Urgent.News

What's breaking now, across thousands of outlets.

Tech

Stricter checks for uploaded distributions on PyPI

The Python Package Index (PyPI) has implemented stricter checks on uploaded source distributions (sdists) and built distributions (bdists or wheels) in recent months. These checks are part of a broader effort to enhance the resilience of the Python packaging ecosystem against parser differentials. Additional measures are expected to follow, aiming to tighten PyPI's distribution handling and ensure better conformity to specifications.

For downstream users, these changes do not pose any breaking issues. However, package maintainers may encounter upload rejections if they use non-conforming distributions. Maintainers are advised to use non-EOL Python versions and build backends that produce distributions adhering to packaging standards. PyPI's packaging formats, tar and ZIP, were not originally designed for Python packaging, and their permissive parsing can lead to parser differentials.

This permissiveness is generally acceptable in local settings, but problematic in networked, packaging environments where small parsing discrepancies can cause identical inputs to extract differently on various platforms and tools. Malicious actors could exploit these differentials to distribute potentially harmful packages, even when their integrity, such as through hashing, remains intact.

Written by urgent.news from Lobsters's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at blog.pypi.org →

More in Tech

More from Wednesday 18 November →