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

Bump pydantic constraint #116401

Merged
merged 5 commits into from Apr 30, 2024
Merged

Conversation

AngellusMortis
Copy link
Contributor

Proposed change

Bump pydantic to 1.10.15 which adds the v1 interface so try/except blocks are not needed to support v1 and v2 at the same time.

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
  • 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.
  • Untested files have been added to .coveragerc.

To help with the load of incoming pull requests:

@AngellusMortis AngellusMortis requested a review from a team as a code owner April 29, 2024 15:16
@home-assistant home-assistant bot added cla-signed core dependency small-pr PRs with less than 30 lines. labels Apr 29, 2024
@joostlek
Copy link
Member

Reminder for myself: we need to check if Pydantic 1.10.15 is available as wheel on piwheels. Otherwise we have a lot of people with broken instances

@AngellusMortis
Copy link
Contributor Author

Reminder for myself: we need to check if Pydantic 1.10.15 is available as wheel on piwheels. Otherwise we have a lot of people with broken instances

Shows up the same as 1.10.12 did.
image

@bdraco
Copy link
Member

bdraco commented Apr 29, 2024

I think we had bad builds of v1 because it needed an old version of cython. Need to verify that we build with old cython before we can bump this

@bdraco
Copy link
Member

bdraco commented Apr 29, 2024

Probably ok

- name: Create requirements for cython<3

Need to do a manual wheel build

@bdraco
Copy link
Member

bdraco commented Apr 29, 2024

@bdraco
Copy link
Member

bdraco commented Apr 29, 2024

Looks like we ended up with a non-binary build

https://wheels.home-assistant.io/musllinux/

@bdraco
Copy link
Member

bdraco commented Apr 29, 2024

@bdraco
Copy link
Member

bdraco commented Apr 29, 2024

We still end up with non-binary builds.

I'm not sure what has changed with pydantic

@bdraco
Copy link
Member

bdraco commented Apr 29, 2024

I wonder if we need to set some env to force binary build

@AngellusMortis
Copy link
Contributor Author

AngellusMortis commented Apr 29, 2024

Looks like it expects you to use the Makefile to build cython maybe?

https://github.com/pydantic/pydantic/blob/v1.10.15/setup.py#L75-L94

@bdraco
Copy link
Member

bdraco commented Apr 29, 2024

Looks like it should just work but it doesn't seem to.

@bdraco
Copy link
Member

bdraco commented Apr 29, 2024

Looks like it didn't actually try again because it sees the non binary wheel is already built.

So we need to get that manually removed before we can reattempt

@AngellusMortis
Copy link
Contributor Author

Can we get this PR merged now and then try to get the cython wheel fixed later? I think this PR needs to be merged so the base virtual env can be re-built for CI to start using the new version.

@bdraco
Copy link
Member

bdraco commented Apr 29, 2024

If we merge this we will end up shipping non-binary pydantic

@bdraco
Copy link
Member

bdraco commented Apr 29, 2024

So it looks what happened is that since its not in skip-binary it pulled the none wheel from pypi and didn't try to build it since pydantic ships a none wheel.

https://pypi.org/project/pydantic/1.10.15/#files

@AngellusMortis
Copy link
Contributor Author

AngellusMortis commented Apr 29, 2024

.5 is not out yet though, so there is still plenty of time to resolve the cython wheel issue before the .6 beta. This PR seems to block any further development since it seems the default branch needs the update to rebuild the base virtual env for CI.

bdraco added a commit that referenced this pull request Apr 29, 2024
When pydantic does a new release they include a none wheel
so we do not try to build binary wheels which means we will
ship slow versions to users the next time we bump

related pr #116401

We need to delete the pydantic-1.10.15-py3-none-any.whl wheel
from wheels.home-assistant.io after this PR merges so the next
build will be binary
@bdraco bdraco mentioned this pull request Apr 29, 2024
20 tasks
@bdraco
Copy link
Member

bdraco commented Apr 29, 2024

#116406

@bdraco
Copy link
Member

bdraco commented Apr 30, 2024

We need to get the non-binary wheel deleted off of wheels. That isn't something I have access to do though

@bdraco
Copy link
Member

bdraco commented Apr 30, 2024

@bdraco
Copy link
Member

bdraco commented Apr 30, 2024

@bdraco
Copy link
Member

bdraco commented Apr 30, 2024

Reminder for myself: we need to check if Pydantic 1.10.15 is available as wheel on piwheels. Otherwise we have a lot of people with broken instances

Shows up the same as 1.10.12 did. image

piwheels blocks building old pydantic 1.x versions because they don't have a way to build with cython 0.29.x and building 1.x with cython 3.x produces broken builds

@bdraco
Copy link
Member

bdraco commented Apr 30, 2024

@bdraco
Copy link
Member

bdraco commented Apr 30, 2024

@bdraco bdraco merged commit c7a84b1 into home-assistant:dev Apr 30, 2024
44 of 45 checks passed
@bdraco bdraco deleted the bump-pydantic branch April 30, 2024 18:14
@github-actions github-actions bot locked and limited conversation to collaborators May 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants