Skip to contentSkip to conversation

package/python-pyopenssl: add missing dependency for deprecation handling

PATCH Applied Alexis Lothoré via buildroot 1 participant 2 messages Sep 25, 2025 – Oct 9, 2025

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/python-pyopenssl: add missing dependency for deprecation handling

When commit bbdcb75d7f19 ("package/python-pyopenssl: bump to version 25.0.0") has been added, it has silently introduced a new dependency on typing_extensions that has not been ported in the corresponding Config.in, resulting in failures at runtime when trying to import the module:

ModuleNotFoundError: No module named 'typing_extensions'

The upstream project has indeed introduced the following deprecation handling snippet with commit 1b2b0ed21986 ("Use type-level deprecations (#1389)"):

if sys.version_info >= (3, 13):
from warnings import deprecated
elif sys.version_info < (3, 8):

      _T = typing.TypeVar("T")

      def deprecated(msg: str, **kwargs: object) -> Callable[[_T], _T]:
          return lambda f: f

else:
from typing_extensions import deprecated

This then breaks systems with pyopenssl >= 25.0.0, python < 3.13, python

Quoted 1 line

= 3.8, and without typing_extensions.

Fix the missing dependency by adding it explicitely in pyopenssl Config.in

---
The specific bug conditions described above are only present in the 2025.02.x branch: python has been updated to version 3.13 right after this release branch, making the fix unneeded on the other release branches or master.

---
 package/python-pyopenssl/Config.in | 1 +
 1 file changed, 1 insertion(+)
package/python-pyopenssl/Config.in +1 -0
index 56f38f58881fbf2b0cf594048238b3c10cc40550..184ad3c5f5bc190d955d386b1816f6601c4a724a 100644
@@ -2,6 +2,7 @@ config BR2_PACKAGE_PYTHON_PYOPENSSL
 	bool "python-pyopenssl"
 	depends on BR2_PACKAGE_HOST_RUSTC_TARGET_ARCH_SUPPORTS # python-cryptography
 	select BR2_PACKAGE_PYTHON_CRYPTOGRAPHY # runtime
+	select BR2_PACKAGE_PYTHON_TYPING_EXTENSIONS
 	help
 	  Python wrapper module around the OpenSSL library.
 

---
base-commit: c55bed263d38dda020484650cf7d07e9477a0d5b
change-id: 20250925-fix-pyopenssl-57e8d8f108df

Best regards,

Signature · 8 lines
Alexis Lothoré, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw

In reply of:

Quoted 22 lines

When commit bbdcb75d7f19 ("package/python-pyopenssl: bump to version 25.0.0") has been added, it has silently introduced a new dependency on typing_extensions that has not been ported in the corresponding Config.in, resulting in failures at runtime when trying to import the module:

ModuleNotFoundError: No module named 'typing_extensions'

The upstream project has indeed introduced the following deprecation handling snippet with commit 1b2b0ed21986 ("Use type-level deprecations (#1389)"):

if sys.version_info >= (3, 13):
from warnings import deprecated
elif sys.version_info < (3, 8):

      _T = typing.TypeVar("T")

      def deprecated(msg: str, **kwargs: object) -> Callable[[_T], _T]:
          return lambda f: f

else:
from typing_extensions import deprecated

Quoted 7 lines

This then breaks systems with pyopenssl >= 25.0.0, python < 3.13, python

Quoted 1 line

= 3.8, and without typing_extensions.

Fix the missing dependency by adding it explicitely in pyopenssl Config.in

Applied to 2025.02.x. Thanks

Quoted 26 lines

---
The specific bug conditions described above are only present in the 2025.02.x branch: python has been updated to version 3.13 right after this release branch, making the fix unneeded on the other release branches or master.

---
 package/python-pyopenssl/Config.in | 1 +
 1 file changed, 1 insertion(+)
package/python-pyopenssl/Config.in +1 -1
index 56f38f58881fbf2b0cf594048238b3c10cc40550..184ad3c5f5bc190d955d386b1816f6601c4a724a 100644
@@ -2,6 +2,7 @@ config BR2_PACKAGE_PYTHON_PYOPENSSL
 	bool "python-pyopenssl"
 	depends on BR2_PACKAGE_HOST_RUSTC_TARGET_ARCH_SUPPORTS # python-cryptography
 	select BR2_PACKAGE_PYTHON_CRYPTOGRAPHY # runtime
+	select BR2_PACKAGE_PYTHON_TYPING_EXTENSIONS
 	help
 	  Python wrapper module around the OpenSSL library.
 
 
---

base-commit: c55bed263d38dda020484650cf7d07e9477a0d5b
change-id: 20250925-fix-pyopenssl-57e8d8f108df

Quoted 10 lines

Best regards,

Signature · 8 lines
Alexis Lothoré, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot