Skip to content
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

Requests: Python 2.7 Support and Deprecation #6023

Closed
nateprewitt opened this issue Dec 29, 2021 · 3 comments
Closed

Requests: Python 2.7 Support and Deprecation #6023

nateprewitt opened this issue Dec 29, 2021 · 3 comments

Comments

@nateprewitt
Copy link
Member

Overview

As we enter our third year of Python 2.7 reaching end-of-life, Requests has decided it's time to start deprecating our support. While we have yet to confirm a date, we want to provide early notice that this is coming at some point in 2022. This follows as the majority of our critical downstream consumers have finished their deprecation campaigns. While we understand this may be viewed as an inconvenience for those still using Python 2.7, I'll try to layout the steps we're taking to ensure a smooth transition.

In January, we will be releasing Requests 2.27.0. This is intended to be the last minor release with guaranteed support, including all 2.27.x hotfix releases. We've taken steps to ensure this release series includes fixes for some of the longer standing pain points and provide as much long term stability as we're able. Users who intend to continue Python 2.7 use should review the Mitigation Steps section of this issue.

Going forward, we're still working through what a Python 3-only Requests looks like. We'd like to preface now that it's unlikely to contain many of the more exciting features that may have previously been promised by former maintainers. In future releases, we'll look to add quality-of-life improvements as they make sense while maintaining the primary focus of stability in the library. We'll provide more on that as information is available.

Mitigation Steps

For Requests users that intend to remain on Python 2.7 through 2022, we recommend taking the following mitigation steps.

  1. For users of pip 9.0+, we'll also be releasing an update to the python_requires metadata to >=3.7 in Requests. This will prevent unintended installation on unsupported Python versions.
  2. For users who want to codify this requirement across all environments, ensure that you've explicitly pinned Requests in your workspace or project to requests<2.28. This will prevent unintended interruptions with future releases.
  3. For users of LTS operating systems providing Python 2.7 support through 2023, you'll need to work with their support teams for bug or security issues for any releases after 2.27.
@nateprewitt nateprewitt pinned this issue Dec 29, 2021
@dulmandakh
Copy link

It's good to hear that requests decided to drop Python 2.7. I would propose to release version 3 without much refactoring but mainly dropping Python 2.7 compatibility, so that Python 3 users can benefit from less dependency and less code to run. Then we can do refactors or non-breaking changes in minor releases. Also it's possible to have another major release with more breaking changes. Otherwise it'll take much longer to drop Python 2.7 and do refactoring at the same time.

@nateprewitt
Copy link
Member Author

I wanted to provide a quick update on timelines. We're currently targeting May for the next release barring any unforeseen circumstances. That will be a minor release (2.28.0) with minimal functional changes but will likely be breaking for Python 2.7 users. We'd advise making sure you have appropriate pinning/pip versions supporting python_requires prior to then.

@nateprewitt
Copy link
Member Author

Resolving now that we have 2.28.0 out the door.

@nateprewitt nateprewitt unpinned this issue Jun 9, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 10, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants