Python 3.13+ Knowledge Patch
Claude's baseline knowledge covers Python through 3.12. This skill provides features from 3.13 (Oct 2024) onwards.
Source: Python "What's New" documentation at https://docs.python.org/3/whatsnew/
3.13 Breaking Changes
| Change |
Impact |
| 19 "dead battery" modules removed (PEP 594) |
ImportError for cgi, crypt, imghdr, telnetlib, etc. See removals |
locals() returns snapshots in functions (PEP 667) |
exec()/eval() in functions need explicit namespace. See new-modules |
TypedDict("T", x=int) keyword syntax removed |
Use class syntax or TypedDict("T", {"x": int}) |
pathlib.Path.glob("**") returns files AND dirs |
Add trailing / for dirs only: glob("**/") |
| Docstring leading whitespace stripped |
May affect doctest tests |
3.13 New Features
| Feature |
Quick reference |
| Free-threaded CPython (PEP 703) |
python3.13t, sys._is_gil_enabled(), PYTHON_GIL=0. See concurrency |
copy.replace() protocol |
copy.replace(obj, field=val), implement __replace__(). See new-modules |
warnings.deprecated() (PEP 702) |
@deprecated("msg") — runtime warning + type checker signal. See new-modules |
3.14 New Syntax
| Feature |
Quick reference |
| T-strings (PEP 750) |
t"Hello {name}" → Template object. from string.templatelib import Template, Interpolation. See new-syntax |
| Deferred annotations (PEP 649/749) |
Forward refs no longer need quotes. from annotationlib import get_annotations, Format. See new-syntax |
except without brackets (PEP 758) |
except A, B: (no parens, no as). Parens still needed with as. |
3.14 New Modules
| Module |
Quick reference |
compression.zstd (PEP 784) |
from compression import zstd; zstd.compress(data). See new-modules |
concurrent.interpreters (PEP 734) |
Subinterpreters + InterpreterPoolExecutor. See concurrency |
annotationlib |
get_annotations(obj, format=Format.FORWARDREF) |
functools.Placeholder |
partial(func, Placeholder, fixed_arg) — reserve positional slots |
3.14 Breaking Changes
| Change |
Impact |
asyncio.get_event_loop() raises RuntimeError |
Must use asyncio.run() or asyncio.Runner |
multiprocessing default → 'forkserver' on Linux |
May cause pickling errors; use get_context('fork') |
int() no longer uses __trunc__() |
Must implement __int__() or __index__() |
functools.partial is method descriptor |
Wrap in staticmethod() for classes |
from __future__ import annotations deprecated |
Unchanged behavior; removal after 2029 |
ast.Num/Str/Bytes removed |
Use ast.Constant |
asyncio child watcher classes removed |
Use asyncio.run() |
SyntaxWarning in finally (PEP 765) |
return/break/continue in finally now warns |
3.14 New APIs
| API |
Quick reference |
sys.remote_exec(pid, script) (PEP 768) |
Attach debugger to running process; python -m pdb -p PID. See new-modules |
io.Reader / io.Writer |
Simpler protocol alternatives to typing.IO |
uuid.uuid7() |
Time-ordered UUID (RFC 9562); also uuid6(), uuid8() |
heapq.*_max() |
heapify_max(), heappush_max(), heappop_max(), etc. |
| Free-threading (PEP 779) |
Now officially supported; 5-10% overhead |
Reference Files
For detailed patterns, code examples, and migration guidance, consult:
references/new-syntax.md — T-strings (template processors, API), deferred annotations (annotationlib), except without brackets
references/new-modules.md — compression.zstd, functools.Placeholder, copy.replace(), warnings.deprecated(), locals() semantics, remote debugging, io.Reader/Writer, uuid.uuid7(), heapq max-heap
references/concurrency.md — Free-threaded CPython (GIL-free mode), subinterpreters, InterpreterPoolExecutor
references/removals.md — Dead batteries (19 modules), 3.13/3.14 removals, breaking behavior changes
Converted and distributed by TomeVault — claim your Tome and manage your conversions.
1---2name: nevaberry-nevaberry-plugins-python-knowledge-patch3description: Python 3.13+ Knowledge Patch4---56# Python 3.13+ Knowledge Patch78Claude's baseline knowledge covers Python through 3.12. This skill provides features from 3.13 (Oct 2024) onwards.910**Source**: Python "What's New" documentation at https://docs.python.org/3/whatsnew/1112## 3.13 Breaking Changes1314| Change | Impact |15|--------|--------|16| 19 "dead battery" modules removed (PEP 594) | `ImportError` for `cgi`, `crypt`, `imghdr`, `telnetlib`, etc. See [removals](references/removals.md) |17| `locals()` returns snapshots in functions (PEP 667) | `exec()`/`eval()` in functions need explicit namespace. See [new-modules](references/new-modules.md) |18| `TypedDict("T", x=int)` keyword syntax removed | Use class syntax or `TypedDict("T", {"x": int})` |19| `pathlib.Path.glob("**")` returns files AND dirs | Add trailing `/` for dirs only: `glob("**/")` |20| Docstring leading whitespace stripped | May affect `doctest` tests |2122## 3.13 New Features2324| Feature | Quick reference |25|---------|----------------|26| Free-threaded CPython (PEP 703) | `python3.13t`, `sys._is_gil_enabled()`, `PYTHON_GIL=0`. See [concurrency](references/concurrency.md) |27| `copy.replace()` protocol | `copy.replace(obj, field=val)`, implement `__replace__()`. See [new-modules](references/new-modules.md) |28| `warnings.deprecated()` (PEP 702) | `@deprecated("msg")` — runtime warning + type checker signal. See [new-modules](references/new-modules.md) |2930## 3.14 New Syntax3132| Feature | Quick reference |33|---------|----------------|34| T-strings (PEP 750) | `t"Hello {name}"` → `Template` object. `from string.templatelib import Template, Interpolation`. See [new-syntax](references/new-syntax.md) |35| Deferred annotations (PEP 649/749) | Forward refs no longer need quotes. `from annotationlib import get_annotations, Format`. See [new-syntax](references/new-syntax.md) |36| `except` without brackets (PEP 758) | `except A, B:` (no parens, no `as`). Parens still needed with `as`. |3738## 3.14 New Modules3940| Module | Quick reference |41|--------|----------------|42| `compression.zstd` (PEP 784) | `from compression import zstd; zstd.compress(data)`. See [new-modules](references/new-modules.md) |43| `concurrent.interpreters` (PEP 734) | Subinterpreters + `InterpreterPoolExecutor`. See [concurrency](references/concurrency.md) |44| `annotationlib` | `get_annotations(obj, format=Format.FORWARDREF)` |45| `functools.Placeholder` | `partial(func, Placeholder, fixed_arg)` — reserve positional slots |4647## 3.14 Breaking Changes4849| Change | Impact |50|--------|--------|51| `asyncio.get_event_loop()` raises `RuntimeError` | Must use `asyncio.run()` or `asyncio.Runner` |52| `multiprocessing` default → `'forkserver'` on Linux | May cause pickling errors; use `get_context('fork')` |53| `int()` no longer uses `__trunc__()` | Must implement `__int__()` or `__index__()` |54| `functools.partial` is method descriptor | Wrap in `staticmethod()` for classes |55| `from __future__ import annotations` deprecated | Unchanged behavior; removal after 2029 |56| `ast.Num`/`Str`/`Bytes` removed | Use `ast.Constant` |57| `asyncio` child watcher classes removed | Use `asyncio.run()` |58| SyntaxWarning in `finally` (PEP 765) | `return`/`break`/`continue` in `finally` now warns |5960## 3.14 New APIs6162| API | Quick reference |63|-----|----------------|64| `sys.remote_exec(pid, script)` (PEP 768) | Attach debugger to running process; `python -m pdb -p PID`. See [new-modules](references/new-modules.md) |65| `io.Reader` / `io.Writer` | Simpler protocol alternatives to `typing.IO` |66| `uuid.uuid7()` | Time-ordered UUID (RFC 9562); also `uuid6()`, `uuid8()` |67| `heapq.*_max()` | `heapify_max()`, `heappush_max()`, `heappop_max()`, etc. |68| Free-threading (PEP 779) | Now officially supported; 5-10% overhead |6970## Reference Files7172For detailed patterns, code examples, and migration guidance, consult:7374- **[`references/new-syntax.md`](references/new-syntax.md)** — T-strings (template processors, API), deferred annotations (`annotationlib`), `except` without brackets75- **[`references/new-modules.md`](references/new-modules.md)** — `compression.zstd`, `functools.Placeholder`, `copy.replace()`, `warnings.deprecated()`, `locals()` semantics, remote debugging, `io.Reader`/`Writer`, `uuid.uuid7()`, `heapq` max-heap76- **[`references/concurrency.md`](references/concurrency.md)** — Free-threaded CPython (GIL-free mode), subinterpreters, `InterpreterPoolExecutor`77- **[`references/removals.md`](references/removals.md)** — Dead batteries (19 modules), 3.13/3.14 removals, breaking behavior changes7879---80> Converted and distributed by [TomeVault](https://tomevault.io/claim/nevaberry) — claim your Tome and manage your conversions.81<!-- tomevault:4.0:skill_md:2026-04-11 -->