]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
Remove jython code, remove all jython / pypy symbols
authorMike Bayer <mike_mp@zzzcomputing.com>
Fri, 17 Jan 2020 22:31:41 +0000 (17:31 -0500)
committerMike Bayer <mike_mp@zzzcomputing.com>
Fri, 17 Jan 2020 22:44:57 +0000 (17:44 -0500)
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

40 files changed:
doc/build/changelog/unreleased_14/5094.rst [new file with mode: 0644]
doc/build/dialects/mysql.rst
doc/build/dialects/oracle.rst
doc/build/dialects/postgresql.rst
doc/build/intro.rst
lib/sqlalchemy/connectors/zxJDBC.py [deleted file]
lib/sqlalchemy/dialects/mssql/__init__.py
lib/sqlalchemy/dialects/mssql/zxjdbc.py [deleted file]
lib/sqlalchemy/dialects/mysql/__init__.py
lib/sqlalchemy/dialects/mysql/zxjdbc.py [deleted file]
lib/sqlalchemy/dialects/oracle/__init__.py
lib/sqlalchemy/dialects/oracle/base.py
lib/sqlalchemy/dialects/oracle/zxjdbc.py [deleted file]
lib/sqlalchemy/dialects/postgresql/__init__.py
lib/sqlalchemy/dialects/postgresql/base.py
lib/sqlalchemy/dialects/postgresql/zxjdbc.py [deleted file]
lib/sqlalchemy/engine/default.py
lib/sqlalchemy/orm/__init__.py
lib/sqlalchemy/sql/sqltypes.py
lib/sqlalchemy/testing/engines.py
lib/sqlalchemy/testing/profiling.py
lib/sqlalchemy/testing/requirements.py
lib/sqlalchemy/testing/suite/test_insert.py
lib/sqlalchemy/testing/util.py
lib/sqlalchemy/util/__init__.py
lib/sqlalchemy/util/compat.py
test/aaa_profiling/test_pool.py
test/base/test_utils.py
test/dialect/oracle/test_types.py
test/dialect/postgresql/test_dialect.py
test/dialect/postgresql/test_query.py
test/dialect/postgresql/test_types.py
test/engine/test_execute.py
test/engine/test_transaction.py
test/ext/test_extendedattr.py
test/orm/test_deprecations.py
test/orm/test_froms.py
test/orm/test_instrumentation.py
test/requirements.py
test/sql/test_returning.py

diff --git a/doc/build/changelog/unreleased_14/5094.rst b/doc/build/changelog/unreleased_14/5094.rst
new file mode 100644 (file)
index 0000000..cecdba3
--- /dev/null
@@ -0,0 +1,14 @@
+.. change::
+    :tags: change, platform
+    :tickets: 5094
+
+    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.
+
index 01f84d16e45c1c75571dbd7c0c7681ffb89f4043..bfd345bc0482c52f973d805a0c9863c0e287dc6f 100644 (file)
@@ -201,7 +201,3 @@ pyodbc
 
 .. automodule:: sqlalchemy.dialects.mysql.pyodbc
 
-zxjdbc
-------
-
-.. automodule:: sqlalchemy.dialects.mysql.zxjdbc
index 7bb0d8c23a856fcca25b51b6751700352130f7a3..52d514aad22294716a00b6b1f66d6e63532554d9 100644 (file)
@@ -61,7 +61,3 @@ cx_Oracle
 
 .. automodule:: sqlalchemy.dialects.oracle.cx_oracle
 
-zxjdbc
-------
-
-.. automodule:: sqlalchemy.dialects.oracle.zxjdbc
index a1294cc4189d25aebc27cae091432bd86a55c35f..e03fba8d30c3e112f03f1e526da2c26d6130ab4f 100644 (file)
@@ -213,8 +213,3 @@ pygresql
 
 .. automodule:: sqlalchemy.dialects.postgresql.pygresql
 
-zxjdbc
-------
-
-.. automodule:: sqlalchemy.dialects.postgresql.zxjdbc
-
index 300831fe685a7712602fa6fe3720bf666fd071fa..f31206bde1f4c535120188d32d5516492398b588 100644 (file)
@@ -80,10 +80,6 @@ SQLAlchemy has been tested against the following platforms:
 .. versionchanged:: 1.3
    Within the Python 3 series, 3.4 is now the minimum Python 3 version supported.
 
-Platforms that don't currently have support include Jython and IronPython.
-Jython has been supported in the past and may be supported in future
-releases as well, depending on the state of Jython itself.
-
 Supported Installation Methods
 -------------------------------
 
diff --git a/lib/sqlalchemy/connectors/zxJDBC.py b/lib/sqlalchemy/connectors/zxJDBC.py
deleted file mode 100644 (file)
index 36c3fbc..0000000
+++ /dev/null
@@ -1,68 +0,0 @@
-# connectors/zxJDBC.py
-# Copyright (C) 2005-2020 the SQLAlchemy authors and contributors
-# <see AUTHORS file>
-#
-# This module is part of SQLAlchemy and is released under
-# the MIT License: http://www.opensource.org/licenses/mit-license.php
-
-import sys
-
-from . import Connector
-
-
-class ZxJDBCConnector(Connector):
-    driver = "zxjdbc"
-
-    supports_sane_rowcount = False
-    supports_sane_multi_rowcount = False
-
-    supports_unicode_binds = True
-    supports_unicode_statements = sys.version > "2.5.0+"
-    description_encoding = None
-    default_paramstyle = "qmark"
-
-    jdbc_db_name = None
-    jdbc_driver_name = None
-
-    @classmethod
-    def dbapi(cls):
-        from com.ziclix.python.sql import zxJDBC
-
-        return zxJDBC
-
-    def _driver_kwargs(self):
-        """Return kw arg dict to be sent to connect()."""
-        return {}
-
-    def _create_jdbc_url(self, url):
-        """Create a JDBC url from a :class:`~sqlalchemy.engine.url.URL`"""
-        return "jdbc:%s://%s%s/%s" % (
-            self.jdbc_db_name,
-            url.host,
-            url.port is not None and ":%s" % url.port or "",
-            url.database,
-        )
-
-    def create_connect_args(self, url):
-        opts = self._driver_kwargs()
-        opts.update(url.query)
-        return [
-            [
-                self._create_jdbc_url(url),
-                url.username,
-                url.password,
-                self.jdbc_driver_name,
-            ],
-            opts,
-        ]
-
-    def is_disconnect(self, e, connection, cursor):
-        if not isinstance(e, self.dbapi.ProgrammingError):
-            return False
-        e = str(e)
-        return "connection is closed" in e or "cursor is closed" in e
-
-    def _get_server_version_info(self, connection):
-        # use connection.connection.dbversion, and parse appropriately
-        # to get a tuple
-        raise NotImplementedError()
index d8d577a658463a5fd336b557c7e3addf35557abd..67830affe308035448b53e0fd44be7e166f4a9fb 100644 (file)
@@ -10,7 +10,6 @@ from . import base  # noqa
 from . import mxodbc  # noqa
 from . import pymssql  # noqa
 from . import pyodbc  # noqa
