<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/4-upgrades-to-the-python-standard-library-in-3-15-2f7amjqxn" -->

---
title: 4 upgrades to the Python standard library in 3.15
description: Python 3.15 adds four notable standard library upgrades. The json.load function gains an object_hook parameter (plus array_hook) to transform decoded objects,...
canonical: https://daily.dev/posts/4-upgrades-to-the-python-standard-library-in-3-15-2f7amjqxn
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: 4 upgrades to the Python standard library in 3.15 | daily.dev
og:description: Python 3.15 adds four notable standard library upgrades. The json.load function gains an object_hook parameter (plus array_hook) to transform decoded objects,...
og:url: https://daily.dev/posts/4-upgrades-to-the-python-standard-library-in-3-15-2f7amjqxn
og:image: https://api.daily.dev/og/posts/2F7AmJqxn.png
og:image:alt: 4 upgrades to the Python standard library in 3.15
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# 4 upgrades to the Python standard library in 3.15

**[Planet Python](https://daily.dev/sources/planetpython)** · 5 min read · 1 upvotes · 0 comments

## Summary

Python 3.15 adds four notable standard library upgrades. The json.load function gains an object_hook parameter (plus array_hook) to transform decoded objects, which combined with the new frozendict type lets you load JSON into an immutable structure. A new math.integer module ships six functions: comb, perm, gcd, lcm, isqrt and factorial. The re.prefixmatch function replaces re.match with a clearer name, since re.match only matches at the start of a string; re.match is now soft deprecated but stays for compatibility. TaskGroup.cancel adds a way to cancel all tasks in an asyncio task group at once.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://mathspp.com/blog/4-upgrades-to-the-python-standard-library-in-315>

## Questions this post answers

### What does re.prefixmatch do differently from re.match in Python 3.15?

re.prefixmatch does the exact same thing as re.match, matching only at the beginning of a string, but with a clearer name since many developers mistakenly expect re.match to search anywhere in the string. re.match has been soft deprecated in Python 3.15: new code should use re.prefixmatch, while re.match remains for backwards compatibility.

_Keep up with naming and deprecation changes like this one on daily.dev before they bite in production regex code._

### How do I cancel all tasks in an asyncio TaskGroup at once in Python 3.15?

Python 3.15 adds a TaskGroup.cancel method that cancels every task in the group without manually tracking each task. Previously developers had to loop over stored task references and call cancel() on each one individually, which made using a TaskGroup more cumbersome than plain asyncio.create_task calls; TaskGroup.cancel removes that boilerplate.

_Developers simplifying async cleanup code can track asyncio changes like this one on daily.dev._

### What functions are included in the new math.integer module in Python 3.15?

The math.integer module, new in Python 3.15, defines six functions for integer-only math: comb(n, k) for combinations, perm(n, k=None) for permutations, gcd(*integers) for greatest common divisor, lcm(*integers) for least common multiple, isqrt(n) for integer square root, and factorial(n) for factorial.

_Anyone upgrading to Python 3.15 can follow standard library additions like this one on daily.dev._

## Similar posts on daily.dev

- [Python 3.15: features that didn't make the headlines](https://daily.dev/posts/python-3-15-features-that-didn-t-make-the-headlines-mni5ub3li) · Hacker News · 4 upvotes · 1 comments
- [Exciting Python features are on the way](https://daily.dev/posts/exciting-python-features-are-on-the-way-u7lhkabec) · InfoWorld · 0 upvotes · 0 comments
- [DX improvements in Python 3.15](https://daily.dev/posts/dx-improvements-in-python-3-15-sq7j4fjy9) · Planet Python · 0 upvotes · 0 comments

---

Tags: [#python](https://daily.dev/tags/python)

[View this post on daily.dev](https://daily.dev/posts/4-upgrades-to-the-python-standard-library-in-3-15-2f7amjqxn)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"4 upgrades to the Python standard library in 3.15","url":"https://daily.dev/posts/4-upgrades-to-the-python-standard-library-in-3-15-2f7amjqxn","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/4-upgrades-to-the-python-standard-library-in-3-15-2f7amjqxn"},"datePublished":"2026-10-28T16:52:26.017Z","dateModified":"2026-10-28T17:06:02.832Z","description":"Python 3.15 adds four notable standard library upgrades. The json.load function gains an object_hook parameter (plus array_hook) to transform decoded objects,...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/33583c5393562d626bcbcf3c78c1d238?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/33583c5393562d626bcbcf3c78c1d238?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Planet Python","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Planet Python","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/eac3cc584cb043b5a242d13752bd3d0c","url":"https://daily.dev/sources/planetpython"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/4-upgrades-to-the-python-standard-library-in-3-15-2f7amjqxn","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":1},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"python","timeRequired":"PT5M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Planet Python","item":"https://daily.dev/sources/planetpython"},{"@type":"ListItem","position":3,"name":"4 upgrades to the Python standard library in 3.15"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/4-upgrades-to-the-python-standard-library-in-3-15-2f7amjqxn#faq","mainEntity":[{"@type":"Question","name":"What does re.prefixmatch do differently from re.match in Python 3.15?","acceptedAnswer":{"@type":"Answer","text":"re.prefixmatch does the exact same thing as re.match, matching only at the beginning of a string, but with a clearer name since many developers mistakenly expect re.match to search anywhere in the string. re.match has been soft deprecated in Python 3.15: new code should use re.prefixmatch, while re.match remains for backwards compatibility. Keep up with naming and deprecation changes like this one on daily.dev before they bite in production regex code."}},{"@type":"Question","name":"How do I cancel all tasks in an asyncio TaskGroup at once in Python 3.15?","acceptedAnswer":{"@type":"Answer","text":"Python 3.15 adds a TaskGroup.cancel method that cancels every task in the group without manually tracking each task. Previously developers had to loop over stored task references and call cancel() on each one individually, which made using a TaskGroup more cumbersome than plain asyncio.create_task calls; TaskGroup.cancel removes that boilerplate. Developers simplifying async cleanup code can track asyncio changes like this one on daily.dev."}},{"@type":"Question","name":"What functions are included in the new math.integer module in Python 3.15?","acceptedAnswer":{"@type":"Answer","text":"The math.integer module, new in Python 3.15, defines six functions for integer-only math: comb(n, k) for combinations, perm(n, k=None) for permutations, gcd(*integers) for greatest common divisor, lcm(*integers) for least common multiple, isqrt(n) for integer square root, and factorial(n) for factorial. Anyone upgrading to Python 3.15 can follow standard library additions like this one on daily.dev."}}]}
```

