Skip to content

Conversation

@leonballoni
Copy link

SUMMARY

Using package bump-pydantic, I refactored the package Pydantic version 1.* to version 2.* and adapted some other dependencies such as python version and else.

Detailed description

The commit below represents what has changed in the code.

  1. updates the project's package dependencies and requirements, specifically removing support for Python 3.7. It modifies various CI configurations (GitHub Actions, GitLab CI, and Travis CI) to remove Python 3.7 from the testing matrix. It adjusts the README to reflect the new minimum Python version requirement of 3.8. Additionally, a new poetry.lock file is introduced to ensure consistent dependency management with newer versions of required packages. The changes ensure that the project is aligned with more current and supported Python versions and dependencies.

  2. refactors the usage of Pydantic models in the API by upgrading to Pydantic v2 with the help of the bump-pydantic library. The changes primarily involve replacing the constr and con* types with Annotated types combined with StringConstraints to achieve similar validation constraints. This update enhances code compatibility with Pydantic v2 and aligns with the annotated type hinting approach recommended by the new version

  3. updates the version constraint for the pydantic package across several configuration files. Specifically, it replaces the version constraint ^2.10.1 with >2.1 in pyproject.toml and adjusts the corresponding minimum version in other dependency management files to >= 2.1 down from >= 2.10.1. This broadens the range of acceptable versions of the pydantic package, likely to accommodate compatibility with a wider set of versions. Additionally, the commit includes updates to the content hash in the poetry.lock file to reflect these changes in dependencies.

@leonballoni
Copy link
Author

@maidul98 , @akhilmhdh , @sheensantoscapadngan

Please, review.

@ion-elgreco
Copy link

@maidul98 , @akhilmhdh , @sheensantoscapadngan

Please, review.

I want to start using infisical but not having pydantic 2 support is a huge blocker, most libraries are already on pydantic 2.

@leonballoni
Copy link
Author

@maidul98 , @akhilmhdh , @sheensantoscapadngan
Please, review.

I want to start using infisical but not having pydantic 2 support is a huge blocker, most libraries are already on pydantic 2.

While waiting @ion-elgreco , you can use it in the forked repository: https://github.com/leonballoni/infisical-python-client/tree/main

@varonix0
Copy link
Member

Hi @leonballoni, I've reached out via. Slack to get some more details

@leonballoni
Copy link
Author

Hi @leonballoni, I've reached out via. Slack to get some more details

Hi, replied you there.

@varonix0
Copy link
Member

Resolved in #12

@varonix0 varonix0 closed this Jan 14, 2025
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.

3 participants