Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace psf/requests with an unofficial fork #1531

Closed
wants to merge 76 commits into from
Closed
Show file tree
Hide file tree
Changes from 45 commits
Commits
Show all changes
76 commits
Select commit Hold shift + click to select a range
a8ef611
HTTPie v4
Ousret Oct 3, 2023
19e75df
resolve merge conflicts
Ousret Mar 18, 2024
bb1acd9
resolve merge conflicts
Ousret Mar 18, 2024
7be49cf
flake8 lint fix
Ousret Mar 18, 2024
4f3b468
code cleanup
Ousret Mar 20, 2024
793e373
fix warnings in PersistentMockEnvironment due to missing cleanup
Ousret Mar 20, 2024
417adcd
fix warnings in TestItemParsing::test_escape_separator due to an uncl…
Ousret Mar 20, 2024
3ccbdbf
fix warnings due leaving the http session open
Ousret Mar 20, 2024
d39752a
add tests to cover recently added cli flags
Ousret Mar 20, 2024
f025f66
fix multipart stream encoder not closing (file) part after completing…
Ousret Mar 20, 2024
1ff2be7
fix warning about unclosed file in TestItemParsing::test_valid_items
Ousret Mar 20, 2024
8037485
adapt tests in OS specifics behaviors (err msg)
Ousret Mar 20, 2024
7eb10b5
add comments to guide future developers
Ousret Mar 20, 2024
8c3c77a
apply initial suggestions
Ousret Mar 20, 2024
dfe3dbe
apply cosmetic fixes
Ousret Mar 21, 2024
cce24fe
add xfail when CI+MacOS for test_stdin_read_warning
Ousret Mar 22, 2024
8827c42
update man files
Ousret Mar 22, 2024
74d62b8
display http3 error message even if user set timeout flag
Ousret Mar 22, 2024
1ac0f32
update docs with fixed metadata render
Ousret Mar 22, 2024
bfd7f37
add comment
Ousret Mar 25, 2024
b010eff
respect httpie config to generate path for "quic.json" cache layer
Ousret Apr 3, 2024
e3c5acd
add test for remote h3 not compatible anymore
Ousret Apr 4, 2024
5c497fd
use compat for create_urllib3_context, resolve_ssl_version in httpie.…
Ousret Apr 4, 2024
ff37166
inject QuicCapabilityCache is a path is given (and not None)
Ousret Apr 4, 2024
e19eb25
fix multipart form data having filename with non ascii characters
Ousret Apr 4, 2024
bb5a57f
ignore "subprocess" is still running and this process pid=x is multi-…
Ousret Apr 4, 2024
ea2d675
remove 'verify=False' when requesting packages.httpie.io for latest v…
Ousret Apr 4, 2024
e181193
don't chain call niquests.get and raise_for_status due to mock in tes…
Ousret Apr 4, 2024
c859191
add note for why 'Host' header cannot be unset
Ousret Apr 4, 2024
eb93eab
fix infinite loop update checker in a specific condition
Ousret Apr 4, 2024
4ae49f1
add section for protocol combinations and http/3 support note
Ousret Apr 24, 2024
6c55c94
downgrade macos-14 to macos-13 due to missing brotlicffi->cffi wheels
Ousret Apr 24, 2024
007234f
Tweak
jkbrzt May 20, 2024
71ab43e
fix test_secure_cookies_on_localhost case
Ousret May 22, 2024
d9db5a2
fix downloader with compressed content #1554 #423
Ousret May 23, 2024
ec02b1c
add support for resolving ".localhost" domains
Ousret May 24, 2024
2583671
Changelog tweaks
jkbrzt May 24, 2024
523faa6
adjust docs around tls version cli command
Ousret May 26, 2024
d200787
Merge branch 'feature-tryout-niquests' of github.com:Ousret/httpie in…
Ousret May 26, 2024
e3cbc7f
improve support --ssl=[...] setting
Ousret May 26, 2024
78aa25d
Docs wip
jkbrzt Jun 3, 2024
d238725
Add `cd_clean_tmp_dir()` test utility context manager
jkbrzt Jun 3, 2024
4747669
Cleanup imports
jkbrzt Jun 3, 2024
b3f9e01
Tests
jkbrzt Jun 6, 2024
bb3583c
Clean
jkbrzt Jun 6, 2024
77bbf8c
Update CHANGELOG.md
jkbrzt Jun 6, 2024
128d952
Update CHANGELOG.md
jkbrzt Jun 6, 2024
540d3f3
Decoded downloads: refactor, add decoded size notice, tests, etc.
jkbrzt Jun 14, 2024
121cba1
Clean
jkbrzt Jun 14, 2024
5dedead
Fix
jkbrzt Jun 14, 2024
f7cbd64
Fix
jkbrzt Jun 14, 2024
f989e5e
support for force http2, http1 or http3 and fix real download speed w…
Ousret Jun 24, 2024
d02b882
update docs for protocol negotiation and gen man
Ousret Jun 26, 2024
55aea9c
fixed+enabled recently disabled tests for download + compressed bodies
Ousret Jun 27, 2024
2e3617e
Merge branch 'refs/heads/master' into feature-tryout-niquests
jkbrzt Jul 10, 2024
1379a2e
add support for early responses 1xx (informational)
Ousret Oct 13, 2024
03bac4d
use ubuntu-22.04 to preserve python 3.7 and add python 3.13 in tests
Ousret Oct 13, 2024
7f5c8a1
fix test_h3_not_compatible_anymore as niquests automatically downgrad…
Ousret Oct 13, 2024
46ca048
add note on changed test_h3_not_compatible_anymore
Ousret Oct 13, 2024
f6f6619
fix test when http3 support is unavailable (windows+py3.7)
Ousret Oct 13, 2024
2ac67d5
fix unclosed file in case of failed download
Ousret Oct 15, 2024
7537b40
add support for happy eyeballs
Ousret Oct 15, 2024
dd60adb
ensure all plugins are migrated to Niquests prior to importing them
Ousret Oct 15, 2024
7a1c341
update man pages
Ousret Oct 15, 2024
5e87d1b
update test_network.py
Ousret Oct 15, 2024
da6cc13
unpin werkzeug, allow <4
Ousret Oct 16, 2024
e375c25
improve error messages upon invalid args/values in new flags
Ousret Oct 22, 2024
a367a55
Deduplicate downloader clean-up logic
jkbrzt Oct 26, 2024
0eab08a
Refactor `niquests` enforcement to `compat.enforce_niquests()`
jkbrzt Oct 26, 2024
4cea2e8
Move port and interface validation to the CLI layer
jkbrzt Oct 26, 2024
191824c
Fix occasional failures for tests dealing with binary bodies
jkbrzt Oct 26, 2024
65e4422
Move IP version options validation to the CLI layer
jkbrzt Oct 26, 2024
b58d001
Cleanup
jkbrzt Oct 26, 2024
7bd3af2
Fix test
jkbrzt Oct 26, 2024
2ea86b2
add delayed annot loading in ports.py
Ousret Oct 26, 2024
573a021
Move HTTP version options validation to the CLI layer
jkbrzt Oct 26, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/release-brew.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:
jobs:
brew-release:
name: Release the Homebrew Package
runs-on: macos-latest
runs-on: macos-13

