summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/util
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2020-01-17 17:31:41 -0500
committerMike Bayer <mike_mp@zzzcomputing.com>2020-01-17 17:44:57 -0500
commit9e31fc74089cf565df5f275d22eb8ae5414d6e45 (patch)
tree954edc3ebcc2116e388752e4aa53789e04113a23 /lib/sqlalchemy/util
parenta711522650863dd368acfa90e09216ae37fc3ec2 (diff)
downloadsqlalchemy-9e31fc74089cf565df5f275d22eb8ae5414d6e45.tar.gz
Remove jython code, remove all jython / pypy symbols
Removed all dialect code related to support for Jython and zxJDBC. Jython has not been supported by SQLAlchemy for many years and it is not expected that the current zxJDBC code is at all functional; for the moment it just takes up space and adds confusion by showing up in documentation. At the moment, it appears that Jython has achieved Python 2.7 support in its releases but not Python 3. If Jython were to be supported again, the form it should take is against the Python 3 version of Jython, and the various zxJDBC stubs for various backends should be implemented as a third party dialect. Additionally modernized logic that distinguishes between "cpython" and "pypy" to instead look at platform.python_distribution() which reliably tells us if we are cPython or not; all booleans which previously checked for pypy and sometimes jython are now converted to be "not cpython", this impacts the test suite for tests that are cPython centric. Fixes: #5094 Change-Id: I226cb55827f997daf6b4f4a755c18e7f4eb8d9ad
Diffstat (limited to 'lib/sqlalchemy/util')
-rw-r--r--lib/sqlalchemy/util/__init__.py3
-rw-r--r--lib/sqlalchemy/util/compat.py9
2 files changed, 7 insertions, 5 deletions
diff --git a/lib/sqlalchemy/util/__init__.py b/lib/sqlalchemy/util/__init__.py
index a19636f62..30e384027 100644
--- a/lib/sqlalchemy/util/__init__.py
+++ b/lib/sqlalchemy/util/__init__.py
@@ -53,12 +53,12 @@ from .compat import cmp # noqa
from .compat import cpython # noqa
from .compat import decode_backslashreplace # noqa
from .compat import dottedgetter # noqa
+from .compat import has_refcount_gc # noqa
from .compat import inspect_getfullargspec # noqa
from .compat import int_types # noqa
from .compat import iterbytes # noqa
from .compat import itertools_filter # noqa
from .compat import itertools_filterfalse # noqa
-from .compat import jython # noqa
from .compat import namedtuple # noqa
from .compat import nested # noqa
from .compat import next # noqa
@@ -69,7 +69,6 @@ from .compat import py2k # noqa
from .compat import py33 # noqa
from .compat import py36 # noqa
from .compat import py3k # noqa
-from .compat import pypy # noqa
from .compat import quote_plus # noqa
from .compat import raise_from_cause # noqa
from .compat import reduce # noqa
diff --git a/lib/sqlalchemy/util/compat.py b/lib/sqlalchemy/util/compat.py
index 2cb5db5d4..ea9ac0f11 100644
--- a/lib/sqlalchemy/util/compat.py
+++ b/lib/sqlalchemy/util/compat.py
@@ -11,6 +11,7 @@ import collections
import contextlib
import inspect
import operator
+import platform
import sys
@@ -21,10 +22,12 @@ 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)
-jython = sys.platform.startswith("java")
-pypy = hasattr(sys, "pypy_version_info")
+
+
+cpython = platform.python_implementation() == "CPython"
win32 = sys.platform.startswith("win")
-cpython = not pypy and not jython # TODO: something better for this ?
+
+has_refcount_gc = bool(cpython)
contextmanager = contextlib.contextmanager
dottedgetter = operator.attrgetter