pyreqwest 0.5.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of pyreqwest might be problematic. Click here for more details.
- pyreqwest-0.5.0/.github/workflows/ci.yml +341 -0
- pyreqwest-0.5.0/.github/workflows/gen_docs.yml +34 -0
- pyreqwest-0.5.0/.gitignore +16 -0
- pyreqwest-0.5.0/Cargo.lock +2222 -0
- pyreqwest-0.5.0/Cargo.toml +55 -0
- pyreqwest-0.5.0/LICENSE +201 -0
- pyreqwest-0.5.0/Makefile +83 -0
- pyreqwest-0.5.0/PKG-INFO +106 -0
- pyreqwest-0.5.0/README.md +76 -0
- pyreqwest-0.5.0/build.rs +3 -0
- pyreqwest-0.5.0/clippy.toml +2 -0
- pyreqwest-0.5.0/docs/benchmarks.md +46 -0
- pyreqwest-0.5.0/docs/logo.png +0 -0
- pyreqwest-0.5.0/docs/performance.md +42 -0
- pyreqwest-0.5.0/examples/__init__.py +0 -0
- pyreqwest-0.5.0/examples/_utils.py +42 -0
- pyreqwest-0.5.0/examples/auth.py +53 -0
- pyreqwest-0.5.0/examples/basic_client.py +109 -0
- pyreqwest-0.5.0/examples/cookies.py +55 -0
- pyreqwest-0.5.0/examples/json_usage.py +65 -0
- pyreqwest-0.5.0/examples/middleware.py +219 -0
- pyreqwest-0.5.0/examples/multipart.py +60 -0
- pyreqwest-0.5.0/examples/stream.py +44 -0
- pyreqwest-0.5.0/examples/testing.py +174 -0
- pyreqwest-0.5.0/pyproject.toml +160 -0
- pyreqwest-0.5.0/python/pyreqwest/__init__.py +3 -0
- pyreqwest-0.5.0/python/pyreqwest/__init__.pyi +1 -0
- pyreqwest-0.5.0/python/pyreqwest/bytes/__init__.py +16 -0
- pyreqwest-0.5.0/python/pyreqwest/bytes/__init__.pyi +106 -0
- pyreqwest-0.5.0/python/pyreqwest/client/__init__.py +21 -0
- pyreqwest-0.5.0/python/pyreqwest/client/__init__.pyi +341 -0
- pyreqwest-0.5.0/python/pyreqwest/client/types.py +54 -0
- pyreqwest-0.5.0/python/pyreqwest/cookie/__init__.py +5 -0
- pyreqwest-0.5.0/python/pyreqwest/cookie/__init__.pyi +174 -0
- pyreqwest-0.5.0/python/pyreqwest/exceptions/__init__.py +193 -0
- pyreqwest-0.5.0/python/pyreqwest/http/__init__.py +19 -0
- pyreqwest-0.5.0/python/pyreqwest/http/__init__.pyi +344 -0
- pyreqwest-0.5.0/python/pyreqwest/middleware/__init__.py +5 -0
- pyreqwest-0.5.0/python/pyreqwest/middleware/__init__.pyi +12 -0
- pyreqwest-0.5.0/python/pyreqwest/middleware/asgi/__init__.py +5 -0
- pyreqwest-0.5.0/python/pyreqwest/middleware/asgi/asgi.py +168 -0
- pyreqwest-0.5.0/python/pyreqwest/middleware/types.py +26 -0
- pyreqwest-0.5.0/python/pyreqwest/multipart/__init__.py +5 -0
- pyreqwest-0.5.0/python/pyreqwest/multipart/__init__.pyi +75 -0
- pyreqwest-0.5.0/python/pyreqwest/proxy/__init__.py +5 -0
- pyreqwest-0.5.0/python/pyreqwest/proxy/__init__.pyi +47 -0
- pyreqwest-0.5.0/python/pyreqwest/py.typed +0 -0
- pyreqwest-0.5.0/python/pyreqwest/pytest_plugin/__init__.py +8 -0
- pyreqwest-0.5.0/python/pyreqwest/pytest_plugin/internal/__init__.py +0 -0
- pyreqwest-0.5.0/python/pyreqwest/pytest_plugin/internal/assert_eq.py +6 -0
- pyreqwest-0.5.0/python/pyreqwest/pytest_plugin/internal/assert_message.py +123 -0
- pyreqwest-0.5.0/python/pyreqwest/pytest_plugin/internal/matcher.py +34 -0
- pyreqwest-0.5.0/python/pyreqwest/pytest_plugin/internal/plugin.py +15 -0
- pyreqwest-0.5.0/python/pyreqwest/pytest_plugin/mock.py +493 -0
- pyreqwest-0.5.0/python/pyreqwest/pytest_plugin/types.py +26 -0
- pyreqwest-0.5.0/python/pyreqwest/request/__init__.py +25 -0
- pyreqwest-0.5.0/python/pyreqwest/request/__init__.pyi +200 -0
- pyreqwest-0.5.0/python/pyreqwest/response/__init__.py +19 -0
- pyreqwest-0.5.0/python/pyreqwest/response/__init__.pyi +157 -0
- pyreqwest-0.5.0/python/pyreqwest/types.py +12 -0
- pyreqwest-0.5.0/rustfmt.toml +10 -0
- pyreqwest-0.5.0/src/allow_threads.rs +21 -0
- pyreqwest-0.5.0/src/asyncio.rs +301 -0
- pyreqwest-0.5.0/src/client/client.rs +234 -0
- pyreqwest-0.5.0/src/client/client_builder.rs +536 -0
- pyreqwest-0.5.0/src/client/internal/connection_limiter.rs +36 -0
- pyreqwest-0.5.0/src/client/internal/mod.rs +5 -0
- pyreqwest-0.5.0/src/client/internal/spawner.rs +108 -0
- pyreqwest-0.5.0/src/client/mod.rs +8 -0
- pyreqwest-0.5.0/src/client/runtime.rs +118 -0
- pyreqwest-0.5.0/src/cookie/cookie.rs +265 -0
- pyreqwest-0.5.0/src/cookie/cookie_store.rs +111 -0
- pyreqwest-0.5.0/src/cookie/mod.rs +5 -0
- pyreqwest-0.5.0/src/exceptions/exceptions.rs +98 -0
- pyreqwest-0.5.0/src/exceptions/mod.rs +4 -0
- pyreqwest-0.5.0/src/exceptions/utils.rs +141 -0
- pyreqwest-0.5.0/src/http/header_map/header_map.rs +431 -0
- pyreqwest-0.5.0/src/http/header_map/iters.rs +87 -0
- pyreqwest-0.5.0/src/http/header_map/mod.rs +6 -0
- pyreqwest-0.5.0/src/http/header_map/views.rs +292 -0
- pyreqwest-0.5.0/src/http/mime.rs +151 -0
- pyreqwest-0.5.0/src/http/mod.rs +7 -0
- pyreqwest-0.5.0/src/http/url.rs +388 -0
- pyreqwest-0.5.0/src/internal/body_stream.rs +184 -0
- pyreqwest-0.5.0/src/internal/json.rs +103 -0
- pyreqwest-0.5.0/src/internal/mod.rs +4 -0
- pyreqwest-0.5.0/src/internal/types.rs +221 -0
- pyreqwest-0.5.0/src/internal/utils.rs +56 -0
- pyreqwest-0.5.0/src/lib.rs +178 -0
- pyreqwest-0.5.0/src/middleware/mod.rs +3 -0
- pyreqwest-0.5.0/src/middleware/next.rs +198 -0
- pyreqwest-0.5.0/src/multipart/form_builder.rs +105 -0
- pyreqwest-0.5.0/src/multipart/mod.rs +5 -0
- pyreqwest-0.5.0/src/multipart/part_builder.rs +111 -0
- pyreqwest-0.5.0/src/proxy/mod.rs +3 -0
- pyreqwest-0.5.0/src/proxy/proxy_builder.rs +100 -0
- pyreqwest-0.5.0/src/request/consumed_request.rs +65 -0
- pyreqwest-0.5.0/src/request/mod.rs +11 -0
- pyreqwest-0.5.0/src/request/request.rs +391 -0
- pyreqwest-0.5.0/src/request/request_body.rs +129 -0
- pyreqwest-0.5.0/src/request/request_builder.rs +324 -0
- pyreqwest-0.5.0/src/request/stream_request.rs +141 -0
- pyreqwest-0.5.0/src/response/internal/body_reader.rs +322 -0
- pyreqwest-0.5.0/src/response/internal/mod.rs +3 -0
- pyreqwest-0.5.0/src/response/mod.rs +8 -0
- pyreqwest-0.5.0/src/response/response.rs +438 -0
- pyreqwest-0.5.0/src/response/response_body_reader.rs +93 -0
- pyreqwest-0.5.0/src/response/response_builder.rs +183 -0
- pyreqwest-0.5.0/tests/__init__.py +0 -0
- pyreqwest-0.5.0/tests/__snapshots__/test_examples.ambr +314 -0
- pyreqwest-0.5.0/tests/__snapshots__/test_request.ambr +25 -0
- pyreqwest-0.5.0/tests/bench/__init__.py +0 -0
- pyreqwest-0.5.0/tests/bench/benchmark_aiohttp.png +0 -0
- pyreqwest-0.5.0/tests/bench/benchmark_gc.py +248 -0
- pyreqwest-0.5.0/tests/bench/benchmark_httpx.png +0 -0
- pyreqwest-0.5.0/tests/bench/benchmark_latency.py +407 -0
- pyreqwest-0.5.0/tests/bench/benchmark_urllib3.png +0 -0
- pyreqwest-0.5.0/tests/conftest.py +75 -0
- pyreqwest-0.5.0/tests/pytest_mock/__init__.py +0 -0
- pyreqwest-0.5.0/tests/pytest_mock/__snapshots__/test_mock_assert.ambr +175 -0
- pyreqwest-0.5.0/tests/pytest_mock/test_mock.py +922 -0
- pyreqwest-0.5.0/tests/pytest_mock/test_mock_assert.py +392 -0
- pyreqwest-0.5.0/tests/pytest_mock/test_plugin_external.py +19 -0
- pyreqwest-0.5.0/tests/samples/crl.pem +12 -0
- pyreqwest-0.5.0/tests/servers/__init__.py +0 -0
- pyreqwest-0.5.0/tests/servers/echo_body_parts_server.py +47 -0
- pyreqwest-0.5.0/tests/servers/echo_server.py +81 -0
- pyreqwest-0.5.0/tests/servers/server.py +151 -0
- pyreqwest-0.5.0/tests/servers/server_pool.py +65 -0
- pyreqwest-0.5.0/tests/servers/server_subprocess.py +63 -0
- pyreqwest-0.5.0/tests/test_client.py +550 -0
- pyreqwest-0.5.0/tests/test_cookie.py +164 -0
- pyreqwest-0.5.0/tests/test_examples.py +72 -0
- pyreqwest-0.5.0/tests/test_header_map.py +636 -0
- pyreqwest-0.5.0/tests/test_middleware.py +516 -0
- pyreqwest-0.5.0/tests/test_middleware_asgi_client.py +217 -0
- pyreqwest-0.5.0/tests/test_mime.py +107 -0
- pyreqwest-0.5.0/tests/test_multipart.py +305 -0
- pyreqwest-0.5.0/tests/test_proxy.py +123 -0
- pyreqwest-0.5.0/tests/test_request.py +477 -0
- pyreqwest-0.5.0/tests/test_request_builder.py +216 -0
- pyreqwest-0.5.0/tests/test_response.py +436 -0
- pyreqwest-0.5.0/tests/test_stream.py +316 -0
- pyreqwest-0.5.0/tests/test_sync.py +335 -0
- pyreqwest-0.5.0/tests/test_url.py +362 -0
- pyreqwest-0.5.0/tests/utils.py +24 -0
- pyreqwest-0.5.0/uv.lock +1814 -0
|
@@ -0,0 +1,341 @@
|
|
|
1
|
+
name: ci
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
tags:
|
|
8
|
+
- 'v*'
|
|
9
|
+
pull_request: {}
|
|
10
|
+
workflow_dispatch: {}
|
|
11
|
+
|
|
12
|
+
env:
|
|
13
|
+
COLUMNS: 150
|
|
14
|
+
UV_PYTHON: 3.13
|
|
15
|
+
CI: 1
|
|
16
|
+
|
|
17
|
+
jobs:
|
|
18
|
+
test-python:
|
|
19
|
+
name: test ${{ matrix.python-version }}
|
|
20
|
+
strategy:
|
|
21
|
+
fail-fast: false
|
|
22
|
+
matrix:
|
|
23
|
+
python-version:
|
|
24
|
+
- "3.11"
|
|
25
|
+
- "3.12"
|
|
26
|
+
- "3.13"
|
|
27
|
+
- "3.14"
|
|
28
|
+
- "3.14t"
|
|
29
|
+
|
|
30
|
+
runs-on: ubuntu-latest
|
|
31
|
+
steps:
|
|
32
|
+
- uses: actions/checkout@v5
|
|
33
|
+
- uses: dtolnay/rust-toolchain@stable
|
|
34
|
+
- uses: Swatinem/rust-cache@v2
|
|
35
|
+
- uses: astral-sh/setup-uv@v6
|
|
36
|
+
with:
|
|
37
|
+
python-version: ${{ matrix.python-version }}
|
|
38
|
+
|
|
39
|
+
- run: uv sync
|
|
40
|
+
- run: make test-release
|
|
41
|
+
|
|
42
|
+
test-os:
|
|
43
|
+
name: test on ${{ matrix.os }}
|
|
44
|
+
strategy:
|
|
45
|
+
fail-fast: false
|
|
46
|
+
matrix:
|
|
47
|
+
os: [ubuntu, macos, windows]
|
|
48
|
+
|
|
49
|
+
runs-on: ${{ matrix.os }}-latest
|
|
50
|
+
steps:
|
|
51
|
+
- uses: actions/checkout@v5
|
|
52
|
+
- uses: dtolnay/rust-toolchain@stable
|
|
53
|
+
- uses: Swatinem/rust-cache@v2
|
|
54
|
+
- uses: astral-sh/setup-uv@v6
|
|
55
|
+
|
|
56
|
+
- run: uv sync
|
|
57
|
+
- run: make test-release
|
|
58
|
+
|
|
59
|
+
# test with a debug build as it picks up errors which optimised release builds do not
|
|
60
|
+
test-debug:
|
|
61
|
+
name: test-debug ${{ matrix.python-version }}
|
|
62
|
+
runs-on: ubuntu-latest
|
|
63
|
+
strategy:
|
|
64
|
+
fail-fast: false
|
|
65
|
+
matrix:
|
|
66
|
+
python-version:
|
|
67
|
+
- "3.13"
|
|
68
|
+
|
|
69
|
+
steps:
|
|
70
|
+
- uses: actions/checkout@v5
|
|
71
|
+
- uses: dtolnay/rust-toolchain@stable
|
|
72
|
+
- uses: Swatinem/rust-cache@v2
|
|
73
|
+
- uses: astral-sh/setup-uv@v6
|
|
74
|
+
|
|
75
|
+
- run: uv sync
|
|
76
|
+
- run: make test
|
|
77
|
+
|
|
78
|
+
lint:
|
|
79
|
+
runs-on: ubuntu-latest
|
|
80
|
+
steps:
|
|
81
|
+
- uses: actions/checkout@v5
|
|
82
|
+
- uses: dtolnay/rust-toolchain@stable
|
|
83
|
+
with:
|
|
84
|
+
components: rustfmt, clippy
|
|
85
|
+
- uses: Swatinem/rust-cache@v2
|
|
86
|
+
- uses: astral-sh/setup-uv@v6
|
|
87
|
+
|
|
88
|
+
- run: make static-checks
|
|
89
|
+
|
|
90
|
+
# https://github.com/marketplace/actions/alls-green#why used for branch protection checks
|
|
91
|
+
check:
|
|
92
|
+
if: always()
|
|
93
|
+
needs:
|
|
94
|
+
[
|
|
95
|
+
test-python,
|
|
96
|
+
test-os,
|
|
97
|
+
test-debug,
|
|
98
|
+
lint,
|
|
99
|
+
]
|
|
100
|
+
runs-on: ubuntu-latest
|
|
101
|
+
steps:
|
|
102
|
+
- name: Decide whether the needed jobs succeeded or failed
|
|
103
|
+
uses: re-actors/alls-green@release/v1
|
|
104
|
+
with:
|
|
105
|
+
jobs: ${{ toJSON(needs) }}
|
|
106
|
+
|
|
107
|
+
build-sdist:
|
|
108
|
+
name: build sdist
|
|
109
|
+
runs-on: ubuntu-latest
|
|
110
|
+
steps:
|
|
111
|
+
- uses: actions/checkout@v5
|
|
112
|
+
- uses: actions/setup-python@v6
|
|
113
|
+
with:
|
|
114
|
+
python-version: "3.13"
|
|
115
|
+
- uses: PyO3/maturin-action@v1
|
|
116
|
+
with:
|
|
117
|
+
command: sdist
|
|
118
|
+
args: --out dist
|
|
119
|
+
rust-toolchain: stable
|
|
120
|
+
- uses: actions/upload-artifact@v4
|
|
121
|
+
with:
|
|
122
|
+
name: pypi_files_sdist
|
|
123
|
+
path: dist
|
|
124
|
+
|
|
125
|
+
build:
|
|
126
|
+
name: build on ${{ matrix.os }} (${{ matrix.target }}${{ matrix.os == 'linux' && format(' - {0}', matrix.manylinux == 'auto' && 'manylinux' || matrix.manylinux) || '' }})
|
|
127
|
+
# only run on push to main and on release
|
|
128
|
+
if: startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/main' || contains(github.event.pull_request.labels.*.name, 'Full Build')
|
|
129
|
+
strategy:
|
|
130
|
+
fail-fast: false
|
|
131
|
+
matrix:
|
|
132
|
+
os: [linux, macos, windows]
|
|
133
|
+
target: [x86_64, aarch64]
|
|
134
|
+
manylinux: [auto]
|
|
135
|
+
include:
|
|
136
|
+
# manylinux for various platforms
|
|
137
|
+
- os: linux
|
|
138
|
+
manylinux: auto
|
|
139
|
+
target: armv7
|
|
140
|
+
- os: linux
|
|
141
|
+
manylinux: auto
|
|
142
|
+
target: i686
|
|
143
|
+
- os: linux
|
|
144
|
+
manylinux: auto
|
|
145
|
+
target: ppc64le
|
|
146
|
+
- os: linux
|
|
147
|
+
manylinux: auto
|
|
148
|
+
target: s390x
|
|
149
|
+
|
|
150
|
+
# musllinux
|
|
151
|
+
- os: linux
|
|
152
|
+
manylinux: musllinux_1_1
|
|
153
|
+
target: x86_64
|
|
154
|
+
- os: linux
|
|
155
|
+
manylinux: musllinux_1_1
|
|
156
|
+
target: aarch64
|
|
157
|
+
- os: linux
|
|
158
|
+
manylinux: musllinux_1_1
|
|
159
|
+
target: armv7
|
|
160
|
+
|
|
161
|
+
#runs-on: ${{ (matrix.os == 'linux' && 'ubuntu') || matrix.os }}-latest
|
|
162
|
+
runs-on: ${{ (matrix.os == 'linux' && matrix.target == 'aarch64' && 'ubuntu-24.04-arm') ||
|
|
163
|
+
(matrix.os == 'macos' && matrix.target == 'aarch64' && 'macos-15') ||
|
|
164
|
+
(matrix.os == 'windows' && matrix.target == 'aarch64' && 'windows-11-arm') ||
|
|
165
|
+
(matrix.os == 'linux' && matrix.target == 'x86_64' && 'ubuntu-24.04') ||
|
|
166
|
+
(matrix.os == 'macos' && matrix.target == 'x86_64' && 'macos-15-intel') ||
|
|
167
|
+
(matrix.os == 'windows' && matrix.target == 'x86_64' && 'windows-2025') ||
|
|
168
|
+
'ubuntu-24.04' }}
|
|
169
|
+
steps:
|
|
170
|
+
- uses: actions/checkout@v5
|
|
171
|
+
|
|
172
|
+
- name: set up python
|
|
173
|
+
uses: actions/setup-python@v6
|
|
174
|
+
with:
|
|
175
|
+
python-version: "3.13"
|
|
176
|
+
|
|
177
|
+
- run: pip install -U twine 'ruff==0.14.0'
|
|
178
|
+
|
|
179
|
+
# https://aws.github.io/aws-lc-rs/faq.html#can-i-run-aws-lc-rs-on-x-platform-or-architecture
|
|
180
|
+
- name: Setup aws-lc-rs
|
|
181
|
+
if: matrix.target == 'armv7' || matrix.target == 'ppc64le' || matrix.target == 's390x'
|
|
182
|
+
run: |
|
|
183
|
+
echo "REQUIRES_BINDGEN=1" >> $GITHUB_ENV
|
|
184
|
+
cargo add aws-lc-rs --features bindgen
|
|
185
|
+
|
|
186
|
+
- name: build wheels
|
|
187
|
+
uses: PyO3/maturin-action@v1
|
|
188
|
+
with:
|
|
189
|
+
target: ${{ matrix.target }}
|
|
190
|
+
manylinux: ${{ matrix.manylinux }}
|
|
191
|
+
args: --release --out dist --interpreter 3.11 3.12 3.13 3.14
|
|
192
|
+
rust-toolchain: stable
|
|
193
|
+
docker-options: -e CI
|
|
194
|
+
before-script-linux: |
|
|
195
|
+
[ "${{ env.REQUIRES_BINDGEN }}" == "1" ] && sudo apt-get update && sudo apt-get install -y gcc-multilib
|
|
196
|
+
|
|
197
|
+
- run: ${{ (matrix.os == 'windows' && 'dir') || 'ls -lh' }} dist/
|
|
198
|
+
|
|
199
|
+
- run: twine check --strict dist/*
|
|
200
|
+
|
|
201
|
+
- uses: actions/upload-artifact@v4
|
|
202
|
+
with:
|
|
203
|
+
name: pypi_files_${{ matrix.os }}_${{ matrix.target }}_${{ matrix.manylinux }}
|
|
204
|
+
path: dist
|
|
205
|
+
|
|
206
|
+
inspect-pypi-assets:
|
|
207
|
+
needs: [build, build-sdist]
|
|
208
|
+
runs-on: ubuntu-latest
|
|
209
|
+
|
|
210
|
+
steps:
|
|
211
|
+
- uses: actions/checkout@v5
|
|
212
|
+
|
|
213
|
+
- name: get dist artifacts
|
|
214
|
+
uses: actions/download-artifact@v5
|
|
215
|
+
with:
|
|
216
|
+
pattern: pypi_files_*
|
|
217
|
+
merge-multiple: true
|
|
218
|
+
path: dist
|
|
219
|
+
|
|
220
|
+
- name: list dist files
|
|
221
|
+
run: |
|
|
222
|
+
ls -lh dist/
|
|
223
|
+
ls -l dist/
|
|
224
|
+
echo "`ls dist | wc -l` files"
|
|
225
|
+
|
|
226
|
+
- name: extract and list sdist file
|
|
227
|
+
run: |
|
|
228
|
+
mkdir sdist-files
|
|
229
|
+
tar -xvf dist/*.tar.gz -C sdist-files
|
|
230
|
+
tree -a sdist-files
|
|
231
|
+
|
|
232
|
+
- name: extract and list wheel file
|
|
233
|
+
run: |
|
|
234
|
+
ls dist/*cp311-manylinux*x86_64.whl | head -n 1
|
|
235
|
+
python -m zipfile --list `ls dist/*cp311-manylinux*x86_64.whl | head -n 1`
|
|
236
|
+
|
|
237
|
+
test-builds-arch:
|
|
238
|
+
name: test build on ${{ matrix.target }}-${{ matrix.distro }}
|
|
239
|
+
needs: [build]
|
|
240
|
+
runs-on: ubuntu-latest
|
|
241
|
+
strategy:
|
|
242
|
+
fail-fast: false
|
|
243
|
+
matrix:
|
|
244
|
+
include:
|
|
245
|
+
- target: armv7
|
|
246
|
+
distro: ubuntu24.04
|
|
247
|
+
- target: aarch64
|
|
248
|
+
distro: alpine_latest
|
|
249
|
+
|
|
250
|
+
steps:
|
|
251
|
+
- uses: actions/checkout@v5
|
|
252
|
+
|
|
253
|
+
- name: get dist artifacts
|
|
254
|
+
uses: actions/download-artifact@v5
|
|
255
|
+
with:
|
|
256
|
+
pattern: pypi_files_linux_*
|
|
257
|
+
merge-multiple: true
|
|
258
|
+
path: dist
|
|
259
|
+
|
|
260
|
+
- uses: uraimo/run-on-arch-action@v3.0.1
|
|
261
|
+
name: install & test
|
|
262
|
+
with:
|
|
263
|
+
arch: ${{ matrix.target }}
|
|
264
|
+
distro: ${{ matrix.distro }}
|
|
265
|
+
githubToken: ${{ github.token }}
|
|
266
|
+
install: |
|
|
267
|
+
set -x
|
|
268
|
+
if command -v apt-get &> /dev/null; then
|
|
269
|
+
echo "installing python & pip with apt-get..."
|
|
270
|
+
apt-get update
|
|
271
|
+
apt-get install -y --no-install-recommends build-essential libffi-dev python3 python3-dev python3-pip python3-venv git curl
|
|
272
|
+
else
|
|
273
|
+
echo "installing python & pip with apk..."
|
|
274
|
+
apk update
|
|
275
|
+
apk add build-base libffi-dev python3 python3-dev py3-pip git curl
|
|
276
|
+
fi
|
|
277
|
+
env: |
|
|
278
|
+
UV_NO_PROGRESS: '1'
|
|
279
|
+
run: |
|
|
280
|
+
set -x
|
|
281
|
+
curl -LsSf https://astral.sh/uv/install.sh | sh
|
|
282
|
+
source $HOME/.local/bin/env
|
|
283
|
+
uv sync --frozen --no-group bench --no-install-project
|
|
284
|
+
uv pip install pyreqwest --no-index --no-deps --find-links dist --force-reinstall
|
|
285
|
+
uv run --no-sync pytest --ignore=tests/test_examples.py
|
|
286
|
+
|
|
287
|
+
test-builds-os:
|
|
288
|
+
name: test build on ${{ matrix.platform.os }}
|
|
289
|
+
needs: [build]
|
|
290
|
+
strategy:
|
|
291
|
+
fail-fast: false
|
|
292
|
+
matrix:
|
|
293
|
+
platform:
|
|
294
|
+
[
|
|
295
|
+
{ os: linux, runs-on: ubuntu-24.04 },
|
|
296
|
+
{ os: linux_aarch64, runs-on: ubuntu-24.04-arm },
|
|
297
|
+
{ os: windows, runs-on: windows-2025 },
|
|
298
|
+
{ os: windows_aarch64, runs-on: windows-11-arm },
|
|
299
|
+
{ os: macos, runs-on: macos-15 },
|
|
300
|
+
]
|
|
301
|
+
|
|
302
|
+
runs-on: ${{ matrix.platform.runs-on }}
|
|
303
|
+
steps:
|
|
304
|
+
- uses: actions/checkout@v5
|
|
305
|
+
- uses: astral-sh/setup-uv@v6
|
|
306
|
+
|
|
307
|
+
- name: get dist artifacts
|
|
308
|
+
uses: actions/download-artifact@v5
|
|
309
|
+
with:
|
|
310
|
+
pattern: pypi_files_*
|
|
311
|
+
merge-multiple: true
|
|
312
|
+
path: dist
|
|
313
|
+
|
|
314
|
+
- run: uv sync
|
|
315
|
+
- run: uv pip install pyreqwest --no-index --no-deps --find-links dist --force-reinstall
|
|
316
|
+
- run: uv run pytest
|
|
317
|
+
|
|
318
|
+
release:
|
|
319
|
+
needs: [test-builds-arch, test-builds-os, build-sdist, check]
|
|
320
|
+
if: always() && startsWith(github.ref, 'refs/tags/')
|
|
321
|
+
runs-on: ubuntu-latest
|
|
322
|
+
|
|
323
|
+
environment:
|
|
324
|
+
name: release
|
|
325
|
+
|
|
326
|
+
permissions:
|
|
327
|
+
id-token: write
|
|
328
|
+
contents: write
|
|
329
|
+
|
|
330
|
+
steps:
|
|
331
|
+
- uses: actions/checkout@v5
|
|
332
|
+
- uses: astral-sh/setup-uv@v6
|
|
333
|
+
|
|
334
|
+
- name: get dist artifacts
|
|
335
|
+
uses: actions/download-artifact@v5
|
|
336
|
+
with:
|
|
337
|
+
pattern: pypi_files_*
|
|
338
|
+
merge-multiple: true
|
|
339
|
+
path: dist
|
|
340
|
+
|
|
341
|
+
- run: uv publish --trusted-publishing always
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
name: Generate Github Pages docs
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
tags:
|
|
8
|
+
- 'v*'
|
|
9
|
+
|
|
10
|
+
permissions:
|
|
11
|
+
contents: write
|
|
12
|
+
|
|
13
|
+
jobs:
|
|
14
|
+
gen-docs:
|
|
15
|
+
concurrency: gen-docs
|
|
16
|
+
runs-on: ubuntu-latest
|
|
17
|
+
steps:
|
|
18
|
+
- uses: actions/checkout@v5
|
|
19
|
+
- uses: actions/setup-python@v6
|
|
20
|
+
with:
|
|
21
|
+
python-version: '3.13'
|
|
22
|
+
- uses: astral-sh/setup-uv@v6
|
|
23
|
+
|
|
24
|
+
- name: Build docs
|
|
25
|
+
run: make docs outdir=./docs/site/${{ github.ref_name }}
|
|
26
|
+
|
|
27
|
+
- name: Deploy Github Pages
|
|
28
|
+
uses: JamesIves/github-pages-deploy-action@v4
|
|
29
|
+
with:
|
|
30
|
+
folder: ./docs/site/${{ github.ref_name }}
|
|
31
|
+
branch: gh-pages-gen-docs
|
|
32
|
+
single-commit: true
|
|
33
|
+
clean: true
|
|
34
|
+
force: true
|