urlpattern 0.1.8__tar.gz → 0.1.9__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.
- {urlpattern-0.1.8 → urlpattern-0.1.9}/.github/workflows/CI.yml +2 -74
- {urlpattern-0.1.8 → urlpattern-0.1.9}/Cargo.lock +29 -68
- {urlpattern-0.1.8 → urlpattern-0.1.9}/Cargo.toml +3 -3
- {urlpattern-0.1.8 → urlpattern-0.1.9}/PKG-INFO +1 -1
- {urlpattern-0.1.8 → urlpattern-0.1.9}/src/lib.rs +9 -5
- {urlpattern-0.1.8 → urlpattern-0.1.9}/.devcontainer/devcontainer.json +0 -0
- {urlpattern-0.1.8 → urlpattern-0.1.9}/.github/dependabot.yml +0 -0
- {urlpattern-0.1.8 → urlpattern-0.1.9}/.gitignore +0 -0
- {urlpattern-0.1.8 → urlpattern-0.1.9}/.vscode/extensions.json +0 -0
- {urlpattern-0.1.8 → urlpattern-0.1.9}/.vscode/settings.json +0 -0
- {urlpattern-0.1.8 → urlpattern-0.1.9}/LICENSE +0 -0
- {urlpattern-0.1.8 → urlpattern-0.1.9}/README.md +0 -0
- {urlpattern-0.1.8 → urlpattern-0.1.9}/pyproject.toml +0 -0
- {urlpattern-0.1.8 → urlpattern-0.1.9}/tests/__init__.py +0 -0
- {urlpattern-0.1.8 → urlpattern-0.1.9}/tests/test_lib.py +0 -0
- {urlpattern-0.1.8 → urlpattern-0.1.9}/tests/urlpatterntestdata.json +0 -0
- {urlpattern-0.1.8 → urlpattern-0.1.9}/urlpattern.pyi +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
# This file is autogenerated by maturin v1.
|
|
1
|
+
# This file is autogenerated by maturin v1.12.0
|
|
2
2
|
# To update, run
|
|
3
3
|
#
|
|
4
|
-
# maturin generate-ci
|
|
4
|
+
# maturin generate-ci github
|
|
5
5
|
#
|
|
6
6
|
name: CI
|
|
7
7
|
|
|
@@ -53,31 +53,6 @@ jobs:
|
|
|
53
53
|
with:
|
|
54
54
|
name: wheels-linux-${{ matrix.platform.target }}
|
|
55
55
|
path: dist
|
|
56
|
-
- name: pytest
|
|
57
|
-
if: ${{ startsWith(matrix.platform.target, 'x86_64') }}
|
|
58
|
-
shell: bash
|
|
59
|
-
run: |
|
|
60
|
-
set -e
|
|
61
|
-
python3 -m venv .venv
|
|
62
|
-
source .venv/bin/activate
|
|
63
|
-
pip install urlpattern --find-links dist --force-reinstall
|
|
64
|
-
pip install pytest
|
|
65
|
-
pytest
|
|
66
|
-
- name: pytest
|
|
67
|
-
if: ${{ !startsWith(matrix.platform.target, 'x86') && matrix.platform.target != 'ppc64' }}
|
|
68
|
-
uses: uraimo/run-on-arch-action@v2
|
|
69
|
-
with:
|
|
70
|
-
arch: ${{ matrix.platform.target }}
|
|
71
|
-
distro: ubuntu22.04
|
|
72
|
-
githubToken: ${{ github.token }}
|
|
73
|
-
install: |
|
|
74
|
-
apt-get update
|
|
75
|
-
apt-get install -y --no-install-recommends python3 python3-pip
|
|
76
|
-
pip3 install -U pip pytest
|
|
77
|
-
run: |
|
|
78
|
-
set -e
|
|
79
|
-
pip3 install urlpattern --find-links dist --force-reinstall
|
|
80
|
-
pytest
|
|
81
56
|
|
|
82
57
|
musllinux:
|
|
83
58
|
runs-on: ${{ matrix.platform.runner }}
|
|
@@ -109,36 +84,6 @@ jobs:
|
|
|
109
84
|
with:
|
|
110
85
|
name: wheels-musllinux-${{ matrix.platform.target }}
|
|
111
86
|
path: dist
|
|
112
|
-
- name: pytest
|
|
113
|
-
if: ${{ startsWith(matrix.platform.target, 'x86_64') }}
|
|
114
|
-
uses: addnab/docker-run-action@v3
|
|
115
|
-
with:
|
|
116
|
-
image: alpine:latest
|
|
117
|
-
options: -v ${{ github.workspace }}:/io -w /io
|
|
118
|
-
run: |
|
|
119
|
-
set -e
|
|
120
|
-
apk add py3-pip py3-virtualenv
|
|
121
|
-
python3 -m virtualenv .venv
|
|
122
|
-
source .venv/bin/activate
|
|
123
|
-
pip install urlpattern --no-index --find-links dist --force-reinstall
|
|
124
|
-
pip install pytest
|
|
125
|
-
pytest
|
|
126
|
-
- name: pytest
|
|
127
|
-
if: ${{ !startsWith(matrix.platform.target, 'x86') }}
|
|
128
|
-
uses: uraimo/run-on-arch-action@v2
|
|
129
|
-
with:
|
|
130
|
-
arch: ${{ matrix.platform.target }}
|
|
131
|
-
distro: alpine_latest
|
|
132
|
-
githubToken: ${{ github.token }}
|
|
133
|
-
install: |
|
|
134
|
-
apk add py3-virtualenv
|
|
135
|
-
run: |
|
|
136
|
-
set -e
|
|
137
|
-
python3 -m virtualenv .venv
|
|
138
|
-
source .venv/bin/activate
|
|
139
|
-
pip install pytest
|
|
140
|
-
pip install urlpattern --find-links dist --force-reinstall
|
|
141
|
-
pytest
|
|
142
87
|
|
|
143
88
|
windows:
|
|
144
89
|
runs-on: ${{ matrix.platform.runner }}
|
|
@@ -171,15 +116,6 @@ jobs:
|
|
|
171
116
|
with:
|
|
172
117
|
name: wheels-windows-${{ matrix.platform.target }}
|
|
173
118
|
path: dist
|
|
174
|
-
- name: pytest
|
|
175
|
-
shell: bash
|
|
176
|
-
run: |
|
|
177
|
-
set -e
|
|
178
|
-
python3 -m venv .venv
|
|
179
|
-
source .venv/Scripts/activate
|
|
180
|
-
pip install urlpattern --find-links dist --force-reinstall
|
|
181
|
-
pip install pytest
|
|
182
|
-
pytest
|
|
183
119
|
|
|
184
120
|
macos:
|
|
185
121
|
runs-on: ${{ matrix.platform.runner }}
|
|
@@ -206,14 +142,6 @@ jobs:
|
|
|
206
142
|
with:
|
|
207
143
|
name: wheels-macos-${{ matrix.platform.target }}
|
|
208
144
|
path: dist
|
|
209
|
-
- name: pytest
|
|
210
|
-
run: |
|
|
211
|
-
set -e
|
|
212
|
-
python3 -m venv .venv
|
|
213
|
-
source .venv/bin/activate
|
|
214
|
-
pip install urlpattern --find-links dist --force-reinstall
|
|
215
|
-
pip install pytest
|
|
216
|
-
pytest
|
|
217
145
|
|
|
218
146
|
sdist:
|
|
219
147
|
runs-on: ubuntu-latest
|
|
@@ -11,12 +11,6 @@ dependencies = [
|
|
|
11
11
|
"memchr",
|
|
12
12
|
]
|
|
13
13
|
|
|
14
|
-
[[package]]
|
|
15
|
-
name = "autocfg"
|
|
16
|
-
version = "1.5.0"
|
|
17
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
18
|
-
checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8"
|
|
19
|
-
|
|
20
14
|
[[package]]
|
|
21
15
|
name = "displaydoc"
|
|
22
16
|
version = "0.2.5"
|
|
@@ -145,20 +139,11 @@ dependencies = [
|
|
|
145
139
|
"icu_properties",
|
|
146
140
|
]
|
|
147
141
|
|
|
148
|
-
[[package]]
|
|
149
|
-
name = "indoc"
|
|
150
|
-
version = "2.0.7"
|
|
151
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
152
|
-
checksum = "79cf5c93f93228cf8efb3ba362535fb11199ac548a09ce117c9b1adc3030d706"
|
|
153
|
-
dependencies = [
|
|
154
|
-
"rustversion",
|
|
155
|
-
]
|
|
156
|
-
|
|
157
142
|
[[package]]
|
|
158
143
|
name = "libc"
|
|
159
|
-
version = "0.2.
|
|
144
|
+
version = "0.2.182"
|
|
160
145
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
161
|
-
checksum = "
|
|
146
|
+
checksum = "6800badb6cb2082ffd7b6a67e6125bb39f18782f793520caee8cb8846be06112"
|
|
162
147
|
|
|
163
148
|
[[package]]
|
|
164
149
|
name = "litemap"
|
|
@@ -168,18 +153,9 @@ checksum = "6373607a59f0be73a39b6fe456b8192fcc3585f602af20751600e974dd455e77"
|
|
|
168
153
|
|
|
169
154
|
[[package]]
|
|
170
155
|
name = "memchr"
|
|
171
|
-
version = "2.
|
|
156
|
+
version = "2.8.0"
|
|
172
157
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
173
|
-
checksum = "
|
|
174
|
-
|
|
175
|
-
[[package]]
|
|
176
|
-
name = "memoffset"
|
|
177
|
-
version = "0.9.1"
|
|
178
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
179
|
-
checksum = "488016bfae457b036d996092f6cb448677611ce4449e970ceaf42695203f218a"
|
|
180
|
-
dependencies = [
|
|
181
|
-
"autocfg",
|
|
182
|
-
]
|
|
158
|
+
checksum = "f8ca58f447f06ed17d5fc4043ce1b10dd205e060fb3ce5b979b8ed8e59ff3f79"
|
|
183
159
|
|
|
184
160
|
[[package]]
|
|
185
161
|
name = "once_cell"
|
|
@@ -195,9 +171,9 @@ checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220"
|
|
|
195
171
|
|
|
196
172
|
[[package]]
|
|
197
173
|
name = "portable-atomic"
|
|
198
|
-
version = "1.13.
|
|
174
|
+
version = "1.13.1"
|
|
199
175
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
200
|
-
checksum = "
|
|
176
|
+
checksum = "c33a9471896f1c69cecef8d20cbe2f7accd12527ce60845ff44c153bb2a21b49"
|
|
201
177
|
|
|
202
178
|
[[package]]
|
|
203
179
|
name = "potential_utf"
|
|
@@ -219,35 +195,32 @@ dependencies = [
|
|
|
219
195
|
|
|
220
196
|
[[package]]
|
|
221
197
|
name = "pyo3"
|
|
222
|
-
version = "0.
|
|
198
|
+
version = "0.28.1"
|
|
223
199
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
224
|
-
checksum = "
|
|
200
|
+
checksum = "14c738662e2181be11cb82487628404254902bb3225d8e9e99c31f3ef82a405c"
|
|
225
201
|
dependencies = [
|
|
226
|
-
"indoc",
|
|
227
202
|
"libc",
|
|
228
|
-
"memoffset",
|
|
229
203
|
"once_cell",
|
|
230
204
|
"portable-atomic",
|
|
231
205
|
"pyo3-build-config",
|
|
232
206
|
"pyo3-ffi",
|
|
233
207
|
"pyo3-macros",
|
|
234
|
-
"unindent",
|
|
235
208
|
]
|
|
236
209
|
|
|
237
210
|
[[package]]
|
|
238
211
|
name = "pyo3-build-config"
|
|
239
|
-
version = "0.
|
|
212
|
+
version = "0.28.1"
|
|
240
213
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
241
|
-
checksum = "
|
|
214
|
+
checksum = "f9ca0864a7dd3c133a7f3f020cbff2e12e88420da854c35540fd20ce2d60e435"
|
|
242
215
|
dependencies = [
|
|
243
216
|
"target-lexicon",
|
|
244
217
|
]
|
|
245
218
|
|
|
246
219
|
[[package]]
|
|
247
220
|
name = "pyo3-ffi"
|
|
248
|
-
version = "0.
|
|
221
|
+
version = "0.28.1"
|
|
249
222
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
250
|
-
checksum = "
|
|
223
|
+
checksum = "9dfc1956b709823164763a34cc42bbfd26b8730afa77809a3df8b94a3ae3b059"
|
|
251
224
|
dependencies = [
|
|
252
225
|
"libc",
|
|
253
226
|
"pyo3-build-config",
|
|
@@ -255,9 +228,9 @@ dependencies = [
|
|
|
255
228
|
|
|
256
229
|
[[package]]
|
|
257
230
|
name = "pyo3-macros"
|
|
258
|
-
version = "0.
|
|
231
|
+
version = "0.28.1"
|
|
259
232
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
260
|
-
checksum = "
|
|
233
|
+
checksum = "29dc660ad948bae134d579661d08033fbb1918f4529c3bbe3257a68f2009ddf2"
|
|
261
234
|
dependencies = [
|
|
262
235
|
"proc-macro2",
|
|
263
236
|
"pyo3-macros-backend",
|
|
@@ -267,9 +240,9 @@ dependencies = [
|
|
|
267
240
|
|
|
268
241
|
[[package]]
|
|
269
242
|
name = "pyo3-macros-backend"
|
|
270
|
-
version = "0.
|
|
243
|
+
version = "0.28.1"
|
|
271
244
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
272
|
-
checksum = "
|
|
245
|
+
checksum = "e78cd6c6d718acfcedf26c3d21fe0f053624368b0d44298c55d7138fde9331f7"
|
|
273
246
|
dependencies = [
|
|
274
247
|
"heck",
|
|
275
248
|
"proc-macro2",
|
|
@@ -280,7 +253,7 @@ dependencies = [
|
|
|
280
253
|
|
|
281
254
|
[[package]]
|
|
282
255
|
name = "python-urlpattern"
|
|
283
|
-
version = "0.1.
|
|
256
|
+
version = "0.1.9"
|
|
284
257
|
dependencies = [
|
|
285
258
|
"pyo3",
|
|
286
259
|
"urlpattern",
|
|
@@ -297,9 +270,9 @@ dependencies = [
|
|
|
297
270
|
|
|
298
271
|
[[package]]
|
|
299
272
|
name = "regex"
|
|
300
|
-
version = "1.12.
|
|
273
|
+
version = "1.12.3"
|
|
301
274
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
302
|
-
checksum = "
|
|
275
|
+
checksum = "e10754a14b9137dd7b1e3e5b0493cc9171fdd105e0ab477f51b72e7f3ac0e276"
|
|
303
276
|
dependencies = [
|
|
304
277
|
"aho-corasick",
|
|
305
278
|
"memchr",
|
|
@@ -309,9 +282,9 @@ dependencies = [
|
|
|
309
282
|
|
|
310
283
|
[[package]]
|
|
311
284
|
name = "regex-automata"
|
|
312
|
-
version = "0.4.
|
|
285
|
+
version = "0.4.14"
|
|
313
286
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
314
|
-
checksum = "
|
|
287
|
+
checksum = "6e1dd4122fc1595e8162618945476892eefca7b88c52820e74af6262213cae8f"
|
|
315
288
|
dependencies = [
|
|
316
289
|
"aho-corasick",
|
|
317
290
|
"memchr",
|
|
@@ -320,15 +293,9 @@ dependencies = [
|
|
|
320
293
|
|
|
321
294
|
[[package]]
|
|
322
295
|
name = "regex-syntax"
|
|
323
|
-
version = "0.8.
|
|
296
|
+
version = "0.8.9"
|
|
324
297
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
325
|
-
checksum = "
|
|
326
|
-
|
|
327
|
-
[[package]]
|
|
328
|
-
name = "rustversion"
|
|
329
|
-
version = "1.0.22"
|
|
330
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
331
|
-
checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d"
|
|
298
|
+
checksum = "a96887878f22d7bad8a3b6dc5b7440e0ada9a245242924394987b21cf2210a4c"
|
|
332
299
|
|
|
333
300
|
[[package]]
|
|
334
301
|
name = "serde"
|
|
@@ -374,9 +341,9 @@ checksum = "6ce2be8dc25455e1f91df71bfa12ad37d7af1092ae736f3a6cd0e37bc7810596"
|
|
|
374
341
|
|
|
375
342
|
[[package]]
|
|
376
343
|
name = "syn"
|
|
377
|
-
version = "2.0.
|
|
344
|
+
version = "2.0.115"
|
|
378
345
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
379
|
-
checksum = "
|
|
346
|
+
checksum = "6e614ed320ac28113fa64972c4262d5dbc89deacdfd00c34a3e4cea073243c12"
|
|
380
347
|
dependencies = [
|
|
381
348
|
"proc-macro2",
|
|
382
349
|
"quote",
|
|
@@ -412,15 +379,9 @@ dependencies = [
|
|
|
412
379
|
|
|
413
380
|
[[package]]
|
|
414
381
|
name = "unicode-ident"
|
|
415
|
-
version = "1.0.
|
|
416
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
417
|
-
checksum = "9312f7c4f6ff9069b165498234ce8be658059c6728633667c526e27dc2cf1df5"
|
|
418
|
-
|
|
419
|
-
[[package]]
|
|
420
|
-
name = "unindent"
|
|
421
|
-
version = "0.2.4"
|
|
382
|
+
version = "1.0.23"
|
|
422
383
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
423
|
-
checksum = "
|
|
384
|
+
checksum = "537dd038a89878be9b64dd4bd1b260315c1bb94f4d784956b81e27a088d9a09e"
|
|
424
385
|
|
|
425
386
|
[[package]]
|
|
426
387
|
name = "url"
|
|
@@ -436,9 +397,9 @@ dependencies = [
|
|
|
436
397
|
|
|
437
398
|
[[package]]
|
|
438
399
|
name = "urlpattern"
|
|
439
|
-
version = "0.
|
|
400
|
+
version = "0.6.0"
|
|
440
401
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
441
|
-
checksum = "
|
|
402
|
+
checksum = "df16f50ef4cc145211879a3867ba757076b25dfee812040dcb0658bd9ae7904b"
|
|
442
403
|
dependencies = [
|
|
443
404
|
"icu_properties",
|
|
444
405
|
"regex",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[package]
|
|
2
2
|
name = "python-urlpattern"
|
|
3
|
-
version = "0.1.
|
|
3
|
+
version = "0.1.9"
|
|
4
4
|
authors = ["방성범 (Bang Seongbeom) <bangseongbeom@gmail.com>"]
|
|
5
5
|
edition = "2024"
|
|
6
6
|
description = "An implementation of the URL Pattern Standard for Python written in Rust."
|
|
@@ -15,5 +15,5 @@ readme = "README.md"
|
|
|
15
15
|
crate-type = ["cdylib"]
|
|
16
16
|
|
|
17
17
|
[dependencies]
|
|
18
|
-
pyo3 = "0.
|
|
19
|
-
deno_urlpattern = { package = "urlpattern", version = "0.
|
|
18
|
+
pyo3 = "0.28.0"
|
|
19
|
+
deno_urlpattern = { package = "urlpattern", version = "0.6.0" }
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
#![allow(non_snake_case)]
|
|
2
2
|
|
|
3
|
+
use std::borrow::Cow;
|
|
3
4
|
use std::collections::HashMap;
|
|
4
5
|
|
|
5
6
|
use pyo3::{
|
|
@@ -201,13 +202,13 @@ pub enum UrlPatternInput<'py> {
|
|
|
201
202
|
Init(Bound<'py, PyDict>),
|
|
202
203
|
}
|
|
203
204
|
|
|
204
|
-
impl<'py> TryFrom<UrlPatternInput<'py>> for deno_urlpattern::quirks::StringOrInit {
|
|
205
|
+
impl<'py> TryFrom<UrlPatternInput<'py>> for deno_urlpattern::quirks::StringOrInit<'static> {
|
|
205
206
|
type Error = pyo3::PyErr;
|
|
206
207
|
|
|
207
208
|
fn try_from(input: UrlPatternInput<'py>) -> Result<Self, Self::Error> {
|
|
208
209
|
Ok(match input {
|
|
209
210
|
UrlPatternInput::String(pattern) => {
|
|
210
|
-
deno_urlpattern::quirks::StringOrInit::String(pattern)
|
|
211
|
+
deno_urlpattern::quirks::StringOrInit::String(Cow::Owned(pattern))
|
|
211
212
|
}
|
|
212
213
|
UrlPatternInput::Init(init) => deno_urlpattern::quirks::StringOrInit::Init(
|
|
213
214
|
deno_urlpattern::quirks::UrlPatternInit {
|
|
@@ -254,7 +255,10 @@ impl<'py> TryFrom<UrlPatternInput<'py>> for deno_urlpattern::quirks::StringOrIni
|
|
|
254
255
|
}
|
|
255
256
|
|
|
256
257
|
pub struct UrlPatternResult {
|
|
257
|
-
pub inputs: (
|
|
258
|
+
pub inputs: (
|
|
259
|
+
deno_urlpattern::quirks::StringOrInit<'static>,
|
|
260
|
+
Option<String>,
|
|
261
|
+
),
|
|
258
262
|
pub protocol: UrlPatternComponentResult,
|
|
259
263
|
pub username: UrlPatternComponentResult,
|
|
260
264
|
pub password: UrlPatternComponentResult,
|
|
@@ -278,7 +282,7 @@ impl<'py> IntoPyObject<'py> for UrlPatternResult {
|
|
|
278
282
|
|
|
279
283
|
match string_or_init {
|
|
280
284
|
deno_urlpattern::quirks::StringOrInit::String(string) => {
|
|
281
|
-
list.append(string).unwrap();
|
|
285
|
+
list.append(string.into_owned()).unwrap();
|
|
282
286
|
}
|
|
283
287
|
deno_urlpattern::quirks::StringOrInit::Init(init) => {
|
|
284
288
|
let init_dict = PyDict::new(py);
|
|
@@ -353,7 +357,7 @@ impl From<deno_urlpattern::Error> for Error {
|
|
|
353
357
|
}
|
|
354
358
|
|
|
355
359
|
/// A Python module implemented in Rust.
|
|
356
|
-
#[pymodule
|
|
360
|
+
#[pymodule]
|
|
357
361
|
mod urlpattern {
|
|
358
362
|
#[pymodule_export]
|
|
359
363
|
use super::UrlPattern;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|