Skip to content

Latest commit

 

History

History
110 lines (57 loc) · 9.17 KB

File metadata and controls

110 lines (57 loc) · 9.17 KB
title Python Trending Weekly #57: Should Python Adopt Calendar Versioning?
pubDate 2024-06-22

Hey there, I'm Cat! Here I share quality Python, AI, and general tech content weekly, mostly in English. Also check out our Telegram channel for additional rich content updates!

This week we're featuring 12 articles, 12 open-source projects, 5 book giveaways, totaling 2000 words.

1、NumPy 2.0: A Major Milestone

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)

2、Python Language Summit 2024: Should Python Adopt Calendar Versioning?

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".

3、Python Language Summit 2024: Should We Make pdb Better?

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.

4、Python Language Summit 2024: Python on Mobile

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.

5、Python Project Management Primer

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

6、Joining Strings in Python: An "Aha" Moment

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.

7、Mastering Context Managers: Simplifying Python Resource Management

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.

8、How to Move from Pandas to Polars

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.

9、Adding a JIT Compiler to CPython

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

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

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

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.

1、pdf-to-podcast: Convert Any PDF to a Podcast

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

2、prettypretty: Beautiful Terminal Color Library

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

3、django-render: Build User-Friendly Apps with Django and React

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.

4、holmesgpt: GPT-Powered DevOps Assistant

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

5、labelme: Image Polygon Annotation with Python

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)

6、aurora: Fast, Scalable Static Site Generator in Python

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

7、httpstat: Making CURL Statistics Simple

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

8、writer-framework: Full-Stack Framework for Creating AI Apps

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)

9、surya: OCR, Layout Analysis, Reading Order, Line Detection in 90+ Languages

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

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

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

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)