[orm] [bug] Added new attribute _orm.ORMExecuteState.is_from_statement to
detect statements created using _sql.Select.from_statement(), and
enhanced FromStatement to set _orm.ORMExecuteState.is_select,
_orm.ORMExecuteState.is_insert,
_orm.ORMExecuteState.is_update, and
_orm.ORMExecuteState.is_delete according to the element that is
sent to the _sql.Select.from_statement() method itself.
[orm] [bug] Fixed issue in _orm.selectin_polymorphic() loader option where
attributes defined with _orm.composite() on a superclass would cause
an internal exception on load.
[orm] [bug] [regression] Fixed regression from 1.4 where using _orm.defaultload() in
conjunction with a non-propagating loader like _orm.contains_eager()
would nonetheless propagate the _orm.contains_eager() to a lazy load
operation, causing incorrect queries as this option is only intended to
come from an original load.
[orm] [bug] Fixed issue in ORM Annotated Declarative where typing issue where literals
defined using PEP 695 type aliases would not work with inference of
Enum datatypes. Pull request courtesy of Alc-Alc.
[orm] [bug] Fixed issue in _orm.selectin_polymorphic() loader option where the
SELECT emitted would only accommodate for the child-most class among the
result rows that were returned, leading intermediary-class attributes to be
unloaded if there were no concrete instances of that intermediary-class
present in the result. This issue only presented itself for multi-level
inheritance hierarchies.
[orm] [bug] Fixed issue in _orm.Session.bulk_save_objects() where the form of the
identity key produced when using return_defaults=True would be
incorrect. This could lead to an errors during pickling as well as identity
map mismatches.
We’ve just uploaded mypy 1.10 to the Python Package Index (PyPI). Mypy is a static type checker for Python. This release includes new features, performance improvements and bug fixes. You can install it as follows:
python3 -m pip install -U mypy
You can read the full documentation for this release on Read the Docs.
Support TypeIs (PEP 742)
Mypy now supports TypeIs (PEP 742), which allows
functions to narrow the type of a value, similar to isinstance(). Unlike TypeGuard,
TypeIs can narrow in both the if and else branches of an if statement:
Do specifier matching correctly when the specifier contains an epoch number
and has more components than the version (:issue:683)
Support the experimental --disable-gil builds in packaging.tags
(:issue:727)
BREAKING: Make optional metadata.Metadata attributes default to None (:issue:733)
Fix errors when trying to access the description_content_type, keywords,
and requires_python attributes on metadata.Metadata when those values
have not been provided (:issue:733)
Fix a bug preventing the use of the built in ExceptionGroup on versions of
Python that support it (:issue:725)
#12355: Fix possible catastrophic performance slowdown on a certain parametrization pattern involving many higher-scoped parameters.
#12367: Fix a regression in pytest 8.2.0 where unittest class instances (a fresh one is created for each test) were not released promptly on test teardown but only on session teardown.
#12381: Fix possible "Directory not empty" crashes arising from concurent cache dir (.pytest_cache) creation. Regressed in pytest 8.2.0.
Improved Documentation
#12290: Updated Sphinx theme to use Furo instead of Flask, enabling Dark mode theme.
#12356: Added a subsection to the documentation for debugging flaky tests to mention
lack of thread safety in pytest as a possible source of flakyness.
#12363: The documentation webpages now links to a canonical version to reduce outdated documentation in search engine results.
8.2.1
pytest 8.2.1 (2024-05-19)
Improvements
#12334: Support for Python 3.13 (beta1 at the time of writing).
Bug Fixes
#12120: Fix [PermissionError]{.title-ref} crashes arising from directories which are not selected on the command-line.
#12191: Keyboard interrupts and system exits are now properly handled during the test collection.
#12300: Fixed handling of 'Function not implemented' error under squashfuse_ll, which is a different way to say that the mountpoint is read-only.
#12308: Fix a regression in pytest 8.2.0 where the permissions of automatically-created .pytest_cache directories became rwx------ instead of the expected rwxr-xr-x.
Trivial/Internal Changes
#12333: pytest releases are now attested using the recent Artifact Attestation support from GitHub, allowing users to verify the provenance of pytest's sdist and wheel artifacts.
8.2.0
pytest 8.2.0 (2024-04-27)
Deprecations
#12069: A deprecation warning is now raised when implementations of one of the following hooks request a deprecated py.path.local parameter instead of the pathlib.Path parameter which replaced it:
Silence deprecation warnings about unclosed event loops that occurred with certain CPython patch releases #817
Known issues
As of v0.23, pytest-asyncio attaches an asyncio event loop to each item of the test suite (i.e. session, packages, modules, classes, functions) and allows tests to be run in those loops when marked accordingly. Pytest-asyncio currently assumes that async fixture scope is correlated with the new event loop scope. This prevents fixtures from being evaluated independently from the event loop scope and breaks some existing test suites (see #706). For example, a test suite may require all fixtures and tests to run in the same event loop, but have async fixtures that are set up and torn down for each module. If you're affected by this issue, please continue using the v0.21 release, until it is resolved.
As of v0.23, pytest-asyncio attaches an asyncio event loop to each item of the test suite (i.e. session, packages, modules, classes, functions) and allows tests to be run in those loops when marked accordingly. Pytest-asyncio currently assumes that async fixture scope is correlated with the new event loop scope. This prevents fixtures from being evaluated independently from the event loop scope and breaks some existing test suites (see #706). For example, a test suite may require all fixtures and tests to run in the same event loop, but have async fixtures that are set up and torn down for each module. If you're affected by this issue, please continue using the v0.21 release, until it is resolved.
Fix typing errors with recent versions of mypy #769
Prevent DeprecationWarning about internal use of asyncio.get_event_loop() from affecting test cases #757
Known issues
As of v0.23, pytest-asyncio attaches an asyncio event loop to each item of the test suite (i.e. session, packages, modules, classes, functions) and allows tests to be run in those loops when marked accordingly. Pytest-asyncio currently assumes that async fixture scope is correlated with the new event loop scope. This prevents fixtures from being evaluated independently from the event loop scope and breaks some existing test suites (see #706). For example, a test suite may require all fixtures and tests to run in the same event loop, but have async fixtures that are set up and torn down for each module. If you're affected by this issue, please continue using the v0.21 release, until it is resolved.
Fix typing errors with recent versions of mypy #769
Prevent DeprecationWarning about internal use of asyncio.get_event_loop() from affecting test cases #757
Known issues
As of v0.23, pytest-asyncio attaches an asyncio event loop to each item of the test suite (i.e. session, packages, modules, classes, functions) and allows tests to be run in those loops when marked accordingly. Pytest-asyncio currently assumes that async fixture scope is correlated with the new event loop scope. This prevents fixtures from being evaluated independently from the event loop scope and breaks some existing test suites (see #706). For example, a test suite may require all fixtures and tests to run in the same event loop, but have async fixtures that are set up and torn down for each module. If you're affected by this issue, please continue using the v0.21 release, until it is resolved.
Fix typing errors with recent versions of mypy #769
Known issues
As of v0.23, pytest-asyncio attaches an asyncio event loop to each item of the test suite (i.e. session, packages, modules, classes, functions) and allows tests to be run in those loops when marked accordingly. Pytest-asyncio currently assumes that async fixture scope is correlated with the new event loop scope. This prevents fixtures from being evaluated independently from the event loop scope and breaks some existing test suites (see #706). For example, a test suite may require all fixtures and tests to run in the same event loop, but have async fixtures that are set up and torn down for each module. If you're affected by this issue, please continue using the v0.21 release, until it is resolved.
pytest-asyncio 0.23.4
0.23.4 (2024-01-28)
pytest-asyncio no longer imports additional, unrelated packages during test collection #729
Addresses further issues that caused an internal pytest error during test collection
Removed support for xdist rsync (now deprecated).
Contributed by Matthias Reichenbach in [#623](https://github.com/pytest-dev/pytest-cov/issues/623) <https://github.com/pytest-dev/pytest-cov/pull/623>_.
Switched docs theme to Furo.
Various legacy Python cleanup and CI improvements.
Contributed by Christian Clauss and Hugo van Kemenade in
[#630](https://github.com/pytest-dev/pytest-cov/issues/630) <https://github.com/pytest-dev/pytest-cov/pull/630>,
[#631](https://github.com/pytest-dev/pytest-cov/issues/631) <https://github.com/pytest-dev/pytest-cov/pull/631>,
[#632](https://github.com/pytest-dev/pytest-cov/issues/632) <https://github.com/pytest-dev/pytest-cov/pull/632>_ and
[#633](https://github.com/pytest-dev/pytest-cov/issues/633) <https://github.com/pytest-dev/pytest-cov/pull/633>_.
Added a pyproject.toml example in the docs.
Contributed by Dawn James in [#626](https://github.com/pytest-dev/pytest-cov/issues/626) <https://github.com/pytest-dev/pytest-cov/pull/626>_.
Modernized project's pre-commit hooks to use ruff. Initial POC contributed by
Christian Clauss in [#584](https://github.com/pytest-dev/...
_Description has been truncated_
Bumps the all-dependencies group with 15 updates in the / directory:
2.0.23
2.0.30
2.0.1701229837
2.0.1716332987
23.12.1
24.4.2
7.0.1
7.1.0
1.8.0
1.10.0
2023.4.22
2024.4.15
23.2
24.1
1.30.3
1.31.2
7.4.3
8.2.2
0.23.2
0.23.7
2.2.0
2.2.1
4.1.0
5.0.0
3.0.0
3.1.2
3.5.0
3.6.1
67.8.0
70.0.0
Updates
sqlalchemy
from 2.0.23 to 2.0.30Release notes
Sourced from sqlalchemy's releases.
... (truncated)
Commits
Updates
sqlakeyset
from 2.0.1701229837 to 2.0.1716332987Commits
Updates
black
from 23.12.1 to 24.4.2Release notes
Sourced from black's releases.
... (truncated)
Changelog
Sourced from black's changelog.
... (truncated)
Commits
3702ba2
Prepare release 24.4.2 (#4335)e4aaa8a
Fix incorrect f-string tokenization (#4332)ba88fc3
Simplify string tokenization regexes (#4331)5683242
New release templatee7fb048
Prepare release 24.4.1 (#4328)3f0f8f1
Support PEP 696 (#4327)2f88085
Github Action: Directly install from repo ifexport-subst
is skipped (#4313)12ce3db
Move changelog entry to right section (#4326)1354be2
Add support to style function definitions with newlines before function stubs...f4b644b
Prevent wrapping of multiline fstrings in parens (#4325)Updates
importlib-metadata
from 7.0.1 to 7.1.0Changelog
Sourced from importlib-metadata's changelog.
Commits
f5d6b5f
Finalize2ef3b5f
Merge commit '1711b2c198'1711b2c
Need to include names from test.support for py312 compat.47b14ac
Make MetadataPathFinder.find_distributions a classmethod for consistency with...adc4b12
Ensure tests do not leak references in sys.modules.07d894d
Copy backport of isolated_modules from importlib_resources.e30a16d
Consolidated test support logic in jaraco.test.cpython.41ca039
Moved compatibility tests to the compat package, as they're not included in C...5950f43
Remove legacy logic for Python 3.7.ffa719b
Moved compatibility module to compat package.Updates
mypy
from 1.8.0 to 1.10.0Changelog
Sourced from mypy's changelog.
... (truncated)
Commits
3faf0fc
Remove +dev for version for release 1.10a5998d2
Update CHANGELOG.md (#17159)62ea5b0
Various updates to changelog for 1.10 (#17158)2f0864c
Update CHANGELOG.md with draft for release 1.10 (#17150)e1443bb
fix: incorrect returned type of access descriptors on unions of types (#16604)5161ac2
Sync typeshed (#17124)e2fc1f2
Fix crash when expanding invalid Unpack in aCallable
alias (#17028)3ff6e47
Docs: docstrings in checker.py, ast_helpers.py (#16908)732d98e
Fix string formatting for string enums (#16555)8019010
Narrow individual items when matching a tuple to a sequence pattern (#16905)Updates
nox
from 2023.4.22 to 2024.4.15Release notes
Sourced from nox's releases.
... (truncated)
Changelog
Sourced from nox's changelog.
... (truncated)
Commits
5656fce
Release 2024.04.158f33d1c
fix: ensure 'uv' always works in a uv venv (#818)d6e1906
feat: support PEP 723 with a toml load function (#811)d3dd1f8
feat: use static arguments instaed of **kwargs (#815)bc21883
feat: support None to remone envvars (#812)5e3d90d
fix: disallow UV_SYSTEM_PYTHON (#817)55c7eaf
feat: support default=False (#810)9a4068f
feat: add micromamba support (#807)11dac8c
fix: don't error if not installing to passthrough (#809)956f10c
ci: use uv (#805)Updates
packaging
from 23.2 to 24.1Release notes
Sourced from packaging's releases.
Changelog
Sourced from packaging's changelog.
Commits
85442b8
Bump for release3e67fc7
Work aroundplatform.python_version()
returning non PEP 440 compliant versi...32deafe
Bump the github-actions group with 3 updates (#789)e0dda88
Documentmarkers.default_environment()
(#753)cc938f9
Modernise type annotations using FA rules from ruff (#785)757f559
Fix typo in_parser
docstring (#784)ec9f203
Bump the github-actions group with 4 updates (#782)5cbe1e4
Add support for Python 3.13 and drop EOL 3.7 (#783)cb8fd38
pyupgrade/black/isort/flake8 → ruff (#769)e8002b1
Bump for developmentUpdates
pg8000
from 1.30.3 to 1.31.2Commits
9945228
Prepare for new release0e6a319
Add tests for Python 3.1262a90d4
Non-ascii parameter statuses faile80fbb1
Update note on IN in README7ab7148
Add 'author' to pyprojectd0356d5
Tests: fixup for the dbname mentioned in a couple of SCRAM-related test comme...5ac331c
Prepare for new release809bed8
Move to src style layoutc789c98
Prepare for new released815ef6
Better defaults for SSLUpdates
pytest
from 7.4.3 to 8.2.2Release notes
Sourced from pytest's releases.
... (truncated)
Commits
329d371
Prepare release version 8.2.2214d098
Merge pull request #12414 from bluetech/backport-12409153a436
[8.2.x] fixtures: fix catastrophic performance problem inreorder_items
b41d5a5
Merge pull request #12412 from pytest-dev/backport-12408-to-8.2.x9bb73d7
[8.2.x] cacheprovider: fix "Directory not empty" crash from cache directory c...4569a01
[8.2.x] doc: Update trainings/events (#12402)1d103e5
[8.2.x] Clarify pytest_ignore_collect docs (#12386)240a252
[8.2.x] Add html_baseurl to sphinx conf.py (#12372)a5ee3c4
Merge pull request #12370 from pytest-dev/backport-12368-to-8.2.xf7358ae
[8.2.x] unittest: fix class instances no longer released on test teardown sin...Updates
pytest-asyncio
from 0.23.2 to 0.23.7Release notes
Sourced from pytest-asyncio's releases.
... (truncated)
Commits
eb63d5a
docs: Prepared for release of v0.23.7.da04a7a
Build(deps): Bump exceptiongroup in /dependencies/default00c667a
Build(deps): Bump pytest from 8.1.1 to 8.2.0 in /dependencies/default3bd9cd8
[docs] Add changelog entry.15544f0
Revert GitHub Actions and Tox changes.6316b28
Deduplicate simplefilter snippet.3ffdfc5
asyncio.run(port_afinalizer())0107fd7
Remove extra space.3bf700a
Fix GH Action mapping.d15dc31
Fix 3109/3108 typo.Updates
pytest-codspeed
from 2.2.0 to 2.2.1Release notes
Sourced from pytest-codspeed's releases.
Commits
7546a2f
Release v2.2.1 🚀0d1fdce
chore: add all-checks job to CI workflowe75634b
chore: switch from black to ruff format061699b
feat: support pytest 8.1.156e6211
fix: loosen runtime requirements (#21)367ef47
chore: update action version in README.mdab5ac24
chore: add codspeed badge to the readmeUpdates
pytest-cov
from 4.1.0 to 5.0.0Changelog
Sourced from pytest-cov's changelog.