steps:
- uses: actions/checkout@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-package-mac-brew.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:

jobs:
brew:
runs-on: macos-latest
runs-on: macos-13
steps:
- uses: actions/checkout@v3
- name: Setup brew
Expand Down
7 changes: 1 addition & 6 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,14 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
os: [ubuntu-latest, macos-13, windows-latest]
python-version:
- '3.12'
- '3.11'
- '3.10'
- '3.9'
- '3.8'
- '3.7'
pyopenssl: [0, 1]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
Expand All @@ -45,12 +44,8 @@ jobs:
python -m pip install --upgrade pip wheel
python -m pip install --upgrade '.[dev]'
python -m pytest --verbose ./httpie ./tests
env:
HTTPIE_TEST_WITH_PYOPENSSL: ${{ matrix.pyopenssl }}
- name: Linux & Mac setup
if: matrix.os != 'windows-latest'
run: |
make install
make test
env:
HTTPIE_TEST_WITH_PYOPENSSL: ${{ matrix.pyopenssl }}
33 changes: 30 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,36 @@
This document records all notable changes to [HTTPie](https://httpie.io).
This project adheres to [Semantic Versioning](https://semver.org/).

## [3.3.0-dev](https://github.com/httpie/cli/compare/3.2.2...master) (unreleased)

- Make it possible to [unset](https://httpie.io/docs/cli/default-request-headers) the `User-Agent`, `Accept-Encoding`, and `Host` request headers. ([#1502](https://github.com/httpie/cli/issues/1502))
## [4.0.0.b1](https://github.com/httpie/cli/compare/3.2.2...master) (unreleased)

- Switched from the [`requests`](https://github.com/psf/requests) library to the compatible [`niquests`](https://github.com/jawah/niquests). ([#1531](https://github.com/httpie/cli/pull/1531))
- Added support for HTTP/2, and HTTP/3 protocols. ([#523](https://github.com/httpie/cli/issues/523), [#692](https://github.com/httpie/cli/issues/692), [#1531](https://github.com/httpie/cli/pull/1531))
- Added support for IPv4/IPv6 enforcement with `-6` and `-4`. ([#94](https://github.com/httpie/cli/issues/94), [#1531](https://github.com/httpie/cli/pull/1531))
- Added support for alternative DNS resolvers via `--resolver`. DNS over HTTPS, DNS over TLS, DNS over QUIC, and DNS over UDP are accepted. ([#99](https://github.com/httpie/cli/issues/99), [#1531](https://github.com/httpie/cli/pull/1531))
- Added support for binding to a specific network adapter with `--interface`. ([#1422](https://github.com/httpie/cli/issues/1422), [#1531](https://github.com/httpie/cli/pull/1531))
- Added support for specifying the local port with `--local-port`. ([#1456](https://github.com/httpie/cli/issues/1456), [#1531](https://github.com/httpie/cli/pull/1531))
- Added the ability to [unset](https://httpie.io/docs/cli/default-request-headers) the `User-Agent`, and `Accept-Encoding` headers. ([#1502](https://github.com/httpie/cli/issues/1502))
- Added request metadata for the TLS certificate, negotiated version with cipher, the revocation status and the remote peer IP address. ([#1495](https://github.com/httpie/cli/issues/1495), [#1023](https://github.com/httpie/cli/issues/1023), [#826](https://github.com/httpie/cli/issues/826), [#1531](https://github.com/httpie/cli/pull/1531))
- Added support to load the operating system trust store for the peer certificate validation. ([#480](https://github.com/httpie/cli/issues/480), [#1531](https://github.com/httpie/cli/pull/1531))
- Added support for using the system trust store to retrieve root CAs for verifying TLS certificates. ([#1531](https://github.com/httpie/cli/pull/1531))
- Added detailed timings in response metadata with DNS resolution, established, TLS handshake, and request sending delays. ([#1023](https://github.com/httpie/cli/issues/1023), [#1531](https://github.com/httpie/cli/pull/1531))
- Added automated resolution of hosts ending with `.localhost` to the default loopback address. ([#1458](https://github.com/httpie/cli/issues/1458), [#1527](https://github.com/httpie/cli/issues/1527))
- Fixed the case when multiple headers where concatenated in the response output. ([#1413](https://github.com/httpie/cli/issues/1413), [#1531](https://github.com/httpie/cli/pull/1531))
- Fixed an edge case where HTTPie could be lead to believe data was passed in stdin, thus sending a POST by default. ([#1551](https://github.com/httpie/cli/issues/1551), [#1531](https://github.com/httpie/cli/pull/1531))
This fix has the particularity to consider 0 byte long stdin buffer as absent stdin. Empty stdin buffer will be ignored.
- Improved performance while downloading by setting chunk size to `-1` to retrieve packets as they arrive. ([#1531](https://github.com/httpie/cli/pull/1531))
- Fixed multipart form data having filename not rfc2231 compliant when name contain non-ascii characters. ([#1401](https://github.com/httpie/cli/issues/1401))
- Fixed issue where the configuration directory was not created at runtime that made the update fetcher run everytime. ([#1527](https://github.com/httpie/cli/issues/1527))
- Fixed cookie persistence in HTTPie session when targeting localhost. They were dropped due to the standard library. ([#1527](https://github.com/httpie/cli/issues/1527))
- Fixed downloader when trying to fetch compressed content. The process will no longer exit with the "Incomplete download" error. ([#1554](https://github.com/httpie/cli/issues/1554), [#423](https://github.com/httpie/cli/issues/423), [#1527](https://github.com/httpie/cli/issues/1527))
- Removed support for preserving the original casing of HTTP headers. This comes as a constraint of newer protocols, namely HTTP/2+ that normalize header keys by default. From the HTTPie user perspective, they are "prettified" in the output by default. e.g. `x-hello-world` is displayed as `X-Hello-World`.
- Removed support for `pyopenssl`. ([#1531](https://github.com/httpie/cli/pull/1531))
- Removed support for dead SSL protocols < TLS 1.0 (e.g. sslv3) as per pyopenssl removal. ([#1531](https://github.com/httpie/cli/pull/1531))
- Removed dependency on `requests_toolbelt` in favor of directly including `MultipartEncoder` into HTTPie due to its direct dependency to requests. ([#1531](https://github.com/httpie/cli/pull/1531))
- Removed dependency on `multidict` in favor aof an internal one due to often missing pre-built wheels. ([#1522](https://github.com/httpie/cli/issues/1522), [#1531](https://github.com/httpie/cli/pull/1531))
jkbrzt marked this conversation as resolved.
Show resolved Hide resolved

Existing plugins are expected to work without any changes. The only caveat would be that certain plugin explicitly require `requests`.
jkbrzt marked this conversation as resolved.
Show resolved Hide resolved
Future contributions may be made in order to relax the constraints where applicable.

## [3.2.2](https://github.com/httpie/cli/compare/3.2.1...3.2.2) (2022-05-19)

Expand Down
Loading
Loading