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

Drop Python 2 support #1413

Closed
roycaihw opened this issue Apr 12, 2021 · 9 comments · Fixed by #1468 or kubernetes-client/python-base#238
Closed

Drop Python 2 support #1413

roycaihw opened this issue Apr 12, 2021 · 9 comments · Fixed by #1468 or kubernetes-client/python-base#238
Assignees
Labels
kind/feature Categorizes issue or PR as related to a new feature.

Comments

@roycaihw
Copy link
Member

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.
@roycaihw roycaihw added the kind/feature Categorizes issue or PR as related to a new feature. label Apr 12, 2021
@roycaihw
Copy link
Member Author

roycaihw commented May 4, 2021

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

@roycaihw
Copy link
Member Author

roycaihw commented May 4, 2021

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.

@Priyankasaggu11929
Copy link
Contributor

/assign

@roycaihw
Copy link
Member Author

roycaihw commented May 7, 2021

the same needs to be done for python-base

@Priyankasaggu11929
Copy link
Contributor

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

@roycaihw
Copy link
Member Author

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.

@Priyankasaggu11929
Copy link
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?

@roycaihw
Copy link
Member Author

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.

@Priyankasaggu11929
Copy link
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
Labels
kind/feature Categorizes issue or PR as related to a new feature.
Projects
None yet
2 participants