New upstream snapshot.
Debian Janitor
2 years ago
0 | 0 | [run] |
1 | 1 | branch = True |
2 | 2 | omit = */flycheck_* |
3 | ||
4 | [report] | |
5 | precision = 2 | |
6 | exclude_lines = | |
7 | if TYPE_CHECKING | |
8 | \s*\.\.\.$ |
0 | 0 | # Hyperlink Changelog |
1 | ||
2 | ## Next | |
3 | ||
4 | * CPython 3.9 added to test matrix | |
5 | ||
6 | ## 21.0.0 | |
7 | ||
8 | *(January 7, 2021)* | |
9 | ||
10 | * Update plus sign (`+`) handling to work with/like HTML form encoding | |
11 | (`POST`) by default, fixes [#129][i129], and associated roundtripping ([#146][i146]). | |
12 | * Package IDNA tables. ([#134][i134]) | |
13 | * Long overdue dependency bumps | |
14 | ||
15 | [i129]: https://github.com/python-hyper/hyperlink/issues/129 | |
16 | [i134]: https://github.com/python-hyper/hyperlink/issues/134 | |
17 | [i146]: https://github.com/python-hyper/hyperlink/issues/146 | |
1 | 18 | |
2 | 19 | ## 20.0.1 |
3 | 20 |
0 | 0 | Metadata-Version: 1.2 |
1 | 1 | Name: hyperlink |
2 | Version: 21.0.0 | |
2 | Version: 21.0.1.dev0 | |
3 | 3 | Summary: A featureful, immutable, and correct URL for Python. |
4 | 4 | Home-page: https://github.com/python-hyper/hyperlink |
5 | 5 | Author: Mahmoud Hashemi and Glyph Lefkowitz |
0 | hyperlink (21.0.0-2) UNRELEASED; urgency=medium | |
0 | hyperlink (21.0.0+git20210808.1.ec7d172-1) UNRELEASED; urgency=medium | |
1 | 1 | |
2 | 2 | * Bump debhelper from old 12 to 13. |
3 | 3 | * Update standards version to 4.5.1, no changes needed. |
4 | * New upstream snapshot. | |
4 | 5 | |
5 | -- Debian Janitor <janitor@jelmer.uk> Thu, 26 Aug 2021 04:14:04 -0000 | |
6 | -- Debian Janitor <janitor@jelmer.uk> Fri, 03 Sep 2021 11:14:17 -0000 | |
6 | 7 | |
7 | 8 | hyperlink (21.0.0-1) experimental; urgency=medium |
8 | 9 |
60 | 60 | |
61 | 61 | # General information about the project. |
62 | 62 | project = u'hyperlink' |
63 | copyright = u'2018, Mahmoud Hashemi' | |
63 | copyright = u'2021, Mahmoud Hashemi' | |
64 | 64 | author = u'Mahmoud Hashemi' |
65 | 65 | |
66 | version = '20.0' | |
67 | release = '20.0.1' | |
66 | version = '21.0' | |
67 | release = '21.0.0' | |
68 | 68 | |
69 | 69 | if os.name != 'nt': |
70 | 70 | today_fmt = '%B %d, %Y' |
10 | 10 | |
11 | 11 | |
12 | 12 | __author__ = "Mahmoud Hashemi and Glyph Lefkowitz" |
13 | __version__ = "21.0.0" | |
13 | __version__ = "21.0.1dev" | |
14 | 14 | __contact__ = "mahmoud@hatnote.com" |
15 | 15 | __url__ = "https://github.com/python-hyper/hyperlink" |
16 | 16 | __license__ = "MIT" |
42 | 42 | TypeVar, |
43 | 43 | Union, |
44 | 44 | cast, |
45 | TYPE_CHECKING, | |
46 | overload, | |
45 | 47 | ) |
46 | 48 | from unicodedata import normalize |
47 | 49 | from ._socket import inet_pton |
64 | 66 | QueryParameters = Union[ |
65 | 67 | Mapping[Text, Optional[Text]], |
66 | 68 | QueryPairs, |
67 | Sequence[Tuple[Text, Optional[Text]]], | |
69 | Iterable[Tuple[Text, Optional[Text]]], | |
68 | 70 | ] |
69 | 71 | T = TypeVar("T") |
72 | # Literal is not available in all pythons so we only bring it in for mypy. | |
73 | if TYPE_CHECKING: | |
74 | from typing import Literal | |
70 | 75 | |
71 | 76 | |
72 | 77 | # from boltons.typeutils |
224 | 229 | _QUERY_KEY_QUOTE_MAP = _make_quote_map(_QUERY_KEY_SAFE) |
225 | 230 | _QUERY_KEY_DECODE_MAP = _make_decode_map(_QUERY_KEY_DELIMS) |
226 | 231 | _QUERY_VALUE_QUOTE_MAP = _make_quote_map(_QUERY_VALUE_SAFE) |
227 | _QUERY_VALUE_DECODE_MAP = _make_decode_map(_QUERY_VALUE_DELIMS) | |
232 | _QUERY_VALUE_DECODE_MAP = _make_decode_map(_QUERY_VALUE_DELIMS | set("+")) | |
228 | 233 | _FRAGMENT_QUOTE_MAP = _make_quote_map(_FRAGMENT_SAFE) |
229 | 234 | _FRAGMENT_DECODE_MAP = _make_decode_map(_FRAGMENT_DELIMS) |
230 | 235 | _UNRESERVED_QUOTE_MAP = _make_quote_map(_UNRESERVED_CHARS) |
2414 | 2419 | # # End Twisted Compat Code |
2415 | 2420 | |
2416 | 2421 | |
2422 | # Add some overloads so that parse gives a better return value. | |
2423 | @overload | |
2424 | def parse(url, decoded, lazy=False): | |
2425 | # type: (Text, Literal[False], bool) -> URL | |
2426 | """Passing decoded=False returns URL.""" | |
2427 | ||
2428 | ||
2429 | @overload | |
2430 | def parse(url, decoded=True, lazy=False): | |
2431 | # type: (Text, Literal[True], bool) -> DecodedURL | |
2432 | """Passing decoded=True (or the default value) returns DecodedURL.""" | |
2433 | ||
2434 | ||
2435 | @overload | |
2436 | def parse(url, decoded=True, lazy=False): | |
2437 | # type: (Text, bool, bool) -> Union[URL, DecodedURL] | |
2438 | """If decoded is not a literal we don't know the return type.""" | |
2439 | ||
2440 | ||
2417 | 2441 | def parse(url, decoded=True, lazy=False): |
2418 | 2442 | # type: (Text, bool, bool) -> Union[URL, DecodedURL] |
2419 | 2443 | """ |
34 | 34 | |
35 | 35 | assert durl.user == "user" |
36 | 36 | assert durl.userinfo == ("user", "\0\0\0\0") |
37 | ||
38 | def test_roundtrip_iri_parameter_values(self): | |
39 | # type: () -> None | |
40 | """ | |
41 | .to_iri() should never modify the application-level data of a query | |
42 | parameter. | |
43 | """ | |
44 | for value in ["hello", "goodbye", "+", "/", ":", "?"]: | |
45 | self.assertEqual( | |
46 | DecodedURL(DecodedURL().set("test", value).to_iri()).get( | |
47 | "test" | |
48 | ), | |
49 | [value], | |
50 | ) | |
51 | ||
52 | def test_roundtrip_uri_parameter_values(self): | |
53 | # type: () -> None | |
54 | """ | |
55 | .to_uri() should never modify the application-level data of a query | |
56 | parameter. | |
57 | """ | |
58 | for value in ["hello", "goodbye", "+", "/", ":", "?"]: | |
59 | self.assertEqual( | |
60 | DecodedURL(DecodedURL().set("test", value).to_uri()).get( | |
61 | "test" | |
62 | ), | |
63 | [value], | |
64 | ) | |
37 | 65 | |
38 | 66 | def test_passthroughs(self): |
39 | 67 | # type: () -> None |
0 | 0 | Metadata-Version: 1.2 |
1 | 1 | Name: hyperlink |
2 | Version: 21.0.0 | |
2 | Version: 21.0.1.dev0 | |
3 | 3 | Summary: A featureful, immutable, and correct URL for Python. |
4 | 4 | Home-page: https://github.com/python-hyper/hyperlink |
5 | 5 | Author: Mahmoud Hashemi and Glyph Lefkowitz |
0 | 0 | [tox] |
1 | 1 | |
2 | 2 | envlist = |
3 | flake8, mypy, black | |
4 | test-py{26,27,34,35,36,37,38,py2,py3} | |
3 | flake8, black, mypy | |
4 | test-py{26,27,34,35,36,37,38,39,py2,py3} | |
5 | 5 | coverage_report |
6 | 6 | docs |
7 | 7 | packaging |
11 | 11 | |
12 | 12 | [default] |
13 | 13 | |
14 | basepython = python3.8 | |
15 | ||
16 | deps = | |
17 | idna==2.9 | |
14 | basepython = python3.9 | |
15 | ||
16 | deps = | |
17 | idna==2.9 # rq.filter: <3 | |
18 | 18 | |
19 | 19 | setenv = |
20 | 20 | PY_MODULE=hyperlink |
31 | 31 | description = run tests |
32 | 32 | |
33 | 33 | basepython = |
34 | py: python | |
35 | ||
34 | 36 | py26: python2.6 |
35 | 37 | py27: python2.7 |
36 | 38 | py34: python3.4 |
39 | 41 | py37: python3.7 |
40 | 42 | py38: python3.8 |
41 | 43 | py39: python3.9 |
44 | py310: python3.10 | |
42 | 45 | |
43 | 46 | pypy2: pypy |
44 | 47 | pypy3: pypy3 |
47 | 50 | {[default]deps} |
48 | 51 | |
49 | 52 | # In Python 2, we need to pull in typing, mock |
50 | py{26,27,py2}: typing==3.7.4.3 | |
53 | py{26,27,py2}: typing==3.10.0.0 | |
51 | 54 | py{26,27,py2}: mock==3.0.5 # rq.filter: <4 |
52 | 55 | |
53 | 56 | # For pytest |
73 | 76 | |
74 | 77 | commands = |
75 | 78 | pytest --cov={env:PY_MODULE} --cov-report=term-missing:skip-covered --doctest-modules {posargs:src/{env:PY_MODULE}} |
79 | coverage_xml: coverage xml | |
76 | 80 | |
77 | 81 | |
78 | 82 | ## |
88 | 92 | skip_install = True |
89 | 93 | |
90 | 94 | deps = |
91 | black==20.8b1 | |
95 | black==21.7b0 | |
92 | 96 | |
93 | 97 | setenv = |
94 | 98 | BLACK_LINT_ARGS=--check |
119 | 123 | skip_install = True |
120 | 124 | |
121 | 125 | deps = |
122 | flake8-bugbear==20.11.1 | |
123 | flake8==3.8.4 | |
126 | flake8-bugbear==21.4.3 | |
127 | flake8==3.9.2 | |
124 | 128 | mccabe==0.6.1 |
125 | pep8-naming==0.11.1 | |
126 | pycodestyle==2.6.0 | |
127 | pydocstyle==5.1.1 | |
128 | pyflakes==2.2.0 | |
129 | pep8-naming==0.12.1 | |
130 | pycodestyle==2.7.0 | |
131 | pydocstyle==6.1.1 | |
132 | pyflakes==2.3.1 | |
129 | 133 | |
130 | 134 | commands = |
131 | 135 | flake8 {posargs:setup.py src/{env:PY_MODULE}} |
182 | 186 | basepython = {[default]basepython} |
183 | 187 | |
184 | 188 | deps = |
185 | mypy==0.790 | |
189 | mypy==0.910 | |
190 | types-mock==0.1.5 | |
186 | 191 | |
187 | 192 | {[default]deps} |
188 | 193 | |
275 | 280 | |
276 | 281 | deps = |
277 | 282 | {[testenv:coverage_report]deps} |
278 | codecov==2.1.11 | |
283 | codecov==2.1.12 | |
279 | 284 | |
280 | 285 | passenv = |
281 | 286 | # See https://github.com/codecov/codecov-python/blob/master/README.md#using-tox |
291 | 296 | setenv = |
292 | 297 | {[testenv:coverage_report]setenv} |
293 | 298 | |
294 | COVERAGE_XML={envlogdir}/coverage_report.xml | |
299 | COVERAGE_XML={envlogdir}/coverage.xml | |
295 | 300 | |
296 | 301 | commands = |
297 | 302 | # Note documentation for CI variables in passenv above |
317 | 322 | basepython = {[default]basepython} |
318 | 323 | |
319 | 324 | deps = |
320 | Sphinx==3.4.3 | |
321 | sphinx-rtd-theme==0.5.1 | |
325 | Sphinx==4.1.2 | |
326 | sphinx-rtd-theme==0.5.2 | |
322 | 327 | |
323 | 328 | commands = |
324 | 329 | sphinx-build \ |
335 | 340 | |
336 | 341 | deps = |
337 | 342 | {[testenv:docs]deps} |
338 | sphinx-autobuild==2020.9.1 | |
343 | sphinx-autobuild==2021.3.14 | |
339 | 344 | |
340 | 345 | commands = |
341 | 346 | sphinx-autobuild \ |
359 | 364 | |
360 | 365 | deps = |
361 | 366 | check-manifest==0.46 |
362 | readme-renderer==28.0 | |
363 | twine==3.3.0 | |
367 | readme-renderer==29.0 | |
368 | twine==3.4.2 | |
364 | 369 | |
365 | 370 | commands = |
366 | 371 | check-manifest |
367 | 372 | pip wheel --wheel-dir "{envtmpdir}/dist" --no-deps {toxinidir} |
368 | 373 | twine check "{envtmpdir}/dist/"* |
374 | ||
375 | ||
376 | ## | |
377 | # Print dependencies | |
378 | ## | |
379 | ||
380 | [testenv:dependencies] | |
381 | ||
382 | description = print dependencies | |
383 | ||
384 | basepython = {[default]basepython} | |
385 | ||
386 | recreate = true | |
387 | ||
388 | deps = | |
389 | ||
390 | commands = | |
391 | pip freeze --exclude={env:PY_MODULE} |