-from . import zxjdbc  # noqa
 from .base import BIGINT
 from .base import BINARY
 from .base import BIT
diff --git a/lib/sqlalchemy/dialects/mssql/zxjdbc.py b/lib/sqlalchemy/dialects/mssql/zxjdbc.py
deleted file mode 100644 (file)
index 9866644..0000000
+++ /dev/null
@@ -1,71 +0,0 @@
-# mssql/zxjdbc.py
-# Copyright (C) 2005-2020 the SQLAlchemy authors and contributors
-# <see AUTHORS file>
-#
-# This module is part of SQLAlchemy and is released under
-# the MIT License: http://www.opensource.org/licenses/mit-license.php
-
-"""
-.. dialect:: mssql+zxjdbc
-    :name: zxJDBC for Jython
-    :dbapi: zxjdbc
-    :connectstring: mssql+zxjdbc://user:pass@host:port/dbname[?key=value&key=value...]
-    :driverurl: http://jtds.sourceforge.net/
-
-    .. note:: Jython is not supported by current versions of SQLAlchemy.  The
-       zxjdbc dialect should be considered as experimental.
-
-"""  # noqa
-from .base import MSDialect
-from .base import MSExecutionContext
-from ... import engine
-from ...connectors.zxJDBC import ZxJDBCConnector
-
-
-class MSExecutionContext_zxjdbc(MSExecutionContext):
-
-    _embedded_scope_identity = False
-
-    def pre_exec(self):
-        super(MSExecutionContext_zxjdbc, self).pre_exec()
-        # scope_identity after the fact returns null in jTDS so we must
-        # embed it
-        if self._select_lastrowid and self.dialect.use_scope_identity:
-            self._embedded_scope_identity = True
-            self.statement += "; SELECT scope_identity()"
-
-    def post_exec(self):
-        if self._embedded_scope_identity:
-            while True:
-                try:
-                    row = self.cursor.fetchall()[0]
-                    break
-                except self.dialect.dbapi.Error:
-                    self.cursor.nextset()
-            self._lastrowid = int(row[0])
-
-        if (
-            self.isinsert or self.isupdate or self.isdelete
-        ) and self.compiled.returning:
-            self._result_proxy = engine.FullyBufferedResultProxy(self)
-
-        if self._enable_identity_insert:
-            table = self.dialect.identifier_preparer.format_table(
-                self.compiled.statement.table
-            )
-            self.cursor.execute("SET IDENTITY_INSERT %s OFF" % table)
-
-
-class MSDialect_zxjdbc(ZxJDBCConnector, MSDialect):
-    jdbc_db_name = "jtds:sqlserver"
-    jdbc_driver_name = "net.sourceforge.jtds.jdbc.Driver"
-
-    execution_ctx_cls = MSExecutionContext_zxjdbc
-
-    def _get_server_version_info(self, connection):
-        return tuple(
-            int(x) for x in connection.connection.dbversion.split(".")
-        )
-
-
-dialect = MSDialect_zxjdbc
index c9f3b43b47907f4fb3e129bd391b0272d97723b0..f1f1cce371a5c509068e14bfd1064b3751dc4702 100644 (file)
@@ -13,7 +13,6 @@ from . import mysqldb  # noqa
 from . import oursql  # noqa
 from . import pymysql  # noqa
 from . import pyodbc  # noqa
-from . import zxjdbc  # noqa
 from .base import BIGINT
 from .base import BINARY
 from .base import BIT
