diff options
| author | Mike Bayer <mike_mp@zzzcomputing.com> | 2020-01-17 17:31:41 -0500 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2020-01-17 17:44:57 -0500 |
| commit | 9e31fc74089cf565df5f275d22eb8ae5414d6e45 (patch) | |
| tree | 954edc3ebcc2116e388752e4aa53789e04113a23 /test/dialect/postgresql | |
| parent | a711522650863dd368acfa90e09216ae37fc3ec2 (diff) | |
| download | sqlalchemy-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 'test/dialect/postgresql')
| -rw-r--r-- | test/dialect/postgresql/test_dialect.py | 9 | ||||
| -rw-r--r-- | test/dialect/postgresql/test_query.py | 2 | ||||
| -rw-r--r-- | test/dialect/postgresql/test_types.py | 26 |
3 files changed, 3 insertions, 34 deletions
diff --git a/test/dialect/postgresql/test_dialect.py b/test/dialect/postgresql/test_dialect.py index cf33f7cbb..107f3a9b2 100644 --- a/test/dialect/postgresql/test_dialect.py +++ b/test/dialect/postgresql/test_dialect.py @@ -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) diff --git a/test/dialect/postgresql/test_query.py b/test/dialect/postgresql/test_query.py index cf51104d8..65defea80 100644 --- a/test/dialect/postgresql/test_query.py +++ b/test/dialect/postgresql/test_query.py @@ -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( diff --git a/test/dialect/postgresql/test_types.py b/test/dialect/postgresql/test_types.py index 6bcfb1736..6a61fb33b 100644 --- a/test/dialect/postgresql/test_types.py +++ b/test/dialect/postgresql/test_types.py @@ -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 |
