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(requirements): set minimum pydantic version to 1.10.0 #882

Merged
merged 3 commits into from
Jan 25, 2024

Conversation

ezorita
Copy link
Contributor

@ezorita ezorita commented Jan 25, 2024

Change Summary

Updated the minimum version of pydantic to 1.10.0. Current version is set to 1.8.0 but it lacks some required typing extensions.

Reproduce

Run:

pip3 install pydantic==1.8.0 prisma
python3 -c 'import prisma'

Output:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/home/ezorita/tmp/prisma-pydantic/lib/python3.8/site-packages/prisma/__init__.py", line 11, in <module>
    from ._config import config as config
  File "/home/ezorita/tmp/prisma-pydantic/lib/python3.8/site-packages/prisma/_config.py", line 12, in <module>
    from ._compat import (
  File "/home/ezorita/tmp/prisma-pydantic/lib/python3.8/site-packages/prisma/_compat.py", line 162, in <module>
    from pydantic.typing import is_union as is_union
ImportError: cannot import name 'is_union' from 'pydantic.typing' (/home/ezorita/tmp/prisma-pydantic/lib/python3.8/site-packages/pydantic/typing.cpython-38-x86_64-linux-gnu.so)

Checklist

Should not a a

  • Unit tests for the changes exist
  • Tests pass without significant drop in coverage
  • Documentation reflects changes where applicable
  • Test snapshots have been updated if applicable

Agreement

By submitting this pull request, I confirm that you can use, modify, copy and redistribute this contribution, under the terms of your choice.

@ezorita
Copy link
Contributor Author

ezorita commented Jan 25, 2024

btw @RobertCraigie hi again! And thanks for the excellent work you're doing with this client, I love it!

@RobertCraigie
Copy link
Owner

Thanks @ezorita! I appreciate it :)

Copy link
Owner

@RobertCraigie RobertCraigie left a comment

Choose a reason for hiding this comment

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

I think this is very slightly over-restrictive, just ran the tests with 1.10.0 and that also seems to work so I'd prefer to bump our minimum to that - thanks for fixing this!

(also sorry about the flaky test)

Copy link
Owner

@RobertCraigie RobertCraigie left a comment

Choose a reason for hiding this comment

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

I've lowered the version slightly myself as to not use up more of your time, thanks for bringing this to my attention and opening a PR!

@RobertCraigie RobertCraigie changed the title fix(requirements): set minimum pydantic version to 1.10.13 fix(requirements): set minimum pydantic version to 1.10.0 Jan 25, 2024
@RobertCraigie RobertCraigie enabled auto-merge (squash) January 25, 2024 21:27
@RobertCraigie RobertCraigie merged commit 1488b8b into RobertCraigie:main Jan 25, 2024
31 of 32 checks passed
@ezorita
Copy link
Contributor Author

ezorita commented Jan 26, 2024

I've lowered the version slightly myself as to not use up more of your time, thanks for bringing this to my attention and opening a PR!

my pleasure!

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.

2 participants