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

Migrate to nightly rust-toolchain #9

Merged
merged 3 commits into from
May 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
6 changes: 4 additions & 2 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ jobs:
target: x86_64
- runner: ubuntu-latest
target: aarch64
- runner: ubuntu-latest
target: armv7
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
Expand All @@ -38,6 +36,7 @@ jobs:
- name: Build wheels
uses: PyO3/maturin-action@v1
with:
rust-toolchain: nightly
target: ${{ matrix.platform.target }}
args: --release --out dist --zig
sccache: 'true'
Expand Down Expand Up @@ -90,6 +89,7 @@ jobs:
- name: Build wheels
uses: PyO3/maturin-action@v1
with:
rust-toolchain: nightly
target: ${{ matrix.platform.target }}
args: --release --out dist --zig
sccache: 'true'
Expand Down Expand Up @@ -145,6 +145,7 @@ jobs:
- name: Build wheels
uses: PyO3/maturin-action@v1
with:
rust-toolchain: nightly
target: ${{ matrix.platform.target }}
args: --release --out dist
sccache: 'true'
Expand Down Expand Up @@ -179,6 +180,7 @@ jobs:
- name: Build wheels
uses: PyO3/maturin-action@v1
with:
rust-toolchain: nightly
target: ${{ matrix.platform.target }}
args: --release --out dist
sccache: 'true'
Expand Down
14 changes: 12 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ reqwest-impersonate = { version = "0.11", default-features = false, features = [
"brotli",
"deflate",
] }
encoding_rs = "0.8"
encoding_rs = { version = "0.8", features = ["simd-accel"] }
pythonize = "0.21"
serde_json = "1"
tokio = { version = "1", features = ["fs", "rt-multi-thread"] }
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ The fastest python HTTP client that can impersonate web browsers by mimicking th
Binding to the Rust [reqwest_impersonate](https://github.com/gngpp/reqwest-impersonate) library.</br>

Provides precompiled wheels:
- [x] Linux: `amd64`, `aarch64`, `armv7`; musllinux: `amd64`, `aarch64`.
- [x] Linux|musl: `amd64`, `aarch64`.
- [x] Windows: `amd64`.
- [x] MacOS: `amd64`, `aarch64`.

Expand All @@ -26,7 +26,7 @@ pip install -U pyreqwest_impersonate
## Key Features
- Impersonate: The Client offers an `impersonate` option, enabling it to mimic web browsers by replicating their headers and TLS/JA3/JA4/HTTP2 fingerprints.
- Thread-safe: The Client is designed to be thread-safe, allowing it to be safely used in multithreaded environments.
- Automatic Character Encoding Detection: The encoding is taken from the "Content-Type" header, but if not specified, "UTF-8".
- Automatic Character Encoding Detection: The encoding is taken from the "Content-Type" header, but if not specified, "UTF-8". If encoding does not match the content, the package automatically detects and uses the correct encoding to decode the text.
- Small Size: The compiled library is about 5.8MB in size.
- High Performance: The library is designed for a large number of threads, uses all processors, and releases the GIL. All operations like accessing headers, decoding text, or parsing JSON are executed in Rust.

Expand Down