diff --git a/lib/sqlalchemy/dialects/mysql/zxjdbc.py b/lib/sqlalchemy/dialects/mysql/zxjdbc.py
deleted file mode 100644 (file)
index cf947b9..0000000
+++ /dev/null
@@ -1,120 +0,0 @@
-# mysql/zxjdbc.py
-# Copyright (C) 2005-2020 the SQLAlchemy authors and contributors
-# <see AUTHORS file>
-#
-# This module is part of SQLAlchemy and is released under
-# the MIT License: http://www.opensource.org/licenses/mit-license.php
-
-r"""
-
-.. dialect:: mysql+zxjdbc
-    :name: zxjdbc for Jython
-    :dbapi: zxjdbc
-    :connectstring: mysql+zxjdbc://<user>:<password>@<hostname>[:<port>]/<database>
-    :driverurl: http://dev.mysql.com/downloads/connector/j/
-
-    .. note:: Jython is not supported by current versions of SQLAlchemy.  The
-       zxjdbc dialect should be considered as experimental.
-
-Character Sets
---------------
-
-SQLAlchemy zxjdbc dialects pass unicode straight through to the
-zxjdbc/JDBC layer. To allow multiple character sets to be sent from the
-MySQL Connector/J JDBC driver, by default SQLAlchemy sets its
-``characterEncoding`` connection property to ``UTF-8``. It may be
-overridden via a ``create_engine`` URL parameter.
-
-"""  # noqa
-import re
-
-from .base import BIT
-from .base import MySQLDialect
-from .base import MySQLExecutionContext
-from ... import types as sqltypes
-from ... import util
-from ...connectors.zxJDBC import ZxJDBCConnector
-
-
-class _ZxJDBCBit(BIT):
-    def result_processor(self, dialect, coltype):
-        """Converts boolean or byte arrays from MySQL Connector/J to longs."""
-
-        def process(value):
-            if value is None:
-                return value
-            if isinstance(value, bool):
-                return int(value)
-            v = 0
-            for i in value:
-                v = v << 8 | (i & 0xFF)
-            value = v
-            return value
-
-        return process
-
-
-class MySQLExecutionContext_zxjdbc(MySQLExecutionContext):
-    def get_lastrowid(self):
-        cursor = self.create_cursor()
-        cursor.execute("SELECT LAST_INSERT_ID()")
-        lastrowid = cursor.fetchone()[0]
-        cursor.close()
-        return lastrowid
-
-
-class MySQLDialect_zxjdbc(ZxJDBCConnector, MySQLDialect):
-    jdbc_db_name = "mysql"
-    jdbc_driver_name = "com.mysql.jdbc.Driver"
-
-    execution_ctx_cls = MySQLExecutionContext_zxjdbc
-
-    colspecs = util.update_copy(
-        MySQLDialect.colspecs, {sqltypes.Time: sqltypes.Time, BIT: _ZxJDBCBit}
-    )
-
-    def _detect_charset(self, connection):
-        """Sniff out the character set in use for connection results."""
-        # Prefer 'character_set_results' for the current connection over the
-        # value in the driver.  SET NAMES or individual variable SETs will
-        # change the charset without updating the driver's view of the world.
-        #
-        # If it's decided that issuing that sort of SQL leaves you SOL, then
-        # this can prefer the driver value.
-        rs = connection.execute("SHOW VARIABLES LIKE 'character_set%%'")
-        opts = {row[0]: row[1] for row in self._compat_fetchall(rs)}
-        for key in ("character_set_connection", "character_set"):
-            if opts.get(key, None):
-                return opts[key]
-
-        util.warn(
-            "Could not detect the connection character set.  "
-            "Assuming latin1."
-        )
-        return "latin1"
-
-    def _driver_kwargs(self):
-        """return kw arg dict to be sent to connect()."""
-        return dict(characterEncoding="UTF-8", yearIsDateType="false")
-
-    def _extract_error_code(self, exception):
-        # e.g.: DBAPIError: (Error) Table 'test.u2' doesn't exist
-        # [SQLCode: 1146], [SQLState: 42S02] 'DESCRIBE `u2`' ()
-        m = re.compile(r"\[SQLCode\: (\d+)\]").search(str(exception.args))
-        c = m.group(1)
-        if c:
-            return int(c)
-
-    def _get_server_version_info(self, connection):
-        dbapi_con = connection.connection
-        version = []
-        r = re.compile(r"[.\-]")
-        for n in r.split(dbapi_con.dbversion):
-            try:
-                version.append(int(n))
-            except ValueError:
-                version.append(n)
-        return tuple(version)
-
-
-dialect = MySQLDialect_zxjdbc
index 849dd6924a6591192f32dc89b16636b7cce0627e..a4dee02ff93e40c978daccc2d9a0e7a2c748df2b 100644 (file)
@@ -7,7 +7,6 @@
 
 from . import base  # noqa
 from . import cx_oracle  # noqa
-from . import zxjdbc  # noqa
 from .base import BFILE
 from .base import BINARY_DOUBLE
 from .base import BINARY_FLOAT
index abf3af8212efc39444d39b8b0adb1c18c3efabcf..9cb25b934fd17f2a676494c8700bf9309dc0e83d 100644 (file)
@@ -575,7 +575,7 @@ class INTERVAL(sqltypes.NativeForEmulated, sqltypes._AbstractInterval):
 
         Note that only DAY TO SECOND intervals are currently supported.
         This is due to a lack of support for YEAR TO MONTH intervals
-        within available DBAPIs (cx_oracle and zxjdbc).
+        within available DBAPIs.
 
         :param day_precision: the day precision value.  this is the number of
           digits to store for the day field.  Defaults to "2"
diff --git a/lib/sqlalchemy/dialects/oracle/zxjdbc.py b/lib/sqlalchemy/dialects/oracle/zxjdbc.py
deleted file mode 100644 (file)
index 66878b2..0000000
+++ /dev/null
@@ -1,254 +0,0 @@
-# oracle/zxjdbc.py
-# Copyright (C) 2005-2020 the SQLAlchemy authors and contributors
-# <see AUTHORS file>
-#
-# This module is part of SQLAlchemy and is released under
-# the MIT License: http://www.opensource.org/licenses/mit-license.php
-
-"""
-.. dialect:: oracle+zxjdbc
-    :name: zxJDBC for Jython
-    :dbapi: zxjdbc
-    :connectstring: oracle+zxjdbc://user:pass@host/dbname
-    :driverurl: http://www.oracle.com/technetwork/database/features/jdbc/index-091264.html
-
-    .. note:: Jython is not supported by current versions of SQLAlchemy.  The
-       zxjdbc dialect should be considered as experimental.
-
-"""  # noqa
-import collections
-import decimal
-import re
-
-from .base import OracleCompiler
-from .base import OracleDialect
-from .base import OracleExecutionContext
-from ... import sql
-from ... import types as sqltypes
-from ... import util
-from ...connectors.zxJDBC import ZxJDBCConnector
-from ...engine import result as _result
-from ...sql import expression
-
-
-SQLException = zxJDBC = None
-
-
-class _ZxJDBCDate(sqltypes.Date):
-    def result_processor(self, dialect, coltype):
-        def process(value):
-            if value is None:
-                return None
-            else:
-                return value.date()
-
-        return process
-
-
-class _ZxJDBCNumeric(sqltypes.Numeric):
-    def result_processor(self, dialect, coltype):
-        # XXX: does the dialect return Decimal or not???
-        # if it does (in all cases), we could use a None processor as well as
-        # the to_float generic processor
-        if self.asdecimal:
-
-            def process(value):
-                if isinstance(value, decimal.Decimal):
-                    return value
-                else:
-                    return decimal.Decimal(str(value))
-
-        else:
-
-            def process(value):
-                if isinstance(value, decimal.Decimal):
-                    return float(value)
-                else:
-                    return value
-
-        return process
-
-
-class OracleCompiler_zxjdbc(OracleCompiler):
-    def returning_clause(self, stmt, returning_cols):
-        self.returning_cols = list(
-            expression._select_iterables(returning_cols)
-        )
-
-        # within_columns_clause=False so that labels (foo AS bar) don't render
-        columns = [
-            self.process(c, within_columns_clause=False)
-            for c in self.returning_cols
-        ]
-
-        if not hasattr(self, "returning_parameters"):
-            self.returning_parameters = []
-
-        binds = []
-        for i, col in enumerate(self.returning_cols):
-            dbtype = col.type.dialect_impl(self.dialect).get_dbapi_type(
-                self.dialect.dbapi
-            )
-            self.returning_parameters.append((i + 1, dbtype))
-
-            bindparam = sql.bindparam(
-                "ret_%d" % i, value=ReturningParam(dbtype)
-            )
-            self.binds[bindparam.key] = bindparam
-            binds.append(
-                self.bindparam_string(self._truncate_bindparam(bindparam))
-            )
-
-        return "RETURNING " + ", ".join(columns) + " INTO " + ", ".join(binds)
-
-
-class OracleExecutionContext_zxjdbc(OracleExecutionContext):
-    def pre_exec(self):
-        if hasattr(self.compiled, "returning_parameters"):
-            # prepare a zxJDBC statement so we can grab its underlying
-            # OraclePreparedStatement's getReturnResultSet later
-            self.statement = self.cursor.prepare(self.statement)
-
-    def get_result_proxy(self):
-        if hasattr(self.compiled, "returning_parameters"):
-            rrs = None
-            try:
-                try:
-                    rrs = self.statement.__statement__.getReturnResultSet()
-                    next(rrs)
-                except SQLException as sqle:
-                    msg = "%s [SQLCode: %d]" % (
-                        sqle.getMessage(),
-                        sqle.getErrorCode(),
-                    )
-                    if sqle.getSQLState() is not None:
-                        msg += " [SQLState: %s]" % sqle.getSQLState()
-                    raise zxJDBC.Error(msg)
-                else:
-                    row = tuple(
-                        self.cursor.datahandler.getPyObject(rrs, index, dbtype)
-                        for index, dbtype in self.compiled.returning_parameters
-                    )
-                    return ReturningResultProxy(self, row)
-            finally:
-                if rrs is not None:
-                    try:
-                        rrs.close()
-                    except SQLException:
-                        pass
-                self.statement.close()
-
-        return _result.ResultProxy(self)
-
-    def create_cursor(self):
-        cursor = self._dbapi_connection.cursor()
-        cursor.datahandler = self.dialect.DataHandler(cursor.datahandler)
-        return cursor
-
-
-class ReturningResultProxy(_result.FullyBufferedResultProxy):
-
-    """ResultProxy backed by the RETURNING ResultSet results."""
-
-    def __init__(self, context, returning_row):
-        self._returning_row = returning_row
-        super(ReturningResultProxy, self).__init__(context)
-
-    def _cursor_description(self):
-        ret = []
-        for c in self.context.compiled.returning_cols:
-            if hasattr(c, "name"):
-                ret.append((c.name, c.type))
-            else:
-                ret.append((c.anon_label, c.type))
-        return ret
-
-    def _buffer_rows(self):
-        return collections.deque([self._returning_row])
-
-
-class ReturningParam(object):
-
-    """A bindparam value representing a RETURNING parameter.
-
-    Specially handled by OracleReturningDataHandler.
-    """
-
-    def __init__(self, type_):
-        self.type = type_
-
-    def __eq__(self, other):
-        if isinstance(other, ReturningParam):
-            return self.type == other.type
-        return NotImplemented
-
-    def __ne__(self, other):
-        if isinstance(other, ReturningParam):
-            return self.type != other.type
-        return NotImplemented
-
-    def __repr__(self):
-        kls = self.__class__
-        return "<%s.%s object at 0x%x type=%s>" % (
-            kls.__module__,
-            kls.__name__,
-            id(self),
-            self.type,
-        )
-
-
-class OracleDialect_zxjdbc(ZxJDBCConnector, OracleDialect):
-    jdbc_db_name = "oracle"
-    jdbc_driver_name = "oracle.jdbc.OracleDriver"
-
-    statement_compiler = OracleCompiler_zxjdbc
-    execution_ctx_cls = OracleExecutionContext_zxjdbc
-
-    colspecs = util.update_copy(
-        OracleDialect.colspecs,
-        {sqltypes.Date: _ZxJDBCDate, sqltypes.Numeric: _ZxJDBCNumeric},
-    )
-
-    def __init__(self, *args, **kwargs):
-        super(OracleDialect_zxjdbc, self).__init__(*args, **kwargs)
-        global SQLException, zxJDBC
-        from java.sql import SQLException
-        from com.ziclix.python.sql import zxJDBC
-        from com.ziclix.python.sql.handler import OracleDataHandler
-
-        class OracleReturningDataHandler(OracleDataHandler):
-            """zxJDBC DataHandler that specially handles ReturningParam."""
-
-            def setJDBCObject(self, statement, index, object_, dbtype=None):
-                if type(object_) is ReturningParam:
-                    statement.registerReturnParameter(index, object_.type)
-                elif dbtype is None:
-                    OracleDataHandler.setJDBCObject(
-                        self, statement, index, object_
-                    )
-                else:
-                    OracleDataHandler.setJDBCObject(
-                        self, statement, index, object_, dbtype
-                    )
-
-        self.DataHandler = OracleReturningDataHandler
-
-    def initialize(self, connection):
-        super(OracleDialect_zxjdbc, self).initialize(connection)
-        self.implicit_returning = connection.connection.driverversion >= "10.2"
-
-    def _create_jdbc_url(self, url):
-        return "jdbc:oracle:thin:@%s:%s:%s" % (
-            url.host,
-            url.port or 1521,
-            url.database,
-        )
-
-    def _get_server_version_info(self, connection):
-        version = re.search(
-            r"Release ([\d\.]+)", connection.connection.dbversion
-        ).group(1)
-        return tuple(int(x) for x in version.split("."))
-
-
-dialect = OracleDialect_zxjdbc
index 80875916a0dca6c966c3fda9bd93b297eda041c4..06d22872a980838b554fc1420f213f390f236d7b 100644 (file)
@@ -11,7 +11,6 @@ from . import psycopg2  # noqa
 from . import psycopg2cffi  # noqa
 from . import pygresql  # noqa
 from . import pypostgresql  # noqa
-from . import zxjdbc  # noqa
 from .array import All
 from .array import Any
 from .array import ARRAY
