Python: Directory Permissions and Thread Safety Fixes
Python core developers merged 20 pull requests focusing on directory creation permissions, thread safety improvements, and documentation updates. Key changes include restored recursive mode application for os.makedirs() and pathlib.mkdir(), plus several critical section fixes for free-threading support.
Duration: PT2M19S
Transcript
Good morning, this is your Python developer briefing for May 19th, 2026.
The Python core team merged 20 pull requests yesterday, with significant improvements to file system operations and thread safety.
Nessita merged a major enhancement restoring the ability for os.makedirs() and pathlib.mkdir() to apply file permissions recursively through a new parent_mode keyword argument. This addresses issue 86533 with over 250 lines of changes across documentation, implementation, and comprehensive test coverage.
Several thread safety fixes landed for Python's free-threading support. Kumar Aditya's work fixed race conditions in dict.clear() operations on split-table dictionaries and improved thread safety for list slice deletions. Saul Cooperman enhanced pickle's batch_dict_exact function by replacing coarse-grained locking with fine-grained critical sections, improving performance while maintaining thread safety.
Dan Shernicoff added a qualname parameter to dataclasses.make_dataclass, allowing users to set the qualified name for generated classes. This resolves the remaining portion of issue 79413 after earlier pickle compatibility fixes.
Documentation received multiple updates. Stefanie Molin clarified usage of inspect.ismethod and inspect.isfunction with class-level access, while Serhiy Storchaka updated ZIP file handling documentation to better warn about dangerous filenames.
Performance improvements include Lukas Geiger's optimization to _pyio.BytesIO.read() using take_bytes to eliminate unnecessary copying, showing significant speed improvements in benchmarks.
Infrastructure changes include Hugo van Kemenade reverting to macos-26-intel runners after GitHub Actions resolved compatibility issues.
What's next: The 3.15 and 3.16 branches are receiving active development with these features, while the team continues addressing free-threading stability issues.
That's your Python update for today. We'll be back tomorrow with more developments from the CPython repository.