Skip to content

Python 2.7 support timeline #5359

Closed

Description

@reaperhulk

We deprecated 2.7 support in our 3.0 release, but we're blocked on very significant performance improvements in our CI (#5246) by continued 2.7 support. This issue is just to discuss and track when we're going to actually drop support. At the moment we continue to see ~20% of our downloads come from Python 2 (I haven't tried to run the numbers on the latest release so that's just a total across all possible versions).

I'd also like to see what our downstream consumers are thinking about regarding 2.7 support in their own projects. /cc @bmw @mattsb42-aws @glyph @bitprophet.

Activity

  1. alex commented on Jul 28, 2020

    @alex
    Member

    Twisted has dropped Python 2, so I assume they're fine with this.

  2. alex commented on Jul 28, 2020

    @alex
    Member

    Another thing that's blocked by this is us starting to use Rust instead of C. pyo3 is Python3 only.

  3. bmw commented on Jul 28, 2020

    @bmw
    Contributor

    I think 6 months is a fairly conservative estimate for how much longer Certbot plans to support Python 2.7. We're in the process of migrating our users and how long it takes depends on how that transition goes.

    If it helps, all we'd really be worried about is making sure our users get any relevant security fixes while we still support Python 2. New cryptography features and releases could be Python 3 only if any security fixes were backported to a version that supports Python 2 that we could use.

  4. reaperhulk commented on Jul 28, 2020

    @reaperhulk
    MemberAuthor

    @bmw we've talked a bit about that and as long as the timeline isn't super long we're probably just going to eat the pain to keep our releases and codebase unified. Supporting to end of 2020 won't kill us 😄

  5. mattsb42-aws commented on Jul 28, 2020

    @mattsb42-aws
    Contributor

    I'll do some digging and get an official answer.

    My personal unofficial answer is that we've historically used pyca as our max support window (mainly because it was the narrowest window of our dependencies at launch), but we do still have a large percentage of our PyPI downloads coming from Python 2. Looking at June 2020, 20% for aws-encryption-sdk, 95% (eek) for aws-encryption-sdk-cli, and 25% for dynamodb-encryption-sdk. That said, we all know that dropping 2 support is a matter of when, not if.

    When pyca does drop 2.7 support, would the idea be to immediately block 2.7 installs or only stop testing/supporting 2.7, like you did with 3.4, and only start blocking installs when known incompatible components (ex: pyo3) are added?

    [1] https://aws.amazon.com/blogs/compute/continued-support-for-python-2-7-on-aws-lambda/

  6. alex commented on Jul 28, 2020

    @alex
    Member

    When we drop Python2, we'll do in the same way we've dropped other Python versions: We'll change our setup.py metadata, we'll stop testing it, we'll stop building wheels for it, and we'll delete all the python2 specific code which will result in the library not working.

  7. reaperhulk commented on Jul 28, 2020

    @reaperhulk
    MemberAuthor

    That means Python 2 will install the last compatible version, but we’re not planning on shipping updated static wheels if/when openssl does security releases. Thus Python 2 users will “work” but become increasingly insecure (absent building it against newer versions themselves) over time.

  8. reaperhulk commented on Jul 29, 2020

    @reaperhulk
    MemberAuthor

    Just cryptography 3.0 downloads bucketed by Python version:
    image
    If you assume both 2.7 and null are Python2 that puts us around 24% right now.

  9. reaperhulk commented on Aug 18, 2020

    @reaperhulk
    MemberAuthor

    Just as a note, we've also deprecated 3.5 support both due to low usage and because, coupled with dropping 2.7, we can finally support inline type hints. Our current timelines put 3.5 being dropped somewhere around December/January, with 2.7 hopefully dropping around the same time (with some potential flex based on downstream needs).

  10. fochoao commented on Aug 23, 2020

    @fochoao
  11. bitprophet commented on Aug 27, 2020

    @bitprophet
    Contributor

    All else equal I'd been thinking I'd cut off 2.7 on my end once downloads get below, I don't know, 10%? 5%?

    But I haven't looked at my stats since before CPython dropped the axe, and given where I'm at these days, I wouldn't feel all that bad if a certain major Paramiko dependency provided timeline pressure giving me more of an excuse to simplify my support window.

    See paramiko/paramiko#1739 - tl;dr I am still at 40% of downloads coming from Python 2.7 or unspecified, over the last 12mo. Reckon once y'all are ready to drop the axe I'd do a shorter scan to get a more up to date figure.

  12. reaperhulk commented on Sep 17, 2020

    @reaperhulk
    MemberAuthor

    Statistics for cryptography 3.1 in the past 30 days:
    image
    19.5% Python 2.7 (assuming null+2.7 like before) and 7% Python 3.5. So we've had ~4% drop from 2.7 in the last 6-7 weeks.

  13. reaperhulk commented on Nov 11, 2020

    @reaperhulk
    MemberAuthor

    Latest numbers here for cryptography 3.2.1 only (which has only been out for 2 weeks): Python 2.7 is 22.9% with another 1.5% unknown. A significant upswing. For now we're still planning on dropping support despite this significant percentage since we can significantly improve our personal quality of life from a maintenance and development perspective, but we'll keep watching this.

  14. WhyNotHugo commented on Nov 11, 2020

    @WhyNotHugo
    Contributor

    I think it's important to remember that dropping Python2 does not leave those users in the dark; they can continue using the latest release that supports Python2 indefinitely.

    When it comes to updates, they're not getting security updates from Python or pretty much any other library anyway either; the lack of support is clear and not something that should burden cryptography developers.

  15. 4 remaining items

  16. potiuk commented on Nov 15, 2020

    @potiuk

    Cool. Glad it's taken care of. Thanks @reaperhulk for the info! Does not change my feelings towards Python 2 after today's debugging.

    BTW. I do recommend yanking for both 3.2, 3.2.1 in PyPI once 3.3 is out -> it works exactly as you'd expect and we've only recently learned about it: https://pypi.org/help/#yanked

  17. potiuk commented on Nov 15, 2020

    @potiuk

    FYI. We've workarounded it for now with apache/airflow@bbf122b

  18. alex commented on Dec 1, 2020

    @alex
    Member

    👋 @bmw @mattsb42-aws @bitprophet I just wanted to flag that we're probably a few weeks out from our 3.3 release, which will be the last cryptography release to support Python 2 (a 3.4 release which is python3 only come at some undetermined point). If this is going to be a problem for y'all, please flag now.

  19. bitprophet commented on Dec 4, 2020

    @bitprophet
    Contributor

    I'm committed to dropping 2 on my end sometime in 2021. Could be sooner, could be later.

    Assuming your 3.4 release has the right metadata prompting pip on Python 2 to disregard it, I don't think I need to bother pinning to 3.3 on my end, yea? (Unless a user is on a Very Old Pip in which case I have a harder time caring.)

  20. alex commented on Dec 4, 2020

    @alex
    Member
  21. added this to the Thirty Fourth Release milestone on Dec 5, 2020
  22. alex commented on Dec 9, 2020

    @alex
    Member

    We just did our 3.3 release. We'll start landing PRs which remove our 2.7 support shortly.

    Thanks to everyone who contributed to this conversation, see y'all on py3k in 2021!

  23. locked as resolved and limited conversation to collaborators on Mar 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions