You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We use Mypy to perform lint checks during PR builds (see this line in tox.ini). However, one of mypy's dependencies, pydantic, was recently updated and mypy is no longer fully compatible with pydantic's latest code. This compatibility issue is problematic because mypy<1.14 seems to pull in the latest pydantic release by default through a dependency chain, which means mypy<1.14 no longer works in certain situations.
Screenshot Example
I unfortunately forgot to grab a screenshot of the issue in this particular repo, but here is a screenshot of a nearly identical mypy error in the instructlab/instructlab repo caused by the same mypy issue:
Relevant Issues Filed
I have found two relevant issues filed for both mypy and pydantic, but there may be more as time marches on:
Background / Context
Breaking Changes
We use Mypy to perform lint checks during PR builds (see this line in
tox.ini
). However, one ofmypy
's dependencies,pydantic
, was recently updated andmypy
is no longer fully compatible withpydantic
's latest code. This compatibility issue is problematic becausemypy<1.14
seems to pull in the latestpydantic
release by default through a dependency chain, which meansmypy<1.14
no longer works in certain situations.Screenshot Example
I unfortunately forgot to grab a screenshot of the issue in this particular repo, but here is a screenshot of a nearly identical
mypy
error in the instructlab/instructlab repo caused by the samemypy
issue:Relevant Issues Filed
I have found two relevant issues filed for both
mypy
andpydantic
, but there may be more as time marches on:mypy
type-checking issues affecting aField
'sdefault
value ordefault_factory
after upgrade to 2.10 pydantic/pydantic#10950Proposed Solution
Pin
mypy<1.14
for now and force it to usepydantic<=2.9.2
by specifyingpydantic<=2.9.2
as a dependency in the affectedtox.ini
file:sdg/tox.ini
Line 77 in c220b5f
The text was updated successfully, but these errors were encountered: