Skip to content
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

depreciation warning regarding ABC #27

Open
BlackZork opened this issue Dec 8, 2021 · 2 comments
Open

depreciation warning regarding ABC #27

BlackZork opened this issue Dec 8, 2021 · 2 comments

Comments

@BlackZork
Copy link

.venv/lib/python3.9/site-packages/valideer/validators.py:469: 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
    accept_types = collections.Sequence

.venv/lib/python3.9/site-packages/valideer/validators.py:564: 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
    accept_types = collections.Mapping

If would be nice to update those imports - I see this warning in every unit test when running pytest

@yellowtailfan
Copy link

On Python 3.10, this breaks import of valideer:

Traceback (most recent call last):
  File "...", line 13, in <module>
    import valideer as V
  File "/home/.../.local/lib/python3.10/site-packages/valideer/__init__.py", line 2, in <module>
    from .validators import  *
  File "/home/.../.local/lib/python3.10/site-packages/valideer/validators.py", line 466, in <module>
    class HomogeneousSequence(Type):
  File "/home/.../.local/lib/python3.10/site-packages/valideer/validators.py", line 469, in HomogeneousSequence
    accept_types = collections.Sequence
AttributeError: module 'collections' has no attribute 'Sequence'
$ python3 -V
Python 3.10.4
$ pip3 show valideer
Name: valideer
Version: 0.4.2

@bmrobin
Copy link

bmrobin commented Dec 13, 2022

would love a repo maintainer to address the open PR's in the repo that allow this support. if not, i'm going to fork it and move along on my own

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants