[postgresql] [bug] [regression] Fixed regression caused by just-released fix for #10863 where an
invalid exception class were added to the "except" block, which does not
get exercised unless such a catch actually happens. A mock-style test has
been added to ensure this catch is exercised in unit tests.
[orm] [bug] Replaced the "loader depth is excessively deep" warning with a shorter
message added to the caching badge within SQL logging, for those statements
where the ORM disabled the cache due to a too-deep chain of loader options.
The condition which this warning highlights is difficult to resolve and is
generally just a limitation in the ORM's application of SQL caching. A
future feature may include the ability to tune the threshold where caching
is disabled, but for now the warning will no longer be a nuisance.
[orm] [bug] Fixed issue where it was not possible to use a type (such as an enum)
within a _orm.Mapped container type if that type were declared
locally within the class body. The scope of locals used for the eval now
includes that of the class body itself. In addition, the expression within
_orm.Mapped may also refer to the class name itself, if used as a
string or with future annotations mode.
[orm] [bug] Fixed issue where using _orm.Session.delete() along with the
_orm.Mapper.version_id_col feature would fail to use the
correct version identifier in the case that an additional UPDATE were
emitted against the target object as a result of the use of
_orm.relationship.post_update on the object. The issue is
similar to #10800 just fixed in version 2.0.25 for the case of
updates alone.
Fixed a bug where comments where mistakenly removed along with redundant parentheses
(#4218)
Preview style
Move the hug_parens_with_braces_and_square_brackets feature to the unstable style
due to an outstanding crash and proposed formatting tweaks (#4198)
Fixed a bug where base expressions caused inconsistent formatting of ** in tenary
expression (#4154)
Checking for newline before adding one on docstring that is almost at the line limit
(#4185)
Remove redundant parentheses in case statement if guards (#4214).
Configuration
Fix issue where Black would ignore input files in the presence of symlinks (#4222)
Black now ignores pyproject.toml that is missing a tool.black section when
discovering project root and configuration. Since Black continues to use version
control as an indicator of project root, this is expected to primarily change behavior
for users in a monorepo setup (desirably). If you wish to preserve previous behavior,
simply add an empty [tool.black] to the previously discovered pyproject.toml
(#4204)
Output
Black will swallow any SyntaxWarnings or DeprecationWarnings produced by the ast
module when performing equivalence checks (#4189)
Integrations
Add a JSONSchema and provide a validate-pyproject entry-point (#4181)
24.1.1
Bugfix release to fix a bug that made Black unusable on certain file systems
with strict limits on path length.
Preview style
Consistently add trailing comma on typed parameters (#4164)
Configuration
Shorten the length of the name of the cache file to fix crashes on file systems that
do not support long paths (#4176)
Fixed a bug where comments where mistakenly removed along with redundant parentheses
(#4218)
Preview style
Move the hug_parens_with_braces_and_square_brackets feature to the unstable style
due to an outstanding crash and proposed formatting tweaks (#4198)
Fixed a bug where base expressions caused inconsistent formatting of ** in tenary
expression (#4154)
Checking for newline before adding one on docstring that is almost at the line limit
(#4185)
Remove redundant parentheses in case statement if guards (#4214).
Configuration
Fix issue where Black would ignore input files in the presence of symlinks (#4222)
Black now ignores pyproject.toml that is missing a tool.black section when
discovering project root and configuration. Since Black continues to use version
control as an indicator of project root, this is expected to primarily change behavior
for users in a monorepo setup (desirably). If you wish to preserve previous behavior,
simply add an empty [tool.black] to the previously discovered pyproject.toml
(#4204)
Output
Black will swallow any SyntaxWarnings or DeprecationWarnings produced by the ast
module when performing equivalence checks (#4189)
Integrations
Add a JSONSchema and provide a validate-pyproject entry-point (#4181)
24.1.1
Bugfix release to fix a bug that made Black unusable on certain file systems with strict
limits on path length.
Preview style
Consistently add trailing comma on typed parameters (#4164)
Configuration
Shorten the length of the name of the cache file to fix crashes on file systems that
do not support long paths (#4176)
See 8.0.0rc1 and 8.0.0rc2 for the full changes since pytest 7.4!
Bug Fixes
#11842: Properly escape the reason of a skip <pytest.mark.skip ref>{.interpreted-text role="ref"} mark when writing JUnit XML files.
#11861: Avoid microsecond exceeds 1_000_000 when using log-date-format with %f specifier, which might cause the test suite to crash.
8.0.0rc2
pytest 8.0.0rc2 (2024-01-17)
Improvements
#11233: Improvements to -r for xfailures and xpasses:
Report tracebacks for xfailures when -rx is set.
Report captured output for xpasses when -rX is set.
For xpasses, add - in summary between test name and reason, to match how xfail is displayed.
#11825: The pytest_plugin_registered{.interpreted-text role="hook"} hook has a new plugin_name parameter containing the name by which plugin is registered.
Bug Fixes
#11706: Fix reporting of teardown errors in higher-scoped fixtures when using [--maxfail]{.title-ref} or [--stepwise]{.title-ref}.
#11758: Fixed IndexError: string index out of range crash in if highlighted[-1] == "\n" and source[-1] != "\n".
This bug was introduced in pytest 8.0.0rc1.
#9765, #11816: Fixed a frustrating bug that afflicted some users with the only error being assert mod not in mods. The issue was caused by the fact that str(Path(mod)) and mod.__file__ don't necessarily produce the same string, and was being erroneously used interchangably in some places in the code.
This fix also broke the internal API of PytestPluginManager.consider_conftest by introducing a new parameter -- we mention this in case it is being used by external code, even if marked as private.
#7363: PytestRemovedIn8Warning deprecation warnings are now errors by default.
Following our plan to remove deprecated features with as little disruption as possible, all warnings of type PytestRemovedIn8Warning now generate errors instead of warning messages by default.
The affected features will be effectively removed in pytest 8.1, so please consult the deprecations{.interpreted-text role="ref"} section in the docs for directions on how to update existing code.
In the pytest 8.0.X series, it is possible to change the errors back into warnings as a stopgap measure by adding this to your pytest.ini file:
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
pytest-asyncio no longer imports additional, unrelated packages during test collection #729
Addresses further issues that caused an internal pytest error during test collection
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.4a1
0.23.4 (UNRELEASED)
pytest-asyncio no longer imports additional, unrelated packages during test collection #729
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.4a0
0.23.4 (UNRELEASED)
pytest-asyncio no longer imports additional, unrelated packages during test collection #729
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.3
0.23.3 (2024-01-01)
Fixes a bug that caused event loops to be closed prematurely when using async generator fixtures with class scope or wider in a function-scoped test #706
... (truncated)
Commits
3aef605 [build] Update actions/upload-artifact and actions/download-artifact to v4.
4b1908d [fix] Prevent DeprecationWarning from bubbling to user code.
fc6d6cf Fix typing and update to mypy 1.8.0 (#769)
6008cf1 Build(deps): Bump pluggy from 1.3.0 to 1.4.0 in /dependencies/default
712c51b Build(deps): Bump coverage from 7.4.0 to 7.4.1 in /dependencies/default
42fd304 Build(deps): Bump hypothesis in /dependencies/default
a40b4f6 Build(deps): Bump urllib3 from 2.1.0 to 2.2.0 in /dependencies/docs
9d90f8e Build(deps): Bump certifi in /dependencies/docs
fe5da07 Build(deps): Bump markupsafe from 2.1.4 to 2.1.5 in /dependencies/docs
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency
- `@dependabot ignore major version` will close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself)
- `@dependabot ignore minor version` will close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself)
- `@dependabot ignore ` will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself)
- `@dependabot unignore ` will remove all of the ignore conditions of the specified dependency
- `@dependabot unignore ` will remove the ignore condition of the specified dependency and ignore conditions
Bumps the all-dependencies group with 6 updates:
2.0.23
2.0.27
2.0.1701229837
2.0.1706067133
23.12.1
24.2.0
1.30.3
1.30.4
7.4.3
8.0.0
0.23.2
0.23.5
Updates
sqlalchemy
from 2.0.23 to 2.0.27Release notes
Sourced from sqlalchemy's releases.
... (truncated)
Commits
Updates
sqlakeyset
from 2.0.1701229837 to 2.0.1706067133Commits
Updates
black
from 23.12.1 to 24.2.0Release notes
Sourced from black's releases.
... (truncated)
Changelog
Sourced from black's changelog.
... (truncated)
Commits
6fdf8a4
Prepare release 24.2.0 (#4226)8af4394
fix: Don't remove comments along with parens (#4218)35e9776
Bump pre-commit/action from 3.0.0 to 3.0.1 (#4225)23dfc5b
Fix ignoring input files for symlink reasons (#4222)a201003
Simplify check for symlinks that resolve outside root (#4221)dab37a6
Remove redundant parentheses incase
statementif
guards (#4214)32230e6
fix: bug where the doublestar operation had inconsistent formatting. (#4154)7edb50f
fix: additional newline added to docstring when the previous line length is l...3e80de3
Bump furo from 2023.9.10 to 2024.1.29 in /docs (#4211)a08b480
Bump pypa/cibuildwheel from 2.16.4 to 2.16.5 (#4212)Updates
pg8000
from 1.30.3 to 1.30.4Commits
f6f416c
Prepare for new release8adb556
Add support for more range and multirange types796cd01
Make Connection.parameter_statuses a dicta93944e
Fix doctest for PostgreSQL 15+433e01f
Fix doctest problem with IDENTIFY_SYSTEM commanda2dc1e8
Fix copy tests for PostgreSQL 16c662f40
PostgreSQL versions: add 16, drop 11Updates
pytest
from 7.4.3 to 8.0.0Release notes
Sourced from pytest's releases.
... (truncated)
Commits
478f823
Prepare release version 8.0.06085900
[8.0.x] fix: avoid rounding microsecond to1_000_000
(#11863)3b41c65
[8.0.x] Escape skip reason in junitxml (#11845)747072a
[8.0.x] Update docstring of scripts/generate-gh-release-notes.py (#11768)011a475
Properly attach packages to the GH release notes (#11839) (#11840)97960bd
Merge pull request #11835 from pytest-dev/release-8.0.0rc26be0a3c
Prepare release version 8.0.0rc244ffe07
Merge pull request #11837 from pytest-dev/backport-11836-to-8.0.x14ecb04
[8.0.x] testing: temporarily disable test due to hypothesis issue41c8dab
Merge pull request #11831 from bluetech/backport-11825-to-8.0.xUpdates
pytest-asyncio
from 0.23.2 to 0.23.5Release notes
Sourced from pytest-asyncio's releases.
... (truncated)
Commits
3aef605
[build] Update actions/upload-artifact and actions/download-artifact to v4.4b1908d
[fix] Prevent DeprecationWarning from bubbling to user code.fc6d6cf
Fix typing and update to mypy 1.8.0 (#769)6008cf1
Build(deps): Bump pluggy from 1.3.0 to 1.4.0 in /dependencies/default712c51b
Build(deps): Bump coverage from 7.4.0 to 7.4.1 in /dependencies/default42fd304
Build(deps): Bump hypothesis in /dependencies/defaulta40b4f6
Build(deps): Bump urllib3 from 2.1.0 to 2.2.0 in /dependencies/docs9d90f8e
Build(deps): Bump certifi in /dependencies/docsfe5da07
Build(deps): Bump markupsafe from 2.1.4 to 2.1.5 in /dependencies/docs42b140d
fix compatibility with pytest ^8 (#776)Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase
.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show