]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
Fractional seconds starts at Python 3.7
authorMike Bayer <mike_mp@zzzcomputing.com>
Thu, 13 Feb 2020 20:43:05 +0000 (15:43 -0500)
committerMike Bayer <mike_mp@zzzcomputing.com>
Thu, 13 Feb 2020 20:44:07 +0000 (15:44 -0500)
CI didn't notice that the fractional seconds in the new SQL Server
DATETIMEOFFSET test are not available on Python 3.6. It was
inadvertently assumed this was a Python 2 incompatibility.

Change-Id: I9839eafbf7c37512eef1ecf666846983f9651c02
(cherry picked from commit 55f6d61e85b7f16df0b77f1c55a4fb051cd696e3)

lib/sqlalchemy/testing/requirements.py
test/dialect/mssql/test_types.py

index 301839eb386ec465585c73eb2ae505dd73a9eac8..01f32d495ab05aca748bae874abeab7bcff48b19 100644 (file)
@@ -960,6 +960,13 @@ class SuiteRequirements(Requirements):
             lambda: sys.version_info < (3,), "Python version 3.xx is required."
         )
 
+    @property
+    def python37(self):
+        return exclusions.skip_if(
+            lambda: sys.version_info < (3, 7),
+            "Python version 3.7 or greater is required.",
+        )
+
     @property
     def cpython(self):
         return exclusions.only_if(
index d7fbccac268bd82299d1da5a0e34aaaa14a5fba9..1f0ae0a6fada752df281e0c4d35258aa091cfeca 100644 (file)
@@ -794,7 +794,7 @@ class TypeRoundTripTest(
             ),
             None,
             True,
-            testing.requires.python3,
+            testing.requires.python37,
         ),
         (
             "dto_param_datetime_naive",