bisection was used to identify where SQLite fixed its support for this
construct, and no further issues were reported against the behavior (even
though some bugs were found internally). It is now anticipated that there
-are little to no Python builds for Python 2.7 or 3.4 and above (the supported
+are little to no Python builds for Python 2.7 or 3.5 and above (the supported
Python versions) which would include a SQLite version prior to 3.7.17, and
the behavior is only necessary only in more complex ORM joining scenarios.
A warning is now emitted if the installed SQLite version is older than
--- /dev/null
+.. change::
+ :tags: change
+
+ Python 3.4 has reached EOL and its support has been dropped from
+ SQLAlchemy.
SQLAlchemy has been tested against the following platforms:
* cPython 2.7
-* cPython 3.4 and higher
+* cPython 3.5 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.3
- Within the Python 3 series, 3.4 is now the minimum Python 3 version supported.
+.. versionchanged:: 1.4
+ Within the Python 3 series, 3.5 is now the minimum Python 3 version supported.
Supported Installation Methods
-------------------------------
def __iter__(self):
return (
- util.safe_kwarg("%s_%s" % (dialect_name, value_name))
+ "%s_%s" % (dialect_name, value_name)
for dialect_name in self.obj.dialect_options
for value_name in self.obj.dialect_options[
dialect_name
"""
from __future__ import absolute_import
-from ..util import py33
+from ..util import py3k
-if py33:
+if py3k:
from unittest.mock import MagicMock
from unittest.mock import Mock
from unittest.mock import call
from .compat import pickle # noqa
from .compat import print_ # noqa
from .compat import py2k # noqa
-from .compat import py33 # noqa
from .compat import py36 # noqa
from .compat import py3k # noqa
from .compat import quote_plus # noqa
from .compat import raise_from_cause # noqa
from .compat import reduce # noqa
from .compat import reraise # noqa
-from .compat import safe_kwarg # noqa
from .compat import string_types # noqa
from .compat import StringIO # noqa
from .compat import text_type # noqa
py36 = sys.version_info >= (3, 6)
-py33 = sys.version_info >= (3, 3)
-py35 = sys.version_info >= (3, 5)
-py32 = sys.version_info >= (3, 2)
py3k = sys.version_info >= (3, 0)
py2k = sys.version_info < (3, 0)
-py265 = sys.version_info >= (2, 6, 5)
cpython = platform.python_implementation() == "CPython"
import dummy_threading as threading # noqa
-# work around http://bugs.python.org/issue2646
-if py265:
- safe_kwarg = lambda arg: arg # noqa
-else:
- safe_kwarg = str
-
-
def inspect_getfullargspec(func):
"""Fully vendored version of getfullargspec from Python 3.3."""
TYPE_CHECKING = False
-if py35:
+if py3k:
def _formatannotation(annotation, base_module=None):
"""vendored from python 3.7
return result
-elif py2k:
+else:
from inspect import formatargspec as _inspect_formatargspec
def inspect_formatargspec(*spec, **kw):
return _inspect_formatargspec(*spec[0:4], **kw) # noqa
-else:
- from inspect import formatargspec as inspect_formatargspec # noqa
-
-
# Fix deprecation of accessing ABCs straight from collections module
# (which will stop working in 3.8).
-if py33:
+if py3k:
import collections.abc as collections_abc
else:
import collections as collections_abc # noqa
license="MIT",
cmdclass=cmdclass,
long_description=readme,
- python_requires=">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*",
+ python_requires=">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*",
classifiers=[
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Programming Language :: Python :: 2",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3",
- "Programming Language :: Python :: 3.4",
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
try:
hasattr(User.addresses, "property")
except exc.InvalidRequestError:
- assert sa.util.compat.py32
+ assert sa.util.compat.py3k
# the exception is preserved. Remains the
# same through repeated calls.
try:
hasattr(Address.user, "property")
except sa.orm.exc.UnmappedClassError:
- assert util.compat.py32
+ assert util.compat.py3k
for i in range(3):
assert_raises_message(
from sqlalchemy import types as sqltypes
from sqlalchemy import Unicode
from sqlalchemy import UniqueConstraint
-from sqlalchemy import util
from sqlalchemy.engine import default
from sqlalchemy.schema import AddConstraint
from sqlalchemy.schema import CreateIndex
},
) # still populates
- def test_runs_safekwarg(self):
-
- with mock.patch(
- "sqlalchemy.util.safe_kwarg", lambda arg: "goofy_%s" % arg
- ):
- with self._fixture():
- idx = Index("a", "b")
- idx.kwargs[util.u("participating_x")] = 7
-
- eq_(list(idx.dialect_kwargs), ["goofy_participating_x"])
-
def test_combined(self):
with self._fixture():
idx = Index(