marshmallow >= 3.1.0 not working in Python<3.5.3
See original GitHub issueHello!
I’m getting the following error when using marshmallow
3.1.0 or 3.1.1 with pytest
:
============================================== test session starts ===============================================
platform linux -- Python 3.5.2, pytest-5.1.2, py-1.8.0, pluggy-0.13.0
rootdir: ***, inifile: setup.cfg
plugins: cov-2.7.1, asyncio-0.10.0
collected 31 items / 1 errors / 30 selected
===================================================== ERRORS =====================================================
______________________________ ERROR collecting tests_async/test_event_executor.py _______________________________
*** imports inside my project ***
from marshmallow import Schema, fields, decorators
../../.local/share/virtualenvs/gateway-WH935Ska/lib/python3.5/site-packages/marshmallow/__init__.py:1: in <module>
from marshmallow.schema import Schema, SchemaOpts
../../.local/share/virtualenvs/gateway-WH935Ska/lib/python3.5/site-packages/marshmallow/schema.py:14: in <module>
from marshmallow import base, fields as ma_fields, class_registry
../../.local/share/virtualenvs/gateway-WH935Ska/lib/python3.5/site-packages/marshmallow/fields.py:434: in <module>
class Nested(Field):
../../.local/share/virtualenvs/gateway-WH935Ska/lib/python3.5/site-packages/marshmallow/fields.py:480: in Nested
unknown: str = None,
../../miniconda3/envs/gateway3.5.2/lib/python3.5/typing.py:552: in __getitem__
dict(self.__dict__), parameters, _root=True)
../../miniconda3/envs/gateway3.5.2/lib/python3.5/typing.py:512: in __new__
for t2 in all_params - {t1} if not isinstance(t2, TypeVar)):
../../miniconda3/envs/gateway3.5.2/lib/python3.5/typing.py:512: in <genexpr>
for t2 in all_params - {t1} if not isinstance(t2, TypeVar)):
../../miniconda3/envs/gateway3.5.2/lib/python3.5/typing.py:1077: in __subclasscheck__
if super().__subclasscheck__(cls):
../../.local/share/virtualenvs/gateway-WH935Ska/lib/python3.5/abc.py:225: in __subclasscheck__
for scls in cls.__subclasses__():
E TypeError: descriptor '__subclasses__' of 'type' object needs an argument
The last working version was 3.0.5.
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Changelog — marshmallow 3.19.0 documentation
This reverts a change introduced in 3.12.0 that causes issues when field names conflict with Schema attributes or methods. Fields s are still...
Read more >PIP dependency conflicts when upgrading to Airflow
1 Answer 1 · I tried this too, but the result is same · You probably did not follow it precisely. · @JarekPotiuk...
Read more >marshmallow - PyPI
A lightweight library for converting complex datatypes to and from native Python datatypes.
Read more >Software Packages in "bionic", Subsection python - Ubuntu
2to3 (3.6.5-3) [universe]: 2to3 binary using python3 ... [universe]: data fitting and Bayesian uncertainty modeling for inverse problems (Python 2) ...
Read more >Pyrsistent error when upgrading from 2.0 - Indico Community
But the command pip install -U indico stops with the message in red: pyrsistent requires Python '>=3.5' but the running Python is 2.7.5....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I was able to reproduce this in the
python:3.5.2
Docker image. I’ve verified https://github.com/marshmallow-code/marshmallow/pull/1410 fixes this and I’ll release it shortly.That said, I can’t promise we’ll continue to support old Python point versions. It will be very costly from a maintenance perspective. These old versions are unsupported and a number of bug fixes and security fixes have been released since 3.5.2.
Thanks for a quick reaction!