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

Add python 3.11 to the CI #88038

Merged
merged 57 commits into from
Feb 16, 2023
Merged

Add python 3.11 to the CI #88038

merged 57 commits into from
Feb 16, 2023

Conversation

bdraco
Copy link
Member

@bdraco bdraco commented Feb 13, 2023

Proposed change

Add python 3.11 to the CI
Previous PR #74650

Breaking enum changes

some breaking changes to Enum https://blog.pecar.me/python-enum

cchardet has a fork now: https://pypi.org/project/faust-cchardet/

Remaining known issues (this list will probably grow)

InterruptibleThreadPoolExecutor needs to be updated for py3.11

  • investigate - this was a small timing issue, its behaving as expected

Issues with pending fixes

Known issues that need to be broken out of here in a separate PR

Integrations using a stub for asyncio.coroutine in tests only (broken in py3.11 but will still run in CI to keep py3.10 support)

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:

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
  • The code has been formatted using Black (black --fast 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.
  • Untested files have been added to .coveragerc.

To help with the load of incoming pull requests:

@home-assistant home-assistant bot added cla-signed small-pr PRs with less than 30 lines. labels Feb 13, 2023
@bdraco bdraco added the help-wanted Wanna help? Jump in! label Feb 14, 2023
.github/workflows/ci.yaml Outdated Show resolved Hide resolved
@bdraco
Copy link
Member Author

bdraco commented Feb 14, 2023

Looks like the custom executor needs to be adapted as well

@Kane610 Kane610 mentioned this pull request Feb 14, 2023
19 tasks
guppy3 is not python3.11 compat
zhuyifei1999/guppy3#41

This service will return if and when guppy3 becomes
python3.11 compat
@bdraco
Copy link
Member Author

bdraco commented Feb 15, 2023

Maybe mock out asyncio.Coro for py3.11 so they still work with 10

@bdraco
Copy link
Member Author

bdraco commented Feb 15, 2023

Still not sure what's going on with the executor since it works locally

@frenck frenck mentioned this pull request Feb 15, 2023
19 tasks
@frenck
Copy link
Member

frenck commented Feb 15, 2023

Not sure what to do about this one

This is, as far as I spotted, used in two places:

As they re-used the namespace in the maintained version, it became both a drop-in replacement and a conflict. If both packages end up in our dependencies, one wins... (without knowing, as they will overwrite each other). So, it is suboptimal.

We can fix it, all, by getting the first one fixed, bumping it on our end, bumping the docker base after that, and lastly banning the old package in our constraints file (all in that order).

@frenck frenck mentioned this pull request Feb 15, 2023
19 tasks
thecode pushed a commit that referenced this pull request Feb 16, 2023
@bdraco bdraco marked this pull request as ready for review February 16, 2023 17:01
@bdraco
Copy link
Member Author

bdraco commented Feb 16, 2023

We can strip out the asyncio test patching at at any point once those integration have their libs updated.

home-assistant/docker#260 will take care of the ccchardet

@balloob balloob merged commit c791572 into dev Feb 16, 2023
@balloob balloob deleted the python3.11 branch February 16, 2023 17:38
AlePerla pushed a commit to AlePerla/homeassistant_core that referenced this pull request Feb 17, 2023
AlePerla pushed a commit to AlePerla/homeassistant_core that referenced this pull request Feb 17, 2023
* Remove profiler.memory service

guppy3 is not python3.11 compat
zhuyifei1999/guppy3#41

This service will return if and when guppy3 becomes
python3.11 compat

* squash

* temp remove

* temp dump tests

* temp dump tests

* drop a few more to get a run

* drop a few more to get a run

* Account for changed python3.11 enum.IntFlag behavior in zha

There may be additional changes needed, but I could only
see what needed to be updated based on the tests

* merge

* restore

* restore

* legacy value

* tweak a bit for the python 3.11 timings

* block cchardet

* conditional

* adjust est

* test

* not yet

* tweak

* give a little leeway for timing

* Fix otbr tests

* Increase database test timeout

It looks like we need a little more time to run
with the addiitonal tests in home-assistant#87019

* Increase database test timeout

It looks like we need a little more time to run
with the addiitonal tests in home-assistant#87019

* Fix aprs tests with python 3.11

* merge fix

* hints

* Update homeassistant/package_constraints.txt

* Update script/gen_requirements_all.py

* Constrain uamqp for Python 3.10 only

* Bump vulcan-api to 2.3.0

see kapi2289/vulcan-api#126
see home-assistant#88038
see home-assistant/docker#260

* add ban

* Bump python-matter-server to 2.1.1

* revert

* Update tests/asyncio_legacy.py

---------

Co-authored-by: Erik <erik@montnemery.com>
Co-authored-by: Franck Nijhof <git@frenck.dev>
Co-authored-by: Marcel van der Veldt <m.vanderveldt@outlook.com>
@github-actions github-actions bot locked and limited conversation to collaborators Feb 18, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cla-signed help-wanted Wanna help? Jump in! small-pr PRs with less than 30 lines.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants