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

Enhancement/pydantic v2 #26

Merged
merged 4 commits into from
Feb 10, 2024
Merged

Enhancement/pydantic v2 #26

merged 4 commits into from
Feb 10, 2024

Conversation

Tinitto
Copy link
Contributor

@Tinitto Tinitto commented Feb 10, 2024

Why

Closes #25

Pydantic V2 was a major rewrite of pydantic. Pydantic V2 is much faster than pydantic v1; and more strict.
Many other projects are expected to move on to pydantic V2. We should not be left behind.

What was done

  • Migrated the code to pydantic v2
  • Fixed failing tests
  • Updated benchmark results
  • Updated documentation to limit to python +v3.8

How to test

  • Clone the repo
git clone https://github.com/sopherapps/pydantic-redis.git
  • Checkout this branch
cd pydantic-redis
git checkout enhancement/pydantic-v2
  • Create a virtual environment and activate it
virtualenv -p /usr/bin/python3.8 env
source env/bin/activate
  • Install the dependencies
pip install -r requirements.txt
  • Run the tests command
pytest --benchmark-disable
  • Run benchmarks
pytest test/test_benchmarks.py --benchmark-columns=mean,min,max --benchmark-name=short

@Tinitto Tinitto force-pushed the enhancement/pydantic-v2 branch from bbf8b1e to 526edc8 Compare February 10, 2024 06:43
@Tinitto Tinitto force-pushed the enhancement/pydantic-v2 branch from 3bd04ec to 38b95fc Compare February 10, 2024 07:20
@Tinitto Tinitto merged commit afa56ec into master Feb 10, 2024
6 checks passed
@Tinitto Tinitto deleted the enhancement/pydantic-v2 branch February 10, 2024 08:18
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.

Pydantic V2
1 participant