-
Notifications
You must be signed in to change notification settings - Fork 148
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
safety-schemas 0.0.7 requires outdated pydantic version that fails install on Python 3.13 #620
Comments
Hi @andy-maier, thank you for opening this issue! We appreciate your effort in reporting this. Our team will review it and get back to you soon. Note: If this is a serious security issue that could impact the security of Safety CLI users, please email [email protected] immediately. Thank you for contributing to Safety CLI! |
I didn't want to open a new ticket, so I'm piggybacking here since the core issue is the same. Can we revisit the decision to enforce an upper bound on the Pydantic version at the minor level @SafetyQuincyF @dylanpulver? With Can we consider loosening the dependency to allow for major version compatibility instead, e.g., |
Checklist
Safety version
safety-schemas 0.0.7
Python version
3.13
Operating System
macos, Ubuntu, Windows
Describe the problem you'd like to have solved
I am using the safety issue tracker for reporting this issue of safety-schemas, because I'm not aware of an issue tracker for safety-schemas.
The safety-schemas package version 0.0.7 has the following package dependencies:
This dependency chain pulls in pydantic-core 2.14.6 and which has a bug that causes its installation to fail on Python 3.13.
That bug has been reported in pydantic/pydantic-core#1366 and again in pydantic/pydantic-core#1500 and has been fixed with pydantic/pydantic-core#1299 in pydantic-core version 2.18.3.
pydantic-core version 2.18.3 was for the first time pulled in by pydantic version 2.7.2.
However, pydantic 2.7.2 has other install issues on Python 3.13, and I found that I needed pydantic>=2.8.0 to successfully install on Python 3.13.
Note that pydantic and pydantic-core are very tightly coupled in their dependencies: pydantic specifies the exact and only version of pydantic-core to be used.
The current dependency safety-schemas 0.0.7 specifies for the pydantic package is
~=2.5.0
which uses the so-called compatibility operator~=
which is equivalent to>=2.5.0, <2.6.0
. This prevents installing the version of pydantic that has the bug fix.safety-schemas 0.0.5 allowed any version for the pydantic package; That's why this issue started to occur with the release of safety-schemas 0.0.7.
Describe the ideal solution
Do not specify an upper limit for the pydantic dependency, at least not an upper 2.x minor version.
Specifying
pydantic ~= 2.5
might be ok, because that is equivalent to>=2.5.0, <3.0.0
Alternatives and current workarounds
Our circumvention is to exclude safety-schemas 0.0.7, hoping that a subsequent safety-schemas version will no longer pin pydantic to <2.6.0.
Additional context
No response
What I Did
On Python 3.13:
The text was updated successfully, but these errors were encountered: