From 0980de38a8144f6755aadf550a5c1077ce1a2416 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade Date: Thu, 6 Jan 2022 12:14:33 -0500 Subject: Remove redundant code for EOL Python <= 3.6 ### Description 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 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: #` 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: #` 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 --- lib/sqlalchemy/sql/lambdas.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'lib/sqlalchemy/sql') 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__ -- cgit v1.2.1