Home
last modified time | relevance | path

Searched +hist:3 +hist:ceb87da (Results 1 - 2 of 2) sorted by relevance

/sqlalchemy/
H A Dsetup.cfgdiff 23721113 Fri Oct 15 09:47:08 MDT 2021 Mike Bayer <mike_mp@zzzcomputing.com> re-enable asnycmy >= 0.2.3; disable aiomysql totally

Change-Id: I94bc22db0462509003c8241d0ccef915fe6513c6
diff 6f08250b Wed Jul 14 13:00:11 MDT 2021 Bryan Forbes <bryan@reigndropsfall.net> Refactor mypy plugin

A major refactor of the mypy plugin

Closes: #6764
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/6764
Pull-request-sha: 3e2295b2da7b57a6669f26db0df78f6409934184

Change-Id: I067d56dcfbc998ddd1b22a448f756859428b9e31
diff 4476dca0 Wed Mar 24 09:33:04 MDT 2021 Mike Bayer <mike_mp@zzzcomputing.com> Repair pysqlcipher and use sqlcipher3

The ``pysqlcipher`` dialect now imports the ``sqlcipher3`` module
for Python 3 by default. Regressions have been repaired such that
the connection routine was not working.

To better support the post-connection steps of the pysqlcipher
dialect, a new hook Dialect.on_connect_url() is added, which
supersedes Dialect.on_connect() and is passed the URL object.
The dialect now pulls the passphrase and other cipher args
from the URL directly without including them in the
"connect" args. This will allow any user-defined extensibility
to connecting to work as it would for other dialects.

The commit also builds upon the extended routines in
sqlite/provisioning.py to better support running tests against
multiple simultaneous SQLite database files. Additionally enables
backend for test_sqlite which was skipping everything
for aiosqlite too, fortunately everything there is passing.

Fixes: #5848
Change-Id: I43f53ebc62298a84a4abe149e1eb699a027b7915
diff e34886f1 Mon Nov 02 13:39:43 MST 2020 Mike Bayer <mike_mp@zzzcomputing.com> only install greenlet for python 3

Change-Id: I6057cd019bb78486e57f2cce49b58d7806ace36f
diff b2f2bf1a Mon Oct 12 09:14:14 MDT 2020 Mike Bayer <mike_mp@zzzcomputing.com> repair pg8000 and pin to 1.16.6 min version

Due to https://github.com/tlocke/pg8000/commit/3a2e7439ae3613367ec231218d7e0f541466d1e5
we no longer decode the description. pin to 1.16.6 as minimum version
so that we don't need to track version changes in code.

Change-Id: I192c851eb2337f37467560a3cbb87f7235884788
diff 3ceb87da Tue Nov 19 10:38:58 MST 2019 Mike Bayer <mike_mp@zzzcomputing.com> Move max-worker-restart to pytest-xdist options in tox.ini

This way py.test can be run on the outside without a
command line error.

Change-Id: Ia3689806bffbabe176a827cca2f099e89a60ebf5
Closes: #4989
diff 3ceb87da Tue Nov 19 10:38:58 MST 2019 Mike Bayer <mike_mp@zzzcomputing.com> Move max-worker-restart to pytest-xdist options in tox.ini

This way py.test can be run on the outside without a
command line error.

Change-Id: Ia3689806bffbabe176a827cca2f099e89a60ebf5
Closes: #4989
diff d427d064 Thu Jan 31 21:24:29 MST 2019 Parth Shandilya <parth1989shandilya@gmail.com> Remove Nose support

The test system has removed support for Nose, which is unmaintained for
several years and is producing warnings under Python 3. The test suite is
currently standardized on Pytest. Pull request courtesy Parth Shandilya.

Fixes: #4460

Closes: #4476
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/4476
Pull-request-sha: e857af9c7d07355e52841149ee2e5d4448409e1e

Change-Id: I76516fae1cf0eb58f2e9fc9f692e591e0fcf39a4
H A Dtox.inidiff 23721113 Fri Oct 15 09:47:08 MDT 2021 Mike Bayer <mike_mp@zzzcomputing.com> re-enable asnycmy >= 0.2.3; disable aiomysql totally

