From 1862c94ed2dfe1ac0de0e080b664d5f438381cd1 Mon Sep 17 00:00:00 2001 From: Nicholas Bollweg Date: Thu, 18 Dec 2025 15:03:07 -0600 Subject: [PATCH] fix: use pep-420 implicit namespace package --- CHANGELOG.md | 2 ++ src/python/backports/__init__.py | 8 -------- 2 files changed, 2 insertions(+), 8 deletions(-) delete mode 100644 src/python/backports/__init__.py diff --git a/CHANGELOG.md b/CHANGELOG.md index fdb5dda..065f5ca 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,8 @@ adheres to [Semantic Versioning](https://semver.org/). ### :bug: Fixes +- Fix conflict on `__init__.py` file on `backports` root module by transforming + `backports.zstd` into an implicit namespace package (see PEP-420) - Raise an exception at both build and runtime when using an unsupported Python version, instead of crashing with a segmentation fault at runtime (in the rare cases where `backports.zstd` was installed despite the `requires-python` marker) diff --git a/src/python/backports/__init__.py b/src/python/backports/__init__.py deleted file mode 100644 index 6d3acae..0000000 --- a/src/python/backports/__init__.py +++ /dev/null @@ -1,8 +0,0 @@ -# see https://github.com/brandon-rhodes/backports - -# A Python "namespace package" http://www.python.org/dev/peps/pep-0382/ -# This always goes inside of a namespace package's __init__.py - -from pkgutil import extend_path - -__path__ = extend_path(__path__, __name__)