index 0f08d1f40bb0d3d90cdda63e862c846f8e588ba7..cbc750066c1f1596f38a78b4c229c87b825e3708 100644 (file)
@@ -1156,9 +1156,6 @@ class INTERVAL(sqltypes.NativeForEmulated, sqltypes._AbstractInterval):
 
     """PostgreSQL INTERVAL type.
 
-    The INTERVAL type may not be supported on all DBAPIs.
-    It is known to work on psycopg2 and not pg8000 or zxjdbc.
-
     """
 
     __visit_name__ = "INTERVAL"
diff --git a/lib/sqlalchemy/dialects/postgresql/zxjdbc.py b/lib/sqlalchemy/dialects/postgresql/zxjdbc.py
deleted file mode 100644 (file)
index 6ca7fcf..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-# postgresql/zxjdbc.py
-# Copyright (C) 2005-2020 the SQLAlchemy authors and contributors
-# <see AUTHORS file>
-#
-# This module is part of SQLAlchemy and is released under
-# the MIT License: http://www.opensource.org/licenses/mit-license.php
-
-"""
-.. dialect:: postgresql+zxjdbc
-    :name: zxJDBC for Jython
-    :dbapi: zxjdbc
-    :connectstring: postgresql+zxjdbc://scott:tiger@localhost/db
-    :driverurl: http://jdbc.postgresql.org/
-
-
-"""
-from .base import PGDialect
-from .base import PGExecutionContext
-from ...connectors.zxJDBC import ZxJDBCConnector
-
-
-class PGExecutionContext_zxjdbc(PGExecutionContext):
-    def create_cursor(self):
-        cursor = self._dbapi_connection.cursor()
-        cursor.datahandler = self.dialect.DataHandler(cursor.datahandler)
-        return cursor
-
-
-class PGDialect_zxjdbc(ZxJDBCConnector, PGDialect):
-    jdbc_db_name = "postgresql"
-    jdbc_driver_name = "org.postgresql.Driver"
-
-    execution_ctx_cls = PGExecutionContext_zxjdbc
-
-    supports_native_decimal = True
-
-    def __init__(self, *args, **kwargs):
-        super(PGDialect_zxjdbc, self).__init__(*args, **kwargs)
-        from com.ziclix.python.sql.handler import PostgresqlDataHandler
-
-        self.DataHandler = PostgresqlDataHandler
-
-    def _get_server_version_info(self, connection):
-        parts = connection.connection.dbversion.split(".")
-        return tuple(int(x) for x in parts)
-
-
-dialect = PGDialect_zxjdbc
index cc65a0c4953a95df58fc855a67df19dfab1f7ab6..1c995f05fec5d434c37b9aaedc2700300494512d 100644 (file)
@@ -410,9 +410,7 @@ class DefaultDialect(interfaces.Dialect):
             return results == {True}
 
     def _check_unicode_description(self, connection):
-        # all DBAPIs on Py2K return cursor.description as encoded,
-        # until pypy2.1beta2 with sqlite, so let's just check it -
-        # it's likely others will start doing this too in Py2k.
+        # all DBAPIs on Py2K return cursor.description as encoded
 
         if util.py2k and not self.supports_unicode_statements:
             cast_to = util.binary_type
index 45a777a560785c778cbb983381511569bbe691df..05fcc3fc9938313ac97d11e5a4df7bab8c8ac1cd 100644 (file)
@@ -233,12 +233,8 @@ def clear_mappers():
     """
     with mapperlib._CONFIGURE_MUTEX:
         while _mapper_registry:
-            try:
-                # can't even reliably call list(weakdict) in jython
-                mapper, b = _mapper_registry.popitem()
-                mapper.dispose()
-            except KeyError:
-                pass
+            mapper, b = _mapper_registry.popitem()
+            mapper.dispose()
 
 
 joinedload = strategy_options.joinedload._unbound_fn
index 6d0d00409b5c4ef984e38cabd32ac1cad76822be..52b9fa1a9adb2bffe68188865d50fa43483ae973 100644 (file)
@@ -41,10 +41,6 @@ from ..util import compat
 from ..util import pickle
 
 
-if util.jython:
-    import array
-
-
 class _LookupExpressionAdapter(object):
 
     """Mixin expression adaptations based on lookup tables.
@@ -923,19 +919,7 @@ class _Binary(TypeEngine):
     if util.py2k:
 
         def result_processor(self, dialect, coltype):
-            if util.jython:
-
-                def process(value):
-                    if value is not None:
-                        if isinstance(value, array.array):
-                            return value.tostring()
-                        return str(value)
-                    else:
-                        return None
-
-            else:
-                process = processors.to_str
-            return process
+            return processors.to_str
 
     else:
 
index 4aa5560bf4f957c853046a7456320488d74b1bd3..ff4f89606edea4d9d02e57ff4fec9a2c6f676611 100644 (file)
@@ -58,7 +58,7 @@ class ConnectionKiller(object):
         # this can cause a deadlock with pg8000 - pg8000 acquires
         # prepared statement lock inside of rollback() - if async gc
         # is collecting in finalize_fairy, deadlock.
-        # not sure if this should be if pypy/jython only.
+        # not sure if this should be for non-cpython only.
         # note that firebird/fdb definitely needs this though
         for conn, rec in list(self.conns):
             if rec.connection is None:
index 14a6fc4acbb4ac9f4c31d2d2644d893464699467..cc6557018a7e8bbe55ff0593517da9f558b36d3b 100644 (file)
@@ -15,13 +15,13 @@ in a more fine-grained way than nose's profiling plugin.
 import collections
 import contextlib
 import os
+import platform
 import pstats
 import sys
 
 from . import config
 from .util import gc_collect
-from ..util import jython
-from ..util import pypy
+from ..util import cpython
 from ..util import win32
 
 
@@ -91,12 +91,12 @@ class ProfileStatsFile(object):
         # keep it at 2.7, 3.1, 3.2, etc. for now.
         py_version = ".".join([str(v) for v in sys.version_info[0:2]])
 
-        platform_tokens = [py_version]
+        if not cpython:
+            platform_tokens = [platform.python_implementation(), py_version]
+        else:
+            platform_tokens = [py_version]
         platform_tokens.append(dbapi_key)
