Skip to content

Not generated code: clean up python 2.7 support artefacts#2570

Merged
k8s-ci-robot merged 2 commits into
kubernetes-client:masterfrom
penguinolog:clean-up_kubernetes_base
May 20, 2026
Merged

Not generated code: clean up python 2.7 support artefacts#2570
k8s-ci-robot merged 2 commits into
kubernetes-client:masterfrom
penguinolog:clean-up_kubernetes_base

Conversation

@penguinolog
Copy link
Copy Markdown
Contributor

  • drop six dependency
  • do not subclass object
  • drop from __future__ import print_function
  • drop # -*- coding: utf-8 -*- comments

What type of PR is this?

/kind cleanup

What this PR does / why we need it:

Python 2.7 reached EOL > 6 years ago, cleaning-up will simplify maintenance and eventually reduce dependency tree.

Which issue(s) this PR fixes:

#2535

Special notes for your reviewer:

Does this PR introduce a user-facing change?

No user-facing changes

Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:

@k8s-ci-robot k8s-ci-robot added kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. labels May 11, 2026
@k8s-ci-robot
Copy link
Copy Markdown
Contributor

Welcome @penguinolog!

It looks like this is your first PR to kubernetes-client/python 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes-client/python has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. 😃

@penguinolog penguinolog changed the title Not generated code: clean up python 3.7 support artefacts Not generated code: clean up python 2.7 support artefacts May 11, 2026
@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels May 11, 2026
@k8s-ci-robot k8s-ci-robot requested review from fabianvf and roycaihw May 11, 2026 12:35
@penguinolog penguinolog force-pushed the clean-up_kubernetes_base branch 3 times, most recently from 633b59f to 1ee5c80 Compare May 11, 2026 12:47
@k8s-ci-robot k8s-ci-robot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels May 11, 2026
@penguinolog
Copy link
Copy Markdown
Contributor Author

I feel "autopep8" part is not really critical (100% generated change). Should I create "related" PR instead?

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 13, 2026
@yliaog
Copy link
Copy Markdown
Contributor

yliaog commented May 15, 2026

@penguinolog could you please rebase the PR?

@penguinolog penguinolog force-pushed the clean-up_kubernetes_base branch from 1ee5c80 to 77bd6b3 Compare May 15, 2026 16:28
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 15, 2026
@penguinolog
Copy link
Copy Markdown
Contributor Author

Rebased

* drop `six` dependency
* do not subclass `object`
* drop `from __future__ import print_function`
* drop `# -*- coding: utf-8 -*-` comments
@penguinolog penguinolog force-pushed the clean-up_kubernetes_base branch from 77bd6b3 to 36fbfea Compare May 15, 2026 16:45
@penguinolog penguinolog force-pushed the clean-up_kubernetes_base branch from ad8a275 to ae86fe9 Compare May 15, 2026 16:56
@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels May 15, 2026
@penguinolog
Copy link
Copy Markdown
Contributor Author

Removed autopep8 commit from PR: autopep8 is breaking code, need to open dedicated PR ONLY formatting code (and preferably using something newer like black or ruff)

@yliaog
Copy link
Copy Markdown
Contributor

yliaog commented May 15, 2026

/lgtm

thanks for the PR. let's merge it after the 1.36 release.

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 15, 2026
@yliaog
Copy link
Copy Markdown
Contributor

yliaog commented May 20, 2026

/approve

@k8s-ci-robot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: penguinolog, yliaog

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 20, 2026
@yliaog
Copy link
Copy Markdown
Contributor

yliaog commented May 20, 2026

/release-note-none

@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. and removed do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. labels May 20, 2026
@k8s-ci-robot k8s-ci-robot merged commit 7a26302 into kubernetes-client:master May 20, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note-none Denotes a PR that doesn't merit a release note. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants