Python Packaging, Requests 3, and PyFlame Insights

·24m 55s
Shared point

Overview

This episode of Python Bytes features a guest appearance by Kenneth Reitz, who provides exclusive insights into the development of Requests 3. The discussion covers critical updates to the Python ecosystem, including performance profiling and modern packaging tools.

Key Topics

Rust and Python Integration

• The hosts explore projects like Wasmer, which enables running WebAssembly directly within Python code as if it were native.
• A new extension allows embedding Python code into Rust via macros for seamless interoperability.

The Future of Requests

Requests 2 is moving to a security-fix-only model (CVE-only).
Requests 3 is actively under development, featuring:
• Full async and await support.
• Removal of urllib3 in favor of a new, internal low-level implementation.
• Exclusive support for modern Python (3.6+ with type annotations).

"Everything that you know that depends on requests, this is going to have backwards incompatible changes, but it'll be under a new namespace."

Developer Tooling & Performance

PyFlame: An essential tool for generating flame graphs with minimal overhead, suitable for production environments.
Flit: A streamlined packaging tool for building and publishing PyProject.toml packages. The discussion includes improvements for source directory support.
PipX: A best-practice method for installing Python-based command-line utilities in isolated virtual environments.

Community Discovery

cheat.sh: A unique, console-based API for quick programming answers, accessible directly via cURL or HTTPie.
GWPy: The official Python package used by the scientific community to analyze and detect gravitational waves in astrophysics.

Topics

Chapters

8 chapters
Python Bytes
AI chat — answers grounded in episodes