Closed jasonrhaas closed 6 years ago
Hey. Pretty sure someone sent a patch to fix this on HEAD, what version are you on?
Of jsonschema I mean.
I'm running:
jsonschema==2.6.0
So the fix is in the alpha release?
Should be yeah
On Nov 8, 2018 14:15, "Jason Haas" notifications@github.com wrote:
I'm running:
jsonschema==2.6.0
So the fix is in the alpha release?
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Julian/jsonschema/issues/487#issuecomment-437121523, or mute the thread https://github.com/notifications/unsubscribe-auth/AAUIXiBXnVv8WqpDqJXtR0ou_mfrBdFiks5utILdgaJpZM4YU-AF .
Closing, but let me know if that's not the case.
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.
Hey all,
I still have this problem while testing with pytest
. don't know what's causing it.
JsonSchema:
jsonschema==2.6.0
# via flasgger
env/lib/python3.9/site-packages/jsonschema/compat.py:6
env/lib/python3.9/site-packages/jsonschema/compat.py:6
/env/lib/python3.9/site-packages/jsonschema/compat.py:6: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated since Python 3.3, and in 3.10 it will stop working
from collections import MutableMapping, Sequence # noqa
thank you all!
Hi there, sounds like that belongs filed on flasgger, that's a very old version of this library that's being depended on.
@Julian when I only import from from collections.abc
on compay.py
then the warning disappears:
from collections.abc import MutableMapping, Sequence # noqa
instead of :
try:
from collections import MutableMapping, Sequence # noqa
except ImportError:
from collections.abc import MutableMapping, Sequence # noqa
That code isn't present on any recent version of this library.
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.