feat: add __init__.py in packages
What changed, and why it matters
This commit adds small marker files (__init__.py) to several Python packages so they can share the same 'pyln' namespace in a virtual environment. It is a packaging/development fix, not a security patch. There is no indication it fixes a vulnerability or changes how the software protects funds or data.
No security action required. Treat as a normal build/packaging improvement.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The change declares the ‘pyln’ and ‘pyln.spec’ directories as PEP 420-style namespace packages using pkgutil.extend_path. This prevents one installed package (specifically pyln-proto-grpc) from shadowing the others when multiple pyln-* packages are installed in the same environment. The diff only adds identical two-line init.py files and contains no logic changes, input handling, cryptography, networking, or permission changes.
Changed components
contrib/pyln-clientcontrib/pyln-grpc-protocontrib/pyln-protocontrib/pyln-spec/bolt1contrib/pyln-spec/bolt2contrib/pyln-spec/bolt4contrib/pyln-spec/bolt7contrib/pyln-testingInspect captured patch +24 / −0
diff --git a/contrib/pyln-client/pyln/__init__.py b/contrib/pyln-client/pyln/__init__.py
new file mode 100644
index 00000000..3c2b6535
--- /dev/null
+++ b/contrib/pyln-client/pyln/__init__.py
@@ -0,0 +1,2 @@
+# pyln is a namespace package
+__path__ = __import__('pkgutil').extend_path(__path__, __name__)
diff --git a/contrib/pyln-grpc-proto/pyln/__init__.py b/contrib/pyln-grpc-proto/pyln/__init__.py
new file mode 100644
index 00000000..3c2b6535
--- /dev/null
+++ b/contrib/pyln-grpc-proto/pyln/__init__.py
@@ -0,0 +1,2 @@
+# pyln is a namespace package
+__path__ = __import__('pkgutil').extend_path(__path__, __name__)
diff --git a/contrib/pyln-proto/pyln/__init__.py b/contrib/pyln-proto/pyln/__init__.py
new file mode 100644
index 00000000..3c2b6535
--- /dev/null
+++ b/contrib/pyln-proto/pyln/__init__.py
@@ -0,0 +1,2 @@
+# pyln is a namespace package
+__path__ = __import__('pkgutil').extend_path(__path__, __name__)
diff --git a/contrib/pyln-spec/bolt1/pyln/__init__.py b/contrib/pyln-spec/bolt1/pyln/__init__.py
new file mode 100644
index 00000000..3c2b6535
--- /dev/null
+++ b/contrib/pyln-spec/bolt1/pyln/__init__.py
@@ -0,0 +1,2 @@
+# pyln is a namespace package
+__path__ = __import__('pkgutil').extend_path(__path__, __name__)
diff --git a/contrib/pyln-spec/bolt1/pyln/spec/__init__.py b/contrib/pyln-spec/bolt1/pyln/spec/__init__.py
new file mode 100644
index 00000000..709a95e4
--- /dev/null
+++ b/contrib/pyln-spec/bolt1/pyln/spec/__init__.py
@@ -0,0 +1,2 @@
+# spec is a namespace package
+__path__ = __import__('pkgutil').extend_path(__path__, __name__)
diff --git a/contrib/pyln-spec/bolt2/pyln/__init__.py b/contrib/pyln-spec/bolt2/pyln/__init__.py
new file mode 100644
index 00000000..3c2b6535
--- /dev/null
+++ b/contrib/pyln-spec/bolt2/pyln/__init__.py
@@ -0,0 +1,2 @@
+# pyln is a namespace package
+__path__ = __import__('pkgutil').extend_path(__path__, __name__)
diff --git a/contrib/pyln-spec/bolt2/pyln/spec/__init__.py b/contrib/pyln-spec/bolt2/pyln/spec/__init__.py
new file mode 100644
index 00000000..709a95e4
--- /dev/null
+++ b/contrib/pyln-spec/bolt2/pyln/spec/__init__.py
@@ -0,0 +1,2 @@
+# spec is a namespace package
+__path__ = __import__('pkgutil').extend_path(__path__, __name__)
diff --git a/contrib/pyln-spec/bolt4/pyln/__init__.py b/contrib/pyln-spec/bolt4/pyln/__init__.py
new file mode 100644
index 00000000..3c2b6535
--- /dev/null
+++ b/contrib/pyln-spec/bolt4/pyln/__init__.py
@@ -0,0 +1,2 @@
+# pyln is a namespace package
+__path__ = __import__('pkgutil').extend_path(__path__, __name__)
diff --git a/contrib/pyln-spec/bolt4/pyln/spec/__init__.py b/contrib/pyln-spec/bolt4/pyln/spec/__init__.py
new file mode 100644
index 00000000..709a95e4
--- /dev/null
+++ b/contrib/pyln-spec/bolt4/pyln/spec/__init__.py
@@ -0,0 +1,2 @@
+# spec is a namespace package
+__path__ = __import__('pkgutil').extend_path(__path__, __name__)
diff --git a/contrib/pyln-spec/bolt7/pyln/__init__.py b/contrib/pyln-spec/bolt7/pyln/__init__.py
new file mode 100644
index 00000000..3c2b6535
--- /dev/null
+++ b/contrib/pyln-spec/bolt7/pyln/__init__.py
@@ -0,0 +1,2 @@
+# pyln is a namespace package
+__path__ = __import__('pkgutil').extend_path(__path__, __name__)
diff --git a/contrib/pyln-spec/bolt7/pyln/spec/__init__.py b/contrib/pyln-spec/bolt7/pyln/spec/__init__.py
new file mode 100644
index 00000000..709a95e4
--- /dev/null
+++ b/contrib/pyln-spec/bolt7/pyln/spec/__init__.py
@@ -0,0 +1,2 @@
+# spec is a namespace package
+__path__ = __import__('pkgutil').extend_path(__path__, __name__)
diff --git a/contrib/pyln-testing/pyln/__init__.py b/contrib/pyln-testing/pyln/__init__.py
new file mode 100644
index 00000000..3c2b6535
--- /dev/null
+++ b/contrib/pyln-testing/pyln/__init__.py
@@ -0,0 +1,2 @@
+# pyln is a namespace package
+__path__ = __import__('pkgutil').extend_path(__path__, __name__)
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.