uritools 6.1.2__tar.gz → 6.1.3__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.
- {uritools-6.1.2 → uritools-6.1.3}/CHANGELOG.rst +8 -0
- {uritools-6.1.2/src/uritools.egg-info → uritools-6.1.3}/PKG-INFO +1 -1
- uritools-6.1.3/docs/conf.py +18 -0
- {uritools-6.1.2 → uritools-6.1.3}/pyproject.toml +3 -0
- {uritools-6.1.2 → uritools-6.1.3}/src/uritools/__init__.py +1 -1
- {uritools-6.1.2 → uritools-6.1.3}/src/uritools/__init__.pyi +1 -2
- {uritools-6.1.2 → uritools-6.1.3/src/uritools.egg-info}/PKG-INFO +1 -1
- {uritools-6.1.2 → uritools-6.1.3}/tests/test_compose.py +7 -7
- {uritools-6.1.2 → uritools-6.1.3}/tests/test_defrag.py +1 -1
- {uritools-6.1.2 → uritools-6.1.3}/tests/test_encoding.py +1 -1
- {uritools-6.1.2 → uritools-6.1.3}/tox.ini +7 -10
- uritools-6.1.2/docs/conf.py +0 -36
- {uritools-6.1.2 → uritools-6.1.3}/LICENSE +0 -0
- {uritools-6.1.2 → uritools-6.1.3}/MANIFEST.in +0 -0
- {uritools-6.1.2 → uritools-6.1.3}/README.rst +0 -0
- {uritools-6.1.2 → uritools-6.1.3}/docs/index.rst +0 -0
- {uritools-6.1.2 → uritools-6.1.3}/setup.cfg +0 -0
- {uritools-6.1.2 → uritools-6.1.3}/src/uritools/py.typed +0 -0
- {uritools-6.1.2 → uritools-6.1.3}/src/uritools.egg-info/SOURCES.txt +0 -0
- {uritools-6.1.2 → uritools-6.1.3}/src/uritools.egg-info/dependency_links.txt +0 -0
- {uritools-6.1.2 → uritools-6.1.3}/src/uritools.egg-info/top_level.txt +0 -0
- {uritools-6.1.2 → uritools-6.1.3}/tests/__init__.py +0 -0
- {uritools-6.1.2 → uritools-6.1.3}/tests/test_classify.py +0 -0
- {uritools-6.1.2 → uritools-6.1.3}/tests/test_join.py +0 -0
- {uritools-6.1.2 → uritools-6.1.3}/tests/test_split.py +0 -0
- {uritools-6.1.2 → uritools-6.1.3}/tests/test_unsplit.py +0 -0
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import importlib.metadata
|
|
2
|
+
|
|
3
|
+
project = "uritools"
|
|
4
|
+
copyright = "2014-2026 Thomas Kemmer"
|
|
5
|
+
release = importlib.metadata.version(project)
|
|
6
|
+
version = ".".join(release.split(".")[:2])
|
|
7
|
+
|
|
8
|
+
extensions = [
|
|
9
|
+
"sphinx.ext.autodoc",
|
|
10
|
+
"sphinx.ext.coverage",
|
|
11
|
+
"sphinx.ext.doctest",
|
|
12
|
+
"sphinx.ext.intersphinx",
|
|
13
|
+
"sphinx.ext.todo",
|
|
14
|
+
]
|
|
15
|
+
exclude_patterns = ["_build"]
|
|
16
|
+
master_doc = "index"
|
|
17
|
+
html_theme = "classic"
|
|
18
|
+
intersphinx_mapping = {"python": ("https://docs.python.org/3", None)}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import ipaddress
|
|
2
2
|
from collections.abc import Iterable, Mapping, Sequence
|
|
3
|
-
from typing import Any, AnyStr, Generic, NamedTuple, overload
|
|
4
|
-
from typing_extensions import TypeAlias
|
|
3
|
+
from typing import Any, AnyStr, Generic, NamedTuple, TypeAlias, overload
|
|
5
4
|
|
|
6
5
|
__all__ = [
|
|
7
6
|
"GEN_DELIMS",
|
|
@@ -212,13 +212,13 @@ class ComposeTest(unittest.TestCase):
|
|
|
212
212
|
("?name=foo&type=bar", od([("name", "foo"), ("type", "bar")])),
|
|
213
213
|
("?name=foo&name=bar", [("name", "foo"), ("name", "bar")]),
|
|
214
214
|
("?name=foo&name=bar", {"name": ["foo", "bar"]}),
|
|
215
|
-
("?name=a/b/c",
|
|
216
|
-
("?name=a:b:c",
|
|
217
|
-
("?name=a?b?c",
|
|
218
|
-
("?name=a@b@c",
|
|
219
|
-
("?name=a;b;c",
|
|
220
|
-
("?name=a%23b%23c",
|
|
221
|
-
("?name=a%26b%26c",
|
|
215
|
+
("?name=a/b/c", {"name": "a/b/c"}),
|
|
216
|
+
("?name=a:b:c", {"name": "a:b:c"}),
|
|
217
|
+
("?name=a?b?c", {"name": "a?b?c"}),
|
|
218
|
+
("?name=a@b@c", {"name": "a@b@c"}),
|
|
219
|
+
("?name=a;b;c", {"name": "a;b;c"}),
|
|
220
|
+
("?name=a%23b%23c", {"name": "a#b#c"}),
|
|
221
|
+
("?name=a%26b%26c", {"name": "a&b&c"}),
|
|
222
222
|
]
|
|
223
223
|
for uri, query in cases:
|
|
224
224
|
self.check(uri, query=query)
|
|
@@ -23,7 +23,7 @@ class DefragTest(unittest.TestCase):
|
|
|
23
23
|
def encode(s):
|
|
24
24
|
return s.encode() if s is not None else None
|
|
25
25
|
|
|
26
|
-
cases +=
|
|
26
|
+
cases += [map(encode, case) for case in cases]
|
|
27
27
|
|
|
28
28
|
for uri, base, fragment in cases:
|
|
29
29
|
defrag = uridefrag(uri)
|
|
@@ -8,7 +8,7 @@ class EncodingTest(unittest.TestCase):
|
|
|
8
8
|
self.assertEqual(uriencode(decoded, safe, encoding), encoded)
|
|
9
9
|
self.assertEqual(uridecode(encoded, encoding), decoded)
|
|
10
10
|
# swap bytes/string types
|
|
11
|
-
self.assertEqual(uriencode(decoded.encode(encoding), safe, encoding), encoded)
|
|
11
|
+
self.assertEqual(uriencode(decoded.encode(encoding), safe, encoding), encoded)
|
|
12
12
|
self.assertEqual(uridecode(encoded.decode("ascii"), encoding), decoded)
|
|
13
13
|
|
|
14
14
|
def test_encoding(self):
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
[tox]
|
|
2
|
-
envlist = py,docs,doctest,ruff,ruff-format
|
|
2
|
+
envlist = py,docs,doctest,pyright,ruff,ruff-format
|
|
3
3
|
|
|
4
4
|
[testenv]
|
|
5
5
|
deps =
|
|
@@ -20,23 +20,20 @@ deps =
|
|
|
20
20
|
commands =
|
|
21
21
|
sphinx-build -W -b doctest -d {envtmpdir}/doctrees docs {envtmpdir}/doctest
|
|
22
22
|
|
|
23
|
+
[testenv:pyright]
|
|
24
|
+
deps =
|
|
25
|
+
pyright
|
|
26
|
+
commands =
|
|
27
|
+
pyright {posargs}
|
|
28
|
+
|
|
23
29
|
[testenv:ruff]
|
|
24
30
|
deps =
|
|
25
31
|
ruff
|
|
26
32
|
commands =
|
|
27
33
|
ruff check {posargs}
|
|
28
|
-
skip_install = true
|
|
29
34
|
|
|
30
35
|
[testenv:ruff-format]
|
|
31
36
|
deps =
|
|
32
37
|
ruff
|
|
33
38
|
commands =
|
|
34
39
|
ruff format --diff -q {posargs}
|
|
35
|
-
skip_install = true
|
|
36
|
-
|
|
37
|
-
[testenv:pyright]
|
|
38
|
-
deps =
|
|
39
|
-
pyright
|
|
40
|
-
commands =
|
|
41
|
-
pyright {posargs}
|
|
42
|
-
skip_install = true
|
uritools-6.1.2/docs/conf.py
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import pathlib
|
|
2
|
-
import sys
|
|
3
|
-
|
|
4
|
-
src_directory = (pathlib.Path(__file__).parent.parent / "src").resolve()
|
|
5
|
-
sys.path.insert(0, str(src_directory))
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
# Extract the current version from the source.
|
|
9
|
-
def get_version():
|
|
10
|
-
"""Get the version and release from the source code."""
|
|
11
|
-
|
|
12
|
-
text = (src_directory / "uritools/__init__.py").read_text()
|
|
13
|
-
for line in text.splitlines():
|
|
14
|
-
if not line.strip().startswith("__version__"):
|
|
15
|
-
continue
|
|
16
|
-
full_version = line.partition("=")[2].strip().strip("\"'")
|
|
17
|
-
partial_version = ".".join(full_version.split(".")[:2])
|
|
18
|
-
return full_version, partial_version
|
|
19
|
-
return (None, None)
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
project = "uritools"
|
|
23
|
-
copyright = "2014-2026 Thomas Kemmer"
|
|
24
|
-
release, version = get_version()
|
|
25
|
-
|
|
26
|
-
extensions = [
|
|
27
|
-
"sphinx.ext.autodoc",
|
|
28
|
-
"sphinx.ext.coverage",
|
|
29
|
-
"sphinx.ext.doctest",
|
|
30
|
-
"sphinx.ext.intersphinx",
|
|
31
|
-
"sphinx.ext.todo",
|
|
32
|
-
]
|
|
33
|
-
exclude_patterns = ["_build"]
|
|
34
|
-
master_doc = "index"
|
|
35
|
-
html_theme = "classic"
|
|
36
|
-
intersphinx_mapping = {"python": ("https://docs.python.org/3", None)}
|
|
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
|
|
File without changes
|
|
File without changes
|