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

Support both Pydantic v1 and v2 #65

Merged
merged 15 commits into from
Sep 20, 2023
Merged

Conversation

ff137
Copy link
Contributor

@ff137 ff137 commented Sep 3, 2023

pydantic is currently pinned to <2. This PR unpins and provides support for both v1 and v2, without deprecation warnings.

Edit: fastapi_websocket_rpc, which is in the requirements here, seems to also be pinned to <2. So, this PR is contingent on this one being released first: permitio/fastapi_websocket_rpc#24. Version there is bumped to 0.1.25, so this PR is set to require fastapi_websocket_rpc~=0.1.25

@ff137 ff137 marked this pull request as draft September 3, 2023 19:09
@ff137 ff137 changed the title Permit pydantic v2 Support both Pydantic v1 and v2 Sep 17, 2023
@ff137 ff137 marked this pull request as ready for review September 17, 2023 15:01
@orweis orweis requested review from orweis, asafc and roekatz and removed request for orweis and asafc September 18, 2023 13:45
@ff137
Copy link
Contributor Author

ff137 commented Sep 18, 2023

These tests will fail until permitio/fastapi_websocket_rpc#24 is merged and published, because this PR requires fastapi_websocket_rpc~=0.1.25 (the version in aforementioned PR). Setting to draft until that's merged.

@ff137 ff137 marked this pull request as draft September 18, 2023 14:01
@orweis
Copy link
Contributor

orweis commented Sep 18, 2023

These tests will fail until permitio/fastapi_websocket_rpc#24 is merged and published, because this PR requires fastapi_websocket_rpc~=0.1.25 (the version in aforementioned PR). Setting to draft until that's merged.

Of course :)

Copy link
Contributor

@roekatz roekatz left a comment

Choose a reason for hiding this comment

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

Same comments as in permitio/fastapi_websocket_rpc#24.
Don't worry about the versions, I'll release those once we merge.

@roekatz roekatz marked this pull request as ready for review September 20, 2023 09:53
@roekatz roekatz self-requested a review September 20, 2023 10:01
@ff137
Copy link
Contributor Author

ff137 commented Sep 20, 2023

@roekatz I notice there's a timeout error for one of the tests. I can't really infer from the logs what's going on there, and if it's related to the pydantic changes ...

@roekatz roekatz merged commit 9d07fc5 into permitio:master Sep 20, 2023
2 of 6 checks passed
@roekatz
Copy link
Contributor

roekatz commented Sep 20, 2023

@ff137 I'll fix it separately, I don't think it's related to your changes

@ff137 ff137 deleted the upgrade/pydantic-v2 branch September 20, 2023 18:54
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