]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
Drop python 3.5 support
authorFederico Caselli <cfederico87@gmail.com>
Thu, 8 Oct 2020 19:01:19 +0000 (21:01 +0200)
committerFederico Caselli <cfederico87@gmail.com>
Thu, 8 Oct 2020 19:32:09 +0000 (21:32 +0200)
Fixes: #5634
Change-Id: Ie8d4076ee35234b535a04e6fb9321096df3f648b

12 files changed:
.github/workflows/create-wheels.yaml
.github/workflows/run-test.yaml
doc/build/changelog/unreleased_14/5634.rst [new file with mode: 0644]
doc/build/intro.rst
lib/sqlalchemy/dialects/postgresql/__init__.py
lib/sqlalchemy/testing/util.py
lib/sqlalchemy/util/__init__.py
lib/sqlalchemy/util/compat.py
pyproject.toml
setup.cfg
test/base/test_utils.py
test/orm/test_unitofwork.py

index 8c2d7ee604021a9a5a4045b463bf052f16cdd525..673081fca8aeae1da621f6ba86385a219f7a36b3 100644 (file)
@@ -24,7 +24,6 @@ jobs:
           - "macos-latest"
         python-version:
           - "2.7"
-          - "3.5"
           - "3.6"
           - "3.7"
           - "3.8"
@@ -83,10 +82,9 @@ jobs:
           pip install -f dist --no-index sqlalchemy
 
       - name: Check c extensions
-        # on windows in python 2.7 and 3.5 the cextension fail to build.
+        # on windows in python 2.7 the cextension fail to build.
         # for python 2.7 visual studio 9 is missing
-        # for python 3.5 the linker has an error "cannot run 'rc.exe'"
-        if: matrix.os != 'windows-latest' || ( matrix.python-version != '2.7' && matrix.python-version != '3.5' )
+        if: matrix.os != 'windows-latest' || matrix.python-version != '2.7'
         run: |
           python -c 'from sqlalchemy import cprocessors, cresultproxy, cutils'
 
@@ -145,7 +143,6 @@ jobs:
           # the versions are <python tag>-<abi tag> as specified in PEP 425.
           - cp27-cp27m
           - cp27-cp27mu
-          - cp35-cp35m
           - cp36-cp36m
           - cp37-cp37m
           - cp38-cp38
@@ -294,7 +291,6 @@ jobs:
           - "ubuntu-latest"
         python-version:
           # the versions are <python tag>-<abi tag> as specified in PEP 425.
-          - cp35-cp35m
           - cp36-cp36m
           - cp37-cp37m
           - cp38-cp38
index 79f2a60860e51a89d6c04d476c6fce2d47bc6c55..7b32950f0ef7390e4b7adec8d75cbfafd0f40995 100644 (file)
@@ -29,7 +29,6 @@ jobs:
           - "macos-latest"
         python-version:
           - "2.7"
-          - "3.5"
           - "3.6"
           - "3.7"
           - "3.8"
@@ -47,13 +46,10 @@ jobs:
             pytest-args: "-k 'not test_autocommit_on and not test_turn_autocommit_off_via_default_iso_level and not test_autocommit_isolation_level'"
 
         exclude:
-          # c-extensions fail to build on windows for python 3.5 and 2.7
+          # c-extensions fail to build on windows for python 2.7
           - os: "windows-latest"
             python-version: "2.7"
             build-type: "cext"
-          - os: "windows-latest"
-            python-version: "3.5"
-            build-type: "cext"
           # linux and osx do not have x86 python
           - os: "ubuntu-latest"
             architecture: x86
@@ -94,7 +90,6 @@ jobs:
     strategy:
       matrix:
         python-version:
-          - cp35-cp35m
           - cp36-cp36m
           - cp37-cp37m
           - cp38-cp38
diff --git a/doc/build/changelog/unreleased_14/5634.rst b/doc/build/changelog/unreleased_14/5634.rst
new file mode 100644 (file)
index 0000000..44e866e
--- /dev/null
@@ -0,0 +1,6 @@
+.. change::
+    :tags: change
+    :tickets: 5634
+
+    Dropped support for python 3.5 that has reached EOL.
+    SQLAlchemy 1.4 series requires python 2.7 or 3.6+.
index 4b9376ab0ff132ef20ab66cb14370c2a866486d2..2beec697e6aedb0a4d741362bc757f3ff0842603 100644 (file)
@@ -71,14 +71,14 @@ Supported Platforms
 SQLAlchemy has been tested against the following platforms:
 
 * cPython 2.7
-* cPython 3.5 and higher
+* cPython 3.6 and higher
 * `PyPy <http://pypy.org/>`_ 2.1 or greater
 
 .. versionchanged:: 1.2
    Python 2.7 is now the minimum Python version supported.
 
 .. versionchanged:: 1.4
-   Within the Python 3 series, 3.5 is now the minimum Python 3 version supported.
+   Within the Python 3 series, 3.6 is now the minimum Python 3 version supported.
 
 Supported Installation Methods
 -------------------------------
index 92abcd124a3802904ab940226f7f6648915ba121..2762a9971b60d8bf94ddb038553e81aa8e633a9f 100644 (file)
@@ -59,7 +59,7 @@ from .ranges import TSRANGE
 from .ranges import TSTZRANGE
 from ...util import compat
 
