question-mark
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.

Deprecation warning, affects compatibility with Python 3.8

See original GitHub issue

When running tests with pytest, I noticed some deprecation warnings popping up. It appears that starting in Python 3.8 we will start to see some issues.

/python3.7/site-packages/jsonschema/compat.py:6:
DeprecationWarning: Using or importing the ABCs from 'collections' instead of 
from 'collections.abc' is deprecated, and in 3.8 it will stop working
    from collections import MutableMapping, Sequence  # noqa

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:10 (6 by maintainers)

github_iconTop GitHub Comments

3reactions
Juliancommented, Jul 13, 2022

That code isn’t present on any recent version of this library.

2reactions
kazz-scommented, Nov 17, 2018

your problem is that you got 2 import mixed up

import operator
import sys


try:
    from collections import MutableMapping, Sequence  # noqa
except ImportError:
    from collections.abc import MutableMapping, Sequence  # noqa

you should use from collections.abc ... by default and then on error fall back to from collections ....

While from collections import MutableMapping works we will keep getting this warning.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Deprecation warning, affects compatibility with Python 3.8 #487
When running tests with pytest, I noticed some deprecation warnings popping up. It appears that starting in Python 3.8 we will start to...
Read more >
PEP 606 – Python Compatibility Version
The new DeprecationWarning and PendingDeprecatingWarning warnings in Python 3.9 will not be disabled in Python 3.8 compatibility mode.
Read more >
warnings — Warning control — Python 3.11.1 documentation
Base category for warnings about deprecated features when those warnings are intended for other Python developers (ignored by default, unless triggered by ...
Read more >
What's New In Python 3.8 — Python 3.11.1 documentation
Many builtin and extension functions that take integer arguments will now emit a deprecation warning for Decimal s, Fraction s and any other...
Read more >
Should deprecation warnings be re-enabled for all code by ...
As an enduser, try running basically any software written in Python with PYTHONWARNINGS=always set in the process environment. Whenever I do ...
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 Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found