Skip to content

Prevent types-*/setuptools/wheel runtime requirements in dependencies #145381

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

Merged
merged 1 commit into from
May 21, 2025

Conversation

epenet
Copy link
Contributor

@epenet epenet commented May 21, 2025

Proposed change

Extracted from #145364

Based on suggestions from @cdce8p and @bdraco

Some packages have runtime dependencies on types-* packages which makes upgrading them quite difficult. Furthermore, this could eventually break mypy if the upstream package added type hints but the stubs package is still installed.
There are still some runtime dependencies on setuptools and wheel. Those are build dependencies / pkg_resources from setuptools should be replaced with importlib.resources and importlib.metadata. Ideally we don't allow new dependencies which require them.

2025-05-21T12:00:44.2819033Z Integration azure_devops:
2025-05-21T12:00:44.2819649Z * [WARNING] [REQUIREMENTS] Package setuptools should not be a runtime dependency in incremental
2025-05-21T12:00:44.2820248Z 
2025-05-21T12:00:44.2820369Z Integration cmus:
2025-05-21T12:00:44.2820912Z * [WARNING] [REQUIREMENTS] Package setuptools should not be a runtime dependency in pbr
2025-05-21T12:00:44.2821424Z 
2025-05-21T12:00:44.2821562Z Integration concord232:
2025-05-21T12:00:44.2822407Z * [WARNING] [REQUIREMENTS] Package setuptools should not be a runtime dependency in pbr
2025-05-21T12:00:44.2822911Z 
2025-05-21T12:00:44.2823042Z Integration ecovacs:
2025-05-21T12:00:44.2823644Z * [WARNING] [REQUIREMENTS] Package wheel should not be a runtime dependency in pycountry-convert
2025-05-21T12:00:44.2824632Z 
2025-05-21T12:00:44.2824775Z Integration efergy:
2025-05-21T12:00:44.2825336Z * [WARNING] [REQUIREMENTS] Package types-pytz should not be a runtime dependency in pyefergy
2025-05-21T12:00:44.2825859Z 
2025-05-21T12:00:44.2825979Z Integration fitbit:
2025-05-21T12:00:44.2826506Z * [WARNING] [REQUIREMENTS] Package setuptools should not be a runtime dependency in fitbit
2025-05-21T12:00:44.2827242Z 
2025-05-21T12:00:44.2827369Z Integration guardian:
2025-05-21T12:00:44.2827941Z * [WARNING] [REQUIREMENTS] Package setuptools should not be a runtime dependency in asyncio-dgram
2025-05-21T12:00:44.2828467Z 
2025-05-21T12:00:44.2828589Z Integration habitica:
2025-05-21T12:00:44.2829143Z * [WARNING] [REQUIREMENTS] Package setuptools should not be a runtime dependency in habitipy
2025-05-21T12:00:44.2829655Z 
2025-05-21T12:00:44.2829772Z Integration hive:
2025-05-21T12:00:44.2830319Z * [WARNING] [REQUIREMENTS] Package setuptools should not be a runtime dependency in unasync
2025-05-21T12:00:44.2830833Z 
2025-05-21T12:00:44.2830955Z Integration influxdb:
2025-05-21T12:00:44.2831553Z * [WARNING] [REQUIREMENTS] Package setuptools should not be a runtime dependency in influxdb-client
2025-05-21T12:00:44.2832278Z 
2025-05-21T12:00:44.2832396Z Integration keba:
2025-05-21T12:00:44.2832958Z * [WARNING] [REQUIREMENTS] Package setuptools should not be a runtime dependency in asyncio-dgram
2025-05-21T12:00:44.2833497Z 
2025-05-21T12:00:44.2833619Z Integration lyric:
2025-05-21T12:00:44.2834181Z * [WARNING] [REQUIREMENTS] Package setuptools should not be a runtime dependency in incremental
2025-05-21T12:00:44.2834769Z 
2025-05-21T12:00:44.2834899Z Integration microbees:
2025-05-21T12:00:44.2835471Z * [WARNING] [REQUIREMENTS] Package setuptools should not be a runtime dependency in microbeespy
2025-05-21T12:00:44.2836003Z 
2025-05-21T12:00:44.2836141Z Integration minecraft_server:
2025-05-21T12:00:44.2836770Z * [WARNING] [REQUIREMENTS] Package setuptools should not be a runtime dependency in asyncio-dgram
2025-05-21T12:00:44.2837301Z 
2025-05-21T12:00:44.2837419Z Integration mochad:
2025-05-21T12:00:44.2837932Z * [WARNING] [REQUIREMENTS] Package setuptools should not be a runtime dependency in pbr
2025-05-21T12:00:44.2838413Z 
2025-05-21T12:00:44.2838535Z Integration mystrom:
2025-05-21T12:00:44.2839105Z * [WARNING] [REQUIREMENTS] Package setuptools should not be a runtime dependency in python-mystrom
2025-05-21T12:00:44.2839639Z 
2025-05-21T12:00:44.2839758Z Integration nx584:
2025-05-21T12:00:44.2840266Z * [WARNING] [REQUIREMENTS] Package setuptools should not be a runtime dependency in pbr
2025-05-21T12:00:44.2840739Z 
2025-05-21T12:00:44.2840864Z Integration opnsense:
2025-05-21T12:00:44.2841395Z * [WARNING] [REQUIREMENTS] Package setuptools should not be a runtime dependency in pbr
2025-05-21T12:00:44.2841880Z 
2025-05-21T12:00:44.2842159Z Integration opower:
2025-05-21T12:00:44.2842764Z * [WARNING] [REQUIREMENTS] Package types-python-dateutil should not be a runtime dependency in arrow
2025-05-21T12:00:44.2843326Z 
2025-05-21T12:00:44.2843459Z Integration osoenergy:
2025-05-21T12:00:44.2844017Z * [WARNING] [REQUIREMENTS] Package setuptools should not be a runtime dependency in unasync
2025-05-21T12:00:44.2844518Z 
2025-05-21T12:00:44.2844644Z Integration ovo_energy:
2025-05-21T12:00:44.2845224Z * [WARNING] [REQUIREMENTS] Package setuptools should not be a runtime dependency in incremental
2025-05-21T12:00:44.2845750Z 
2025-05-21T12:00:44.2845896Z Integration remote_rpi_gpio:
2025-05-21T12:00:44.2846505Z * [WARNING] [REQUIREMENTS] Package setuptools should not be a runtime dependency in colorzero
2025-05-21T12:00:44.2847028Z 
2025-05-21T12:00:44.2847167Z Integration system_bridge:
2025-05-21T12:00:44.2847759Z * [WARNING] [REQUIREMENTS] Package setuptools should not be a runtime dependency in incremental
2025-05-21T12:00:44.2848270Z 
2025-05-21T12:00:44.2848392Z Integration zha:
2025-05-21T12:00:44.2848946Z * [WARNING] [REQUIREMENTS] Package setuptools should not be a runtime dependency in colorzero

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New integration (thank you!)
  • New feature (which adds functionality to an existing integration)
  • Deprecation (breaking change to happen in the future)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Additional information

  • This PR fixes or closes issue: fixes #
  • This PR is related to issue:
  • Link to documentation pull request:
  • Link to developer documentation pull request:
  • Link to frontend pull request:

