-
-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
Remove support for Python 2.7, 3.6 and Pypy3.6 #6091
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is so exciting! Here's a handful of comments/questions:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few other bits to clean up:
tox.ini
: add 310
, remove 27
and 36
Several files: clean up use_chardet_on_py3
requests/utils.py
: replacer = os.rename if sys.version_info[0] == 2 else os.replace
tests/testserver/server.py
:
# NB: when Python 2.7 is no longer supported, the argument
# can be removed to use a default backlog size
sock.listen(5)
Formally removing any remaining vestiges of Python 2 from Requests. We'll also leave behind Python 3.6 while we're at it.
Thanks @hugovk, those are all great call outs! I addressed the rest of @sethmlarson's comments too and added a hard failure in the setup.py for anyone installing on |
Co-authored-by: Pradyun Gedam <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
psf/requests#6091 drops py3.6 support, so the feedstock should require python 3.7 or newer
This PR is a proposal to officially remove support for Python 2.7 as discussed in #6023. The next minor release (Requests 2.28.0) will no longer provide support for any of the end of life Python runtimes. Users are encouraged to upgrade to Python 3.8 or later. If you're unable to do so, we'd recommend pinning to
requests<2.28
.This will be the first of a few PRs that will be doing some general code clean up now that we're moving to a Python 3-only code base. I'll post the others as drafts shortly.