Skip to content

Drop Python 2 support #1413

Closed
kubernetes-client/python-base
#238

Description

@roycaihw

As documented in https://github.com/kubernetes-client/python/blob/master/CHANGELOG.md#v1700-snapshot. We should drop support for Python 2 from the next release (v18.0.0). This includes:

  • drop Python 2 from master branch
  • make sure all the tests use Python 3
  • drop Python 2 from v18 beta release.

Activity

  1. added
    kind/featureCategorizes issue or PR as related to a new feature.
    on Apr 12, 2021
  2. roycaihw commented on May 4, 2021

    @roycaihw
    MemberAuthor

    This can be started after we cut a v17 GA release. We've released v17 beta this Monday. Given k8s v17 is pretty old, we will give v17 beta one week of soak time. The ETA for v17 GA is next Monday 05-10.

    To drop Python 2, most importantly we need to remove

    python/setup.py

    Lines 75 to 76 in b13b350

    "Programming Language :: Python :: 2",
    "Programming Language :: Python :: 2.7",

    which controls the Python version the package runs in.

    Additionally, we should remove any places that use Python 2 in this repo, especially the tests:
    https://github.com/kubernetes-client/python/blob/master/.travis.yml
    https://github.com/kubernetes-client/python/blob/master/.github/workflows/test.yaml

  3. roycaihw commented on May 4, 2021

    @roycaihw
    MemberAuthor

    This needs to happen after the v17 GA release because otherwise it will cause trouble pulling master into release-17.0, and accidentally drop Python 2 for v17.

  4. Priyankasaggu11929 commented on May 5, 2021

    @Priyankasaggu11929
    Contributor

    /assign

  5. roycaihw commented on May 7, 2021

    @roycaihw
    MemberAuthor

    the same needs to be done for python-base

  6. Priyankasaggu11929 commented on May 7, 2021

    @Priyankasaggu11929
    Contributor

    I’ll do the same for Python-base as well. Thank you for pointing.

  7. roycaihw commented on May 11, 2021

    @roycaihw
    MemberAuthor

    I just realized that some of our tests (e.g. codestyle) only exist in Python 2.

    We need to make sure we have the same test in Python 3. @Priyankasaggu11929 would you mind taking a look at adding a Python 3 codestyle test? This doesn't have to be blocked by the v17 GA release.

    Sorry this is more complex than I thought. Let me know if you have any questions.

  8. Priyankasaggu11929 commented on May 11, 2021

    @Priyankasaggu11929
    Contributor

    Yes, I will have a look at this & try adding the required tests in python3.

    Just to be sure v17 GA release is happening this week itself, right?

    And when you say this change doesn't have to be blocked by the GA release, that means we can go with v17 GA release without these changes for now?

  9. roycaihw commented on May 11, 2021

    @roycaihw
    MemberAuthor

    Just to be sure v17 GA release is happening this week itself, right?

    Yes, Scott and I are on it now :) #1458, #1460

    this change doesn't have to be blocked by the GA release

    I mean you can start adding the test to Python 3 and don't have to wait for the v17 GA release. Adding additional Python 3 tests can happen before/after the v17 GA release, since we don't mind having extra tests in the release. Dropping Python 2 needs to wait for the v17 GA release, because we promised to keep Python 2 around in the lifetime of v17.

  10. Priyankasaggu11929 commented on May 11, 2021

    @Priyankasaggu11929
    Contributor

    Understood now. Thank you for the clarification. :)

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

Metadata

Metadata

Labels

kind/featureCategorizes issue or PR as related to a new feature.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions