Skip to content

Commit

Permalink
❇️ Adjustment for HTTP/3 and OCSP simplifications that came with qh3 …
Browse files Browse the repository at this point in the history
…1.0+ (#108)

3.6.0 (2024-04-20)
------------------

**Added**
- Support for qh3 version 1.0.0
This qh3 release enable a greater flexibility by dropping cryptography.
We had to adapt the OCSP code as we
  relied on cryptography. HTTP/3 experience is greatly improved.

**Changed**
- urllib3.future lower bound constraint has been raised to version
2.7.904 to ensure support for the last qh3 release.

**Fixed**
- Improved compatibility with third party mocking tool that are bound to
requests.
- OCSP check did not warn if the HTTP server responded with a non 2xx
response in strict mode.
  • Loading branch information
Ousret authored Apr 20, 2024
1 parent 7ff8515 commit f7b53e6
Show file tree
Hide file tree
Showing 12 changed files with 210 additions and 185 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ repos:
- id: mypy
args: [--check-untyped-defs]
exclude: 'tests/|noxfile.py'
additional_dependencies: ['charset_normalizer', 'urllib3.future>=2.6.900', 'wassima>=1.0.1', 'idna', 'kiss_headers']
additional_dependencies: ['charset_normalizer', 'urllib3.future>=2.7.904', 'wassima>=1.0.1', 'idna', 'kiss_headers']
15 changes: 15 additions & 0 deletions HISTORY.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,21 @@
Release History
===============

3.6.0 (2024-04-20)
------------------

**Added**
- Support for qh3 version 1.0.0
This qh3 release enable a greater flexibility by dropping cryptography. We had to adapt the OCSP code as we
relied on cryptography. HTTP/3 experience is greatly improved.

**Changed**
- urllib3.future lower bound constraint has been raised to version 2.7.904 to ensure support for the last qh3 release.

**Fixed**
- Improved compatibility with third party mocking tool that are bound to requests.
- OCSP check did not warn if the HTTP server responded with a non 2xx response in strict mode.

3.5.5 (2024-03-25)
------------------

Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,8 @@ Niquests allows you to send HTTP requests extremely easily. There’s no need to
[![Downloads](https://static.pepy.tech/badge/niquests/month)](https://pepy.tech/project/niquests)
[![Supported Versions](https://img.shields.io/pypi/pyversions/niquests.svg)](https://pypi.org/project/niquests)

This project does not require any compilation toolchain. The HTTP/3 support is not enforced and installed if your platform can support it natively _(e.g. pre-built wheel available)_.

## ✨ Installing Niquests and Supported Versions

Niquests is available on PyPI:
Expand Down
8 changes: 4 additions & 4 deletions docs/community/faq.rst
Original file line number Diff line number Diff line change
Expand Up @@ -118,15 +118,15 @@ Yes... kind of!
Niquests ships with a nice alternative to ``CaseInsensitiveDict`` that is ``kiss_headers.Headers``.
You may access it through the ``oheaders`` property of your usual Response, Request and PreparedRequest.

Am I obligated to install qh3 and dependents?
---------------------------------------------
Am I obligated to install qh3?
------------------------------

No. But by default, it could be picked for installation. You may remove it safely at the cost
of loosing HTTP/3 over QUIC.
of loosing HTTP/3 over QUIC and OCSP certificate revocation status.

A shortcut would be::

$ pip uninstall qh3 cryptography cffi pycparser
$ pip uninstall qh3

.. warning:: Your site-packages is shared, thus it is possible that other libraries depends on some of the listed programs. Do it with care!

Expand Down
2 changes: 1 addition & 1 deletion docs/user/advanced.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1249,7 +1249,7 @@ a complementary security measure.
Unless in strict-mode, the proxy configuration will be respected when given, as long as it specify
a plain ``http`` proxy. This is meant for people who want privacy.

This feature may not be available if the ``cryptography`` package is missing from your environment.
This feature may not be available if the ``qh3`` package is missing from your environment.
Verify the availability by running ``python -m niquests.help``.

.. note:: Access property ``ocsp_verified`` in both ``PreparedRequest``, and ``Response`` to have information about this post handshake verification.
Expand Down
8 changes: 4 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ dynamic = ["version"]
dependencies = [
"charset_normalizer>=2,<4",
"idna>=2.5,<4",
"urllib3.future>=2.7.900,<3",
"urllib3.future>=2.7.904,<3",
"wassima>=1.0.1,<2",
"kiss_headers>=2,<4",
]
Expand All @@ -51,14 +51,14 @@ socks = [
"urllib3.future[socks]",
]
http3 = [
"urllib3.future[qh3]"
"urllib3.future[qh3]",
]
ocsp = [
"cryptography<43.0.0,>=41.0.0"
"urllib3.future[qh3]",
]
speedups = [
"orjson>=3,<4",
"urllib3.future[zstd,brotli]"
"urllib3.future[zstd,brotli]",
]

[project.urls]
Expand Down
4 changes: 2 additions & 2 deletions src/niquests/__version__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
__url__: str = "https://niquests.readthedocs.io"

__version__: str
__version__ = "3.5.5"
__version__ = "3.6.0"

__build__: int = 0x030505
__build__: int = 0x030600
__author__: str = "Kenneth Reitz"
__author_email__: str = "[email protected]"
__license__: str = "Apache-2.0"
Expand Down
2 changes: 1 addition & 1 deletion src/niquests/_async.py
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,7 @@ async def handle_upload_progress(
request.conn_info = _deepcopy_ci(request.conn_info)

# We are leveraging a multiplexed connection
if r.raw is None:
if r.lazy is True:

async def _redirect_method_ref(x, y):
try:
Expand Down
Loading

0 comments on commit f7b53e6

Please sign in to comment.