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

fix: v4 import to pydantic config #342

Merged
merged 4 commits into from
Dec 8, 2024

Conversation

NTFSvolume
Copy link
Collaborator

@NTFSvolume NTFSvolume commented Nov 30, 2024

Config is immediately validated after import, but given that most of the v4 options were str or bool (except for proxy) importing from v4 is actually easier that importing from v5

I had to replace SupportedSites Enum with a list. It was giving me validation errors because the enum names and their values are different. Even when the validation was successful, I was getting a bunch of warnings from pydantic. We need to switch back to using regular lists for those. I will make new PR for that

@NTFSvolume NTFSvolume added the bug Something isn't working label Nov 30, 2024
@NTFSvolume NTFSvolume marked this pull request as draft November 30, 2024 07:42
@NTFSvolume NTFSvolume marked this pull request as ready for review December 2, 2024 00:10
@NTFSvolume NTFSvolume marked this pull request as draft December 2, 2024 02:12
@NTFSvolume
Copy link
Collaborator Author

NTFSvolume commented Dec 2, 2024

This no longer works. I need #340 to be merged first to fix it.

Config is immediately validated after import, but given that most of the v4 options were `str` or `bool` (except for `proxy`) importing from v4 is actually easier that importing from v5

I had to replace `SupportedSytes` Enum with a list. It was giving me validation errors because the enum names and their values are different. Even when the validation was successful, I was getting a bunch of warnings from pydantic. We need to switch back to using regular lists for those. I will make new PR for that
@NTFSvolume NTFSvolume marked this pull request as ready for review December 6, 2024 00:54
@NTFSvolume
Copy link
Collaborator Author

Rebased from master. Everything should be working now.

@NTFSvolume NTFSvolume merged commit ab2075d into jbsparrow:master Dec 8, 2024
2 checks passed
@NTFSvolume NTFSvolume deleted the fix_v4_import branch December 8, 2024 09:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants