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 support for PEP 560 #305
Conversation
@@ -16,7 +16,7 @@ install: | |||
- pip install --upgrade --force-reinstall "setuptools; python_version != '3.2' and python_version != '3.3'" "setuptools < 30; python_version == '3.2'" "setuptools < 40; python_version == '3.3'" | |||
- pip uninstall --yes six || true | |||
- pip install --upgrade --force-reinstall --ignore-installed -e . | |||
- pip install pytest | |||
- pip install pytest typing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it possible to test this without depending on typing?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, this was just the simplest way. I thought it is OK to add it here since typing
will not be a dependency for six
itself. Do you want me to add an extra test, or replace the existing one? (I would prefer to keep the existing one.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(FWIW I added a typing-agnostic test.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I mainly wanted to make sure that the semantic change was tested directly rather than relying on typing
.
@@ -16,7 +16,7 @@ install: | |||
- pip install --upgrade --force-reinstall "setuptools; python_version != '3.2' and python_version != '3.3'" "setuptools < 30; python_version == '3.2'" "setuptools < 40; python_version == '3.3'" | |||
- pip uninstall --yes six || true | |||
- pip install --upgrade --force-reinstall --ignore-installed -e . | |||
- pip install pytest | |||
- pip install pytest typing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I mainly wanted to make sure that the semantic change was tested directly rather than relying on typing
.
This is mostly important for
typing
module that is extensively using PEP 560 since Python 3.7. The goal of this PR is to makebehave equivalently to
and
on all Python versions (also with custom metaclasses on Python versions where it is supported).