]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
dont import typing on Python 3.4
authorMike Bayer <mike_mp@zzzcomputing.com>
Wed, 31 Mar 2021 13:58:19 +0000 (09:58 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Wed, 31 Mar 2021 13:58:19 +0000 (09:58 -0400)
Repaired an import for "typing" that is not supported in Python 3.4, which
is the bottom version supported by SQLAlchemy 1.3.

Fixes: #6168
Change-Id: I282c04be0dd40e2b6d5dc3c7f7dad65746d60008

doc/build/changelog/unreleased_13/6168.rst [new file with mode: 0644]
lib/sqlalchemy/util/compat.py

diff --git a/doc/build/changelog/unreleased_13/6168.rst b/doc/build/changelog/unreleased_13/6168.rst
new file mode 100644 (file)
index 0000000..cf70b92
--- /dev/null
@@ -0,0 +1,6 @@
+.. change::
+    :tags: bug, general
+    :tickets: 6168
+
+    Repaired an import for "typing" that is not supported in Python 3.4, which
+    is the bottom version supported by SQLAlchemy 1.3.
index a1d55376dd7b316a0497b074388e31823e68c714..2ca060b2a53e9e35eb047c015f8208d152c8c2c6 100644 (file)
@@ -186,7 +186,10 @@ if py3k:
             # as the __traceback__ object creates a cycle
             del exception, replace_context, from_, with_traceback
 
-    from typing import TYPE_CHECKING
+    if py35:
+        from typing import TYPE_CHECKING
+    else:
+        TYPE_CHECKING = False
 
     def u(s):
         return s