-        if jython:
-            platform_tokens.append("jython")
-        if pypy:
-            platform_tokens.append("pypy")
+
         if win32:
             platform_tokens.append("win")
         platform_tokens.append(
index 4088c0cb1cee4f5b9b508eb933b59a46e8aa0153..b3375f6d5b08001854c43765c524e4c97cc6435b 100644 (file)
@@ -1034,7 +1034,7 @@ class SuiteRequirements(Requirements):
         from sqlalchemy.util import pickle
 
         return exclusions.only_if(
-            lambda: not util.pypy
+            lambda: util.cpython
             and pickle.__name__ == "cPickle"
             or sys.version_info >= (3, 2),
             "Needs cPickle+cPython or newer Python 3 pickle",
index fc535aa23d110bbc15df97f97b40a4db3130401a..2cc8761b8f3fe1cac7cbc289ef3f43627a44d73f 100644 (file)
@@ -56,10 +56,6 @@ class LastrowidTest(fixtures.TablesTest):
         pk = config.db.scalar(select([self.tables.autoinc_pk.c.id]))
         eq_(r.inserted_primary_key, [pk])
 
-    # failed on pypy1.9 but seems to be OK on pypy 2.1
-    # @exclusions.fails_if(lambda: util.pypy,
-    #                      "lastrowid not maintained after "
-    #                      "connection close")
     @requirements.dbapi_lastrowid
     def test_native_lastrowid_autoinc(self):
         r = config.db.execute(
index de20bb794fad9eaac4fc1beedf6698104a671cae..c52dc4a19b524fe11c5cd408211e9f14e005a1fe 100644 (file)
@@ -9,36 +9,22 @@ import decimal
 import gc
 import random
 import sys
-import time
 import types
 
 from . import mock
 from ..util import decorator
 from ..util import defaultdict
+from ..util import has_refcount_gc
 from ..util import inspect_getfullargspec
-from ..util import jython
 from ..util import py2k
-from ..util import pypy
 
-if jython:
+if not has_refcount_gc:
 
-    def jython_gc_collect(*args):
-        """aggressive gc.collect for tests."""
-        gc.collect()
-        time.sleep(0.1)
-        gc.collect()
-        gc.collect()
-        return 0
-
-    # "lazy" gc, for VM's that don't GC on refcount == 0
-    gc_collect = lazy_gc = jython_gc_collect
-elif pypy:
-
-    def pypy_gc_collect(*args):
+    def non_refcount_gc_collect(*args):
         gc.collect()
         gc.collect()
 
-    gc_collect = lazy_gc = pypy_gc_collect
+    gc_collect = lazy_gc = non_refcount_gc_collect
 else:
     # assume CPython - straight gc.collect, lazy_gc() is a pass
     gc_collect = gc.collect
index a19636f623641dc6fd559cc7bee6bc4eb5830922..30e384027954bbe1fbd3e4a7dc6c2f1e5769c662 100644 (file)
@@ -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
index 2cb5db5d42053e9368b4905a918f57055fbc4bd6..ea9ac0f1162520460d2be218e2034dd201139b4a 100644 (file)
@@ -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
index 07438f880ff5869967d3505e648528c0eb1a1792..d74dcf62774fcb0aa1c7ca1e24013e350f4207e1 100644 (file)
@@ -21,8 +21,8 @@ class QueuePoolTest(fixtures.TestBase, AssertsExecutionResults):
     def teardown(self):
         # the tests leave some fake connections
         # around which don't necessarily
-        # get gc'ed as quickly as we'd like,
-        # on backends like pypy, python3.2
+        # get gc'ed as quickly as we'd like all the time,
+        # particularly for non-refcount gc
         pool_module._refs.clear()
 
     def setup(self):
index e4d5a4d5fb36ff05a7746556d024dd748da1547a..1f7c0cf623a3144c0dba49bc5fce51226b3dced8 100644 (file)
@@ -15,7 +15,6 @@ from sqlalchemy.testing import assert_raises
 from sqlalchemy.testing import assert_raises_message
 from sqlalchemy.testing import eq_
 from sqlalchemy.testing import expect_warnings
-from sqlalchemy.testing import fails_if
 from sqlalchemy.testing import fixtures
 from sqlalchemy.testing import in_
 from sqlalchemy.testing import is_
@@ -2060,13 +2059,13 @@ class ArgInspectionTest(fixtures.TestBase):
             ),
         )
 
-    @fails_if(lambda: util.pypy, "pypy returns plain *arg, **kw")
+    @testing.requires.cpython
     def test_callable_argspec_py_builtin(self):
         import datetime
 
         assert_raises(TypeError, get_callable_argspec, datetime.datetime.now)
 
-    @fails_if(lambda: util.pypy, "pypy returns plain *arg, **kw")
+    @testing.requires.cpython
     def test_callable_argspec_obj_init(self):
         assert_raises(TypeError, get_callable_argspec, object)
 
@@ -2148,7 +2147,7 @@ class ArgInspectionTest(fixtures.TestBase):
             compat.FullArgSpec(["x", "y"], None, None, None, [], None, {}),
         )
 
-    @fails_if(lambda: util.pypy, "pypy returns plain *arg, **kw")
+    @testing.requires.cpython
     def test_callable_argspec_partial(self):
         from functools import partial
 
@@ -2495,10 +2494,7 @@ class TestFormatArgspec(_Py3KFixtures, fixtures.TestBase):
                 grouped=False,
             )
 
