Sourced from psycopg's changelog.
.. currentmodule:: psycopg
.. index:: single: Release notes single: News
psycopgrelease notesFuture releases
Psycopg 3.3.7 (unreleased) ^^^^^^^^^^^^^^^^^^^^^^^^^^
- Fix segfault fetching arrays of strings or timestamps after closing the connection (:ticket:
[#1428](https://github.com/psycopg/psycopg/issues/1428)).Current release
Psycopg 3.3.6 ^^^^^^^^^^^^^
- Add support for Python 3.15 (:ticket:
[#1245](https://github.com/psycopg/psycopg/issues/1245)).- Improve performance of async queries by reducing the overhead of the
!wait_async()function (:ticket:[#1331](https://github.com/psycopg/psycopg/issues/1331)).- Don't wait forever for a query to terminate after interrupting it, for instance if the server is unresponsive. The fix requires libpq 17 or newer (:ticket:
[#1371](https://github.com/psycopg/psycopg/issues/1371)).- Cancel a running query upon receiving
!SystemExit(:ticket:[#1384](https://github.com/psycopg/psycopg/issues/1384)).- Report
!Noneinstead of65535as theColumn.precisionof an :sql:intervalcolumn declared with a fields restriction and no explicit precision, such as e.g. :sql:interval day to second(:ticket:[#1397](https://github.com/psycopg/psycopg/issues/1397)).- Fix dumping of nested subclasses of lists as arrays (:ticket:
[#1398](https://github.com/psycopg/psycopg/issues/1398)).- Discard prepared statements upon :sql:
DEALLOCATE ALL(:ticket:[#1408](https://github.com/psycopg/psycopg/issues/1408)).- Better guards dumping large Python
!intto binary numeric (:ticket:[#1414](https://github.com/psycopg/psycopg/issues/1414)).Psycopg 3.3.5 ^^^^^^^^^^^^^
- Discard prepared statements upon :sql:
ALTER *orDISCARD *(:ticket:[#1307](https://github.com/psycopg/psycopg/issues/1307)).- Fix
!ProgrammingErrorwhen dumping non-!Nonevalues with no!NoneTypedumper registered in python implementation (:ticket:[#1325](https://github.com/psycopg/psycopg/issues/1325)).- Fix
!wait_selectorwait function to not raise!KeyError(:ticket:[#1327](https://github.com/psycopg/psycopg/issues/1327)).- Fix
!DataErrormessages leaking the literal{...}placeholder instead
... (truncated)
a67654d
chore: bump psycopg package version to 3.3.6443814b
Merge pull request #1416
from dvarrazzo/wait-async-perf42966e9
test: add helpful comments to some tests5e8797f
test: add reasonable connect_timeout to most testsc81ba62
perf: reduce the overhead of wait_async()d2bbfe4
refactor: use get_running_loop() in the async wait functions2b1484a
test: add a script to measure the async wait functions573cf4a
test: fix incorrect wait timing test2b68990
refactor: drop leftovers of waiting with inf interval in
wait_conn_async60765dd
Merge pull request #1414
from dvarrazzo/fix-decimal-overflowSourced from psycopg-pool's changelog.
.. currentmodule:: psycopg
.. index:: single: Release notes single: News
psycopgrelease notesFuture releases
Psycopg 3.3.7 (unreleased) ^^^^^^^^^^^^^^^^^^^^^^^^^^
- Fix segfault fetching arrays of strings or timestamps after closing the connection (:ticket:
[#1428](https://github.com/psycopg/psycopg/issues/1428)).Current release
Psycopg 3.3.6 ^^^^^^^^^^^^^
- Add support for Python 3.15 (:ticket:
[#1245](https://github.com/psycopg/psycopg/issues/1245)).- Improve performance of async queries by reducing the overhead of the
!wait_async()function (:ticket:[#1331](https://github.com/psycopg/psycopg/issues/1331)).- Don't wait forever for a query to terminate after interrupting it, for instance if the server is unresponsive. The fix requires libpq 17 or newer (:ticket:
[#1371](https://github.com/psycopg/psycopg/issues/1371)).- Cancel a running query upon receiving
!SystemExit(:ticket:[#1384](https://github.com/psycopg/psycopg/issues/1384)).- Report
!Noneinstead of65535as theColumn.precisionof an :sql:intervalcolumn declared with a fields restriction and no explicit precision, such as e.g. :sql:interval day to second(:ticket:[#1397](https://github.com/psycopg/psycopg/issues/1397)).- Fix dumping of nested subclasses of lists as arrays (:ticket:
[#1398](https://github.com/psycopg/psycopg/issues/1398)).- Discard prepared statements upon :sql:
DEALLOCATE ALL(:ticket:[#1408](https://github.com/psycopg/psycopg/issues/1408)).- Better guards dumping large Python
!intto binary numeric (:ticket:[#1414](https://github.com/psycopg/psycopg/issues/1414)).Psycopg 3.3.5 ^^^^^^^^^^^^^
- Discard prepared statements upon :sql:
ALTER *orDISCARD *(:ticket:[#1307](https://github.com/psycopg/psycopg/issues/1307)).- Fix
!ProgrammingErrorwhen dumping non-!Nonevalues with no!NoneTypedumper registered in python implementation (:ticket:[#1325](https://github.com/psycopg/psycopg/issues/1325)).- Fix
!wait_selectorwait function to not raise!KeyError(:ticket:[#1327](https://github.com/psycopg/psycopg/issues/1327)).- Fix
!DataErrormessages leaking the literal{...}placeholder instead
... (truncated)
1a8f65a
chore: bump psycopg package version to 3.3.3db3c435
Merge pull request #1260
from ggevay/sync-error-fix0237586
Fix ValueError when server sends ErrorResponse during Sync after
Parsecb97ef7
docs: fix typos09c8918
Merge pull request #1256
from veeceey/fix/tstrings-error-msg-and-docs-improve...9e74d96
fix: fix error message incorrectly generated by Claude AI0db9d8b
fix: correct typo in tstrings error message and fix sql.rst docs86a0e1b
chore(deps): bump pypa/cibuildwheel in the actions groupf5d90fa
Merge pull request #1233
from lysnikolaou/pgconn-critical-sectiond7dc6c7
Merge critical section and nogil blocks into one context managerSourced from anyio's releases.
4.15.1
- Implemented a compatibility fix for supporting direct access of
anyio.*submodules from the main package even when those submodules were not directly imported first (#1311 <agronholm/anyio#1311)4.15.0
Added support for the newer keyword-only arguments on
anyio.Pathmethods to match the standard librarypathlib.Path:
follow_symlinksonexists()(Python 3.12+)follow_symlinksonis_dir()(Python 3.13+)follow_symlinksonis_file()(Python 3.13+)follow_symlinksonowner()(Python 3.13+)follow_symlinksongroup()(Python 3.13+)newlineonread_text()(Python 3.13+)(#1286, #1293; PR by
@jaideeppyne)Added
amap,gather, andas_completedutility functions to simplify common patterns (#1173; PR by@Graeme22)Added
--anyio-modecommand-line option as an alternative to theanyio_modeini setting, and fix the pytest plugin's auto mode detection to recognize the mode when set via either mechanism(e.g:pytest_asyncio). (#1242; PR by@EmmanuelNiyonshuti)Added the
anyio.Futuresynchronization primitive which behaves similar toasyncio.Future, allowing tasks to wait for a value (or exception) from another task (#1146; PR by@Vizonex)Added guidance for managing multiple memory object stream producers and consumers with cloned streams (#330; PR by
@nightcityblade)Added
StapledObjectStream.send_nowait()that delegates to the underlyingObjectSendStream, if it implements it (#1241; PR by@davidbrochart)Added the
move_on_at()andfail_at()functions to complementmove_on_after()andfail_after()Changed the default name for a task spawned with
TaskGroup.create_task(func())to match the default task name for the analogous task spawned withTaskGroup.start_soon(func)orTaskGroup.start(func)in more situations. Previously, the default name of aTaskGroup.create_tasktask never included the module name. (The default name for a task spawned withTaskGroup.start_soonorTaskGroup.starttypically includes the module name.) (#1234; PR by@gschaffner)Changed the
anyioandanyio.abcmodules to lazily (much like810) import the necessary submodules. This is done by parsing the AST of the module and building a lookup table from theif TYPE_CHECKING:block. A fallback mode has been provided for installations where the source code is unavailable (e.g. PyInstaller). (#1169)Fixed free-threading compatibility issues arising from the fact that on Python 3.14 free-threading builds, newly created threads inherit the current context by default, causing AnyIO to behave erroneously in relation to
start_blocking_portal()andanyio.to_thread.run_sync()(#1224; PR by@EmmanuelNiyonshuti)Fixed
SpooledTemporaryFile.readinto()andreadinto1()reading twice before rollover, so the destination buffer was overwritten by the second read and the file position advanced twice, silently losing data (#1215; PR by@c-tonneslan)Added a
reasonparameter tofail_after(and the newfail_at) allowing for added exception context when raisingTimeoutError(#1227; PR by@Graeme22)Fixed the default
TaskHandle.namemissing part of the task name for tasks started withTaskGroup.starton Trio (#1231; PR by@gschaffner)Fixed
anyio.runleaking, or at least, delaying collection of loop and root_task due to the root task being cached in aRunVar. (#1203; PR by@tapetersen)Fixed
anyio.Path.with_stem()silently producing a wrong path (e.g.Path(".txt")) instead of raisingValueErrorwhen given an empty stem on a path with a non-empty suffix, unlikepathlib.PurePath.with_stem(#1200; PR by@Sanjays2402)Fixed
UNIXSocketStream.aclose()raisingasyncio.InvalidStateErrorwhen a concurrent receive or send operation had just been cancelled on the asyncio backend (#1267; PR by@alloutflo)Fixed the pytest plugin importing the deprecated
_pytest.python.CallSpec2alias, which triggersPytestRemovedIn10Warningonpytest>=9.2and crashes pytest at startup whenfilterwarnings = erroris configured (#1271; PR by@matthewfeickert)Fixed an asyncio worker thread race that could raise
RuntimeErrorwhen the event loop closed between checking its state and scheduling the worker result (#1265; PR by@hansu650)Fixed
CapacityLimiteron the asyncio backend over-granting tokens whentotal_tokenswas raised while the limiter was over-subscribed (#1223; PR by@zelinewang)
... (truncated)
ffcd154
Bumped up the version0ecf5ed
Added a workaround for third party code accessing unimported submodules
(#1309)9283662
Bumped up the versiond137692
Improved the instructions for AI agents033fc52
Shield TemporaryDirectory cleanup from cancellation (#1304)942e9a6
[pre-commit.ci] pre-commit autoupdate (#1305)b825c3b
Fixed pyproject.toml changes not triggering the test suite9727dc5
Fixed start inconsistencies between trio and asyncio (#1198)b05fe6d
Fixed wrong type in move_on_after (#1297)44d0c93
Fixed asyncio task group coroutine cleanup (#1275)Sourced from pytest-mock's releases.
v3.16.0
2026-09-27
- #604: Fixed
duplicate_iterators=Truefor async functions spied withmocker.spy.- #611: Fixed async mock assertion introspection to use awaited arguments instead of the latest call's arguments.
- #606:
mocker.resetall(return_value=True, side_effect=True)now also applies to non-callable mocks, such as those returned bymocker.create_autospec(SomeClass, instance=True). Previously both arguments were silently ignored for them.- #547: Added
SpyTypefor annotatingmocker.spyresults.- Dropped support for EOL Python 3.9.
- #147: Removed handling of
RuntimeError: stop called on unstarted patcher, which can no longer occur in the supported Python versions.- Added support for Python 3.15.
Sourced from pytest-mock's changelog.
3.16.0
2026-09-27
[#604](https://github.com/pytest-dev/pytest-mock/issues/604) <https://github.com/pytest-dev/pytest-mock/pull/604>_: Fixedduplicate_iterators=Truefor async functions spied withmocker.spy.[#611](https://github.com/pytest-dev/pytest-mock/issues/611) <https://github.com/pytest-dev/pytest-mock/pull/611>_: Fixed async mock assertion introspection to use awaited arguments instead of the latest call's arguments.[#606](https://github.com/pytest-dev/pytest-mock/issues/606) <https://github.com/pytest-dev/pytest-mock/pull/606>_:mocker.resetall(return_value=True, side_effect=True)now also applies to non-callable mocks, such as those returned bymocker.create_autospec(SomeClass, instance=True). Previously both arguments were silently ignored for them.[#547](https://github.com/pytest-dev/pytest-mock/issues/547) <https://github.com/pytest-dev/pytest-mock/issues/547>_: AddedSpyTypefor annotatingmocker.spyresults.- Dropped support for EOL Python 3.9.
[#147](https://github.com/pytest-dev/pytest-mock/issues/147) <https://github.com/pytest-dev/pytest-mock/issues/147>_: Removed handling ofRuntimeError: stop called on unstarted patcher, which can no longer occur in the supported Python versions.- Added support for Python 3.15.
f3b531f
Release 3.16.071ed673
Fix duplicate_iterators for async spies (#604)0797e3d
Fix async assertion argument introspection (#611)e24c334
docs: import os in the opening usage example (#612)9e7eb7b
[pre-commit.ci] pre-commit autoupdate (#613)445fd4d
[pre-commit.ci] pre-commit autoupdate (#610)a8bd0b1
Honour resetall() arguments for non-callable mocks (#606)6559fdf
[pre-commit.ci] pre-commit autoupdate (#608)466d026
[pre-commit.ci] pre-commit autoupdate (#605)164defe
[pre-commit.ci] pre-commit autoupdate (#603)Sourced from ruff's releases.
0.16.9
Release Notes
Released on 2026-09-24.
Preview features
- [
ruff] Avoid false positives for overloaded division (RUF069) (#28309)Bug fixes
- [
flake8-bugbear] Avoid false positives for calls with keyword arguments (B009,B010,B043) (#28776)- [
flake8-tidy-imports] Allow lazy imports to be used in deferred annotations (TID255) (#28767)Rule changes
- Update LibCST-based fixes for Python 3.15 (#28616)
- [
flake8-pyi] Mention stubs in the diagnostic message (PYI002) (#28542)Documentation
- Fix horizontal overflow on the rules documentation page (#28699)
- Update rules table with category information (#28651)
- [
flake8-annotations] Clarify thatANN401checks return types in addition to arguments (#28334)- [
flake8-bugbear] Document type-checker interaction (B010) (#28509)- [
flake8-comprehensions] Documentmap/generator exception behavior (C417) (#27794)- [
ruff] Mention related isort settings (RUF022) (#28719)Contributors
@qinpei-dev@sanjayrohith@ntBre@webdevsamran@zaniebot@ewdurbin@MichaReiser@spaceone@IbrahimKhan12@devtechedge@GruffElixirInstall ruff 0.16.9
Install prebuilt binaries via shell script
curl --proto '=https' --tlsv1.2 -LsSf https://releases.astral.sh/github/ruff/releases/download/0.16.9/ruff-installer.sh | sh
... (truncated)
Sourced from ruff's changelog.
0.16.9
Released on 2026-09-24.
Preview features
- [
ruff] Avoid false positives for overloaded division (RUF069) (#28309)Bug fixes
- [
flake8-bugbear] Avoid false positives for calls with keyword arguments (B009,B010,B043) (#28776)- [
flake8-tidy-imports] Allow lazy imports to be used in deferred annotations (TID255) (#28767)Rule changes
- Update LibCST-based fixes for Python 3.15 (#28616)
- [
flake8-pyi] Mention stubs in the diagnostic message (PYI002) (#28542)Documentation
- Fix horizontal overflow on the rules documentation page (#28699)
- Update rules table with category information (#28651)
- [
flake8-annotations] Clarify thatANN401checks return types in addition to arguments (#28334)- [
flake8-bugbear] Document type-checker interaction (B010) (#28509)- [
flake8-comprehensions] Documentmap/generator exception behavior (C417) (#27794)- [
ruff] Mention related isort settings (RUF022) (#28719)Contributors
@qinpei-dev@sanjayrohith@ntBre@webdevsamran@zaniebot@ewdurbin@MichaReiser@spaceone@IbrahimKhan12@devtechedge@GruffElixir0.16.8
Released on 2026-09-16.
Bug fixes
... (truncated)
0be08a2
Bump version to 0.16.9 (#28882)b4920b7
Rename ruff_cli to ruff_command_line (#28881)47c751b
Update dependency astral-sh/uv to v0.12.18 (#28880)8c244e5
[flake8-comprehensions] Document map/generator
exception behavior (C417...5edf5a1
Use target form in rooster.version_files (#28876)915bb2b
[ty] Prefer existing @ paths over response files in Ruff and ty (#28877)4710e1a
ci(github): update version number in placeholder of issue template (#28871)eedfc62
[ty] Propagate outer type context through cast calls (#28855)ceaa6a0
[ty] Contain rendered code within Markdown fences (#28869)dba0f30
authorize ruff-pre-commit dispatch via OIDC (#28867)Sourced from ty's releases.
0.0.84
Release Notes
Released on 2026-09-24.
This release addresses GHSA-vxvm-j4xq-q7m4, a use-after-free vulnerability during incremental type checking that can result in arbitrary code execution when analyzing a specially crafted Python project. Users who run ty on untrusted code should upgrade to 0.0.84 or newer.
Bug fixes
- Fix stale diagnostics from the LSP server after toggling
showSyntaxErrors(#28759)LSP server
- Complete string keys from dictionary initializers (#28820)
- Support LSP requests against closed documents (#28595)
- Select projects for external files using import search paths (#28594)
- Use workspace editor settings for external files (#28639)
Performance
- Avoid repeated subtyping checks for materialized recursive protocols (#28774)
- Skip reading notebooks when discovering scripts (#28781)
Core type checking
- Avoid incorrect simplification of
TypeIsmaterializations (#28817)- Fix disjointness of generic class types (#28787)
- Fix staticmethod shadowing through generic receivers and unions (#28766)
- Infer callable signatures from bounded type variables (#28599)
- Infer constant membership in inline list and set literals (e.g.
"foo" in ["foo"]is now inferred asLiteral[True]) (#28676)- Infer through optional generic containers in the legacy solver (#28791)
- Preserve call narrowing during cyclic inference (#28708)
- Preserve intersections of type guard return types (#28796)
- Use subtyping for constraint-set implication (#28657)
Configuration
- Disable
invalid-legacy-positional-parameterby default (#28834)Other changes
- Only consider reachable definitions when determining whether a condition should be exempted from
redundant-condition(-strict)due to the condition being defined relative tosys.version_info,sys.platform,os.nameortyping.TYPE_CHECKING(#28788)Contributors
... (truncated)
Sourced from ty's changelog.
0.0.84
Released on 2026-09-24.
This release addresses GHSA-vxvm-j4xq-q7m4, a use-after-free vulnerability during incremental type checking that can result in arbitrary code execution when analyzing a specially crafted Python project. Users who run ty on untrusted code should upgrade to 0.0.84 or newer.
Bug fixes
- Fix stale diagnostics from the LSP server after toggling
showSyntaxErrors(#28759)LSP server
- Complete string keys from dictionary initializers (#28820)
- Support LSP requests against closed documents (#28595)
- Select projects for external files using import search paths (#28594)
- Use workspace editor settings for external files (#28639)
Performance
- Avoid repeated subtyping checks for materialized recursive protocols (#28774)
- Skip reading notebooks when discovering scripts (#28781)
Core type checking
- Avoid incorrect simplification of
TypeIsmaterializations (#28817)- Fix disjointness of generic class types (#28787)
- Fix staticmethod shadowing through generic receivers and unions (#28766)
- Infer callable signatures from bounded type variables (#28599)
- Infer constant membership in inline list and set literals (e.g.
"foo" in ["foo"]is now inferred asLiteral[True]) (#28676)- Infer through optional generic containers in the legacy solver (#28791)
- Preserve call narrowing during cyclic inference (#28708)
- Preserve intersections of type guard return types (#28796)
- Use subtyping for constraint-set implication (#28657)
Configuration
- Disable
invalid-legacy-positional-parameterby default (#28834)Other changes
- Only consider reachable definitions when determining whether a condition should be exempted from
redundant-condition(-strict)due to the condition being defined relative tosys.version_info,sys.platform,os.nameortyping.TYPE_CHECKING(#28788)Contributors
... (truncated)
8dd9a7f
Bump version to 0.0.84 (#4585)d4e4bf9
publish to astral-sh/versions via OIDC (#4581)94ce733
use oidc issued token for docs publication (#4579)901eeaa
Update prek dependencies (#4576)09bf0b1
Update docker/setup-buildx-action action to v4.3.0 (#4575)89d6ffe
Update astral-sh/setup-uv action to v10.2.0 (#4574)9c21479
Bump version to 0.0.83 (#4569)04c6911
Sync the ty security mirror (#4549)3fa57a2
Grant the versions workflow repository read access (#4550)a15b353
use scoped token for release workflow (#4506)