Repository navigation
Drop Python 3.11 support; use PEP 695 type parameters - #91
Merged
Merged
Conversation
Follows numpy, which requires Python >=3.12 from 2.5 on (2.4 was the last line to allow 3.11). networkx 3.7 and jax 0.12 require >=3.12 as well, so the py311 environment could only ever resolve networkx 3.6.1 and numpy 2.4. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01K77bhqW4p5VmpnXm4hkZ77
Generic functions name their type parameters in the signature, so the module-level ParamSpec, TypeVar and TypeVarTuple objects in dags.typing and dags.tree.typing are no longer needed. dags.typing is removed. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01K77bhqW4p5VmpnXm4hkZ77
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01K77bhqW4p5VmpnXm4hkZ77
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## boilerplate-update-py315 #91 +/- ##
============================================================
- Coverage 96.54% 96.52% -0.03%
============================================================
Files 27 26 -1
Lines 1391 1382 -9
============================================================
- Hits 1343 1334 -9
Misses 48 48 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This was referenced Nov 17, 2026
MImmesberger
pushed a commit
to ttsim-dev/ttsim
that referenced
this pull request
Nov 17, 2026
## Why numpy requires Python >=3.12 from 2.5 on; 2.4 was the last line to allow 3.11. networkx 3.7 and jax 0.12 require >=3.12 as well, so the `py311` environment could only resolve an ageing dependency set. dags drops 3.11 in OpenSourceEconomics/dags#91. ## What - `requires-python = ">=3.12"`; the `py311` pixi feature, environment and classifier are gone. - CI: the `py311` job is gone, and the `exclude` list is replaced by a shorter `include` list. Job names are unchanged. - `RoundingSpec.apply_rounding` and `cast_ttsim_unit` declare their type parameters with PEP 695 syntax. - The generic classes (`InterfaceFunction`, `ColumnFunction`, `ParamFunction`) keep `Generic[...]` and their `@no_type_check` on `__call__`. I tried the PEP 695 form: beartype cannot resolve class type parameters in stringified annotations, so the package fails at import. `_set_single_field` keeps its `TypeVar` because its forward-referenced bound fails under beartype on 3.12 and 3.13. The ruff ignores for UP046 and UP047 stay, with these reasons. - `test_python_version` is removed; `requires-python` enforces the floor. - `pixi.lock` is regenerated. Besides losing the `py311` environments, the changed `requires-python` re-resolved the PyPI packages, so several move forward (for example networkx 3.7). ## Checks Hooks pass. Tests pass on py312, py313 and py314 (1742 passed, 58 skipped) and on py314-jax (1770 passed, 30 skipped). https://claude.ai/code/session_01K77bhqW4p5VmpnXm4hkZ77 --------- Co-authored-by: Claude Fable 5.2 <noreply@anthropic.com>
MImmesberger
pushed a commit
to ttsim-dev/gettsim
that referenced
this pull request
Nov 18, 2026
## Why numpy requires Python >=3.12 from 2.5 on; 2.4 was the last line to allow 3.11. networkx 3.7 and jax 0.12 require >=3.12 as well, so the `py311` environment could only resolve an ageing dependency set. dags drops 3.11 in OpenSourceEconomics/dags#91. ## What - `requires-python = ">=3.12"`; the `py311` pixi feature, environment and classifier are gone. - CI: the `py311` job is gone, and the `exclude` list is replaced by a shorter `include` list. Job names are unchanged. - `test_python_version` is removed; `requires-python` enforces the floor. - GEP 9 names 3.12–3.13 as the versions that still need `from __future__ import annotations`. - `pixi.lock` is regenerated. Besides losing the `py311` environments, the changed `requires-python` re-resolved the PyPI packages, so several move forward (for example networkx 3.7). ## Checks Hooks pass. Tests pass on py312 and py314 (1341 passed, 568 skipped each). https://claude.ai/code/session_01K77bhqW4p5VmpnXm4hkZ77 --------- Co-authored-by: Claude Fable 5.2 <noreply@anthropic.com>
MImmesberger
added a commit
to ttsim-dev/gettsim-personas
that referenced
this pull request
Nov 18, 2026
## Why numpy requires Python >=3.12 from 2.5 on; 2.4 was the last line to allow 3.11. networkx 3.7 and jax 0.12 require >=3.12 as well, so the `py311` environment could only resolve an ageing dependency set. dags drops 3.11 in OpenSourceEconomics/dags#91. ## What - `requires-python = ">=3.12"`; the `py311` pixi feature, environment and classifier are gone. - `AGENTS.md` lists the remaining environments. - `pixi.lock` is regenerated. Besides losing the `py311` environments, the changed `requires-python` re-resolved the PyPI packages, so several move forward (for example networkx 3.7). ## Checks Hooks pass. Tests pass on py312 and py314 (545 passed, 4 skipped each). https://claude.ai/code/session_01K77bhqW4p5VmpnXm4hkZ77 Co-authored-by: Claude Fable 5.2 <noreply@anthropic.com> Co-authored-by: MImmesberger <74215010+MImmesberger@users.noreply.github.com>
timmens
approved these changes
Nov 19, 2026
hmgaudecker
added a commit
that referenced
this pull request
Nov 23, 2026
…-code hook (#90) * Update boilerplate, add Python 3.15, run ty as a prek hook - Python 3.15: py315 environment, CI matrix entry, classifier, requires-python bound, max_supported_python; pixi.lock regenerated (lock format v7). - ty runs as the ty-pre-commit hook against the py314 pixi env; the type-checking environment and ty task are gone. - Hook and action versions refreshed; template hooks added (codespell, pixi-lock-check, pre-push-hooks-installed, notebook-cell-source-format, no-hardcoded-user-paths, no-section-separator-comments, no-internal-references). - CLAUDE.md and GEMINI.md removed; AGENTS.md is the only instruction file. - .ai-instructions bumped, and excluded from ty. - Fixes the new hook versions demanded: a doubly unpacked TypeVarTuple in output.py, renamed ty rules, RUF036 union order, a README typo. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Adopt the dead-code hook; drop test-only _is_python_identifier Adds the vulture-based dead-code hook from .ai-instructions, its [tool.dead-code] table (src/dags/ as public API), its ci.skip entry and a run-ty CI step with the submodule checked out. Its first run reported _is_python_identifier in tree_utils.py as used only by tests. Nothing in dags or the gettsim workspace calls it, so it goes, with its regex constant and its test. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Require prek>=0.5.9 so CI can install the ty hook The lock held prek 0.3.4, whose bundled uv 0.10.2 cannot parse ty-pre-commit's pyproject.toml (dependency tables with hashes), so the run-ty job failed while installing the hook. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Require jupyter-book>=2.1.7 and mystmd>=1.13.0 for the docs build The build fetches the newest MyST book theme, which no longer supports mystmd 1.8.2; the old engine reports the mismatch and then hangs, so Read the Docs kills the build. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Drop Python 3.11 support; use PEP 695 type parameters (#91) * Clarify code analysis checks and consolidate changelog entry * Bump pyproject-fmt, ruff, ty and nbstripout hooks Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01K77bhqW4p5VmpnXm4hkZ77 --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: timmens <mensingertim@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #90.
Why
numpy requires Python >=3.12 from 2.5 on; 2.4 was the last line to allow 3.11. networkx 3.7 and jax 0.12 require >=3.12 as well. The
py311environment could therefore only ever resolve networkx 3.6.1 and numpy 2.4, so that CI job tested a frozen dependency set.What
requires-python = ">=3.12"; thepy311pixi feature, environment, classifier and CI matrix entry are gone.def with_signature[**P, R](...)). The module-levelParamSpec,TypeVarandTypeVarTupleobjects are no longer needed, sodags.typingis removed anddags.tree.typinglosesT.dags.typingonly held those four type variables. ttsim, gettsim, gettsim-personas and pylcm do not import it.Checks
Hooks (including ty) pass; 172 tests pass on each of py312, py313, py314 and py315.
https://claude.ai/code/session_01K77bhqW4p5VmpnXm4hkZ77