Change-Id: I94bc22db0462509003c8241d0ccef915fe6513c6
diff 3ea321ce Sat Sep 11 14:26:59 MDT 2021 Kevin Kirsche <kevin.kirsche@one.verizon.com> Fix various lib / test / examples typos (#7017)

* fix: lib/sqlalchemy/sql/lambdas.py

* fix: lib/sqlalchemy/sql/compiler.py

* fix: lib/sqlalchemy/sql/selectable.py

* fix: lib/sqlalchemy/orm/relationships.py

* fix: lib/sqlalchemy/dialects/mssql/base.py

* fix: lib/sql/test_compiler.py

* fix: lib/sqlalchemy/testing/requirements.py

* fix: lib/sqlalchemy/orm/path_registry.py

* fix: lib/sqlalchemy/dialects/postgresql/psycopg2.py

* fix: lib/sqlalchemy/cextension/immutabledict.c

* fix: lib/sqlalchemy/cextension/resultproxy.c

* fix: ./lib/sqlalchemy/dialects/oracle/cx_oracle.py

* fix: examples/versioned_rows/versioned_rows_w_versionid.py

* fix: examples/elementtree/optimized_al.py

* fix: test/orm/test_attribute.py

* fix: test/sql/test_compare.py

* fix: test/sql/test_type_expression.py

* fix: capitalization in test/dialect/mysql/test_compiler.py

* fix: typos in test/dialect/postgresql/test_reflection.py

* fix: typo in tox.ini comment

* fix: typo in /lib/sqlalchemy/orm/decl_api.py

* fix: typo in test/orm/test_update_delete.py

* fix: self-induced typo

* fix: typo in test/orm/test_query.py

* fix: typos in test/dialect/mssql/test_types.py

* fix: typo in test/sql/test_types.py
diff 4476dca0 Wed Mar 24 09:33:04 MDT 2021 Mike Bayer <mike_mp@zzzcomputing.com> Repair pysqlcipher and use sqlcipher3

The ``pysqlcipher`` dialect now imports the ``sqlcipher3`` module
for Python 3 by default. Regressions have been repaired such that
the connection routine was not working.

To better support the post-connection steps of the pysqlcipher
dialect, a new hook Dialect.on_connect_url() is added, which
supersedes Dialect.on_connect() and is passed the URL object.
The dialect now pulls the passphrase and other cipher args
from the URL directly without including them in the
"connect" args. This will allow any user-defined extensibility
to connecting to work as it would for other dialects.

The commit also builds upon the extended routines in
sqlite/provisioning.py to better support running tests against
multiple simultaneous SQLite database files. Additionally enables
backend for test_sqlite which was skipping everything
for aiosqlite too, fortunately everything there is passing.

Fixes: #5848
Change-Id: I43f53ebc62298a84a4abe149e1eb699a027b7915
diff f1e96cb0 Sun Jan 10 11:44:14 MST 2021 Mike Bayer <mike_mp@zzzcomputing.com> reinvent xdist hooks in terms of pytest fixtures

To allow the "connection" pytest fixture and others work
correctly in conjunction with setup/teardown that expects
to be external to the transaction, remove and prevent any usage
of "xdist" style names that are hardcoded by pytest to run
inside of fixtures, even function level ones. Instead use
pytest autouse fixtures to implement our own
r"setup|teardown_test(?:_class)?" methods so that we can ensure
function-scoped fixtures are run within them. A new more
explicit flow is set up within plugin_base and pytestplugin
such that the order of setup/teardown steps, which there are now
many, is fully documented and controllable. New granularity
has been added to the test teardown phase to distinguish
between "end of the test" when lock-holding structures on
connections should be released to allow for table drops,
vs. "end of the test plus its teardown steps" when we can
perform final cleanup on connections and run assertions
that everything is closed out.

From there we can remove most of the defensive "tear down everything"
logic inside of engines which for many years would frequently dispose
of pools over and over again, creating for a broken and expensive
connection flow. A quick test shows that running test/sql/ against
a single Postgresql engine with the new approach uses 75% fewer new
connections, creating 42 new connections total, vs. 164 new
connections total with the previous system.

As part of this, the new fixtures metadata/connection/future_connection
have been integrated such that they can be combined together
effectively. The fixture_session(), provide_metadata() fixtures
have been improved, including that fixture_session() now strongly
references sessions which are explicitly torn down before
table drops occur afer a test.

Major changes have been made to the
ConnectionKiller such that it now features different "scopes" for
testing engines and will limit its cleanup to those testing
engines corresponding to end of test, end of test class, or
end of test session. The system by which it tracks DBAPI
connections has been reworked, is ultimately somewhat similar to
how it worked before but is organized more clearly along
with the proxy-tracking logic. A "testing_engine" fixture
is also added that works as a pytest fixture rather than a
standalone function. The connection cleanup logic should
now be very robust, as we now can use the same global
connection pools for the whole suite without ever disposing
them, while also running a query for PostgreSQL
locks remaining after every test and assert there are no open
transactions leaking between tests at all. Additional steps
are added that also accommodate for asyncio connections not
explicitly closed, as is the case for legacy sync-style
tests as well as the async tests themselves.

As always, hundreds of tests are further refined to use the
new fixtures where problems with loose connections were identified,
largely as a result of the new PostgreSQL assertions,
many more tests have moved from legacy patterns into the newest.

An unfortunate discovery during the creation of this system is that
autouse fixtures (as well as if they are set up by
@pytest.mark.usefixtures) are not usable at our current scale with pytest
4.6.11 running under Python 2. It's unclear if this is due
to the older version of pytest or how it implements itself for
Python 2, as well as if the issue is CPU slowness or just large
memory use, but collecting the full span of tests takes over
a minute for a single process when any autouse fixtures are in
place and on CI the jobs just time out after ten minutes.
So at the moment this patch also reinvents a small version of
"autouse" fixtures when py2k is running, which skips generating
the real fixture and instead uses two global pytest fixtures
(which don't seem to impact performance) to invoke the
"autouse" fixtures ourselves outside of pytest.
This will limit our ability to do more with fixtures
until we can remove py2k support.

py.test is still observed to be much slower in collection in the
4.6.11 version compared to modern 6.2 versions, so add support for new
TOX_POSTGRESQL_PY2K and TOX_MYSQL_PY2K environment variables that
will run the suite for fewer backends under Python 2. For Python 3
pin pytest to modern 6.2 versions where performance for collection
has been improved greatly.

Includes the following improvements:

Fixed bug in asyncio connection pool where ``asyncio.TimeoutError`` would
be raised rather than :class:`.exc.TimeoutError`. Also repaired the
:paramref:`_sa.create_engine.pool_timeout` parameter set to zero when using
the async engine, which previously would ignore the timeout and block
rather than timing out immediately as is the behavior with regular
:class:`.QueuePool`.

For asyncio the connection pool will now also not interact
at all with an asyncio connection whose ConnectionFairy is
being garbage collected; a warning that the connection was
not properly closed is emitted and the connection is discarded.
Within the test suite the ConnectionKiller is now maintaining
strong references to all DBAPI connections and ensuring they
are released when tests end, including those whose ConnectionFairy
proxies are GCed.

Identified cx_Oracle.stmtcachesize as a major factor in Oracle
test scalability issues, this can be reset on a per-test basis
rather than setting it to zero across the board. the addition
of this flag has resolved the long-standing oracle "two task"
error problem.

For SQL Server, changed the temp table style used by the
"suite" tests to be the double-pound-sign, i.e. global,
variety, which is much easier to test generically. There
are already reflection tests that are more finely tuned
to both styles of temp table within the mssql test
suite. Additionally, added an extra step to the
"dropfirst" mechanism for SQL Server that will remove
all foreign key constraints first as some issues were
observed when using this flag when multiple schemas
had not been torn down.

Identified and fixed two subtle failure modes in the
engine, when commit/rollback fails in a begin()
context manager, the connection is explicitly closed,
and when "initialize()" fails on the first new connection
of a dialect, the transactional state on that connection
is still rolled back.

Fixes: #5826
Fixes: #5827
Change-Id: Ib1d05cb8c7cf84f9a4bfd23df397dc23c9329bfe
diff bcc17b1d Thu Oct 08 10:52:39 MDT 2020 Mike Bayer <mike_mp@zzzcomputing.com> pin pytest lower bound at 4.6.11

we need 4.6 to support Python 2. however 4.6.0 is too low,
4.6.11 seems to work in both python 2 and 3, pin on that

Change-Id: I0a5995ca5e5bf08a06997130e4ffbaaceef8d942
diff 79a53645 Wed Feb 26 12:50:01 MST 2020 Gord Thompson <gord@gordthompson.com> Fix tests failing for SQLite file databases; repair provisioning

1. ensure provision.py loads dialect implementations when running
reap_dbs.py. Reapers haven't been working since
598f2f7e557073f29563d4d567f43931fc03013f .

2. add some exclusion rules to allow the sqlite_file target to work;
add to tox.

3. add reap dbs target for SQLite, repair SQLite drop_db routine
which also wasn't doing the right thing for memory databases
etc.

4. Fix logging in provision files, as the main provision logger
is the one that's enabled by reap_dbs and maybe others, have all
the provision files use the provision logger.

Fixes: #5180
Fixes: #5168

Change-Id: Ibc1b0106394d20f5bcf847f37b09d185f26ac9b5
diff 3ceb87da Tue Nov 19 10:38:58 MST 2019 Mike Bayer <mike_mp@zzzcomputing.com> Move max-worker-restart to pytest-xdist options in tox.ini

This way py.test can be run on the outside without a
command line error.

Change-Id: Ia3689806bffbabe176a827cca2f099e89a60ebf5
Closes: #4989
diff 3ceb87da Tue Nov 19 10:38:58 MST 2019 Mike Bayer <mike_mp@zzzcomputing.com> Move max-worker-restart to pytest-xdist options in tox.ini

This way py.test can be run on the outside without a
command line error.

Change-Id: Ia3689806bffbabe176a827cca2f099e89a60ebf5
Closes: #4989
diff 664290ab Fri Nov 02 14:54:21 MDT 2018 Mike Bayer <mike_mp@zzzcomputing.com> - block py.test 3.9.1 and 3.9.2, 3.9.3 is OK

Change-Id: I35ecd78b92ea420ef7909de65f82e005b92bf986

Completed in 38 milliseconds