Checklist

  • The code change is tested and works locally.
  • Local tests pass. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.
  • I have followed the development checklist
  • I have followed the perfect PR recommendations
  • The code has been formatted using Ruff (ruff format homeassistant tests)
  • Tests have been added to verify that the new code works.

If user exposed functionality or configuration variables are added/changed:

If the code communicates with devices, web services, or third-party tools:

  • The manifest file has all fields filled out correctly.
    Updated and included derived files by running: python3 -m script.hassfest.
  • New or updated dependencies have been added to requirements_all.txt.
    Updated by running python3 -m script.gen_requirements_all.
  • For the updated dependencies - a link to the changelog, or at minimum a diff between library versions is added to the PR description.

To help with the load of incoming pull requests:

@home-assistant
Copy link

Hey there @dannerph, mind taking a look at this pull request as it has been labeled with an integration (keba) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of keba can trigger bot actions by commenting:

  • @home-assistant close Closes the pull request.
  • @home-assistant rename Awesome new title Renames the pull request.
  • @home-assistant reopen Reopen the pull request.
  • @home-assistant unassign keba Removes the current integration label and assignees on the pull request, add the integration domain after the command.
  • @home-assistant add-label needs-more-information Add a label (needs-more-information, problem in dependency, problem in custom component) to the pull request.
  • @home-assistant remove-label needs-more-information Remove a label (needs-more-information, problem in dependency, problem in custom component) on the pull request.

