diff options
author | layday <layday@protonmail.com> | 2021-09-19 11:58:05 -0400 |
---|---|---|
committer | sqla-tester <sqla-tester@sqlalchemy.org> | 2021-09-19 11:58:05 -0400 |
commit | b0260bd6706659ee01c33c41f4f7f4c9a8020512 (patch) | |
tree | 43debfd461d94c896ff0c888c195843bfe8c7572 /lib/sqlalchemy/testing/requirements.py | |
parent | 4d9bc42f52e2c37e4285cce0a41bfd9b030834b7 (diff) | |
download | sqlalchemy-b0260bd6706659ee01c33c41f4f7f4c9a8020512.tar.gz |
Relax the Python version check for `__class_getitem__` tests
<!-- Provide a general summary of your proposed changes in the Title field above -->
### Description
`__class_getitem__` to support generics was introduced in Python 3.7.
In 3.9 some built-ins were made generic but the functionality
for user-defined classes has been there since 3.7.
### Checklist
<!-- go over following points. check them with an `x` if they do apply, (they turn into clickable checkboxes once the PR is submitted, so no need to do everything at once)
-->
This pull request is:
- [ ] A documentation / typographical error fix
- Good to go, no issue or tests are needed
- [x] A short code fix
- please include the issue number, and create an issue if none exists, which
must include a complete example of the issue. one line code fixes without an
issue and demonstration will not be accepted.
- Please include: `Fixes: #<issue number>` in the commit message
- please include tests. one line code fixes without tests will not be accepted.
- [ ] A new feature implementation
- please include the issue number, and create an issue if none exists, which must
include a complete example of how the feature would look.
- Please include: `Fixes: #<issue number>` in the commit message
- please include tests.
**Have a nice day!**
Closes: #7049
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/7049
Pull-request-sha: 7bd16d416db010e7140313fe326861cc263b8864
Change-Id: I4f45b9585d263636e613cc5c86e710fa31c7d283
Diffstat (limited to 'lib/sqlalchemy/testing/requirements.py')
-rw-r--r-- | lib/sqlalchemy/testing/requirements.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/sqlalchemy/testing/requirements.py b/lib/sqlalchemy/testing/requirements.py index 40127addf..f6e79042c 100644 --- a/lib/sqlalchemy/testing/requirements.py +++ b/lib/sqlalchemy/testing/requirements.py @@ -1448,6 +1448,6 @@ class SuiteRequirements(Requirements): return exclusions.open() @property - def builtin_generics(self): - "If list[int] is a valid syntax. basically py3.9+" - return exclusions.only_if(lambda: util.py39) + def generic_classes(self): + "If X[Y] can be implemented with ``__class_getitem__``. py3.7+" + return exclusions.only_if(lambda: util.py37) |