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

Add Python 3.9 support #25

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

AlexSopov
Copy link

Running tests with all warnings filters disabled, following warnings appear:

.../valideer/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.9 it will stop working
  accept_types = collections.Sequence
.../valideer/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.9 it will stop working
  accept_types = collections.Mapping

which indicates that valideer will stop working on Python 3.9.

This PR adds support for Python 3.9 by using ABCs from 'collections.abc' instead of 'collections'. On Python versions greater or equal to 3.3 'collections.abc' will be used and on lower versions, it will fall back to 'collections'.
The decision to use an appropriate version of ABCs is done in compat.py and implemented by try/except for code cleanliness.

@AlexSopov
Copy link
Author

The build was failing ☝️because of missing Python 3.3 on Travis CI on Ubuntu Xenial version (16.04 that is a default in Travis CI now: see here) as it described on Python's page.
So i've changed .travis.yml to make sure build passes successfully on all envs.

@bmrobin
Copy link

bmrobin commented Dec 13, 2022

@gsakkis @movermeyer it seems like you are past contributor to master for valideer -- can you approve this?

there are a few open issues & pr's from people requesting newer versions of python to be supported and this seems quite trivial to introduce to allow valideer to continue to thrive.

@gsakkis
Copy link
Contributor

gsakkis commented Dec 13, 2022

@bmrobin I'm afraid I don't have write access to this repo anymore. I had contacted Citrix tech support about a year ago to request access and although somebody eventually replied, nothing came out of it 🤷‍♂️

@bmrobin
Copy link

bmrobin commented Dec 13, 2022

@bmrobin I'm afraid I don't have write access to this repo anymore. I had contacted Citrix tech support about a year ago to request access and although somebody eventually replied, nothing came out of it 🤷‍♂️

ok thanks for replying. i forked it and have made the necessary changes to get my organization unblocked.

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

Successfully merging this pull request may close these issues.

3 participants