@home-assistant
Copy link

Hey there @tkdrob, mind taking a look at this pull request as it has been labeled with an integration (efergy) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of efergy can trigger bot actions by commenting:

  • @home-assistant close Closes the pull request.
  • @home-assistant rename Awesome new title Renames the pull request.
  • @home-assistant reopen Reopen the pull request.
  • @home-assistant unassign efergy Removes the current integration label and assignees on the pull request, add the integration domain after the command.
  • @home-assistant add-label needs-more-information Add a label (needs-more-information, problem in dependency, problem in custom component) to the pull request.
  • @home-assistant remove-label needs-more-information Remove a label (needs-more-information, problem in dependency, problem in custom component) on the pull request.

@home-assistant
Copy link

Hey there @bachya, mind taking a look at this pull request as it has been labeled with an integration (guardian) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of guardian can trigger bot actions by commenting:

  • @home-assistant close Closes the pull request.
  • @home-assistant rename Awesome new title Renames the pull request.
  • @home-assistant reopen Reopen the pull request.
  • @home-assistant unassign guardian Removes the current integration label and assignees on the pull request, add the integration domain after the command.
  • @home-assistant add-label needs-more-information Add a label (needs-more-information, problem in dependency, problem in custom component) to the pull request.
  • @home-assistant remove-label needs-more-information Remove a label (needs-more-information, problem in dependency, problem in custom component) on the pull request.

@home-assistant
Copy link

Hey there @timmo001, mind taking a look at this pull request as it has been labeled with an integration (azure_devops) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of azure_devops can trigger bot actions by commenting:

  • @home-assistant close Closes the pull request.
  • @home-assistant rename Awesome new title Renames the pull request.
  • @home-assistant reopen Reopen the pull request.
  • @home-assistant unassign azure_devops Removes the current integration label and assignees on the pull request, add the integration domain after the command.
  • @home-assistant add-label needs-more-information Add a label (needs-more-information, problem in dependency, problem in custom component) to the pull request.
  • @home-assistant remove-label needs-more-information Remove a label (needs-more-information, problem in dependency, problem in custom component) on the pull request.

@home-assistant
Copy link

Hey there @mtreinish, mind taking a look at this pull request as it has been labeled with an integration (opnsense) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of opnsense can trigger bot actions by commenting:

  • @home-assistant close Closes the pull request.
  • @home-assistant rename Awesome new title Renames the pull request.
  • @home-assistant reopen Reopen the pull request.
  • @home-assistant unassign opnsense Removes the current integration label and assignees on the pull request, add the integration domain after the command.
  • @home-assistant add-label needs-more-information Add a label (needs-more-information, problem in dependency, problem in custom component) to the pull request.
  • @home-assistant remove-label needs-more-information Remove a label (needs-more-information, problem in dependency, problem in custom component) on the pull request.

@home-assistant
Copy link

