diff --git a/httpcore/__init__.py b/httpcore/__init__.py index 662b1563..d2d2c7ed 100644 --- a/httpcore/__init__.py +++ b/httpcore/__init__.py @@ -136,5 +136,6 @@ def __init__(self, *args, **kwargs): # type: ignore __locals = locals() for __name in __all__: - if not __name.startswith("__"): + # Exclude SOCKET_OPTION, it causes AttributeError on Python 3.14 + if not __name.startswith(("__", "SOCKET_OPTION")): setattr(__locals[__name], "__module__", "httpcore") # noqa