PyCoder's Weekly Issue #740 curates Python news and tutorials including a deep dive into the Pluggy plugin system used by pytest and tox, a guide on implementing interfaces with ABCs and Protocols, a tutorial on building Scrapy extensions, and coverage of Python 3.14 garbage collection changes. Also featured: a comparison of Python task queue libraries (Celery, Dramatiq, FastStream, Taskiq, Repid) for 2026, security concerns around AI code completions in PyCharm, PSF board election dates, multiple PEPs marked Final for Python 3.15 beta, and a roundup of security topics from PyCon US 2026. Projects highlighted include NVIDIA's Warp GPU simulation library, python-socketio, and Facebook Research's Hydra configuration framework.
Nguồn: https://pycoders.com/issues/740. 8sync News chỉ tóm tắt và dẫn link; bản quyền nội dung thuộc tác giả và nguồn gốc.
Bài viết giới thiệu một khóa học hướng dẫn Rust thông qua việc xây dựng lại 10 công cụ Unix quen thuộc (như wc, grep, sort) bằng cách sử dụng Python làm cầu nối. Mỗi bài tập so sánh các mẫu Python (vòng lặp, comprehensions) với cơ chế Rust (iterator chains, Option/Result) và cung cấp bài tập miễn phí trên rustplatform.com.
Lập trình viên nên đọc bài này để chuyển đổi từ cách sử dụng iterator trong Python—thường là các vòng lặp hoặc list comprehension—ra những kiến thức Rust mạnh mẽ như iterator chains và lifting để viết code hiệu quả, an toàn và dễ bảo trì hơn.
Khóa học hướng dẫn xây dựng ứng dụng RAG (Retrieval-Augmented Generation) bằng Python với LlamaIndex, từ thiết lập môi trường, tải tài liệu, tạo và lưu trữ indexes tìm kiếm, cấu hình nhà cung cấp AI (local/remote) đến chạy truy vấn nhằm giảm thiểu ảo giác (hallucination) từ LLM.
Là người phát triển Python muốn xây dựng hệ thống xử lý thông tin tự động với chất lượng cao, LlamaIndex giúp bạn tự động hóa việc kết hợp tìm kiếm và sinh lời từ mô hình ngôn ngữ lớn, giảm thiểu sai sót và tối ưu hóa hiệu suất cho ứng dụng của mình.
A podcast episode recap covering why Python developers are adopting Rust, featuring discussion of Rust tooling (Ruff, uv, Polars, Pydantic core), how Rust's strictness benefits AI agent guardrails, and a skeptical take on vibe coding. The author argues real AI productivity gains are closer to 1.2-2x rather than 10x, warns about rubber-stamping AI-generated code, and emphasizes that deep engineering fundamentals outlast hype cycles. The post also promotes a 6-week Python-to-Rust cohort building a JSON parser with PyO3 bindings.
Brett Cannon explains the motivation behind PEP 832, a proposal for standardizing Python virtual environment discovery. The core problem is that tools like VS Code have no reliable way to know which workflow tool (uv, Poetry, Hatch, etc.) a project uses, or where its environments are stored. Cannon proposes a .python-envs file listing environment paths and a [workflow] table in pyproject.toml to specify a workflow server protocol (WSP) over JSON-RPC, enabling editors to communicate with any workflow tool in a standardized way rather than requiring bespoke extensions per tool.
A solo engineer describes building a fully automated, self-healing price scraper for 163 European shipping providers using an agentic task graph. The system runs updater scripts per provider, detects failures, and dispatches AI agents (Claude Code CLI, OpenAI Codex CLI, Cursor) to diagnose broken scrapers, rewrite scripts, and verify prices against live carrier websites. Key design patterns include: a layered architecture separating the calculator, updater scripts, and agentic loop; pluggable LLM routing with fallbacks and cooldown handling for rate limits; deterministic pre-checks before invoking LLMs; and a two-agent verifier pattern where a second agent reviews the first's output cold. Feedback from failed verifications is written into the next agent's prompt as structured context. The post concludes with practical takeaways for engineers building agentic pipelines, including single-responsibility agents, independent verifiers, and model-to-task matching.
Python 3.15 introduces explicit lazy imports via PEP 810, allowing modules to be deferred until their attributes are first accessed. This reduces startup latency and memory consumption, especially useful in large applications and CLI tools that conditionally use heavy libraries. The post demonstrates the feature using Python 3.15.0b1 (installable via uv or pyenv), profiles import times with the tuna tool showing pandas being skipped when unused, and walks through the internal mechanism using pdb breakpoints to observe sys.lazy_modules and sys.modules state changes during reification. PyCharm 2026.1 does not yet fully support the new lazy keyword syntax.
A practical guide comparing three regression approaches for datasets with zero-inflation and heavy tails: standard OLS, OLS with interaction terms, and Tweedie regression. Using the French Motor Third-Party Liability Claims dataset, the author demonstrates that OLS fails on zero-inflated insurance data, interaction terms provide only marginal improvement, while Tweedie regression reduces MAE by ~35%. A bonus two-step zero-inflated model combining LightGBM (claim occurrence classifier) with Tweedie regression (severity estimator) achieves an additional 21% MAE reduction, reaching an MAE of 87.79 versus OLS's 174.17.
Bitbucket Packages bổ sung hỗ trợ PyPI (Python) và NuGet (.NET), tích hợp quản lý package vào Bitbucket cùng các registry sẵn có (container, Maven, npm). Tất cả năm registry chia sẻ chung mô hình quyền, thanh toán và dung lượng, nhưng PyPI/NuGet chỉ khả dụng trên gói Standard/Premium trả phí.
Lập trình viên phát triển ứng dụng Python hoặc .NET sẽ tìm hiểu Bitbucket Packages để tiết kiệm thời gian quản lý và chia sẻ gói phụ thuộc một cách hiệu quả hơn, tránh việc phụ thuộc vào các nền tảng bên ngoài như PyPI hoặc NuGet độc lập.