Hey there @osohotwateriot, mind taking a look at this pull request as it has been labeled with an integration (osoenergy) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of osoenergy can trigger bot actions by commenting:

  • @home-assistant close Closes the pull request.
  • @home-assistant rename Awesome new title Renames the pull request.
  • @home-assistant reopen Reopen the pull request.
  • @home-assistant unassign osoenergy Removes the current integration label and assignees on the pull request, add the integration domain after the command.
  • @home-assistant add-label needs-more-information Add a label (needs-more-information, problem in dependency, problem in custom component) to the pull request.
  • @home-assistant remove-label needs-more-information Remove a label (needs-more-information, problem in dependency, problem in custom component) on the pull request.

@home-assistant
Copy link

Hey there @timmo001, mind taking a look at this pull request as it has been labeled with an integration (ovo_energy) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of ovo_energy can trigger bot actions by commenting:

  • @home-assistant close Closes the pull request.
  • @home-assistant rename Awesome new title Renames the pull request.
  • @home-assistant reopen Reopen the pull request.
  • @home-assistant unassign ovo_energy Removes the current integration label and assignees on the pull request, add the integration domain after the command.
  • @home-assistant add-label needs-more-information Add a label (needs-more-information, problem in dependency, problem in custom component) to the pull request.
  • @home-assistant remove-label needs-more-information Remove a label (needs-more-information, problem in dependency, problem in custom component) on the pull request.

@home-assistant
Copy link

Hey there @timmo001, mind taking a look at this pull request as it has been labeled with an integration (system_bridge) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of system_bridge can trigger bot actions by commenting:

  • @home-assistant close Closes the pull request.
  • @home-assistant rename Awesome new title Renames the pull request.
  • @home-assistant reopen Reopen the pull request.
  • @home-assistant unassign system_bridge Removes the current integration label and assignees on the pull request, add the integration domain after the command.
  • @home-assistant add-label needs-more-information Add a label (needs-more-information, problem in dependency, problem in custom component) to the pull request.
  • @home-assistant remove-label needs-more-information Remove a label (needs-more-information, problem in dependency, problem in custom component) on the pull request.

@home-assistant
Copy link

Hey there @fabaff, mind taking a look at this pull request as it has been labeled with an integration (mystrom) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of mystrom can trigger bot actions by commenting:

  • @home-assistant close Closes the pull request.
  • @home-assistant rename Awesome new title Renames the pull request.
  • @home-assistant reopen Reopen the pull request.
  • @home-assistant unassign mystrom Removes the current integration label and assignees on the pull request, add the integration domain after the command.
  • @home-assistant add-label needs-more-information Add a label (needs-more-information, problem in dependency, problem in custom component) to the pull request.
  • @home-assistant remove-label needs-more-information Remove a label (needs-more-information, problem in dependency, problem in custom component) on the pull request.

@home-assistant home-assistant bot assigned edenhaus and puddly and unassigned edenhaus May 21, 2025
@home-assistant
Copy link

Hey there @allenporter, mind taking a look at this pull request as it has been labeled with an integration (fitbit) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of fitbit can trigger bot actions by commenting:

  • @home-assistant close Closes the pull request.
  • @home-assistant rename Awesome new title Renames the pull request.
  • @home-assistant reopen Reopen the pull request.
  • @home-assistant unassign fitbit Removes the current integration label and assignees on the pull request, add the integration domain after the command.
  • @home-assistant add-label needs-more-information Add a label (needs-more-information, problem in dependency, problem in custom component) to the pull request.
  • @home-assistant remove-label needs-more-information Remove a label (needs-more-information, problem in dependency, problem in custom component) on the pull request.

@home-assistant
Copy link

Hey there @timmo001, mind taking a look at this pull request as it has been labeled with an integration (lyric) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of lyric can trigger bot actions by commenting:

  • @home-assistant close Closes the pull request.
  • @home-assistant rename Awesome new title Renames the pull request.
  • @home-assistant reopen Reopen the pull request.
  • @home-assistant unassign lyric Removes the current integration label and assignees on the pull request, add the integration domain after the command.
  • @home-assistant add-label needs-more-information Add a label (needs-more-information, problem in dependency, problem in custom component) to the pull request.
  • @home-assistant remove-label needs-more-information Remove a label (needs-more-information, problem in dependency, problem in custom component) on the pull request.

