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

Pin mashumaro version >= 3.13.1 for python 3.12.4 compatibility. #121782

Merged
merged 1 commit into from
Jul 11, 2024

Conversation

allenporter
Copy link
Contributor

@allenporter allenporter commented Jul 11, 2024

Proposed change

Pin mashumaro>=3.13.1 for python 3.12.4 compatibility. I did not reproduce the original issue, however, tested the version of mashumaro against nest.

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

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:

@allenporter allenporter requested a review from a team as a code owner July 11, 2024 14:35
@home-assistant home-assistant bot added cla-signed core small-pr PRs with less than 30 lines. labels Jul 11, 2024
@allenporter allenporter added this to the 2024.7.3 milestone Jul 11, 2024
@allenporter allenporter changed the title Pin mashumaro version >+ 3.13.1 for python 3.12.4 compatibility. Pin mashumaro version >= 3.13.1 for python 3.12.4 compatibility. Jul 11, 2024
@allenporter
Copy link
Contributor Author

I noticed there are 3 integrations now using mashumaro directly in home assistant code:
https://github.com/search?q=repo%3Ahome-assistant%2Fcore%20mashumaro&type=code but are not declaring it as a dependency. However, this is also true for pydantic. Given these are broadly used lower level parsing libraries it seems reasonable to leave without direct pins in the specific integrations.

@allenporter allenporter merged commit ede130a into home-assistant:dev Jul 11, 2024
39 of 40 checks passed
@joostlek
Copy link
Member

@allenporter there are more using it, but they use it via <object>.from_json()

@allenporter
Copy link
Contributor Author

Ok. I assume our stance is we won't be declaring this directly in integrations anywhere, similar to pydantic, for any of these cases: used directly where symbols are imported, directly in home assistant code using from_json on an object declared in a lib but not directly imported, or indirectly where from_jsom happens only in a library.

@frenck
Copy link
Member

frenck commented Jul 12, 2024

I noticed there are 3 integrations now using mashumaro directly in home assistant code: github.com/search?q=repo:home-assistant/core%20mashumaro&type=code but are not declaring it as a dependency. However, this is also true for pydantic. Given these are broadly used lower level parsing libraries it seems reasonable to leave without direct pins in the specific integrations.

Hmz that seems odd and unneeded. These should indeed either fix their dependencies or adjust otherwise.

We should not indirectly assume/depend on those while using it directly in our codebase.

../Frenck

@allenporter
Copy link
Contributor Author

OK i'll go ahead and add explicit pins for mashumaro and pydantic uses in the code base.

@frenck
Copy link
Member

frenck commented Jul 12, 2024

OK i'll go ahead and add explicit pins for mashumaro and pydantic uses in the code base.

I honestly think it is better to remove the direct dependency of it in our codebase.

@allenporter
Copy link
Contributor Author

Makes sense -- would be similar to the approach taken in #103482 which I forgot about.

adriencog pushed a commit to adriencog/homeassistant-core that referenced this pull request Jul 13, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Jul 13, 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.

Nest Integration failing
4 participants