[orm] [bug] [typing] Fixed issue where it was not possible to use typing.Literal with
Mapped[] on Python 3.8 and 3.9. Pull request courtesy Frazer McLean.
[orm] [bug] Fixed issue in ORM evaluator where two datatypes being evaluated with the
SQL concatenator operator would not be checked for
UnevaluatableError based on their datatype; this missed the case
of _postgresql.JSONB values being used in a concatenate operation
which is supported by PostgreSQL as well as how SQLAlchemy renders the SQL
for this operation, but does not work at the Python level. By implementing
UnevaluatableError for this combination, ORM update statements
will now fall back to "expire" when a concatenated JSON value used in a SET
clause is to be synchronized to a Python object.
[orm] [bug] An warning is emitted if _orm.joinedload() or
_orm.subqueryload() are used as a top level option against a
statement that is not a SELECT statement, such as with an
insert().returning(). There are no JOINs in INSERT statements nor is
there a "subquery" that can be repurposed for subquery eager loading, and
for UPDATE/DELETE joinedload does not support these either, so it is never
appropriate for this use to pass silently.
[orm] [bug] Fixed issue where using loader options such as _orm.selectinload()
with additional criteria in combination with ORM DML such as
_sql.insert() with RETURNING would not correctly set up internal
contexts required for caching to work correctly, leading to incorrect
results.
[mysql] [bug] Fixed issue in mariadbconnector dialect where query string arguments that
weren't checked integer or boolean arguments would be ignored, such as
string arguments like unix_socket, etc. As part of this change, the
argument parsing for particular elements such as client_flags,
compress, local_infile has been made more consistent across all
Fix crashes on 32-bit PPC Linux. Note that there is no CI for this,
and support is best effort; there may be other issues lurking.
See issue 422 <https://github.com/python-greenlet/greenlet/issues/422>_.
Remove unnecessary logging sometimes during interpreter shutdown.
See issue 426 <https://github.com/python-greenlet/greenlet/issues/426>_.
Fix some crashes on 32-bit PPC MacOS. This is a very old platform,
and is only known to be tested on beta versions of an operating
system that was never released, using the GCC 14 only provided by
MacPorts; it may or may not work on the final MacOS X release that
supported 32-bit PowerPC. It has the known issue of leaking memory
when greenlets are used in multiple threads. Help debugging this
would be appreciated. See PR 419 <https://github.com/python-greenlet/greenlet/pull/419>_.
3.1.0 (2024-09-10)
.. note::
This will be the last release to support Python 3.7 and 3.8.
Adds support for Python 3.13.
.. note::
greenlet will not work in no-gil (free threaded) builds of CPython.
Internally, greenlet heavily depends on the GIL.
Greatly reduce the chances for crashes during interpreter shutdown.
See issue 411 <https://github.com/python-greenlet/greenlet/issues/411>_.
Platform Support
Support for the following platforms was contributed by the community.
Note that they are untested by this project's continuous integration
services.
Hitachi's SuperH CPU <https://github.com/python-greenlet/greenlet/issues/166>_.
NetBSD on PowerPC. <https://github.com/python-greenlet/greenlet/pull/402>_
RiscV 64 with -fno-omit-frame-pointer <https://github.com/python-greenlet/greenlet/pull/404>. Note that
there are known test failures <https://github.com/python-greenlet/greenlet/issues/403>, so this
We’ve just uploaded mypy 1.11 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 Python 3.12 Syntax for Generics (PEP 695)
Mypy now supports the new type parameter syntax introduced in Python 3.12 (PEP 695).
This feature is still experimental and must be enabled with the --enable-incomplete-feature=NewGenericSyntax flag, or with enable_incomplete_feature = NewGenericSyntax in the mypy configuration file.
We plan to enable this by default in the next mypy feature release.
This example demonstrates the new syntax:
# Generic function
def f[T](https://github.com/python/mypy/blob/master/x: T) -> T: ...
reveal_type(f(1)) # Revealed type is 'int'
Generic class
class C[T]:
def init(self, x: T) -> None:
self.x = x
c = C('a')
reveal_type(c.x) # Revealed type is 'str'
Type alias
type A[T] = C[list[T]]
This feature was contributed by Jukka Lehtosalo.
Support for functools.partial
Mypy now type checks uses of functools.partial. Previously mypy would accept arbitrary arguments.
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)
Support creating a SpecifierSet from an iterable of Specifier objects (:issue:775)
#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
pytest-asyncio 0.23.8
0.23.8 (2024-07-17)
Fixes a bug that caused duplicate markers in async tests #813
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.7
0.23.7 (2024-05-19)
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.
🧙 Sourcery has finished reviewing your pull request!
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.
#### 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 16 updates in the / directory:
2.0.23
2.0.35
3.0.3
3.1.1
2.0.1701229837
2.0.1726021475
23.12.1
24.8.0
7.0.1
8.5.0
1.8.0
1.11.2
2023.4.22
2024.4.15
23.2
24.1
1.30.3
1.31.2
7.4.3
8.3.3
0.23.2
0.24.0
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
75.1.0
Updates
sqlalchemy
from 2.0.23 to 2.0.35Release notes
Sourced from sqlalchemy's releases.
... (truncated)
Commits
Updates
greenlet
from 3.0.3 to 3.1.1Changelog
Sourced from greenlet's changelog.
... (truncated)
Commits
dd0a948
Preparing release 3.1.1ab8d3bc
Disable thread-local cleanup on 32-bit MacOS PPC with GCC. This will result i...e9db22a
Merge pull request #429 from python-greenlet/issue419redux6081a16
Merge pull request #419 from barracuda156/powerpcdbf311a
Greater safety and fewer assumptions doing cross-thread cleanup.9e8a90b
Set back greenlet_thread_state.hpp file1bf374f
Duplicate greenlet_thread_state.hpp history.64e0b4f
Copy greenlet_thread_state.hpp into TThreadStateCreator.hpp358a2e8
Keep greenlet_thread_state.hpp5144f70
Sigh. Pip hides compiler output which is, you know, important, and the only w...Updates
sqlakeyset
from 2.0.1701229837 to 2.0.1726021475Commits
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.0.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.11.2Changelog
Sourced from mypy's changelog.
... (truncated)
Commits
789f02c
Bump version to 1.11.2917cc75
An alternative fix for a union-like literal string (#17639)7d805b3
Unwrap TypedDict item types before storing (#17640)32675dd
Revert "Fix Literal strings containing pipe characters" (#17638)778542b
Revert "FixRawExpressionType.accept
crash with--cache-fine-grained
" (#1...14ab742
Bump version to 1.11.2+dev570b90a
Bump version to 1.11b3a102e
FixRawExpressionType.accept
crash with--cache-fine-grained
(#17588)aec04c7
Fix PEP 604 isinstance caching (#17563)cb44e4d
Fixtyping.TypeAliasType
being undefined on python < 3.12 (#17558)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.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.2 to 0.24.0Release notes
Sourced from pytest-asyncio's releases.