@home-assistant
Copy link

Hey there @Rendili, @KJonline, mind taking a look at this pull request as it has been labeled with an integration (hive) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of hive can trigger bot actions by commenting:

  • @home-assistant close Closes the pull request.
  • @home-assistant rename Awesome new title Renames the pull request.
  • @home-assistant reopen Reopen the pull request.
  • @home-assistant unassign hive Removes the current integration label and assignees on the pull request, add the integration domain after the command.
  • @home-assistant add-label needs-more-information Add a label (needs-more-information, problem in dependency, problem in custom component) to the pull request.
  • @home-assistant remove-label needs-more-information Remove a label (needs-more-information, problem in dependency, problem in custom component) on the pull request.

@home-assistant
Copy link

Hey there @tronikos, mind taking a look at this pull request as it has been labeled with an integration (opower) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of opower can trigger bot actions by commenting:

  • @home-assistant close Closes the pull request.
  • @home-assistant rename Awesome new title Renames the pull request.
  • @home-assistant reopen Reopen the pull request.
  • @home-assistant unassign opower Removes the current integration label and assignees on the pull request, add the integration domain after the command.
  • @home-assistant add-label needs-more-information Add a label (needs-more-information, problem in dependency, problem in custom component) to the pull request.
  • @home-assistant remove-label needs-more-information Remove a label (needs-more-information, problem in dependency, problem in custom component) on the pull request.

@home-assistant
Copy link

Hey there @mib1185, @edenhaus, @Augar, mind taking a look at this pull request as it has been labeled with an integration (ecovacs) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of ecovacs can trigger bot actions by commenting:

  • @home-assistant close Closes the pull request.
  • @home-assistant rename Awesome new title Renames the pull request.
  • @home-assistant reopen Reopen the pull request.
  • @home-assistant unassign ecovacs Removes the current integration label and assignees on the pull request, add the integration domain after the command.
  • @home-assistant add-label needs-more-information Add a label (needs-more-information, problem in dependency, problem in custom component) to the pull request.
  • @home-assistant remove-label needs-more-information Remove a label (needs-more-information, problem in dependency, problem in custom component) on the pull request.

@home-assistant
Copy link

Hey there @dmulcahey, @Adminiuga, @puddly, @TheJulianJES, mind taking a look at this pull request as it has been labeled with an integration (zha) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of zha can trigger bot actions by commenting:

  • @home-assistant close Closes the pull request.
  • @home-assistant rename Awesome new title Renames the pull request.
  • @home-assistant reopen Reopen the pull request.
  • @home-assistant unassign zha Removes the current integration label and assignees on the pull request, add the integration domain after the command.
  • @home-assistant add-label needs-more-information Add a label (needs-more-information, problem in dependency, problem in custom component) to the pull request.
  • @home-assistant remove-label needs-more-information Remove a label (needs-more-information, problem in dependency, problem in custom component) on the pull request.

@epenet epenet changed the title Prevent setuptools/wheel runtime requirements in dependencies Prevent types-*/setuptools/wheel runtime requirements in dependencies May 21, 2025
@edenhaus edenhaus removed their assignment May 21, 2025
@tr4nt0r
Copy link
Contributor

tr4nt0r commented May 21, 2025

Habitipy dependency will be removed soon with the next library bump

@epenet epenet merged commit f76165e into dev May 21, 2025
48 checks passed
@epenet epenet deleted the epenet-20250521-1349 branch May 21, 2025 14:17
@epenet
Copy link
Contributor Author

epenet commented May 21, 2025

Habitipy dependency will be removed soon with the next library bump

Great!
Please remove from the exception list when you bump the dependency

@github-actions github-actions bot locked and limited conversation to collaborators May 22, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.