-    @testing.fails_if(
-        lambda: util.pypy,
-        "pypy doesn't report Obj.__init__ as object.__init__",
-    )
+    @testing.requires.cpython
     def test_init_grouped(self):
         object_spec = {
             "args": "(self)",
@@ -2522,10 +2518,7 @@ class TestFormatArgspec(_Py3KFixtures, fixtures.TestBase):
         self._test_init(None, object_spec, wrapper_spec, custom_spec)
         self._test_init(True, object_spec, wrapper_spec, custom_spec)
 
-    @testing.fails_if(
-        lambda: util.pypy,
-        "pypy doesn't report Obj.__init__ as object.__init__",
-    )
+    @testing.requires.cpython
     def test_init_bare(self):
         object_spec = {
             "args": "self",
index b3bde1c7fd66214f07358bea695a4408f27e7142..23c73a231d01d7206ea1d615eb5b960b49f1f9d7 100644 (file)
@@ -275,9 +275,6 @@ class TypesTest(fixtures.TestBase):
             )
             eq_(conn.execute(s3).fetchall(), [(5, rowid)])
 
-    @testing.fails_on(
-        "+zxjdbc", "Not yet known how to pass values of the " "INTERVAL type"
-    )
     @testing.provide_metadata
     def test_interval(self):
         metadata = self.metadata
index cf33f7cbbf5422e750611fcbbf3f25beb5492d44..107f3a9b24cb23009cc087bacf842700cf0511c6 100644 (file)
@@ -584,7 +584,8 @@ class MiscBackendTest(
 
     @testing.requires.psycopg2_compatibility
     def test_psycopg2_non_standard_err(self):
-        # under pypy the name here is psycopg2cffi
+        # note that psycopg2 is sometimes called psycopg2cffi
+        # depending on platform
         psycopg2 = testing.db.dialect.dbapi
         TransactionRollbackError = __import__(
             "%s.extensions" % psycopg2.__name__
@@ -670,11 +671,6 @@ $$ LANGUAGE plpgsql;
             "commit prepared 'gilberte'",
         )
 
-    @testing.fails_on(
-        "+zxjdbc",
-        "Can't infer the SQL type to use for an instance "
-        "of org.python.core.PyObjectDerived.",
-    )
     def test_extract(self):
         fivedaysago = testing.db.scalar(
             select([func.now()])
@@ -784,7 +780,6 @@ $$ LANGUAGE plpgsql;
         finally:
             testing.db.execute("drop table speedy_users")
 
-    @testing.fails_on("+zxjdbc", "psycopg2/pg8000 specific assertion")
     @testing.requires.psycopg2_or_pg8000_compatibility
     def test_numeric_raise(self):
         stmt = text("select cast('hi' as char) as hi").columns(hi=Numeric)
index cf51104d8bf8947a8620ca235b0d30f0d0a042eb..65defea801213cf3208ece53c555f0c85369ce5f 100644 (file)
@@ -751,7 +751,6 @@ class MatchTest(fixtures.TestBase, AssertsCompiledSQL):
         metadata.drop_all()
 
     @testing.fails_on("postgresql+pg8000", "uses positional")
-    @testing.fails_on("postgresql+zxjdbc", "uses qmark")
     def test_expression_pyformat(self):
         self.assert_compile(
             matchtable.c.title.match("somstr"),
@@ -761,7 +760,6 @@ class MatchTest(fixtures.TestBase, AssertsCompiledSQL):
     @testing.fails_on("postgresql+psycopg2", "uses pyformat")
     @testing.fails_on("postgresql+pypostgresql", "uses pyformat")
     @testing.fails_on("postgresql+pygresql", "uses pyformat")
-    @testing.fails_on("postgresql+zxjdbc", "uses qmark")
     @testing.fails_on("postgresql+psycopg2cffi", "uses pyformat")
     def test_expression_positional(self):
         self.assert_compile(
index 6bcfb17364c3a07675fb6a647482f34ec9a6d269..6a61fb33be4cbed12c79e923f61032f4eb360bec 100644 (file)
@@ -95,10 +95,6 @@ class FloatCoercionTest(fixtures.TablesTest, AssertsExecutionResults):
             {"data": 9},
         )
 
-    @testing.fails_on(
-        "postgresql+zxjdbc",
-        "XXX: postgresql+zxjdbc currently returns a Decimal result for Float",
-    )
     def test_float_coercion(self):
         data_table = self.tables.data_table
 
@@ -119,9 +115,6 @@ class FloatCoercionTest(fixtures.TablesTest, AssertsExecutionResults):
             ).scalar()
             eq_(round_decimal(ret, 9), result)
 
-    @testing.fails_on(
-        "postgresql+zxjdbc", "zxjdbc has no support for PG arrays"
-    )
     @testing.provide_metadata
     def test_arrays_pg(self):
         metadata = self.metadata
@@ -138,9 +131,6 @@ class FloatCoercionTest(fixtures.TablesTest, AssertsExecutionResults):
         row = t1.select().execute().first()
         eq_(row, ([5], [5], [6], [decimal.Decimal("6.4")]))
 
-    @testing.fails_on(
-        "postgresql+zxjdbc", "zxjdbc has no support for PG arrays"
-    )
     @testing.provide_metadata
     def test_arrays_base(self):
         metadata = self.metadata
@@ -163,11 +153,6 @@ class EnumTest(fixtures.TestBase, AssertsExecutionResults):
 
     __only_on__ = "postgresql > 8.3"
 
-    @testing.fails_on(
-        "postgresql+zxjdbc",
-        'zxjdbc fails on ENUM: column "XXX" is of type '
-        "XXX but expression is of type character varying",
-    )
     @testing.provide_metadata
     def test_create_table(self):
         metadata = self.metadata
@@ -198,11 +183,6 @@ class EnumTest(fixtures.TestBase, AssertsExecutionResults):
             exc.CompileError, etype.compile, dialect=postgresql.dialect()
         )
 
-    @testing.fails_on(
-        "postgresql+zxjdbc",
-        'zxjdbc fails on ENUM: column "XXX" is of type '
-        "XXX but expression is of type character varying",
-    )
     @testing.provide_metadata
     def test_unicode_labels(self):
         metadata = self.metadata
@@ -842,10 +822,6 @@ class TimezoneTest(fixtures.TestBase):
     def teardown_class(cls):
         metadata.drop_all()
 
-    @testing.fails_on(
-        "postgresql+zxjdbc",
-        "XXX: postgresql+zxjdbc doesn't give a tzinfo back",
-    )
     def test_with_timezone(self):
 
         # get a date with a tzinfo
@@ -1201,7 +1177,7 @@ class ArrayRoundTripTest(object):
 
     __only_on__ = "postgresql"
     __backend__ = True
-    __unsupported_on__ = "postgresql+pg8000", "postgresql+zxjdbc"
+    __unsupported_on__ = ("postgresql+pg8000",)
 
     ARRAY = postgresql.ARRAY
 
index b71eb88378445f47f0243f64d8539993c8da3d28..2c6473166c427b7fda11a7e6773d09716cee2f9c 100644 (file)
@@ -105,7 +105,7 @@ class ExecuteTest(fixtures.TestBase):
         eq_(result, "%")
 
     @testing.fails_on_everything_except(
-        "firebird", "sqlite", "+pyodbc", "+mxodbc", "+zxjdbc", "mysql+oursql"
+        "firebird", "sqlite", "+pyodbc", "+mxodbc", "mysql+oursql"
     )
     def test_raw_qmark(self):
         def go(conn):
@@ -172,7 +172,6 @@ class ExecuteTest(fixtures.TestBase):
         "mysql+mysqlconnector",
         "postgresql",
     )
-    @testing.fails_on("postgresql+zxjdbc", "sprintf not supported")
     def test_raw_sprintf(self):
         def go(conn):
             conn.execute(
index 595849bd5f7a7b6f5e2935639464f0e656005a0e..39c9b2ad4a833bc8ffcdf5a361b6f4be761c50eb 100644 (file)
@@ -374,10 +374,6 @@ class TransactionTest(fixtures.TestBase):
         connection.close()
 
     @testing.requires.savepoints
-    @testing.crashes(
-        "oracle+zxjdbc",
-        "Errors out and causes subsequent tests to " "deadlock",
-    )
     def test_nested_subtransaction_commit(self):
         connection = testing.db.connect()
         transaction = connection.begin()
index 46df83a3015e6dee8bcd4cda0f85af16e6f14719..df9d2f9d56dd84564c3cf8a1c6b13361a975fe9a 100644 (file)
@@ -109,7 +109,7 @@ class UserDefinedExtensionTest(_ExtBase, fixtures.ORMTest):
             )
 
             # This proves SA can handle a class with non-string dict keys
-            if not util.pypy and not util.jython:
+            if util.cpython:
                 locals()[42] = 99  # Don't remove this line!
 
             def __init__(self, **kwargs):
index 6b423d03fe98ae580715ac95009229b913593c20..17954f3089c120a709894db41fc710302383fa10 100644 (file)
@@ -46,7 +46,6 @@ from sqlalchemy.testing import is_true
 from sqlalchemy.testing.schema import Column
 from sqlalchemy.testing.schema import Table
 from sqlalchemy.testing.util import gc_collect
-from sqlalchemy.util.compat import pypy
 from . import _fixtures
 from .inheritance import _poly_fixtures
 from .test_options import PathTest as OptionsPathTest
@@ -343,8 +342,7 @@ class StrongIdentityMapTest(_fixtures.FixtureTest):
     def test_prune_events(self):
         self._test_prune(self._event_fixture)
 
-    @testing.fails_if(lambda: pypy, "pypy has a real GC")
-    @testing.fails_on("+zxjdbc", "http://www.sqlalchemy.org/trac/ticket/1473")
+    @testing.requires.cpython
     def _test_prune(self, fixture):
         s, prune = fixture()
 
index f3fda579aea2a884ba99df942aa9561a0234d199..54714864dc054d586aa0265f930b754ab2d95de8 100644 (file)
@@ -1507,11 +1507,6 @@ class MixedEntitiesTest(QueryTest, AssertsCompiledSQL):
         "pg8000 parses the SQL itself before passing on "
         "to PG, doesn't parse this",
     )
