Skip to content

v21.2 does not run on Python 3.6.0 & Python 3.6.1 #10211

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
1 task done
plannigan opened this issue Jul 26, 2021 · 2 comments · Fixed by #10213
Closed
1 task done

v21.2 does not run on Python 3.6.0 & Python 3.6.1 #10211

plannigan opened this issue Jul 26, 2021 · 2 comments · Fixed by #10213
Labels
type: bug A confirmed bug or unintended behavior
Milestone

Comments

@plannigan
Copy link

Description

v21.2 updated the version of tenacity which includes an explicit dependency on typing.NoReturn (which was added in 3.6.2). Based on this issue, tenacity isn't planning making the library compatible with older patch versions of Python 3.6.

This type of issue has occurred previously.

Expected behavior

pip should work on all patch versions of Python 3.6.

pip version

21.2.1

Python version

3.6.0

OS

CentOS 7.6

How to Reproduce

  1. Use Python 3.6.0.
  2. Install pip 21.2.1
  3. Attempt to install a package.

Output

pip3 install -r requirements.lock
Traceback (most recent call last):
  File "/foobar/home/jenkins/venvs/default/bin/pip3", line 7, in <module>
    from pip._internal.cli.main import main
  File "/foobar/home/jenkins/venvs/default/lib64/python3.6/site-packages/pip/_internal/cli/main.py", line 9, in <module>
    from pip._internal.cli.autocompletion import autocomplete
  File "/foobar/home/jenkins/venvs/default/lib64/python3.6/site-packages/pip/_internal/cli/autocompletion.py", line 10, in <module>
    from pip._internal.cli.main_parser import create_main_parser
  File "/foobar/home/jenkins/venvs/default/lib64/python3.6/site-packages/pip/_internal/cli/main_parser.py", line 8, in <module>
    from pip._internal.cli import cmdoptions
  File "/foobar/home/jenkins/venvs/default/lib64/python3.6/site-packages/pip/_internal/cli/cmdoptions.py", line 23, in <module>
    from pip._internal.cli.parser import ConfigOptionParser
  File "/foobar/home/jenkins/venvs/default/lib64/python3.6/site-packages/pip/_internal/cli/parser.py", line 12, in <module>
    from pip._internal.configuration import Configuration, ConfigurationError
  File "/foobar/home/jenkins/venvs/default/lib64/python3.6/site-packages/pip/_internal/configuration.py", line 27, in <module>
    from pip._internal.utils.misc import ensure_dir, enum
  File "/foobar/home/jenkins/venvs/default/lib64/python3.6/site-packages/pip/_internal/utils/misc.py", line 38, in <module>
    from pip._vendor.tenacity import retry, stop_after_delay, wait_fixed
  File "/foobar/home/jenkins/venvs/default/lib64/python3.6/site-packages/pip/_vendor/tenacity/__init__.py", line 186, in <module>
    class RetryError(Exception):
  File "/foobar/home/jenkins/venvs/default/lib64/python3.6/site-packages/pip/_vendor/tenacity/__init__.py", line 193, in RetryError
    def reraise(self) -> t.NoReturn:
AttributeError: module 'typing' has no attribute 'NoReturn'

Code of Conduct

@plannigan plannigan added S: needs triage Issues/PRs that need to be triaged type: bug A confirmed bug or unintended behavior labels Jul 26, 2021
@domdfcoding
Copy link
Contributor

domdfcoding commented Jul 26, 2021

While I don't doubt that pip should work on Python 3.6.0, that patch version is rather old and is missing out on many bug and security fixes (see https://docs.python.org/3.6/whatsnew/changelog.html).
Are you able to upgrade to a newer version of Python, either in the 3.6 series or, preferably, to Python 3.9?


I tried a CentOS 7.6 docker image, but yum will only give me Python 3.6.8

@pfmoore
Copy link
Member

pfmoore commented Jul 26, 2021

From the pip manual:

pip is tested to work on the latest patch version of the Python interpreter, for each of the minor versions listed above. Previous patch versions are supported on a best effort approach.

In this case, the typing module in Python 3.6 was provisional, so breaking changes were possible in patch releases of Python. I'm not personally inclined to worry about breaking older versions of Python 3.6 for this (I'd strongly recommend people upgrade to the latest patch level regardless), but as @domdfcoding has already supplied a patch (thanks!) I've approved it as it's a minor fix which helps our users on older Python 3.6 versions.

@uranusjr uranusjr added this to the 21.2.2 milestone Jul 26, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 25, 2021
@pradyunsg pradyunsg removed the S: needs triage Issues/PRs that need to be triaged label Mar 17, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: bug A confirmed bug or unintended behavior
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants