Python Standard Library Debates and Packaging Trends
The Python Standard Library Debate
Recent discussions in the core developer community center on whether to expand or shrink the standard library. Several core developers and community members advocate for a more modular approach to avoid bloating the core distribution.
• Proposal for Miniaturization: Some suggest creating a smaller standard library combined with a curated set of PyPI packages that could be updated independently of CPython releases.
• The Burden of Maintenance: Adding new modules increases the long-term support burden on core developers, creating a "kennel full of puppies" that must be cared for indefinitely.
• Standardizing Distribution: Looking at how .NET modularized its base class library, there is interest in a "standard distribution," easing the testing process and allowing faster updates for external modules.
Tools for Modern Python Ecosystems
Home Assistant Data Science
Home Assistant has launched a data science portal for users to analyze their home data locally. They have introduced JupyterLab Lite as an add-on, allowing users to run Jupyter environments directly on their Raspberry Pi hardware, utilizing a library called HASS Data Detective.
The Future of Pandas
As Pandas approaches a 1.0 release, it is undergoing significant changes to improve efficiency and usability.
• Fluent API: Increased support for method chaining.
• Performance Upgrades: Integration with Apache Arrow to handle large datasets efficiently.
• Cleanup: Deprecating legacy structures such as ix, Panel, and sparse data frames, and officially dropping support for Python 2.7.
Packaging with PyOxidizer
PyOxidizer is emerging as a novel way to package Python applications into single binary executables.
"PyOxidizer is a set of Rust crates that facilitate building libraries and binaries containing Python interpreters."
Unlike PyInstaller or cx_Freeze, PyOxidizer embeds everything—including dependencies and resources—into a single file, running directly from memory without extracting temporary files to the OS filesystem.
Community Resources and Best Practices
• Pathlib Adoption: A new RealPython article highlights the benefits of using Pathlib over legacy OS and Sys modules for file system operations, marking a shift toward more modern and readable code patterns.
• The 'Python' Command Debate: Discussions continue regarding whether the python terminal command should default to Python 2 or Python 3. Despite movements like Homebrew's reversal, the consensus leans toward explicit naming (using python3) rather than ambiguous defaults.