-    @testing.fails_on(
-        "postgresql+zxjdbc",
-        "zxjdbc parses the SQL itself before passing on "
-        "to PG, doesn't parse this",
-    )
     @testing.fails_on("firebird", "unknown")
     def test_values_with_boolean_selects(self):
         """Tests a values clause that works with select boolean
index 5dea8d9d84c6d38550fa14295b9a4c3468a20e62..ddf735e4f0534a230d9399e4a78759b62584168e 100644 (file)
@@ -750,8 +750,6 @@ class MiscTest(fixtures.ORMTest):
         assert instrumentation.manager_of_class(A) is None
         assert not hasattr(A, "x")
 
-        # I prefer 'is' here but on pypy
-        # it seems only == works
         assert A.__init__ == object.__init__
 
     def test_compileonattr_rel_backref_a(self):
index dceae6c5447c1175f5bea98c434d625a34209605..47a84fc89e5b544de89a47de616ddec47ba92fee 100644 (file)
@@ -92,9 +92,9 @@ class DefaultRequirements(SuiteRequirements):
         """target database must *not* support ON UPDATE..CASCADE behavior in
         foreign keys."""
 
-        return fails_on_everything_except(
-            "sqlite", "oracle", "+zxjdbc"
-        ) + skip_if("mssql")
+        return fails_on_everything_except("sqlite", "oracle") + skip_if(
+            "mssql"
+        )
 
     @property
     def recursive_fk_cascade(self):
@@ -680,11 +680,6 @@ class DefaultRequirements(SuiteRequirements):
                 no_support(
                     "sybase", "two-phase xact not supported by drivers/SQLA"
                 ),
-                no_support(
-                    "postgresql+zxjdbc",
-                    "FIXME: JDBC driver confuses the transaction state, "
-                    "may need separate XA implementation",
-                ),
                 no_support(
                     "mysql",
                     "recent MySQL communiity editions have too many issues "
@@ -828,7 +823,6 @@ class DefaultRequirements(SuiteRequirements):
             [
                 lambda config: against(config, "postgresql")
                 and not against(config, "+pg8000")
-                and not against(config, "+zxjdbc")
             ]
         )
 
@@ -915,9 +909,7 @@ class DefaultRequirements(SuiteRequirements):
         """target dialect supports representation of Python
         datetime.datetime() with microsecond objects."""
 
-        return skip_if(
-            ["mssql", "mysql", "firebird", "+zxjdbc", "oracle", "sybase"]
-        )
+        return skip_if(["mssql", "mysql", "firebird", "oracle", "sybase"])
 
     @property
     def timestamp_microseconds(self):
@@ -968,9 +960,7 @@ class DefaultRequirements(SuiteRequirements):
         """target dialect supports representation of Python
         datetime.time() with microsecond objects."""
 
-        return skip_if(
-            ["mssql", "mysql", "firebird", "+zxjdbc", "oracle", "sybase"]
-        )
+        return skip_if(["mssql", "mysql", "firebird", "oracle", "sybase"])
 
     @property
     def precision_numerics_general(self):
index ad1eb33480806452a394e83e4c28556e797181d3..b8a3cce7cbf0355ce0e44d8c55910fde21f1372b 100644 (file)
@@ -97,7 +97,6 @@ class ReturningTest(fixtures.TestBase, AssertsExecutionResults):
     @testing.fails_on(
         "firebird", "fb/kintersbasdb can't handle the bind params"
     )
-    @testing.fails_on("oracle+zxjdbc", "JDBC driver bug")
     def test_anon_expressions(self):
         result = (
             table.insert()