v1.2.0
pydantic/montyv1.2.0Oct 18, 2026by samuelcolvin
Upgrading?
AI Summary
This release significantly expands the standard library support within the Monty interpreter by adding modules like `hashlib`, `csv`, `tomllib`, and `bisect`. It also introduces new language features such as match statements and enhances dataclass support, alongside various performance optimizations and bug fixes.
Key Highlights
- New module implementations: `hashlib`, `csv`, `tomllib`, `bisect`, and `os.path`
- Language features: Match statements and enhanced dataclass support (`field`, `default_factory`, `__post_init__`)
- JSON module support: Added `json.load` and `json.dump`
- Performance optimizations: Float precision capping, f-string buffer preallocation, and direct sequence unpacking
New Features
- Implemented `hashlib` module
- Implemented `csv` module
- Implemented `tomllib` module
- Implemented `bisect` module
- Implemented `os.path` module
- Added `json.load` and `json.dump` functions
- Added support for match statements
- Added support for dataclass `field()`, `default_factory`, and `__post_init__`
- Added support for list slice assignment
- Added support for ordering comparisons for set and frozenset
- Added `Path.scan` os call
- File objects are now iterable
- Include capture groups in `re.split()` results
Full Release Notes
## What's Changed * Cap float format precision at `INT_MAX - 1024` like CPython 3.14.8 by @samuelcolvin in https://github.com/pydantic/monty/pull/1002 * Implement `hashlib` by @samuelcolvin in https://github.com/pydantic/monty/pull/988 * fix(monty-js): publish the component facade declaration in dist by @Yi-111-a in https://github.com/pydantic/monty/pull/1008 * fix-pr-comments: include maintainer threads, be sceptical of bots by @samuelcolvin in https://github.com/pydantic/monty/pull/1012 * Implement `os.path` by @samuelcolvin in https://github.com/pydantic/monty/pull/1000 * Add a docs column to the branch diff and fix misclassified files by @samuelcolvin in https://github.com/pydantic/monty/pull/1017 * Support dataclasses `field()`, `default_factory` and `__post_init__` by @rewitt94 in https://github.com/pydantic/monty/pull/835 * Load `pydantic_monty._binary` eagerly at package import by @cpruijsen in https://github.com/pydantic/monty/pull/992 * Honour `open()`'s `newline` argument and make file objects iterable by @samuelcolvin in https://github.com/pydantic/monty/pull/1001 * Import host call by @samuelcolvin in https://github.com/pydantic/monty/pull/942 * Host module fixes: duplicate attr names, assignment docs, module hashing by @samuelcolvin in https://github.com/pydantic/monty/pull/1021 * fix(monty): compile the JSON string cache on the declared 1.96 MSRV by @Yi-111-a in https://github.com/pydantic/monty/pull/1013 * Fix JavaScript print callbacks swallowing thrown null by @GoldArowana in https://github.com/pydantic/monty/pull/1028 * Optimisation: Direct sequence unpacking by @jaheba in https://github.com/pydantic/monty/pull/1015 * Extract a `PyHashTable` shared by dict and set by @rewitt94 in https://github.com/pydantic/monty/pull/884 * Binascii and base64 resource limits checks by @rewitt94 in https://github.com/pydantic/monty/pull/842 * Bump `samuelcolvin/check-python-version` action to v5.1 by @Viicos in https://github.com/pydantic/monty/pull/997 * Harden CI by @Viicos in https://github.com/pydantic/monty/pull/1010 * Cap restored session budgets at destination limits by @rewitt94 in https://github.com/pydantic/monty/pull/1027 * Support list slice assignment by @jaheba in https://github.com/pydantic/monty/pull/1031 * `Path.scan` os call by @samuelcolvin in https://github.com/pydantic/monty/pull/987 * Bump dtolnay/rust-toolchain from efa25f7f19611383d5b0ccf2d1c8914531636bf9 to e2a55d2ffb04f378e9626c28d38b36d230d1e12f by @dependabot[bot] in https://github.com/pydantic/monty/pull/1034 * Fix contracts of `pathlib.Path` and `os` fs actions by @jaheba in https://github.com/pydantic/monty/pull/999 * Support ordering comparisons for set and frozenset by @jaheba in https://github.com/pydantic/monty/pull/1040 * Add `bisect` module by @jaheba in https://github.com/pydantic/monty/pull/1047 * Run CodSpeed benchmarks on macro runners in walltime mode by @samuelcolvin in https://github.com/pydantic/monty/pull/1044 * Extract Python benchmark scripts into separate files by @jaheba in https://github.com/pydantic/monty/pull/1055 * Enable CodSpeed memory mode for benchmarks by @jaheba in https://github.com/pydantic/monty/pull/1054 * Optimize f-string concatenation buffer preallocation and refcount churn by @gabrielhsc95 in https://github.com/pydantic/monty/pull/1052 * Implement the `csv` module by @samuelcolvin in https://github.com/pydantic/monty/pull/1018 * Remove redundant interpreter benchmarks by @samuelcolvin in https://github.com/pydantic/monty/pull/1056 * Disable ASLR for the CodSpeed bench run by @samuelcolvin in https://github.com/pydantic/monty/pull/1062 * optimize ci by @davidhewitt in https://github.com/pydantic/monty/pull/1064 * Match statements by @samuelcolvin in https://github.com/pydantic/monty/pull/1016 * Pin glibc malloc thresholds for walltime benchmarks by @codspeed[bot] in https://github.com/pydantic/monty/pull/1059 * make many more dunders supported on user instances by @davidhewitt in https://github.com/pydantic/monty/pull/1058 * Include capture groups in `re.split()` results by @Likheet in https://github.com/pydantic/monty/pull/1036 * Register interpreter benchmarks from the python/ directory by @samuelcolvin in https://github.com/pydantic/monty/pull/1057 * Fix match statement review findings by @samuelcolvin in https://github.com/pydantic/monty/pull/1069 * Add `pyperformance` benchmarks by @jaheba in https://github.com/pydantic/monty/pull/996 * `json.load` and `json.dump` by @samuelcolvin in https://github.com/pydantic/monty/pull/1023 * implement `tomllib` by @samuelcolvin in https://github.com/pydantic/monty/pull/1022 * v1.2.0 release prep by @samuelcolvin in https://github.com/pydantic/monty/pull/1073 ## New Contributors * @cpruijsen made their first contribution in https://github.com/pydantic/monty/pull/992 * @GoldArowana made their first contribution in https://github.com/pydantic/monty/pull/1028 * @dependabot[bot] made their first contribution in https://github.com/pydantic/monty/pull/1034 * @gabrielhsc95 made their first contribution in https://github.com/pydantic/monty/pull/1052 * @Likheet made their first contribution in https://github.com/pydantic/monty/pull/1036 **Full Changelog**: https://github.com/pydantic/monty/compare/v1.1.0...v1.2.0
Related Repositories
A cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Grok Build & Hermes Agent. Only official website: ccswitch.io
An open-source remote desktop application designed for self-hosting, as an alternative to TeamViewer.
Build smaller, faster, and more secure desktop and mobile applications with a web frontend.
π RuView turns commodity WiFi signals into real-time spatial intelligence, vital sign monitoring, and presence detection — all without a single pixel of video.
Incredibly fast JavaScript runtime, bundler, test runner, and package manager – all in one