Skip to content

setup.py still declares Python 2.7 support #436

Open

Description

@ekalinin

setup.py still declares Python 2.7 and 3.7+ (master, ecb4b74):

    python_requires=(
        ">=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*"
    ),

The classifiers list 2, 2.7, 3.7, 3.8, 3.9, 3.10 and PyPy, and nothing after 3.10.

CI (main.yml, tests.yml) and tox.ini (envlist = py310,py311,py312,py313,py314) only test CPython 3.10-3.14.

Python 2.7 is already broken. Since 1.10.0 (e868dbe, #355), find_system_node() calls shutil.which, which 2.7 doesn't have, so --node=system and --prefer-system fail with AttributeError.

PR #434 changes the README to "Python 3 (CI tests CPython 3.10 through 3.14)". Once it is merged, the README and the package metadata will disagree.

To do:

  • pick the minimum supported version and update python_requires
  • update the classifiers to match it (they stop at 3.10)
  • drop the Python 2 compatibility code in nodeenv.py:
    • the pipes.quote fallback for Python < 3.3
    • the try/except ImportError block with the py2 imports (ConfigParser, urllib2, urlparse, urllib.unquote, httplib) and the iteritems helper; urllib.request is still imported as urllib2
    • is_PY3 and to_utf8(), which returns the text unchanged on Python 3 (7 call sites)
    • the sys.version_info major check in build_node_from_src; PR fix: do not require python2 to build node from source #429 already rewrites it

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions