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

Prepare for Pydantic v2 migration #232

Merged
merged 3 commits into from Feb 17, 2024
Merged

Conversation

Orhideous
Copy link
Collaborator

Copy link

@joostlek joostlek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of moving and removing all kinds of tests, you could add a second test step where you install the v1 version (since via the poetry.lock file it will probably install v2 for the normal test) and then test? That would validate both usages imo.

poetry.lock Show resolved Hide resolved
@Orhideous Orhideous force-pushed the fix/pydantic branch 3 times, most recently from 17ddb93 to 3c65715 Compare February 17, 2024 19:36
Copy link

@joostlek joostlek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So now my big question is, why do we need to move all the tests in this PR?

But I am no maintainer, just something that I am remarking

@Orhideous
Copy link
Collaborator Author

Orhideous commented Feb 17, 2024

@joostlek The thing is I actually added a unit-test for this, but messed with naming, so it wasn't even detected. If you prefer, I can split PR :)

@joostlek
Copy link

I personally think, this PR should just contain the changes for this change, and nothing more. (But again, I'm not a maintainer so I don't do the calls here :) )

@Orhideous
Copy link
Collaborator Author

You're right. I have moved irrelevant changesets to a separate branch — there is actually much more work to do with tests.

@pschmitt
Copy link
Owner

I don't see the benefit in testing against pydantic v1 in roombapy, this is temporary at best.

Home Assistant is stuck on v1 for now but that does not warrant roombapy running the tests on v1 as well imo, I'm fine with just yoloing the tests on v2 and live with the deprecation warnings for now.

As a the sole maintainer (hehe, plz send help) I'd rather just see the pyproject.toml changes and pydantic v1 compat usage changes in this PR.

@Orhideous
Copy link
Collaborator Author

@pschmitt

I would like to help maintain this integration, just to keep the home herd of Roomba rolling.

As for testing... I can keep an eye on home-assistant/core#99218, so when HA migrates from Pydantic v1, I just drop these workarounds and tests.

@pschmitt
Copy link
Owner

@Orhideous you asked for it :)

image

@Orhideous Orhideous merged commit 42aa885 into pschmitt:main Feb 17, 2024
8 checks passed
@Orhideous Orhideous deleted the fix/pydantic branch February 17, 2024 20:40
@pschmitt
Copy link
Owner

Thanks ❤️

@pschmitt
Copy link
Owner

Imma craft a release for ha

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants