python: [RFC] Major breaking changes in the upcoming release
Hi Kubernetes Python client developers, this is a request for comment issue. Please leave comments if you have any opinion/suggestion. Thanks!
What happened: A majority of the code base is generated code. This repo is switching from using swagger-codegen to using openapi-generator. For more backgrounds:
Major breaking changes were detected when we released 11.0.0a1 with openapi-generator:
The breaking changes are:
- [Major]
kubernetes.client.apispackage is renamed tokubernetes.client.api - [Major]
kubernetespackage code now uses absolute import instead of relative import - [Minor] The
swagger_typesattribute in all models is renamed toopenapi_types
the major breaking changes come from https://github.com/swagger-api/swagger-codegen/pull/6839#discussion_r148603571, which is also in latest swagger-codegen. This repo didn’t have these changes because we were depending on a old version of swagger-codegen.
What versions are affected?:
- All
8.0.x,9.0.x,10.0.xversions are not affected 11.0.0a1(corresponding to Kubernetes 1.15) is the only version that’s affected currently- The next release
11.0.0b1and future releases (corresponding to Kubernetes 1.15, 1.16+) will be affected.
Impact and fix:
- All clients that import
kubernetes.client.apismust change the import tokubernetes.client.apiwhen upgrading to 11.0.0b1+, to avoid import error. - Clients that use relative import and patch the
kubernetespackage locally may experience unexpected import error. Clients should installkubernetespackage properly following the instructions in the Readme or the release page.
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 3
- Comments: 17 (10 by maintainers)
Commits related to this issue
- Add kubernetes.client.apis as an alias to kubernetes.client.api Reference: https://github.com/kubernetes-client/python/issues/974 Signed-off-by: Nabarun Pal <pal.nabarun95@gmail.com> — committed to palnabarun/python by palnabarun 4 years ago
- Add kubernetes.client.apis as an alias to kubernetes.client.api Reference: https://github.com/kubernetes-client/python/issues/974 Signed-off-by: Nabarun Pal <pal.nabarun95@gmail.com> — committed to palnabarun/python by palnabarun 4 years ago
- Add kubernetes.client.apis as an alias to kubernetes.client.api Reference: https://github.com/kubernetes-client/python/issues/974 Signed-off-by: Nabarun Pal <pal.nabarun95@gmail.com> — committed to palnabarun/python by palnabarun 4 years ago
- Add kubernetes.client.apis as an alias to kubernetes.client.api Reference: https://github.com/kubernetes-client/python/issues/974 Signed-off-by: Nabarun Pal <pal.nabarun95@gmail.com> — committed to palnabarun/python by palnabarun 4 years ago
- Add kubernetes.client.apis as an alias to kubernetes.client.api Reference: https://github.com/kubernetes-client/python/issues/974 Signed-off-by: Nabarun Pal <pal.nabarun95@gmail.com> — committed to palnabarun/python by palnabarun 4 years ago
- Add kubernetes.client.apis as an alias to kubernetes.client.api Reference: https://github.com/kubernetes-client/python/issues/974 Signed-off-by: Nabarun Pal <pal.nabarun95@gmail.com> — committed to palnabarun/python by palnabarun 4 years ago
- Add kubernetes.client.apis as an alias to kubernetes.client.api Reference: https://github.com/kubernetes-client/python/issues/974 Signed-off-by: Nabarun Pal <pal.nabarun95@gmail.com> — committed to palnabarun/python by palnabarun 4 years ago
- Add kubernetes.client.apis as an alias to kubernetes.client.api Reference: https://github.com/kubernetes-client/python/issues/974 Signed-off-by: Nabarun Pal <pal.nabarun95@gmail.com> — committed to palnabarun/python by palnabarun 4 years ago
- Add kubernetes.client.apis as an alias to kubernetes.client.api Reference: https://github.com/kubernetes-client/python/issues/974 Signed-off-by: Nabarun Pal <pal.nabarun95@gmail.com> — committed to palnabarun/python by palnabarun 4 years ago
- Add kubernetes.client.apis as an alias to kubernetes.client.api Reference: https://github.com/kubernetes-client/python/issues/974 Signed-off-by: Nabarun Pal <pal.nabarun95@gmail.com> — committed to palnabarun/python by palnabarun 4 years ago
- Add kubernetes.client.apis as an alias to kubernetes.client.api Reference: https://github.com/kubernetes-client/python/issues/974 Signed-off-by: Nabarun Pal <pal.nabarun95@gmail.com> — committed to palnabarun/python by palnabarun 4 years ago
- Add kubernetes.client.apis as an alias to kubernetes.client.api Reference: https://github.com/kubernetes-client/python/issues/974 Signed-off-by: Nabarun Pal <pal.nabarun95@gmail.com> — committed to palnabarun/python by palnabarun 4 years ago
- Add kubernetes.client.apis as an alias to kubernetes.client.api Reference: https://github.com/kubernetes-client/python/issues/974 Signed-off-by: Nabarun Pal <pal.nabarun95@gmail.com> — committed to palnabarun/python by palnabarun 4 years ago
- Add kubernetes.client.apis as an alias to kubernetes.client.api Reference: https://github.com/kubernetes-client/python/issues/974 Signed-off-by: Nabarun Pal <pal.nabarun95@gmail.com> — committed to palnabarun/python by palnabarun 4 years ago
- Add kubernetes.client.apis as an alias to kubernetes.client.api Reference: https://github.com/kubernetes-client/python/issues/974 Signed-off-by: Nabarun Pal <pal.nabarun95@gmail.com> — committed to palnabarun/python by palnabarun 4 years ago
- Add kubernetes.client.apis as an alias to kubernetes.client.api Reference: https://github.com/kubernetes-client/python/issues/974 Signed-off-by: Nabarun Pal <pal.nabarun95@gmail.com> — committed to roycaihw/client-python by palnabarun 4 years ago
- Add kubernetes.client.apis as an alias to kubernetes.client.api Reference: https://github.com/kubernetes-client/python/issues/974 Signed-off-by: Nabarun Pal <pal.nabarun95@gmail.com> — committed to roycaihw/client-python by palnabarun 4 years ago
@roycaihw my 2 cents (appologies for being so scrooge, it’s late here): I consider this “impolite” to remove existing functionality without warnings. Maybe we can add an empty package called
apiwhich only imports everything fromapis. However, when one uses stuff fromapiwe can issue a deprecation warning. This package can stay along for 2 versions giving people enough time to update their code.I’m willing to work a PR for this. If someone else feels the urgency to do this before me here is a reference: https://www.lesinskis.com/python_deprecation_tutorial.html
@palnabarun Nabarun is working on the 11.0.0 release and I think a PR will be created in the next two weeks.
Hi, Any news regarding 1.16 support? Or the the estimated release time?
/remove-lifecycle stale