summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormike bayer <mike_mp@zzzcomputing.com>2020-10-10 16:02:26 +0000
committerGerrit Code Review <gerrit@bbpush.zzzcomputing.com>2020-10-10 16:02:26 +0000
commitd0b5ce2ad4cb6149dbe3a378665c9c093da3f4f7 (patch)
treecc735df3a6cf162f7b527456f6e470f38364aa84
parent2827aa911991fb3a39b8adc3b400053e38265edc (diff)
parent9b3812a0c646ee14a6f102e6dc87298d5c255cec (diff)
downloadsqlalchemy-d0b5ce2ad4cb6149dbe3a378665c9c093da3f4f7.tar.gz
Merge "Drop python 3.5 support"
-rw-r--r--.github/workflows/create-wheels.yaml8
-rw-r--r--.github/workflows/run-test.yaml7
-rw-r--r--doc/build/changelog/unreleased_14/5634.rst6
-rw-r--r--doc/build/intro.rst4
-rw-r--r--lib/sqlalchemy/dialects/postgresql/__init__.py2
-rw-r--r--lib/sqlalchemy/testing/util.py3
-rw-r--r--lib/sqlalchemy/util/__init__.py1
-rw-r--r--lib/sqlalchemy/util/compat.py1
-rw-r--r--pyproject.toml2
-rw-r--r--setup.cfg3
-rw-r--r--test/base/test_utils.py6
-rw-r--r--test/orm/test_unitofwork.py19
12 files changed, 22 insertions, 40 deletions
diff --git a/.github/workflows/create-wheels.yaml b/.github/workflows/create-wheels.yaml
index ecf17e990..7d08b2b71 100644
--- a/.github/workflows/create-wheels.yaml
+++ b/.github/workflows/create-wheels.yaml
@@ -24,7 +24,6 @@ jobs:
- "macos-latest"
python-version:
- "2.7"
- - "3.5"
- "3.6"
- "3.7"
- "3.8"
@@ -84,10 +83,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'
@@ -146,7 +144,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
@@ -296,7 +293,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
diff --git a/.github/workflows/run-test.yaml b/.github/workflows/run-test.yaml
index a8b0af4b6..1382bc95b 100644
--- a/.github/workflows/run-test.yaml
+++ b/.github/workflows/run-test.yaml
@@ -29,7 +29,6 @@ jobs:
- "macos-latest"
python-version:
- "2.7"
- - "3.5"
- "3.6"
- "3.7"
- "3.8"
@@ -48,13 +47,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
@@ -95,7 +91,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
index 000000000..44e866e89
--- /dev/null
+++ b/doc/build/changelog/unreleased_14/5634.rst
@@ -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+.
diff --git a/doc/build/intro.rst b/doc/build/intro.rst
index 4b9376ab0..2beec697e 100644
--- a/doc/build/intro.rst
+++ b/doc/build/intro.rst
@@ -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
-------------------------------
diff --git a/lib/sqlalchemy/dialects/postgresql/__init__.py b/lib/sqlalchemy/dialects/postgresql/__init__.py
index 92abcd124..2762a9971 100644
--- a/lib/sqlalchemy/dialects/postgresql/__init__.py
+++ b/lib/sqlalchemy/dialects/postgresql/__init__.py
@@ -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
diff --git a/lib/sqlalchemy/testing/util.py b/lib/sqlalchemy/testing/util.py
index 586974f11..c52dc4a19 100644
--- a/lib/sqlalchemy/testing/util.py
+++ b/lib/sqlalchemy/testing/util.py
@@ -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)
diff --git a/lib/sqlalchemy/util/__init__.py b/lib/sqlalchemy/util/__init__.py
index 885f62f97..00066cbed 100644
--- a/lib/sqlalchemy/util/__init__.py
+++ b/lib/sqlalchemy/util/__init__.py
@@ -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
diff --git a/lib/sqlalchemy/util/compat.py b/lib/sqlalchemy/util/compat.py
index d3fefa526..1480bbeee 100644
--- a/lib/sqlalchemy/util/compat.py
+++ b/lib/sqlalchemy/util/compat.py
@@ -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"
diff --git a/pyproject.toml b/pyproject.toml
index 276edcf74..0f7257892 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,3 +1,3 @@
[tool.black]
line-length = 79
-target-version = ['py27', 'py35']
+target-version = ['py27', 'py36']
diff --git a/setup.cfg b/setup.cfg
index 4fefdd4d5..92cec24a9 100644
--- 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
@@ -35,7 +34,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 =
diff --git a/test/base/test_utils.py b/test/base/test_utils.py
index 9220720b6..843d36b71 100644
--- a/test/base/test_utils.py
+++ b/test/base/test_utils.py
@@ -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_
@@ -3201,8 +3199,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):
diff --git a/test/orm/test_unitofwork.py b/test/orm/test_unitofwork.py
index ee76d7a24..dcd9219a4 100644
--- a/test/orm/test_unitofwork.py
+++ b/test/orm/test_unitofwork.py
@@ -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,