From 7aaeaef4b06324fd7f11ab803adecf850e19574b Mon Sep 17 00:00:00 2001 From: Torben Logemann Date: Wed, 4 Feb 2026 17:52:19 +0100 Subject: [PATCH 1/2] Fix TypeError due to IntEnum --- httpcore/_async/http2.py | 2 +- httpcore/_sync/http2.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/httpcore/_async/http2.py b/httpcore/_async/http2.py index dbd0beeb..287cbe1a 100644 --- a/httpcore/_async/http2.py +++ b/httpcore/_async/http2.py @@ -33,7 +33,7 @@ def has_body_headers(request: Request) -> bool: ) -class HTTPConnectionState(enum.IntEnum): +class HTTPConnectionState(enum.Enum): ACTIVE = 1 IDLE = 2 CLOSED = 3 diff --git a/httpcore/_sync/http2.py b/httpcore/_sync/http2.py index ddcc1890..11e32aba 100644 --- a/httpcore/_sync/http2.py +++ b/httpcore/_sync/http2.py @@ -33,7 +33,7 @@ def has_body_headers(request: Request) -> bool: ) -class HTTPConnectionState(enum.IntEnum): +class HTTPConnectionState(enum.Enum): ACTIVE = 1 IDLE = 2 CLOSED = 3 From 63ac44b9186afa22b3d1b4a2af94b2a6e3178dbd Mon Sep 17 00:00:00 2001 From: Torben Logemann Date: Thu, 5 Feb 2026 14:46:06 +0100 Subject: [PATCH 2/2] Fix TypeError due to IntEnum also in http11 --- httpcore/_async/http11.py | 2 +- httpcore/_sync/http11.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/httpcore/_async/http11.py b/httpcore/_async/http11.py index e6d6d709..4c258bc8 100644 --- a/httpcore/_async/http11.py +++ b/httpcore/_async/http11.py @@ -33,7 +33,7 @@ ] -class HTTPConnectionState(enum.IntEnum): +class HTTPConnectionState(enum.Enum): NEW = 0 ACTIVE = 1 IDLE = 2 diff --git a/httpcore/_sync/http11.py b/httpcore/_sync/http11.py index ebd3a974..45acb53c 100644 --- a/httpcore/_sync/http11.py +++ b/httpcore/_sync/http11.py @@ -33,7 +33,7 @@ ] -class HTTPConnectionState(enum.IntEnum): +class HTTPConnectionState(enum.Enum): NEW = 0 ACTIVE = 1 IDLE = 2