]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
dont use exception catches for warnings; modernize xdist detection
authorMike Bayer <mike_mp@zzzcomputing.com>
Fri, 21 Jan 2022 23:46:37 +0000 (18:46 -0500)
committerMike Bayer <mike_mp@zzzcomputing.com>
Sun, 23 Jan 2022 00:17:10 +0000 (19:17 -0500)
commitde0b4db838e26fe61953c7765f35d5b7be581646
tree89f9816c86dbf9eaec0406b6a9b8585e9b645a6c
parentd46a4c0326bd2e697794514b920e6727d5153324
dont use exception catches for warnings; modernize xdist detection

Improvements to the test suite's integration with pytest such that the
"warnings" plugin, if manually enabled, will not interfere with the test
suite, such that third parties can enable the warnings plugin or make use
of the ``-W`` parameter and SQLAlchemy's test suite will continue to pass.
Additionally, modernized the detection of the "pytest-xdist" plugin so that
plugins can be globally disabled using PYTEST_DISABLE_PLUGIN_AUTOLOAD=1
without breaking the test suite if xdist were still installed. Warning
filters that promote deprecation warnings to errors are now localized to
SQLAlchemy-specific warnings, or within SQLAlchemy-specific sources for
general Python deprecation warnings, so that non-SQLAlchemy deprecation
warnings emitted from pytest plugins should also not impact the test suite.

Fixes: #7599
Change-Id: Ibcf09af25228d39ee5a943fda82d8a9302433726
33 files changed:
doc/build/changelog/unreleased_14/7599.rst [new file with mode: 0644]
lib/sqlalchemy/dialects/postgresql/provision.py
lib/sqlalchemy/testing/__init__.py
lib/sqlalchemy/testing/assertions.py
lib/sqlalchemy/testing/plugin/pytestplugin.py
lib/sqlalchemy/testing/warnings.py
test/dialect/oracle/test_reflection.py
test/dialect/postgresql/test_reflection.py
test/engine/test_pool.py
test/engine/test_reconnect.py
test/orm/declarative/test_basic.py
test/orm/declarative/test_clsregistry.py
test/orm/declarative/test_mixin.py
test/orm/inheritance/test_basic.py
test/orm/test_attributes.py
test/orm/test_cascade.py
test/orm/test_dynamic.py
test/orm/test_eager_relations.py
test/orm/test_events.py
test/orm/test_instrumentation.py
test/orm/test_lazy_relations.py
test/orm/test_mapper.py
test/orm/test_query.py
test/orm/test_rel_fn.py
test/orm/test_relationships.py
test/orm/test_scoping.py
test/orm/test_selectin_relations.py
test/orm/test_session.py
test/orm/test_subquery_relations.py
test/orm/test_unitofworkv2.py
test/orm/test_versioning.py
test/sql/test_metadata.py
test/sql/test_operators.py