[orm] [usecase] Added new parameter _orm.mapped_column.hash to ORM constructs
such as _orm.mapped_column(), _orm.relationship(), etc.,
which is interpreted for ORM Native Dataclasses in the same way as other
dataclass-specific field parameters.
[orm] [bug] Fixed bug in ORM bulk update/delete where using RETURNING with bulk
update/delete in combination with populate_existing would fail to
accommodate the populate_existing option.
[orm] [bug] Continuing from #11912, columns marked with
mapped_column.onupdate,
mapped_column.server_onupdate, or Computed are now
refreshed in ORM instances when running an ORM enabled UPDATE with WHERE
criteria, even if the statement does not use RETURNING or
populate_existing.
[orm] [bug] Fixed regression caused by fixes to joined eager loading in #11449
released in 2.0.31, where a particular joinedload case could not be
asserted correctly. We now have an example of that case so the assertion
has been repaired to allow for it.
[orm] [bug] Improved the error message emitted when trying to map as dataclass a class
while also manually providing the __table__ attribute.
This usage is currently not supported.
[orm] [bug] Refined the check which the ORM lazy loader uses to detect "this would be
loading by primary key and the primary key is NULL, skip loading" to take
into account the current setting for the
orm.Mapper.allow_partial_pks parameter. If this parameter is
False, then a composite PK value that has partial NULL elements should
also be skipped. This can apply to some composite overlapping foreign key
configurations.
class Pet(Enum):
CAT = 1 # Member attribute
DOG = 2 # Member attribute
WOLF: int = 3 # New error: Enum members must be left unannotated
species: str # Considered a non-member attribute
In particular, the specification change can result in issues in type stubs (.pyi files), since
historically it was common to leave the value absent:
# In a type stub (.pyi file)
class Pet(Enum):
# Change in semantics: previously considered members, now non-member attributes
CAT: int
DOG: int
# Mypy will now issue a warning if it detects this situation in type stubs:
# > Detected enum "Pet" in a type stub with zero members.
# > There is a chance this is due to a recent change in the semantics of enum membership.
# > If so, use `member = value` to mark an enum member, instead of `member: type`
class Pet(Enum):
# As per the specification, you should now do one of the following:
DOG = 1 # Member attribute with value 1 and known type
WOLF = cast(int, ...) # Member attribute with unknown value but known type
LION = ... # Member attribute with unknown value and unknown type
Contributed by Terence Honles in PR 17207 and
Shantanu Jain in PR 18068.
Mypy 1.13
We’ve just uploaded mypy 1.13 to the Python Package Index (PyPI).
Mypy is a static type checker for Python. You can install it as follows:
This release adds explicit support for Python 3.13 and drops support for running Nox itself under Python 3.7. Note that you can still use 3.7 in your Nox sessions, we just dropped support for installing & running nox itself in 3.7.
We'd like to thank the following folks who conributed to this release:
This release adds explicit support for Python 3.13 and drops support for running Nox itself under Python 3.7. Note that you can still use 3.7 in your Nox sessions, we just dropped support for installing & running nox itself in 3.7.
We'd like to thank the following folks who contributed to this release:
* PEP 639: Implement License-Expression and License-File (:issue:`828`)
* Use ``!r`` formatter for error messages with filenames (:issue:`844`)
* Add support for PEP 730 iOS tags (:issue:`832`)
* Fix prerelease detection for ``>`` and ``<`` (:issue:`794`)
* Fix uninformative error message (:issue:`830`)
* Refactor ``canonicalize_version`` (:issue:`793`)
* Patch python_full_version unconditionally (:issue:`825`)
* Fix doc for ``canonicalize_version`` to mention ``strip_trailing_zero`` and a typo in a docstring (:issue:`801`)
* Fix typo in Version ``__str__`` (:issue:`817`)
* Support creating a ``SpecifierSet`` from an iterable of ``Specifier`` objects (:issue:`775`)
What's new in psycopg 2.9.10
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Add support for Python 3.13.
Receive notifications on commit (:ticket:[#1728](https://github.com/psycopg/psycopg2/issues/1728)).
~psycopg2.errorcodes map and ~psycopg2.errors classes updated to
PostgreSQL 17.
Drop support for Python 3.7.
What's new in psycopg 2.9.9
^^^^^^^^^^^^^^^^^^^^^^^^^^^
Add support for Python 3.12.
Drop support for Python 3.6.
What's new in psycopg 2.9.8
^^^^^^^^^^^^^^^^^^^^^^^^^^^
Wheel package bundled with PostgreSQL 16 libpq in order to add support for
recent features, such as sslcertmode.
What's new in psycopg 2.9.7
^^^^^^^^^^^^^^^^^^^^^^^^^^^
Fix propagation of exceptions raised during module initialization
(:ticket:[#1598](https://github.com/psycopg/psycopg2/issues/1598)).
Fix building when pg_config returns an empty string (:ticket:[#1599](https://github.com/psycopg/psycopg2/issues/1599)).
Wheel package bundled with OpenSSL 1.1.1v.
What's new in psycopg 2.9.6
^^^^^^^^^^^^^^^^^^^^^^^^^^^
Package manylinux 2014 for aarch64 and ppc64le platforms, in order to
include libpq 15 in the binary package (:ticket:[#1396](https://github.com/psycopg/psycopg2/issues/1396)).
Wheel package bundled with OpenSSL 1.1.1t.
What's new in psycopg 2.9.5
^^^^^^^^^^^^^^^^^^^^^^^^^^^
Add support for Python 3.11.
Add support for rowcount in MERGE statements in binary packages
(:ticket:[#1497](https://github.com/psycopg/psycopg2/issues/1497)).
#12446: Avoid calling @property (and other instance descriptors) during fixture discovery -- by asottile{.interpreted-text role="user"}
#12659: Fixed the issue of not displaying assertion failure differences when using the parameter --import-mode=importlib in pytest>=8.1.
#12667: Fixed a regression where type change in [ExceptionInfo.errisinstance]{.title-ref} caused [mypy]{.title-ref} to fail.
#12744: Fixed typing compatibility with Python 3.9 or less -- replaced [typing.Self]{.title-ref} with [typing_extensions.Self]{.title-ref} -- by Avasam{.interpreted-text role="user"}
#12745: Fixed an issue with backslashes being incorrectly converted in nodeid paths on Windows, ensuring consistent path handling across environments.
#6682: Fixed bug where the verbosity levels where not being respected when printing the "msg" part of failed assertion (as in assert condition, msg).
#9422: Fix bug where disabling the terminal plugin via -p no:terminal would cause crashes related to missing the verbose option.
-- by GTowers1{.interpreted-text role="user"}
Improved documentation
#12663: Clarify that the [pytest_deselected]{.title-ref} hook should be called from [pytest_collection_modifyitems]{.title-ref} hook implementations when items are deselected.
#12678: Remove erroneous quotes from [tmp_path_retention_policy]{.title-ref} example in docs.
Miscellaneous internal changes
#12769: Fix typos discovered by codespell and add codespell to pre-commit hooks.
8.3.2
pytest 8.3.2 (2024-07-24)
Bug fixes
#12652: Resolve regression [conda]{.title-ref} environments where no longer being automatically detected.
-- by RonnyPfannschmidt{.interpreted-text role="user"}
8.3.1
pytest 8.3.1 (2024-07-20)
The 8.3.0 release failed to include the change notes and docs for the release. This patch release remedies this. There are no other changes.
... (truncated)
Commits
d0f136f build(deps): Bump pypa/gh-action-pypi-publish from 1.10.0 to 1.10.1 (#12790)
BREAKING: Updated minimum supported pytest version to v8.2.0
Adds an optional loop_scope keyword argument to pytest.mark.asyncio. This argument controls which event loop is used to run the marked async test. #706, #871
Deprecates the optional scope keyword argument to pytest.mark.asyncio for API consistency with pytest_asyncio.fixture. Users are encouraged to use the loop_scope keyword argument, which does exactly the same.
Raises an error when passing scope or loop_scope as a positional argument to @pytest.mark.asyncio. #812
Fixes a bug that caused module-scoped async fixtures to fail when reused in other modules #862#668
pytest-asyncio 0.24.0a1
0.24.0 (UNRELEASED)
BREAKING: Updated minimum supported pytest version to v8.2.0
Adds an optional loop_scope keyword argument to pytest.mark.asyncio. This argument controls which event loop is used to run the marked async test. #706, #871
Deprecates the optional scope keyword argument to pytest.mark.asyncio for API consistency with pytest_asyncio.fixture. Users are encouraged to use the loop_scope keyword argument, which does exactly the same.
Raises an error when passing scope or loop_scope as a positional argument to @pytest.mark.asyncio. #812
Fixes a bug that caused module-scoped async fixtures to fail when reused in other modules #862#668
pytest-asyncio 0.24.0a0
0.24.0 (UNRELEASED)
Adds an optional loop_scope keyword argument to pytest.mark.asyncio. This argument controls which event loop is used to run the marked async test. #706, #871
Deprecates the optional scope keyword argument to pytest.mark.asyncio for API consistency with pytest_asyncio.fixture. Users are encouraged to use the loop_scope keyword argument, which does exactly the same.
Raises an error when passing scope or loop_scope as a positional argument to @pytest.mark.asyncio. #812
Commits
fb5422f docs: Set release date for v0.24 in changelog.
This pull request updates multiple Python dependencies in the project's development dependencies. The changes are primarily version bumps to newer releases, with some adjustments to version constraints to allow for newer major versions.
No diagrams generated as the changes look simple and do not need a visual representation.
File-Level Changes
Change
Details
Files
Update SQLAlchemy and database adapter dependencies
Bump SQLAlchemy from 2.0.35 to 2.0.36 with ORM improvements and bug fixes
Update asyncpg from 0.29.0 to 0.30.0 with Python 3.13 and PostgreSQL 17 support
Update psycopg2 from 2.9.9 to 2.9.10 with Python 3.13 support
pyproject.toml poetry.lock
Update testing and development tool dependencies
Bump pytest from 7.4.4 to 8.3.3 with bug fixes and improvements
Update pytest-asyncio from 0.23.8 to 0.24.0 with new loop_scope feature
Update pytest-cov version constraint to allow v5.x
Update black from 23.12.1 to 24.8.0 with improved f-string handling
Update mypy from 1.8.0 to 1.13.0 with enum membership semantic changes
pyproject.toml poetry.lock
Update utility package dependencies
Update importlib-metadata from 7.2.1 to 8.5.0 with performance improvements
Update nox from 2023.4.22 to 2024.10.9 with Python 3.13 support
Update packaging from 24.1 to 24.2 with PEP 639 support
pyproject.toml poetry.lock
Tips and commands
#### Interacting with Sourcery
- **Trigger a new review:** Comment `@sourcery-ai review` on the pull request.
- **Continue discussions:** Reply directly to Sourcery's review comments.
- **Generate a GitHub issue from a review comment:** Ask Sourcery to create an
issue from a review comment by replying to it.
- **Generate a pull request title:** Write `@sourcery-ai` anywhere in the pull
request title to generate a title at any time.
- **Generate a pull request summary:** Write `@sourcery-ai summary` anywhere in
the pull request body to generate a PR summary at any time. You can also use
this command to specify where the summary should be inserted.
#### Customizing Your Experience
Access your [dashboard](https://app.sourcery.ai) to:
- Enable or disable review features such as the Sourcery-generated pull request
summary, the reviewer's guide, and others.
- Change the review language.
- Add, remove or edit custom review instructions.
- Adjust other review settings.
#### Getting Help
- [Contact our support team](mailto:support@sourcery.ai) for questions or feedback.
- Visit our [documentation](https://docs.sourcery.ai) for detailed guides and information.
- Keep in touch with the Sourcery team by following us on [X/Twitter](https://x.com/SourceryAI), [LinkedIn](https://www.linkedin.com/company/sourcery-ai/) or [GitHub](https://github.com/sourcery-ai).
Bumps the all-dependencies group with 12 updates in the / directory:
2.0.35
2.0.36
0.29.0
0.30.0
23.12.1
24.8.0
7.2.1
8.5.0
1.8.0
1.13.0
2023.4.22
2024.10.9
24.1
24.2
2.9.9
2.9.10
7.4.4
8.3.3
0.23.8
0.24.0
4.1.0
5.0.0
75.1.0
75.3.0
Updates
sqlalchemy
from 2.0.35 to 2.0.36Release notes
Sourced from sqlalchemy's releases.
... (truncated)
Commits
Updates
asyncpg
from 0.29.0 to 0.30.0Release notes
Sourced from asyncpg's releases.
... (truncated)
Commits
bae282e
asyncpg v0.30.0965fb08
Fix release workflowf6ec755
Allow customizing connection state reset (#1191)3ef884e
Upgrade Sphinx3ee19ba
Add connect_fn kwarg to Pool to better support GCP's CloudSQL (#1170)73f2209
Addfetchmany
to execute many and return rows (#1175)b732b4f
tests: Attempt to inhibit spurious ConnectionResetError on Windows (#1190)cee97e1
Test on PostgreSQL 17 (#1189)3aa9894
Test and build on Python 3.13 (#1188)afdb05c
Add support for thesslnegotiation
parameter (#1187)Updates
black
from 23.12.1 to 24.8.0Release notes
Sourced from black's releases.
... (truncated)
Changelog
Sourced from black's changelog.
... (truncated)
Commits
b965c2a
Prepare release 24.8.0 (#4426)9ccf279
Documentfind_project_root
ignoringpyproject.toml
without[tool.black]
...14b6e61
fix: Enhace black efficiently to skip directories listed in .gitignore (#4415)b1c4dd9
fix: respect braces better in f-string parsing (#4422)4b4ae43
Fix incorrect linenos on fstring tokens with escaped newlines (#4423)7fa1faf
docs: fix the installation command of extra for blackd (#4413)8827acc
Bump sphinx from 7.3.7 to 7.4.0 in /docs (#4404)b0da11d
Bump furo from 2024.5.6 to 2024.7.18 in /docs (#4409)721dff5
fix: avoid formatting backslash strings inside f-strings (#4401)7e2afc9
Updateactions/checkout
to v4 to stop node deprecation warnings (#4379)Updates
importlib-metadata
from 7.2.1 to 8.5.0Changelog
Sourced from importlib-metadata's changelog.
... (truncated)
Commits
b34810b
Finalize8c1d1fa
Merge pull request #501 from Avasam/Pass-mypy-and-link-issuesafa39e8
Back out changes to tests._path8b909f9
Merge pull request #503 from danielhollas/defer-json2a3f50d
Add news fragment.3f78dc1
Add comment to protect the deferred import.18eb2da
Revert "Defer platform import"58832f2
Merge pull request #502 from danielhollas/defer-zippe3ce33b
Add news fragment.d11b67f
Add comment to protect the deferred import.Updates
mypy
from 1.8.0 to 1.13.0Changelog
Sourced from mypy's changelog.
... (truncated)
Commits
eb31034
Bump version to 1.13.02eeb588
Update changelog for 1.12.1 (#17999)bc0386b
Changelog for 1.13 (#18000)5c4d2db
Add faster-cache extra, test in CI (#17978)854ad18
Make is_sub_path faster (#17962)50aa4ca
Speed up stubs suggestions (#17965)7c27808
Use orjson instead of json, when available (#17955)2cd2406
Use fast path in modulefinder more often (#17950)e20aaee
Let mypyc optimise os.path.join (#17949)159974c
Use sha1 for hashing (#17953)Updates
nox
from 2023.4.22 to 2024.10.9Release notes
Sourced from nox's releases.
... (truncated)
Changelog
Sourced from nox's changelog.
... (truncated)
Commits
1199ab3
Release 2024.10.096f295da
docs: add uv sync example (#864)57825e8
docs: note about uv reinstall (#863)57a65d8
docs: clean up dev recipe (#862)40d6b49
feat: install_and_run_script (PEP 721) (#847)9058e72
fix: remove add_timestamp from noxfile.options (#856)19655f4
chore: PyPy no longer supports 3.9 (#858)1806181
ci: use astral-sh's setup-uv (#859)d7072e3
chore: include 3.13 in classifiers (#851)a49c730
feat: support for uv-installed pythons (#842)Updates
packaging
from 24.1 to 24.2Release notes
Sourced from packaging's releases.
Changelog
Sourced from packaging's changelog.
Commits
d8e3b31
Bump for release2de393d
Update changelog for release9c66f5c
Remove extraneous quotes in f-strings by using!r
(#848)4dc334c
Upgrade to latest mypy (#853)d1a9f93
Bump the github-actions group with 4 updates (#852)029f415
PEP 639: Implement License-Expression and License-File (#828)6c338a8
Use !r formatter for error messages with filenames. (#844)28e7da7
Add a comment as to whyMetadata.name
isn't normalized (#842)ce0d79c
Mention updating changelog in release process (#841)ac5bdf3
Update the changelog to reflect 24.1 changes (#840)Updates
psycopg2
from 2.9.9 to 2.9.10Changelog
Sourced from psycopg2's changelog.
... (truncated)
Commits
Updates
pytest
from 7.4.4 to 8.3.3Release notes
Sourced from pytest's releases.
... (truncated)
Commits
d0f136f
build(deps): Bump pypa/gh-action-pypi-publish from 1.10.0 to 1.10.1 (#12790)972f307
Prepare release version 8.3.30dabdcf
Include co-authors in release announcement (#12795) (#12797)a9910a4
Do not discover properties when iterating fixtures (#12781) (#12788)0f10b6b
Fix issue with slashes being turned into backslashes on Windows (#12760) (#12...300d13d
Merge pull request #12785 from pytest-dev/patchback/backports/8.3.x/57cccf7f4...e5d32c7
Merge pull request #12784 from svenevs/fix/docs-example-parametrize-minor-typobc913d1
Streamline checks for verbose option (#12706) (#12778)01cfcc9
Fix typos and introduce codespell pre-commit hook (#12769) (#12774)4873394
doc: Remove past training (#12772) (#12773)Updates
pytest-asyncio
from 0.23.8 to 0.24.0Release notes
Sourced from pytest-asyncio's releases.
Commits
fb5422f
docs: Set release date for v0.24 in changelog.6dc7f58
Reviewer's Guide by Sourcery
This pull request updates multiple Python dependencies in the project's development dependencies. The changes are primarily version bumps to newer releases, with some adjustments to version constraints to allow for newer major versions.
No diagrams generated as the changes look simple and do not need a visual representation.
File-Level Changes
pyproject.toml
poetry.lock
pyproject.toml
poetry.lock
pyproject.toml
poetry.lock
Tips and commands
#### Interacting with Sourcery - **Trigger a new review:** Comment `@sourcery-ai review` on the pull request. - **Continue discussions:** Reply directly to Sourcery's review comments. - **Generate a GitHub issue from a review comment:** Ask Sourcery to create an issue from a review comment by replying to it. - **Generate a pull request title:** Write `@sourcery-ai` anywhere in the pull request title to generate a title at any time. - **Generate a pull request summary:** Write `@sourcery-ai summary` anywhere in the pull request body to generate a PR summary at any time. You can also use this command to specify where the summary should be inserted. #### Customizing Your Experience Access your [dashboard](https://app.sourcery.ai) to: - Enable or disable review features such as the Sourcery-generated pull request summary, the reviewer's guide, and others. - Change the review language. - Add, remove or edit custom review instructions. - Adjust other review settings. #### Getting Help - [Contact our support team](mailto:support@sourcery.ai) for questions or feedback. - Visit our [documentation](https://docs.sourcery.ai) for detailed guides and information. - Keep in touch with the Sourcery team by following us on [X/Twitter](https://x.com/SourceryAI), [LinkedIn](https://www.linkedin.com/company/sourcery-ai/) or [GitHub](https://github.com/sourcery-ai).CodSpeed Performance Report
Merging #213 will not alter performance
Comparing
dependabot/pip/all-dependencies-2df1a09e07
(f422797) withmain
(2133fd7)Summary
✅ 1
untouched benchmarks