python-knowledge-patch
Python changes since training cutoff (latest: 3.14) — t-strings, deferred annotations, free-threaded CPython, subinterpreters, zstd compression, dead battery removals. Load before working with Python.
What this skill does
# 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](references/removals.md) |
| `locals()` returns snapshots in functions (PEP 667) | `exec()`/`eval()` in functions need explicit namespace. See [new-modules](references/new-modules.md) |
| `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](references/concurrency.md) |
| `copy.replace()` protocol | `copy.replace(obj, field=val)`, implement `__replace__()`. See [new-modules](references/new-modules.md) |
| `warnings.deprecated()` (PEP 702) | `@deprecated("msg")` — runtime warning + type checker signal. See [new-modules](references/new-modules.md) |
## 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](references/new-syntax.md) |
| Deferred annotations (PEP 649/749) | Forward refs no longer need quotes. `from annotationlib import get_annotations, Format`. See [new-syntax](references/new-syntax.md) |
| `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](references/new-modules.md) |
| `concurrent.interpreters` (PEP 734) | Subinterpreters + `InterpreterPoolExecutor`. See [concurrency](references/concurrency.md) |
| `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](references/new-modules.md) |
| `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`](references/new-syntax.md)** — T-strings (template processors, API), deferred annotations (`annotationlib`), `except` without brackets
- **[`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-heap
- **[`references/concurrency.md`](references/concurrency.md)** — Free-threaded CPython (GIL-free mode), subinterpreters, `InterpreterPoolExecutor`
- **[`references/removals.md`](references/removals.md)** — Dead batteries (19 modules), 3.13/3.14 removals, breaking behavior changes
Related in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.