Python Trending Weekly
ISSUE 57

Should Python Adopt Calendar Versioning?

2024-06-22 Season 2

TL;DR

The Language Summit asks three questions: calendar versioning, a better pdb, and Python on mobile; NumPy 2.0 lands, and MiniCPM-Llama3-V 2.5 challenges GPT-4V from a phone.

Articles 12 Projects 12
🦄

Articles & Tutorials

× 12
01 NumPy 2.0: A Major Milestone blog.scientific-python.org

It's been 18 years since NumPy 1.0 was released, and version 2.0 marks a major milestone. It introduces some breaking changes with significant upgrades: cleaned up and simplified Python API, updated scalar promotion rules, powerful DType API and new string dtype, enhanced Windows compatibility, and support for the Python Array API standard. (Also see: NumPy 2.0.0 Release Notes)

02 Python Language Summit 2024: Should Python Adopt Calendar Versioning? pyfound.blogspot.com

Last year we covered all Python Language Summit topics in a special edition, this year we're picking just three highlights - check the official blog for more. This topic discusses switching Python from its current semantic versioning (SemVer) to calendar versioning (CalVer), incorporating the year into version numbers - like 3.26 for a version released in 2026. Alternative formats include year-focused "26.0.0" and year-plus-month "26.10.0".

03 Python Language Summit 2024: Should We Make pdb Better? pyfound.blogspot.com

One of this year's Python Language Summit topics, presented by @Gaotian who recently became a core developer from China. The discussion covered potential new features for pdb, including displaying code around breakpoints, syntax highlighting in terminals, customization support, and handling more scenarios (threading, async, bytecode, remote debugging). It also proposed switching pdb's underlying implementation to sys.monitoring for better performance, though this would introduce backward compatibility issues.

04 Python Language Summit 2024: Python on Mobile pyfound.blogspot.com

Another topic from this year's Python Language Summit, discussing the current state and future direction of Python on mobile platforms like iOS and Android. Python 3.13 provides Tier 3 support for Python on Android and iOS. The BeeWare team is pushing to bring the Python open-source package ecosystem to mobile platforms, with increased investment in CPython test suites and build tools.

05 Python Project Management Primer martynassubonis.substack.com

Explores how to manage Python project environments and dependencies, plus how to build projects effectively. It's a comprehensive deep dive.

06 Joining Strings in Python: An "Aha" Moment berglyd.net

The author has been using Python for 17 years - what could possibly make her go "aha"? While studying str.join(), she discovered something weird: using a generator as input to str.join() performs about 16% slower than using a list comprehension. The reason? join() first converts the generator to a list before concatenating, causing extra overhead. PyPy doesn't do this conversion - it's actually about 5x faster with generators than list comprehensions.

07 Mastering Context Managers: Simplifying Python Resource Management coderlegion.com

When working with resources, you often need to handle repetitive tasks like setting up and tearing down processes, opening and closing resources. Context managers are perfect for these scenarios. This article covers what context managers are, detailed usage guides, typical use cases, and common pitfalls.

08 How to Move from Pandas to Polars blog.jetbrains.com

The high-performance Rust-built Polars is eating into Pandas' market share. Is migrating from Pandas to Polars a hassle? Will it break your data processing workflows and tools? The author demonstrates a seamless transition process.

09 Adding a JIT Compiler to CPython lwn.net

This is a written report on a PyCon 2024 talk by Brandt Bucher, who introduced the JIT compiler to Python 3.13. It covers the series of improvements made before Python 3.13, why they decided to introduce a JIT compiler in 3.13, the team's current work, and core implementation details.

10 Debug Log: CPython GH-120437 manjusaka.blog

The article shares the author's experience debugging a bug in Python 3.13 Beta, involving the newly introduced JIT/Tier 2 optimizer module.

11 Parsing Python ASTs 20x Faster with Rust gauge.sh

The author used the tach library (featured in issue #53) to analyze 3000 files, which took nearly 10 seconds. The article analyzes what was causing the slowdown, then rewrites the C code in Rust, achieving nearly 20x speedup. Performance profiling tools used include py-spy, speedscope, and Valgrind.

12 Ruff: Internals of a Rust-Backed Python Linter-Formatter compileralchemy.substack.com

This is the first article in a series attempting to decode Ruff's internal implementation, covering how Rust and Python interoperate, how Ruff's first version worked, and what components make up the current version.

🐿️

Projects & Resources

× 12
01 pdf-to-podcast: Convert Any PDF to a Podcast github.com

Leverages OpenAI's text-to-speech models and Google Gemini to process PDF files, generating natural conversational podcasts and outputting them as MP3 files.

02 prettypretty: Beautiful Terminal Color Library github.com

Helps build beautiful terminal user interfaces with Python and Rust. Features a powerful and versatile color library.

03 django-render: Build User-Friendly Apps with Django and React github.com

A full-stack web project for building fully client-side rendered React apps with Django backend, supporting forms, session authentication, and messaging. Includes Storybook and Vite hot module reloading support.

04 holmesgpt: GPT-Powered DevOps Assistant github.com

From DevOps to AIOps - view alerts and get missing context data to find root causes faster.

05 labelme: Image Polygon Annotation with Python github.com

A graphical image annotation tool developed in Python with Qt GUI. Supports classification and cleaning of image annotations, video annotation, and GUI customization. (12.7K stars)

06 aurora: Fast, Scalable Static Site Generator in Python github.com

A simple static site/blog generator that can render 4000 Markdown files in about 1 second.

07 httpstat: Making CURL Statistics Simple github.com

Visualizes curl(1) statistics in a beautiful and clear way. Single Python file with no external dependencies. (6K stars)

httpstat: Making CURL Statistics Simple
08 writer-framework: Full-Stack Framework for Creating AI Apps github.com

Provides a visual editor with drag-and-drop support for building UIs without code; write backend code in Python with clean separation between interface and business logic. (1.2K stars)

09 surya: OCR, Layout Analysis, Reading Order, Line Detection in 90+ Languages github.com

A document OCR toolkit supporting 90+ languages, line-level text detection, and layout analysis (tables, images, headers, etc.). (8.8K stars)

10 MiniCPM-Llama3-V 2.5: Multimodal LLM Rivaling GPT-4V on Mobile github.com

The latest model in the MiniCPM-V series with 8B parameters, achieving OpenCompass scores that surpass mainstream commercial closed-source multimodal large models like GPT-4V-1106, Gemini Pro, Claude 3, and Qwen-VL-Max. (7.5K stars)

11 pyod: Python Library for Outlier Detection github.com

Detects outliers in multivariate data with support for 50+ detection algorithms and over 17 million downloads. Leverages numba and joblib for JIT compilation and parallel processing, delivering exceptional performance. (8.1K stars)

12 warp: Python Framework for High-Performance GPU Simulation and Graphics github.com

NVIDIA's framework that JIT-compiles regular Python functions into efficient kernel code running on CPU or GPU. Designed for spatial computing, making it easy to write programs for physics simulation, perception, robotics, and geometry processing. (3.4K stars)

ESC
↑↓ select · ↵ open175 issues