-if compat.py36:
+if compat.py3k:
     from . import asyncpg  # noqa
 
 base.dialect = dialect = psycopg2.dialect
index 586974f11b2a5ebaf83cca79aaf9a0a6dd0b9faa..c52dc4a19b524fe11c5cd408211e9f14e005a1fe 100644 (file)
@@ -17,7 +17,6 @@ from ..util import defaultdict
 from ..util import has_refcount_gc
 from ..util import inspect_getfullargspec
 from ..util import py2k
-from ..util import py36
 
 if not has_refcount_gc:
 
@@ -54,7 +53,7 @@ def picklers():
             yield pickle_.loads, lambda d: pickle_.dumps(d, protocol)
 
 
-if py2k or not py36:
+if py2k:
 
     def random_choices(population, k=1):
         pop = list(population)
index 8ef2f010321879f0cce341cc04c63a6f2171f096..69cdce216e3041b121149729ed45b3412658a579 100644 (file)
@@ -72,7 +72,6 @@ from .compat import perf_counter  # noqa
 from .compat import pickle  # noqa
 from .compat import print_  # noqa
 from .compat import py2k  # noqa
-from .compat import py36  # noqa
 from .compat import py37  # noqa
 from .compat import py3k  # noqa
 from .compat import pypy  # noqa
index d3fefa526578ddc19315c7f100f1fc62d86df245..1480bbeee370719470755c4f8838d233a7b40265 100644 (file)
@@ -17,7 +17,6 @@ import sys
 
 py38 = sys.version_info >= (3, 8)
 py37 = sys.version_info >= (3, 7)
-py36 = sys.version_info >= (3, 6)
 py3k = sys.version_info >= (3, 0)
 py2k = sys.version_info < (3, 0)
 pypy = platform.python_implementation() == "PyPy"
index 276edcf74b90ef2fc0b0b596233969c9b32c1253..0f72578923ce0bf603f0bca5ba7e00c2ccdaa89e 100644 (file)
@@ -1,3 +1,3 @@
 [tool.black]
 line-length = 79
-target-version = ['py27', 'py35']
+target-version = ['py27', 'py36']
index cb8e6930ed7a6d36ba029f747ef2fc8b49484e5e..c8767d310d199735250436519765b496e4144b01 100644 (file)
--- a/setup.cfg
+++ b/setup.cfg
@@ -21,7 +21,6 @@ classifiers =
     Programming Language :: Python :: 2
     Programming Language :: Python :: 2.7
     Programming Language :: Python :: 3
-    Programming Language :: Python :: 3.5
     Programming Language :: Python :: 3.6
     Programming Language :: Python :: 3.7
     Programming Language :: Python :: 3.8
@@ -34,7 +33,7 @@ project_urls =
 
 [options]
 packages = find:
-python_requires = >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*
+python_requires = >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*
 package_dir =
     =lib
 install_requires =
index fa347243e7555127c47f417fa6158e32b1280a31..8921be8d009fc1376d969829b14b84bda174c4c2 100644 (file)
@@ -1674,12 +1674,10 @@ class IdentitySetTest(fixtures.TestBase):
         return super_, sub_, twin1, twin2, unique1, unique2
 
     def _assert_unorderable_types(self, callable_):
-        if util.py36:
+        if util.py3k:
             assert_raises_message(
                 TypeError, "not supported between instances of", callable_
             )
-        elif util.py3k:
-            assert_raises_message(TypeError, "unorderable types", callable_)
         else:
             assert_raises_message(
                 TypeError, "cannot compare sets using cmp()", callable_
@@ -3165,8 +3163,6 @@ class TimezoneTest(fixtures.TestBase):
         ),
     )
     def test_tzname(self, td, expected):
-        if expected == "UTC" and util.py3k and not util.py36:
-            expected += "+00:00"
         eq_(timezone(td).tzname(None), expected)
 
     def test_utcoffset(self):
index ee76d7a247af5004513a424d1292822855caeaae..dcd9219a4362665d82a0ea8f00c3e7db7229eb13 100644 (file)
@@ -3505,19 +3505,12 @@ class EnsurePKSortableTest(fixtures.MappedTest):
         a.data = "bar"
         b.data = "foo"
         if sa.util.py3k:
-            if sa.util.py36:
-                message = (
-                    r"Could not sort objects by primary key; primary key "
-                    r"values must be sortable in Python \(was: '<' not "
-                    r"supported between instances of 'MyNotSortableEnum'"
-                    r" and 'MyNotSortableEnum'\)"
-                )
-            else:
-                message = (
-                    r"Could not sort objects by primary key; primary key "
-                    r"values must be sortable in Python \(was: unorderable "
-                    r"types: MyNotSortableEnum\(\) < MyNotSortableEnum\(\)\)"
-                )
+            message = (
+                r"Could not sort objects by primary key; primary key "
+                r"values must be sortable in Python \(was: '<' not "
+                r"supported between instances of 'MyNotSortableEnum'"
+                r" and 'MyNotSortableEnum'\)"
+            )
 
             assert_raises_message(
                 sa.exc.InvalidRequestError,