API Changes (Backward Compatible)
- Setting Identifier are now correctly serialized as 16-bit values, instead of 8-bit.
- GoAwayFrame and WindowUpdateFrame now correctly mask off the reserved bit during parsing and serialization of stream IDs and window increments, as per RFC 9113, Sections 6.8 and 6.9.
API Changes (Backward Incompatible)
Bugfixes
API Changes (Backward Incompatible)
- Support for Python 3.6 has been removed.
- Support for Python 3.7 has been removed.
- Support for Python 3.8 has been removed.
API Changes (Backward Compatible)
- Support for Python 3.10 has been added.
- Support for Python 3.11 has been added.
- Support for Python 3.12 has been added.
- Support for Python 3.13 has been added.
- Updated packaging and testing infrastructure.
- Code cleanup and linting.
- Improved type hints.
API Changes (Backward Compatible)
- Added support for Python 3.9.
- Added type hints.
API Changes (Backward Incompatible)
- Introduce
HyperframeErrorbase exception class for all errors raised within hyperframe. - Change exception base class of
UnknownFrameErrortoHyperframeError - Change exception base class of
InvalidPaddingErrortoHyperframeError - Change exception base class of
InvalidFrameErrortoHyperframeError - Invalid frames with wrong stream id (zero vs. non-zero) now raise
InvalidDataError. - Invalid SETTINGS frames (non-empty but ACK) now raise
InvalidDataError. - Invalid ALTSVC frames with non-bytestring field or origin now raise
InvalidDataError.
API Changes (Backward Compatible)
- Deprecate
total_padding- use pad_length instead. - Improve repr() output for all frame classes.
- Introduce Frame.explain(data) for quick introspection of raw data.
Bugfixes
- Fixed padding parsing for
PushPromiseFrame. - Fixed unchecked frame length for
PriorityFrame. It now correctly raisesInvalidFrameError. - Fixed promised stream id validation for
PushPromiseFrame. It now raisesInvalidDataError. - Fixed unchecked frame length for
WindowUpdateFrame. It now correctly raisesInvalidFrameError. - Fixed window increment value range validation. It now raises
InvalidDataError. - Fixed parsing of
SettingsFramewith mutual exclusion of ACK flag and payload.
Other Changes
- Removed support for Python 2.7, 3.4, 3.5, pypy.
- Added support for Python 3.8.
API Changes (Backward Compatible)
- Add a new ENABLE_CONNECT_PROTOCOL settings parameter.
Other Changes
- Fix collections.abc deprecation.
- Drop support for Python 3.3 and support 3.7.
API Changes (Backward Compatible)
- Added support for
DataFrame.databeing amemoryviewobject.
Backwards Incompatible API Changes
- Added support for unknown extension frames. These will be returned in the new
ExtensionFrameobject. The flag information for these frames is persisted inflag_byteif needed.
Bugfixes
- Fixed AltSvc stream association, which was incorrectly set to
'both': should have been'either'. - Fixed a bug where stream IDs on received frames were allowed to be 32-bit, instead of 31-bit.
- Fixed a bug with frames that had the
PADDINGflag set but zero-length padding, whose flow-controlled length was calculated wrongly. - Miscellaneous performance improvements to serialization and parsing logic.
Bugfixes
- Fixed bug with the repr of
AltSvcFrame, where building it could throw exceptions if the frame had been received from the network.
Backwards Incompatible API Changes
- Updated old ALTSVC frame definition to match the newly specified RFC 7838.
- Remove BLOCKED frame, which was never actually specified.
- Removed previously deprecated
SettingsFrame.SETTINGS_MAX_FRAME_SIZEandSettingsFrame.SETTINGS_MAX_HEADER_LIST_SIZE.
API Changes (Backward Compatible)
- Invalid PING frame bodies now raise
InvalidFrameError, notValueError. Note thatInvalidFrameErroris aValueErrorsubclass. - Invalid RST_STREAM frame bodies now raise
InvalidFramError, notValueError. Note thatInvalidFrameErroris aValueErrorsubclass. - Canonicalized the names of
SettingsFrame.SETTINGS_MAX_FRAME_SIZEandSettingsFrame.SETTINGS_MAX_HEADER_LIST_SIZEto match their peers, by adding new propertiesSettingsFrame.MAX_FRAME_SIZEandSettingsFrame.SETTINGS_MAX_HEADER_LIST_SIZE. The old names are still present, but will be deprecated in 4.0.0.
Bugfixes
- The change in
3.1.0that ensured thatInvalidFrameErrorwould be thrown did not affect certain invalid values in ALT_SVC frames. This has been fixed:ValueErrorwill no longer be thrown from invalid ALT_SVC bodies.
Bugfixes
- Correctly error when receiving Ping frames that have insufficient data.
API Changes
- Added new
InvalidFrameErrorthat is thrown instead ofstruct.errorwhen parsing a frame.
Bugfixes
- Fixed error when trying to serialize frames that use Priority information with the defaults for that information.
- Fixed errors when displaying the repr of frames with non-printable bodies.
Bugfixes
- Fix issue where unpadded DATA, PUSH_PROMISE and HEADERS frames that had empty
bodies would raise
InvalidPaddingErrorexceptions when parsed.
Backwards Incompatible API Changes
- Parsing padded frames that have invalid padding sizes now throws an
InvalidPaddingError.
API Changes
- When an unknown frame is encountered,
parse_frame_headernow throws aValueErrorsubclass:UnknownFrameError. This subclass contains the frame type and the length of the frame body.
API Changes
- Frames parsed from binary data now carry a
body_lenattribute that matches the frame length (minus the frame header).
API Changes
- Attempting to parse unrecognised frames now throws
ValueErrorinstead ofKeyError. Thanks to @Kriechi! - Flags are now validated for correctness, preventing setting flags that
hyperframedoes not recognise and that would not serialize. Thanks to @mhils! - Frame properties can now be initialized in the constructors. Thanks to @mhils and @Kriechi!
- Frames that cannot be sent on a stream now have their stream ID defaulted
to
0. Thanks to @Kriechi!
Other Changes
- Frames have a more useful repr. Thanks to @mhils!
- Fix a bug where
FRAME_MAX_LENwas one byte too small.
- Add
body_lenproperty to frames to enable introspection of the actual frame length. Thanks to @jdecuyper!
- Fix bug where the frame header would have an incorrect length added to it.
- Initial extraction from hyper.