Skip to content

Move async client dependencies into extras - #2766

Open
jdork0 wants to merge 1 commit into
kubernetes-client:masterfrom
nokia:async_extra
Open

jdork0 wants to merge 1 commit into
kubernetes-client:masterfrom
nokia:async_extra

Conversation

@jdork0

@jdork0 jdork0 commented Oct 29, 2026

Copy link
Copy Markdown

What type of PR is this?

/kind feature

What this PR does / why we need it:

Prior to version 36.0.0, the async client was a seperate pypi package. With version 36.0.0 including the async client in the main package, this increased the vulnerability/install footprint for users who don't require the asyncio client + dependencies.

This change makes asyncio dependencies an extra that will not be installed by default. These dependencies are now only installed by specifying the asyncio extra - pip install kubernetes[asyncio].

Which issue(s) this PR fixes:

Fixes #2739

Special notes for your reviewer:

Tested pip install kubernetes.whl and kubernetes.whl[asyncio] and compared pip freeze list post install.

$ diff -y base-freeze.txt asyncio-freeze.txt
                                                              > aiohappyeyeballs==2.7.1
                                                              > aiohttp==3.14.5
                                                              > aiohttp-retry==2.9.1
                                                              > aiosignal==1.4.0
annotated-types==0.8.0                                          annotated-types==0.8.0
                                                              > attrs==26.1.0
certifi==2026.10.23                                             certifi==2026.10.23
charset-normalizer==3.5.2                                       charset-normalizer==3.5.2
durationpy==0.11                                                durationpy==0.11
                                                              > frozenlist==1.8.0
idna==3.20                                                      idna==3.20
kubernetes @ file:///home/jasonk/ws/nokia/kubernetes-client-p   kubernetes @ file:///home/jasonk/ws/nokia/kubernetes-client-p
                                                              > multidict==7.2.1
oauthlib==4.0.0                                                 oauthlib==4.0.0
                                                              > propcache==0.5.4
pydantic==2.14.2                                                pydantic==2.14.2
pydantic_core==2.50.2                                           pydantic_core==2.50.2
python-dateutil==3.0.0                                          python-dateutil==3.0.0
PyYAML==6.0.3                                                   PyYAML==6.0.3
requests==2.34.2                                                requests==2.34.2
requests-oauthlib==2.0.0                                        requests-oauthlib==2.0.0
six==1.17.0                                                     six==1.17.0
typing-inspection==0.4.4                                        typing-inspection==0.4.4
typing_extensions==4.16.0                                       typing_extensions==4.16.0
tzdata==2026.6                                                  tzdata==2026.6
urllib3==2.8.0                                                  urllib3==2.8.0
websocket-client==1.9.2                                         websocket-client==1.9.2
                                                              > yarl==1.25.1

Does this PR introduce a user-facing change?

Yes, users who install from pypi and need async client will need to pip install kubernetes[asyncio] to have all the dependencies installed.

Breaking change: the asyncio client's dependencies, such as `aiohttp` and `aiohttp-retry`, are no longer installed by `pip install kubernetes`. Applications that use `kubernetes.aio` must install with `pip install kubernetes[asyncio]`.

/kind feature

Prior to version 36.0.0, the async client was a seperate pypi package.
With version 36.0.0 including the async client in the main package, this
increased the vulnerability/install footprint for users who don't
require the asyncio client by now having to install several new
dependency packages.

This change makes asyncio dependencies an extra that will not be install
by default. These dependencies are now only installed by specifying the
asyncio extra - `pip install kubernetes[asyncio]`.

Fixes kubernetes-client#2739

Yes, users who install from pypi and need asyncio will need to `pip
install kubernetes[asyncio]` to have all the dependencies installed.

```release-note
Breaking change: the asyncio client's dependencies, such as `aiohttp`
and `aiohttp-retry`, are no longer install by `pip install kubernetes`.
Applications that user `kubernetes.aio` must install with `pip install
kubernetes[asyncio]`.
```

Proposals), usage docs, etc.:

Signed-off-by: Jason Kelly <jason.kelly@nokia.com>
@kubernetes-prow kubernetes-prow Bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. kind/feature Categorizes issue or PR as related to a new feature. labels Oct 29, 2026
@linux-foundation-easycla

linux-foundation-easycla Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

CLA Signed
The committers listed above are authorized under a signed CLA.

  • ✅ login: jdork0 / name: Jason Kelly (51f73bc)

@kubernetes-prow

Copy link
Copy Markdown
Contributor

Welcome @jdork0!

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. 😃

@kubernetes-prow kubernetes-prow Bot added cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Oct 29, 2026
@kubernetes-prow
kubernetes-prow Bot requested review from roycaihw and yliaog October 29, 2026 19:38
@kubernetes-prow

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: jdork0
Once this PR has been reviewed and has the lgtm label, please assign roycaihw for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found 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

@kubernetes-prow kubernetes-prow Bot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. and removed cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. labels Oct 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/feature Categorizes issue or PR as related to a new feature. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make async an extra

1 participant