Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

marshmallow >= 3.1.0 not working in Python<3.5.3

See original GitHub issue


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/ _______________________________
*** imports inside my project ***
    from marshmallow import Schema, fields, decorators
../../.local/share/virtualenvs/gateway-WH935Ska/lib/python3.5/site-packages/marshmallow/ in <module>
    from marshmallow.schema import Schema, SchemaOpts
../../.local/share/virtualenvs/gateway-WH935Ska/lib/python3.5/site-packages/marshmallow/ in <module>
    from marshmallow import base, fields as ma_fields, class_registry
../../.local/share/virtualenvs/gateway-WH935Ska/lib/python3.5/site-packages/marshmallow/ in <module>
    class Nested(Field):
../../.local/share/virtualenvs/gateway-WH935Ska/lib/python3.5/site-packages/marshmallow/ in Nested
    unknown: str = None,
../../miniconda3/envs/gateway3.5.2/lib/python3.5/ in __getitem__
    dict(self.__dict__), parameters, _root=True)
../../miniconda3/envs/gateway3.5.2/lib/python3.5/ in __new__
    for t2 in all_params - {t1} if not isinstance(t2, TypeVar)):
../../miniconda3/envs/gateway3.5.2/lib/python3.5/ in <genexpr>
    for t2 in all_params - {t1} if not isinstance(t2, TypeVar)):
../../miniconda3/envs/gateway3.5.2/lib/python3.5/ in __subclasscheck__
    if super().__subclasscheck__(cls):
../../.local/share/virtualenvs/gateway-WH935Ska/lib/python3.5/ 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:closed
  • Created 4 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

sloriacommented, Sep 17, 2019

I was able to reproduce this in the python:3.5.2 Docker image. I’ve verified 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.

lukaszdudek-silvaircommented, Sep 17, 2019

Thanks for a quick reaction!

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found