summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/dialects/postgresql
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/dialects/postgresql
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/dialects/postgresql')
-rw-r--r--lib/sqlalchemy/dialects/postgresql/__init__.py1
-rw-r--r--lib/sqlalchemy/dialects/postgresql/base.py3
-rw-r--r--lib/sqlalchemy/dialects/postgresql/zxjdbc.py48
3 files changed, 0 insertions, 52 deletions
diff --git a/lib/sqlalchemy/dialects/postgresql/__init__.py b/lib/sqlalchemy/dialects/postgresql/__init__.py
index 80875916a..06d22872a 100644
--- a/lib/sqlalchemy/dialects/postgresql/__init__.py
+++ b/lib/sqlalchemy/dialects/postgresql/__init__.py
@@ -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
diff --git a/lib/sqlalchemy/dialects/postgresql/base.py b/lib/sqlalchemy/dialects/postgresql/base.py
index 0f08d1f40..cbc750066 100644
--- a/lib/sqlalchemy/dialects/postgresql/base.py
+++ b/lib/sqlalchemy/dialects/postgresql/base.py
@@ -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
index 6ca7fcf98..000000000
--- a/lib/sqlalchemy/dialects/postgresql/zxjdbc.py
+++ /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