METADATA 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735
  1. Metadata-Version: 2.0
  2. Name: h2
  3. Version: 2.6.2
  4. Summary: HTTP/2 State-Machine based protocol implementation
  5. Home-page: http://hyper.rtfd.org
  6. Author: Cory Benfield
  7. Author-email: cory@lukasa.co.uk
  8. License: MIT License
  9. Platform: UNKNOWN
  10. Classifier: Development Status :: 5 - Production/Stable
  11. Classifier: Intended Audience :: Developers
  12. Classifier: License :: OSI Approved :: MIT License
  13. Classifier: Programming Language :: Python
  14. Classifier: Programming Language :: Python :: 2
  15. Classifier: Programming Language :: Python :: 2.7
  16. Classifier: Programming Language :: Python :: 3
  17. Classifier: Programming Language :: Python :: 3.3
  18. Classifier: Programming Language :: Python :: 3.4
  19. Classifier: Programming Language :: Python :: 3.5
  20. Classifier: Programming Language :: Python :: 3.6
  21. Classifier: Programming Language :: Python :: Implementation :: CPython
  22. Classifier: Programming Language :: Python :: Implementation :: PyPy
  23. Requires-Dist: hyperframe (!=4.0.0,<6,>=3.1)
  24. Requires-Dist: hpack (>=2.2,<4)
  25. Requires-Dist: enum34 (>=1.0.4,<2); python_version == "2.7" or python_version == "3.3"
  26. ===============================
  27. hyper-h2: HTTP/2 Protocol Stack
  28. ===============================
  29. .. image:: https://raw.github.com/Lukasa/hyper/development/docs/source/images/hyper.png
  30. .. image:: https://travis-ci.org/python-hyper/hyper-h2.svg?branch=master
  31. :target: https://travis-ci.org/python-hyper/hyper-h2
  32. This repository contains a pure-Python implementation of a HTTP/2 protocol
  33. stack. It's written from the ground up to be embeddable in whatever program you
  34. choose to use, ensuring that you can speak HTTP/2 regardless of your
  35. programming paradigm.
  36. You use it like this:
  37. .. code-block:: python
  38. import h2.connection
  39. conn = h2.connection.H2Connection()
  40. conn.send_headers(stream_id=stream_id, headers=headers)
  41. conn.send_data(stream_id, data)
  42. socket.sendall(conn.data_to_send())
  43. events = conn.receive_data(socket_data)
  44. This repository does not provide a parsing layer, a network layer, or any rules
  45. about concurrency. Instead, it's a purely in-memory solution, defined in terms
  46. of data actions and HTTP/2 frames. This is one building block of a full Python
  47. HTTP implementation.
  48. To install it, just run:
  49. .. code-block:: console
  50. $ pip install h2
  51. Documentation
  52. =============
  53. Documentation is available at http://python-hyper.org/h2/.
  54. Contributing
  55. ============
  56. ``hyper-h2`` welcomes contributions from anyone! Unlike many other projects we
  57. are happy to accept cosmetic contributions and small contributions, in addition
  58. to large feature requests and changes.
  59. Before you contribute (either by opening an issue or filing a pull request),
  60. please `read the contribution guidelines`_.
  61. .. _read the contribution guidelines: http://python-hyper.org/en/latest/contributing.html
  62. License
  63. =======
  64. ``hyper-h2`` is made available under the MIT License. For more details, see the
  65. ``LICENSE`` file in the repository.
  66. Authors
  67. =======
  68. ``hyper-h2`` is maintained by Cory Benfield, with contributions from others. For
  69. more details about the contributors, please see ``CONTRIBUTORS.rst``.
  70. Release History
  71. ===============
  72. 2.6.2 (2017-04-03)
  73. ------------------
  74. Bugfixes
  75. ~~~~~~~~
  76. - CONTINUATION frames sent on closed streams previously caused stream errors
  77. of type STREAM_CLOSED. RFC 7540 § 6.10 requires that these be connection
  78. errors of type PROTOCOL_ERROR, and so this release changes to match that
  79. behaviour.
  80. - Remote peers incrementing their inbound connection window beyond the maximum
  81. allowed value now cause stream-level errors, rather than connection-level
  82. errors, allowing connections to stay up longer.
  83. - h2 now rejects receiving and sending request header blocks that are missing
  84. any of the mandatory pseudo-header fields (:path, :scheme, and :method).
  85. - h2 now rejects receiving and sending request header blocks that have an empty
  86. :path pseudo-header value.
  87. - h2 now rejects receiving and sending request header blocks that contain
  88. response-only pseudo-headers, and vice versa.
  89. - h2 now correct respects user-initiated changes to the HEADER_TABLE_SIZE
  90. local setting, and ensures that if users shrink or increase the header
  91. table size it is policed appropriately.
  92. 2.5.4 (2017-04-03)
  93. ------------------
  94. Bugfixes
  95. ~~~~~~~~
  96. - CONTINUATION frames sent on closed streams previously caused stream errors
  97. of type STREAM_CLOSED. RFC 7540 § 6.10 requires that these be connection
  98. errors of type PROTOCOL_ERROR, and so this release changes to match that
  99. behaviour.
  100. - Remote peers incrementing their inbound connection window beyond the maximum
  101. allowed value now cause stream-level errors, rather than connection-level
  102. errors, allowing connections to stay up longer.
  103. - h2 now correct respects user-initiated changes to the HEADER_TABLE_SIZE
  104. local setting, and ensures that if users shrink or increase the header
  105. table size it is policed appropriately.
  106. 2.6.1 (2017-03-16)
  107. ------------------
  108. Bugfixes
  109. ~~~~~~~~
  110. - Allowed hyperframe v5 support while continuing to ignore unexpected frames.
  111. 2.5.3 (2017-03-16)
  112. ------------------
  113. Bugfixes
  114. ~~~~~~~~
  115. - Allowed hyperframe v5 support while continuing to ignore unexpected frames.
  116. 2.4.4 (2017-03-16)
  117. ------------------
  118. Bugfixes
  119. ~~~~~~~~
  120. - Allowed hyperframe v5 support while continuing to ignore unexpected frames.
  121. 2.6.0 (2017-02-28)
  122. ------------------
  123. API Changes (Backward-Compatible)
  124. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  125. - Added a new ``h2.events.Event`` class that acts as a base class for all
  126. events.
  127. - Rather than reject outbound Connection-specific headers, h2 will now
  128. normalize the header block by removing them.
  129. - Implement equality for the ``h2.settings.Settings`` class.
  130. - Added ``h2.settings.SettingCodes``, an enum that is used to store all the
  131. HTTP/2 setting codes. This allows us to use a better printed representation of
  132. the setting code in most places that it is used.
  133. - The ``setting`` field in ``ChangedSetting`` for the ``RemoteSettingsChanged``
  134. and ``SettingsAcknowledged`` events has been updated to be instances of
  135. ``SettingCodes`` whenever they correspond to a known setting code. When they
  136. are an unknown setting code, they are instead ``int``. As ``SettingCodes`` is
  137. a subclass of ``int``, this is non-breaking.
  138. - Deprecated the other fields in ``h2.settings``. These will be removed in
  139. 3.0.0.
  140. - Added an optional ``pad_length`` parameter to ``H2Connection.send_data``
  141. to allow the user to include padding on a data frame.
  142. - Added a new parameter to the ``h2.config.H2Configuration`` initializer which
  143. takes a logger. This allows us to log by providing a logger that conforms
  144. to the requirements of this module so that it can be used in different
  145. environments.
  146. Bugfixes
  147. ~~~~~~~~
  148. - Correctly reject pushed request header blocks whenever they have malformed
  149. request header blocks.
  150. - Correctly normalize pushed request header blocks whenever they have
  151. normalizable header fields.
  152. - Remote peers are now allowed to send zero or any positive number as a value
  153. for ``SETTINGS_MAX_HEADER_LIST_SIZE``, where previously sending zero would
  154. raise a ``InvalidSettingsValueError``.
  155. - Resolved issue where the ``HTTP2-Settings`` header value for plaintext
  156. upgrade that was emitted by ``initiate_upgrade_connection`` included the
  157. *entire* ``SETTINGS`` frame, instead of just the payload.
  158. - Resolved issue where the ``HTTP2-Settings`` header value sent by a client for
  159. plaintext upgrade would be ignored by ``initiate_upgrade_connection``, rather
  160. than have those settings applied appropriately.
  161. - Resolved an issue whereby certain frames received from a peer in the CLOSED
  162. state would trigger connection errors when RFC 7540 says they should have
  163. triggered stream errors instead. Added more detailed stream closure tracking
  164. to ensure we don't throw away connections unnecessarily.
  165. 2.5.2 (2017-01-27)
  166. ------------------
  167. - Resolved issue where the ``HTTP2-Settings`` header value for plaintext
  168. upgrade that was emitted by ``initiate_upgrade_connection`` included the
  169. *entire* ``SETTINGS`` frame, instead of just the payload.
  170. - Resolved issue where the ``HTTP2-Settings`` header value sent by a client for
  171. plaintext upgrade would be ignored by ``initiate_upgrade_connection``, rather
  172. than have those settings applied appropriately.
  173. 2.4.3 (2017-01-27)
  174. ------------------
  175. - Resolved issue where the ``HTTP2-Settings`` header value for plaintext
  176. upgrade that was emitted by ``initiate_upgrade_connection`` included the
  177. *entire* ``SETTINGS`` frame, instead of just the payload.
  178. - Resolved issue where the ``HTTP2-Settings`` header value sent by a client for
  179. plaintext upgrade would be ignored by ``initiate_upgrade_connection``, rather
  180. than have those settings applied appropriately.
  181. 2.3.4 (2017-01-27)
  182. ------------------
  183. - Resolved issue where the ``HTTP2-Settings`` header value for plaintext
  184. upgrade that was emitted by ``initiate_upgrade_connection`` included the
  185. *entire* ``SETTINGS`` frame, instead of just the payload.
  186. - Resolved issue where the ``HTTP2-Settings`` header value sent by a client for
  187. plaintext upgrade would be ignored by ``initiate_upgrade_connection``, rather
  188. than have those settings applied appropriately.
  189. 2.5.1 (2016-12-17)
  190. ------------------
  191. Bugfixes
  192. ~~~~~~~~
  193. - Remote peers are now allowed to send zero or any positive number as a value
  194. for ``SETTINGS_MAX_HEADER_LIST_SIZE``, where previously sending zero would
  195. raise a ``InvalidSettingsValueError``.
  196. 2.5.0 (2016-10-25)
  197. ------------------
  198. API Changes (Backward-Compatible)
  199. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  200. - Added a new ``H2Configuration`` object that allows rich configuration of
  201. a ``H2Connection``. This object supersedes the prior keyword arguments to the
  202. ``H2Connection`` object, which are now deprecated and will be removed in 3.0.
  203. - Added support for automated window management via the
  204. ``acknowledge_received_data`` method. See the documentation for more details.
  205. - Added a ``DenialOfServiceError`` that is raised whenever a behaviour that
  206. looks like a DoS attempt is encountered: for example, an overly large
  207. decompressed header list. This is a subclass of ``ProtocolError``.
  208. - Added support for setting and managing ``SETTINGS_MAX_HEADER_LIST_SIZE``.
  209. This setting is now defaulted to 64kB.
  210. - Added ``h2.errors.ErrorCodes``, an enum that is used to store all the HTTP/2
  211. error codes. This allows us to use a better printed representation of the
  212. error code in most places that it is used.
  213. - The ``error_code`` fields on ``ConnectionTerminated`` and ``StreamReset``
  214. events have been updated to be instances of ``ErrorCodes`` whenever they
  215. correspond to a known error code. When they are an unknown error code, they
  216. are instead ``int``. As ``ErrorCodes`` is a subclass of ``int``, this is
  217. non-breaking.
  218. - Deprecated the other fields in ``h2.errors``. These will be removed in 3.0.0.
  219. Bugfixes
  220. ~~~~~~~~
  221. - Correctly reject request header blocks with neither :authority nor Host
  222. headers, or header blocks which contain mismatched :authority and Host
  223. headers, per RFC 7540 Section 8.1.2.3.
  224. - Correctly expect that responses to HEAD requests will have no body regardless
  225. of the value of the Content-Length header, and reject those that do.
  226. - Correctly refuse to send header blocks that contain neither :authority nor
  227. Host headers, or header blocks which contain mismatched :authority and Host
  228. headers, per RFC 7540 Section 8.1.2.3.
  229. - Hyper-h2 will now reject header field names and values that contain leading
  230. or trailing whitespace.
  231. - Correctly strip leading/trailing whitespace from header field names and
  232. values.
  233. - Correctly refuse to send header blocks with a TE header whose value is not
  234. ``trailers``, per RFC 7540 Section 8.1.2.2.
  235. - Correctly refuse to send header blocks with connection-specific headers,
  236. per RFC 7540 Section 8.1.2.2.
  237. - Correctly refuse to send header blocks that contain duplicate pseudo-header
  238. fields, or with pseudo-header fields that appear after ordinary header fields,
  239. per RFC 7540 Section 8.1.2.1.
  240. This may cause passing a dictionary as the header block to ``send_headers``
  241. to throw a ``ProtocolError``, because dictionaries are unordered and so they
  242. may trip this check. Passing dictionaries here is deprecated, and callers
  243. should change to using a sequence of 2-tuples as their header blocks.
  244. - Correctly reject trailers that contain HTTP/2 pseudo-header fields, per RFC
  245. 7540 Section 8.1.2.1.
  246. - Correctly refuse to send trailers that contain HTTP/2 pseudo-header fields,
  247. per RFC 7540 Section 8.1.2.1.
  248. - Correctly reject responses that do not contain the ``:status`` header field,
  249. per RFC 7540 Section 8.1.2.4.
  250. - Correctly refuse to send responses that do not contain the ``:status`` header
  251. field, per RFC 7540 Section 8.1.2.4.
  252. - Correctly update the maximum frame size when the user updates the value of
  253. that setting. Prior to this release, if the user updated the maximum frame
  254. size hyper-h2 would ignore the update, preventing the remote peer from using
  255. the higher frame sizes.
  256. 2.4.2 (2016-10-25)
  257. ------------------
  258. Bugfixes
  259. ~~~~~~~~
  260. - Correctly update the maximum frame size when the user updates the value of
  261. that setting. Prior to this release, if the user updated the maximum frame
  262. size hyper-h2 would ignore the update, preventing the remote peer from using
  263. the higher frame sizes.
  264. 2.3.3 (2016-10-25)
  265. ------------------
  266. Bugfixes
  267. ~~~~~~~~
  268. - Correctly update the maximum frame size when the user updates the value of
  269. that setting. Prior to this release, if the user updated the maximum frame
  270. size hyper-h2 would ignore the update, preventing the remote peer from using
  271. the higher frame sizes.
  272. 2.2.7 (2016-10-25)
  273. ------------------
  274. *Final 2.2.X release*
  275. Bugfixes
  276. ~~~~~~~~
  277. - Correctly update the maximum frame size when the user updates the value of
  278. that setting. Prior to this release, if the user updated the maximum frame
  279. size hyper-h2 would ignore the update, preventing the remote peer from using
  280. the higher frame sizes.
  281. 2.4.1 (2016-08-23)
  282. ------------------
  283. Bugfixes
  284. ~~~~~~~~
  285. - Correctly expect that responses to HEAD requests will have no body regardless
  286. of the value of the Content-Length header, and reject those that do.
  287. 2.3.2 (2016-08-23)
  288. ------------------
  289. Bugfixes
  290. ~~~~~~~~
  291. - Correctly expect that responses to HEAD requests will have no body regardless
  292. of the value of the Content-Length header, and reject those that do.
  293. 2.4.0 (2016-07-01)
  294. ------------------
  295. API Changes (Backward-Compatible)
  296. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  297. - Adds ``additional_data`` to ``H2Connection.close_connection``, allowing the
  298. user to send additional debug data on the GOAWAY frame.
  299. - Adds ``last_stream_id`` to ``H2Connection.close_connection``, allowing the
  300. user to manually control what the reported last stream ID is.
  301. - Add new method: ``prioritize``.
  302. - Add support for emitting stream priority information when sending headers
  303. frames using three new keyword arguments: ``priority_weight``,
  304. ``priority_depends_on``, and ``priority_exclusive``.
  305. - Add support for "related events": events that fire simultaneously on a single
  306. frame.
  307. 2.3.1 (2016-05-12)
  308. ------------------
  309. Bugfixes
  310. ~~~~~~~~
  311. - Resolved ``AttributeError`` encountered when receiving more than one sequence
  312. of CONTINUATION frames on a given connection.
  313. 2.2.5 (2016-05-12)
  314. ------------------
  315. Bugfixes
  316. ~~~~~~~~
  317. - Resolved ``AttributeError`` encountered when receiving more than one sequence
  318. of CONTINUATION frames on a given connection.
  319. 2.3.0 (2016-04-26)
  320. ------------------
  321. API Changes (Backward-Compatible)
  322. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  323. - Added a new flag to the ``H2Connection`` constructor: ``header_encoding``,
  324. that controls what encoding is used (if any) to decode the headers from bytes
  325. to unicode. This defaults to UTF-8 for backward compatibility. To disable the
  326. decode and use bytes exclusively, set the field to False, None, or the empty
  327. string. This affects all headers, including those pushed by servers.
  328. - Bumped the minimum version of HPACK allowed from 2.0 to 2.2.
  329. - Added support for advertising RFC 7838 Alternative services.
  330. - Allowed users to provide ``hpack.HeaderTuple`` and
  331. ``hpack.NeverIndexedHeaderTuple`` objects to all methods that send headers.
  332. - Changed all events that carry headers to emit ``hpack.HeaderTuple`` and
  333. ``hpack.NeverIndexedHeaderTuple`` instead of plain tuples. This allows users
  334. to maintain header indexing state.
  335. - Added support for plaintext upgrade with the ``initiate_upgrade_connection``
  336. method.
  337. Bugfixes
  338. ~~~~~~~~
  339. - Automatically ensure that all ``Authorization`` and ``Proxy-Authorization``
  340. headers, as well as short ``Cookie`` headers, are prevented from being added
  341. to encoding contexts.
  342. 2.2.4 (2016-04-25)
  343. ------------------
  344. Bugfixes
  345. ~~~~~~~~
  346. - Correctly forbid pseudo-headers that were not defined in RFC 7540.
  347. - Ignore AltSvc frames, rather than exploding when receiving them.
  348. 2.1.5 (2016-04-25)
  349. ------------------
  350. *Final 2.1.X release*
  351. Bugfixes
  352. ~~~~~~~~
  353. - Correctly forbid pseudo-headers that were not defined in RFC 7540.
  354. - Ignore AltSvc frames, rather than exploding when receiving them.
  355. 2.2.3 (2016-04-13)
  356. ------------------
  357. Bugfixes
  358. ~~~~~~~~
  359. - Allowed the 4.X series of hyperframe releases as dependencies.
  360. 2.1.4 (2016-04-13)
  361. ------------------
  362. Bugfixes
  363. ~~~~~~~~
  364. - Allowed the 4.X series of hyperframe releases as dependencies.
  365. 2.2.2 (2016-04-05)
  366. ------------------
  367. Bugfixes
  368. ~~~~~~~~
  369. - Fixed issue where informational responses were erroneously not allowed to be
  370. sent in the ``HALF_CLOSED_REMOTE`` state.
  371. - Fixed issue where informational responses were erroneously not allowed to be
  372. received in the ``HALF_CLOSED_LOCAL`` state.
  373. - Fixed issue where we allowed information responses to be sent or received
  374. after final responses.
  375. 2.2.1 (2016-03-23)
  376. ------------------
  377. Bugfixes
  378. ~~~~~~~~
  379. - Fixed issue where users using locales that did not default to UTF-8 were
  380. unable to install source distributions of the package.
  381. 2.2.0 (2016-03-23)
  382. ------------------
  383. API Changes (Backward-Compatible)
  384. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  385. - Added support for sending informational responses (responses with 1XX status)
  386. codes as part of the standard flow. HTTP/2 allows zero or more informational
  387. responses with no upper limit: hyper-h2 does too.
  388. - Added support for receiving informational responses (responses with 1XX
  389. status) codes as part of the standard flow. HTTP/2 allows zero or more
  390. informational responses with no upper limit: hyper-h2 does too.
  391. - Added a new event: ``ReceivedInformationalResponse``. This response is fired
  392. when informational responses (those with 1XX status codes).
  393. - Added an ``additional_data`` field to the ``ConnectionTerminated`` event that
  394. carries any additional data sent on the GOAWAY frame. May be ``None`` if no
  395. such data was sent.
  396. - Added the ``initial_values`` optional argument to the ``Settings`` object.
  397. Bugfixes
  398. ~~~~~~~~
  399. - Correctly reject all of the connection-specific headers mentioned in RFC 7540
  400. § 8.1.2.2, not just the ``Connection:`` header.
  401. - Defaulted the value of ``SETTINGS_MAX_CONCURRENT_STREAMS`` to 100, unless
  402. explicitly overridden. This is a safe defensive initial value for this
  403. setting.
  404. 2.1.3 (2016-03-16)
  405. ------------------
  406. Deprecations
  407. ~~~~~~~~~~~~
  408. - Passing dictionaries to ``send_headers`` as the header block is deprecated,
  409. and will be removed in 3.0.
  410. 2.1.2 (2016-02-17)
  411. ------------------
  412. Bugfixes
  413. ~~~~~~~~
  414. - Reject attempts to push streams on streams that were themselves pushed:
  415. streams can only be pushed on streams that were initiated by the client.
  416. - Correctly allow CONTINUATION frames to extend the header block started by a
  417. PUSH_PROMISE frame.
  418. - Changed our handling of frames received on streams that were reset by the
  419. user.
  420. Previously these would, at best, cause ProtocolErrors to be raised and the
  421. connection to be torn down (rather defeating the point of resetting streams
  422. at all) and, at worst, would cause subtle inconsistencies in state between
  423. hyper-h2 and the remote peer that could lead to header block decoding errors
  424. or flow control blockages.
  425. Now when the user resets a stream all further frames received on that stream
  426. are ignored except where they affect some form of connection-level state,
  427. where they have their effect and are then ignored.
  428. - Fixed a bug whereby receiving a PUSH_PROMISE frame on a stream that was
  429. closed would cause a RST_STREAM frame to be emitted on the closed-stream,
  430. but not the newly-pushed one. Now this causes a ``ProtocolError``.
  431. 2.1.1 (2016-02-05)
  432. ------------------
  433. Bugfixes
  434. ~~~~~~~~
  435. - Added debug representations for all events.
  436. - Fixed problems with setup.py that caused trouble on older setuptools/pip
  437. installs.
  438. 2.1.0 (2016-02-02)
  439. ------------------
  440. API Changes (Backward-Compatible)
  441. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  442. - Added new field to ``DataReceived``: ``flow_controlled_length``. This is the
  443. length of the frame including padded data, allowing users to correctly track
  444. changes to the flow control window.
  445. - Defined new ``UnsupportedFrameError``, thrown when frames that are known to
  446. hyperframe but not supported by hyper-h2 are received. For
  447. backward-compatibility reasons, this is a ``ProtocolError`` *and* a
  448. ``KeyError``.
  449. Bugfixes
  450. ~~~~~~~~
  451. - Hyper-h2 now correctly accounts for padding when maintaining flow control
  452. windows.
  453. - Resolved a bug where hyper-h2 would mistakenly apply
  454. SETTINGS_INITIAL_WINDOW_SIZE to the connection flow control window in
  455. addition to the stream-level flow control windows.
  456. - Invalid Content-Length headers now throw ``ProtocolError`` exceptions and
  457. correctly tear the connection down, instead of leaving the connection in an
  458. indeterminate state.
  459. - Invalid header blocks now throw ``ProtocolError``, rather than a grab bag of
  460. possible other exceptions.
  461. 2.0.0 (2016-01-25)
  462. ------------------
  463. API Changes (Breaking)
  464. ~~~~~~~~~~~~~~~~~~~~~~
  465. - Attempts to open streams with invalid stream IDs, either by the remote peer
  466. or by the user, are now rejected as a ``ProtocolError``. Previously these
  467. were allowed, and would cause remote peers to error.
  468. - Receiving frames that have invalid padding now causes the connection to be
  469. terminated with a ``ProtocolError`` being raised. Previously these passed
  470. undetected.
  471. - Settings values set by both the user and the remote peer are now validated
  472. when they're set. If they're invalid, a new ``InvalidSettingsValueError`` is
  473. raised and, if set by the remote peer, a connection error is signaled.
  474. Previously, it was possible to set invalid values. These would either be
  475. caught when building frames, or would be allowed to stand.
  476. - Settings changes no longer require user action to be acknowledged: hyper-h2
  477. acknowledges them automatically. This moves the location where some
  478. exceptions may be thrown, and also causes the ``acknowledge_settings`` method
  479. to be removed from the public API.
  480. - Removed a number of methods on the ``H2Connection`` object from the public,
  481. semantically versioned API, by renaming them to have leading underscores.
  482. Specifically, removed:
  483. - ``get_stream_by_id``
  484. - ``get_or_create_stream``
  485. - ``begin_new_stream``
  486. - ``receive_frame``
  487. - ``acknowledge_settings``
  488. - Added full support for receiving CONTINUATION frames, including policing
  489. logic about when and how they are received. Previously, receiving
  490. CONTINUATION frames was not supported and would throw exceptions.
  491. - All public API functions on ``H2Connection`` except for ``receive_data`` no
  492. longer return lists of events, because these lists were always empty. Events
  493. are now only raised by ``receive_data``.
  494. - Calls to ``increment_flow_control_window`` with out of range values now raise
  495. ``ValueError`` exceptions. Previously they would be allowed, or would cause
  496. errors when serializing frames.
  497. API Changes (Backward-Compatible)
  498. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  499. - Added ``PriorityUpdated`` event for signaling priority changes.
  500. - Added ``get_next_available_stream_id`` function.
  501. - Receiving DATA frames on streams not in the OPEN or HALF_CLOSED_LOCAL states
  502. now causes a stream reset, rather than a connection reset. The error is now
  503. also classified as a ``StreamClosedError``, rather than a more generic
  504. ``ProtocolError``.
  505. - Receiving HEADERS or PUSH_PROMISE frames in the HALF_CLOSED_REMOTE state now
  506. causes a stream reset, rather than a connection reset.
  507. - Receiving frames that violate the max frame size now causes connection errors
  508. with error code FRAME_SIZE_ERROR, not a generic PROTOCOL_ERROR. This
  509. condition now also raises a ``FrameTooLargeError``, a new subclass of
  510. ``ProtocolError``.
  511. - Made ``NoSuchStreamError`` a subclass of ``ProtocolError``.
  512. - The ``StreamReset`` event is now also fired whenever a protocol error from
  513. the remote peer forces a stream to close early. This is only fired once.
  514. - The ``StreamReset`` event now carries a flag, ``remote_reset``, that is set
  515. to ``True`` in all cases where ``StreamReset`` would previously have fired
  516. (e.g. when the remote peer sent a RST_STREAM), and is set to ``False`` when
  517. it fires because the remote peer made a protocol error.
  518. - Hyper-h2 now rejects attempts by peers to increment a flow control window by
  519. zero bytes.
  520. - Hyper-h2 now rejects peers sending header blocks that are ill-formed for a
  521. number of reasons as set out in RFC 7540 Section 8.1.2.
  522. - Attempting to send non-PRIORITY frames on closed streams now raises
  523. ``StreamClosedError``.
  524. - Remote peers attempting to increase the flow control window beyond
  525. ``2**31 - 1``, either by window increment or by settings frame, are now
  526. rejected as ``ProtocolError``.
  527. - Local attempts to increase the flow control window beyond ``2**31 - 1`` by
  528. window increment are now rejected as ``ProtocolError``.
  529. - The bytes that represent individual settings are now available in
  530. ``h2.settings``, instead of needing users to import them from hyperframe.
  531. Bugfixes
  532. ~~~~~~~~
  533. - RFC 7540 requires that a separate minimum stream ID be used for inbound and
  534. outbound streams. Hyper-h2 now obeys this requirement.
  535. - Hyper-h2 now does a better job of reporting the last stream ID it has
  536. partially handled when terminating connections.
  537. - Fixed an error in the arguments of ``StreamIDTooLowError``.
  538. - Prevent ``ValueError`` leaking from Hyperframe.
  539. - Prevent ``struct.error`` and ``InvalidFrameError`` leaking from Hyperframe.
  540. 1.1.1 (2015-11-17)
  541. ------------------
  542. Bugfixes
  543. ~~~~~~~~
  544. - Forcibly lowercase all header names to improve compatibility with
  545. implementations that demand lower-case header names.
  546. 1.1.0 (2015-10-28)
  547. ------------------
  548. API Changes (Backward-Compatible)
  549. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  550. - Added a new ``ConnectionTerminated`` event, which fires when GOAWAY frames
  551. are received.
  552. - Added a subclass of ``NoSuchStreamError``, called ``StreamClosedError``, that
  553. fires when actions are taken on a stream that is closed and has had its state
  554. flushed from the system.
  555. - Added ``StreamIDTooLowError``, raised when the user or the remote peer
  556. attempts to create a stream with an ID lower than one previously used in the
  557. dialog. Inherits from ``ValueError`` for backward-compatibility reasons.
  558. Bugfixes
  559. ~~~~~~~~
  560. - Do not throw ``ProtocolError`` when attempting to send multiple GOAWAY
  561. frames on one connection.
  562. - We no longer forcefully change the decoder table size when settings changes
  563. are ACKed, instead waiting for remote acknowledgement of the change.
  564. - Improve the performance of checking whether a stream is open.
  565. - We now attempt to lazily garbage collect closed streams, to avoid having the
  566. state hang around indefinitely, leaking memory.
  567. - Avoid further per-stream allocations, leading to substantial performance
  568. improvements when many short-lived streams are used.
  569. 1.0.0 (2015-10-15)
  570. ------------------
  571. - First production release!