-
Notifications
You must be signed in to change notification settings - Fork 76
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
Typeguard fails with 8.7.0 #272
Comments
My guess is that this is more of a Previous to marshmallow_dataclass 8.7.0, typeguard was pinned to < 3. 8.7.0 relaxes that pin to allow for typeguard 4.x. (#250, #260) From the traceback, this appears to have something to do with the use of typeguards import hook. In your case, the import hook appears to be installed through the use of the typeguard's pytest plugin. |
OK - I'm making progress, but I am still confused. $ pip show typeguard
Name: typeguard
Version: 4.3.0
$ pip show marshmallow-dataclass
Name: marshmallow_dataclass
Version: 8.6.1
$ pip show typing-inspect
Name: typing-inspect
Version: 0.8.0
==> OK vs $ pip show typeguard
Name: typeguard
Version: 4.0.1
$ pip show marshmallow-dataclass
Name: marshmallow_dataclass
Version: 8.7.0
$ pip show typing-inspect
Name: typing-inspect
Version: 0.9.0
==> SyntaxError: from __future__ imports must occur at the beginning of the file |
OK - it seems the issue does come from marshmallow-dataclass, which restricts:
marshmallow_dataclass/setup.py Lines 49 to 55 in 4edbfb4
Should then not be loosened up? install_requires=[
"marshmallow>=3.18.0,",
"typing-inspect>=0.9.0",
"typeguard>=4.0.0",
# Need `dataclass_transform(field_specifiers)`
"typing-extensions>=4.2.0; python_version<'3.11'",
] |
It worked fine with 8.6.1
See hacf-fr/renault-api#1234
The text was updated successfully, but these errors were encountered: