summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/sql/lambdas.py
diff options
context:
space:
mode:
authorHugo van Kemenade <hugovk@users.noreply.github.com>2022-01-06 12:14:33 -0500
committersqla-tester <sqla-tester@sqlalchemy.org>2022-01-06 12:14:33 -0500
commit0980de38a8144f6755aadf550a5c1077ce1a2416 (patch)
tree58335a5496af595deba7423cd4b07d673d708f5c /lib/sqlalchemy/sql/lambdas.py
parent21ee595ba9ef3e7abc8982fac7bf488c904cf9c9 (diff)
downloadsqlalchemy-0980de38a8144f6755aadf550a5c1077ce1a2416.tar.gz
Remove redundant code for EOL Python <= 3.6
<!-- Provide a general summary of your proposed changes in the Title field above --> ### Description <!-- Describe your changes in detail --> There's a few bits and pieces of code to support Python <= 3.6 which are no longer needed and can be removed, to slightly simplify the codebase. ### 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: #7544 Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/7544 Pull-request-sha: 282b4a91282902a57807aa2541b75b272b547127 Change-Id: I9ddf15fcf72551d52e3f027f337c7fee4aa9083b
Diffstat (limited to 'lib/sqlalchemy/sql/lambdas.py')
-rw-r--r--lib/sqlalchemy/sql/lambdas.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/sqlalchemy/sql/lambdas.py b/lib/sqlalchemy/sql/lambdas.py
index b2c366671..8af727bbe 100644
--- a/lib/sqlalchemy/sql/lambdas.py
+++ b/lib/sqlalchemy/sql/lambdas.py
@@ -8,7 +8,6 @@
import collections.abc as collections_abc
import itertools
import operator
-import sys
import types
import weakref
@@ -1113,9 +1112,8 @@ class AnalyzedFunction:
func = type(f)(
f.__code__, globals_, f.__name__, f.__defaults__, closure
)
- if sys.version_info >= (3,):
- func.__annotations__ = f.__annotations__
- func.__kwdefaults__ = f.__kwdefaults__
+ func.__annotations__ = f.__annotations__
+ func.__kwdefaults__ = f.__kwdefaults__
func.__doc__ = f.__doc__
func.__module__ = f.__module__