Skip to content

Commit b2a796c

Browse files
authored
Fix AttributeError when importing on Python 3.14 (#1005)
1 parent 38f277c commit b2a796c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

httpcore/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,5 +136,6 @@ def __init__(self, *args, **kwargs): # type: ignore
136136

137137
__locals = locals()
138138
for __name in __all__:
139-
if not __name.startswith("__"):
139+
# Exclude SOCKET_OPTION, it causes AttributeError on Python 3.14
140+
if not __name.startswith(("__", "SOCKET_OPTION")):
140141
setattr(__locals[__name], "__module__", "httpcore") # noqa

0 commit comments

Comments
 (0)