Debian Codegraph @

third_party/python/yarl/yarl-1.15.2.dist-info/METADATA

raw
1 Metadata-Version: 2.1
2 Name: yarl
3 Version: 1.15.2
4 Summary: Yet another URL library
5 Home-page: https://github.com/aio-libs/yarl
6 Author: Andrew Svetlov
7 Author-email: [email protected]
8 Maintainer: aiohttp team <[email protected]>
9 Maintainer-email: [email protected]
10 License: Apache-2.0
11 Project-URL: Chat: Matrix, https://matrix.to/#/#aio-libs:matrix.org
12 Project-URL: Chat: Matrix Space, https://matrix.to/#/#aio-libs-space:matrix.org
13 Project-URL: CI: GitHub Workflows, https://github.com/aio-libs/yarl/actions?query=branch:master
14 Project-URL: Code of Conduct, https://github.com/aio-libs/.github/blob/master/CODE_OF_CONDUCT.md
15 Project-URL: Coverage: codecov, https://codecov.io/github/aio-libs/yarl
16 Project-URL: Docs: Changelog, https://yarl.aio-libs.org/en/latest/changes/
17 Project-URL: Docs: RTD, https://yarl.aio-libs.org
18 Project-URL: GitHub: issues, https://github.com/aio-libs/yarl/issues
19 Project-URL: GitHub: repo, https://github.com/aio-libs/yarl
20 Keywords: cython,cext,yarl
21 Classifier: Development Status :: 5 - Production/Stable
22 Classifier: Intended Audience :: Developers
23 Classifier: License :: OSI Approved :: Apache Software License
24 Classifier: Programming Language :: Cython
25 Classifier: Programming Language :: Python
26 Classifier: Programming Language :: Python :: 3
27 Classifier: Programming Language :: Python :: 3.8
28 Classifier: Programming Language :: Python :: 3.9
29 Classifier: Programming Language :: Python :: 3.10
30 Classifier: Programming Language :: Python :: 3.11
31 Classifier: Programming Language :: Python :: 3.12
32 Classifier: Programming Language :: Python :: 3.13
33 Classifier: Topic :: Internet :: WWW/HTTP
34 Classifier: Topic :: Software Development :: Libraries :: Python Modules
35 Requires-Python: >=3.8
36 Description-Content-Type: text/x-rst
37 License-File: LICENSE
38 License-File: NOTICE
39 Requires-Dist: idna >=2.0
40 Requires-Dist: multidict >=4.0
41 Requires-Dist: propcache >=0.2.0
42
43 yarl
44 ====
45
46 The module provides handy URL class for URL parsing and changing.
47
48 .. image:: https://github.com/aio-libs/yarl/workflows/CI/badge.svg
49 :target: https://github.com/aio-libs/yarl/actions?query=workflow%3ACI
50 :align: right
51
52 .. image:: https://codecov.io/gh/aio-libs/yarl/branch/master/graph/badge.svg
53 :target: https://codecov.io/gh/aio-libs/yarl
54
55 .. image:: https://badge.fury.io/py/yarl.svg
56 :target: https://badge.fury.io/py/yarl
57
58
59 .. image:: https://readthedocs.org/projects/yarl/badge/?version=latest
60 :target: https://yarl.aio-libs.org
61
62
63 .. image:: https://img.shields.io/pypi/pyversions/yarl.svg
64 :target: https://pypi.python.org/pypi/yarl
65
66 .. image:: https://img.shields.io/matrix/aio-libs:matrix.org?label=Discuss%20on%20Matrix%20at%20%23aio-libs%3Amatrix.org&logo=matrix&server_fqdn=matrix.org&style=flat
67 :target: https://matrix.to/#/%23aio-libs:matrix.org
68 :alt: Matrix Room — #aio-libs:matrix.org
69
70 .. image:: https://img.shields.io/matrix/aio-libs-space:matrix.org?label=Discuss%20on%20Matrix%20at%20%23aio-libs-space%3Amatrix.org&logo=matrix&server_fqdn=matrix.org&style=flat
71 :target: https://matrix.to/#/%23aio-libs-space:matrix.org
72 :alt: Matrix Space — #aio-libs-space:matrix.org
73
74 Introduction
75 ------------
76
77 Url is constructed from ``str``:
78
79 .. code-block:: pycon
80
81 >>> from yarl import URL
82 >>> url = URL('https://www.python.org/~guido?arg=1#frag')
83 >>> url
84 URL('https://www.python.org/~guido?arg=1#frag')
85
86 All url parts: *scheme*, *user*, *password*, *host*, *port*, *path*,
87 *query* and *fragment* are accessible by properties:
88
89 .. code-block:: pycon
90
91 >>> url.scheme
92 'https'
93 >>> url.host
94 'www.python.org'
95 >>> url.path
96 '/~guido'
97 >>> url.query_string
98 'arg=1'
99 >>> url.query
100 <MultiDictProxy('arg': '1')>
101 >>> url.fragment
102 'frag'
103
104 All url manipulations produce a new url object:
105
106 .. code-block:: pycon
107
108 >>> url = URL('https://www.python.org')
109 >>> url / 'foo' / 'bar'
110 URL('https://www.python.org/foo/bar')
111 >>> url / 'foo' % {'bar': 'baz'}
112 URL('https://www.python.org/foo?bar=baz')
113
114 Strings passed to constructor and modification methods are
115 automatically encoded giving canonical representation as result:
116
117 .. code-block:: pycon
118
119 >>> url = URL('https://www.python.org/шлях')
120 >>> url
121 URL('https://www.python.org/%D1%88%D0%BB%D1%8F%D1%85')
122
123 Regular properties are *percent-decoded*, use ``raw_`` versions for
124 getting *encoded* strings:
125
126 .. code-block:: pycon
127
128 >>> url.path
129 '/шлях'
130
131 >>> url.raw_path
132 '/%D1%88%D0%BB%D1%8F%D1%85'
133
134 Human readable representation of URL is available as ``.human_repr()``:
135
136 .. code-block:: pycon
137
138 >>> url.human_repr()
139 'https://www.python.org/шлях'
140
141 For full documentation please read https://yarl.aio-libs.org.
142
143
144 Installation
145 ------------
146
147 ::
148
149 $ pip install yarl
150
151 The library is Python 3 only!
152
153 PyPI contains binary wheels for Linux, Windows and MacOS. If you want to install
154 ``yarl`` on another operating system where wheels are not provided,
155 the the tarball will be used to compile the library from
156 the source code. It requires a C compiler and and Python headers installed.
157
158 To skip the compilation you must explicitly opt-in by using a PEP 517
159 configuration setting ``pure-python``, or setting the ``YARL_NO_EXTENSIONS``
160 environment variable to a non-empty value, e.g.:
161
162 .. code-block:: console
163
164 $ pip install yarl --config-settings=pure-python=false
165
166 Please note that the pure-Python (uncompiled) version is much slower. However,
167 PyPy always uses a pure-Python implementation, and, as such, it is unaffected
168 by this variable.
169
170 Dependencies
171 ------------
172
173 YARL requires multidict_ and propcache_ libraries.
174
175
176 API documentation
177 ------------------
178
179 The documentation is located at https://yarl.aio-libs.org.
180
181
182 Why isn't boolean supported by the URL query API?
183 -------------------------------------------------
184
185 There is no standard for boolean representation of boolean values.
186
187 Some systems prefer ``true``/``false``, others like ``yes``/``no``, ``on``/``off``,
188 ``Y``/``N``, ``1``/``0``, etc.
189
190 ``yarl`` cannot make an unambiguous decision on how to serialize ``bool`` values because
191 it is specific to how the end-user's application is built and would be different for
192 different apps. The library doesn't accept booleans in the API; a user should convert
193 bools into strings using own preferred translation protocol.
194
195
196 Comparison with other URL libraries
197 ------------------------------------
198
199 * furl (https://pypi.python.org/pypi/furl)
200
201 The library has rich functionality but the ``furl`` object is mutable.
202
203 I'm afraid to pass this object into foreign code: who knows if the
204 code will modify my url in a terrible way while I just want to send URL
205 with handy helpers for accessing URL properties.
206
207 ``furl`` has other non-obvious tricky things but the main objection
208 is mutability.
209
210 * URLObject (https://pypi.python.org/pypi/URLObject)
211
212 URLObject is immutable, that's pretty good.
213
214 Every URL change generates a new URL object.
215
216 But the library doesn't do any decode/encode transformations leaving the
217 end user to cope with these gory details.
218
219
220 Source code
221 -----------
222
223 The project is hosted on GitHub_
224
225 Please file an issue on the `bug tracker
226 <https://github.com/aio-libs/yarl/issues>`_ if you have found a bug
227 or have some suggestion in order to improve the library.
228
229 Discussion list
230 ---------------
231
232 *aio-libs* google group: https://groups.google.com/forum/#!forum/aio-libs
233
234 Feel free to post your questions and ideas here.
235
236
237 Authors and License
238 -------------------
239
240 The ``yarl`` package is written by Andrew Svetlov.
241
242 It's *Apache 2* licensed and freely available.
243
244
245 .. _GitHub: https://github.com/aio-libs/yarl
246
247 .. _multidict: https://github.com/aio-libs/multidict
248
249 .. _propcache: https://github.com/aio-libs/propcache
250
251 =========
252 Changelog
253 =========
254
255 ..
256 You should *NOT* be adding new change log entries to this file, this
257 file is managed by towncrier. You *may* edit previous change logs to
258 fix problems like typo corrections or such.
259 To add a new change log entry, please see
260 https://pip.pypa.io/en/latest/development/#adding-a-news-entry
261 we named the news folder "changes".
262
263 WARNING: Don't drop the next directive!
264
265 .. towncrier release notes start
266
267 1.15.2
268 ======
269
270 *(2024-10-13)*
271
272
273 Miscellaneous internal changes
274 ------------------------------
275
276 - Improved performance of converting ``~yarl.URL`` to a string -- by `@bdraco <https://github.com/sponsors/bdraco>`__.
277
278 *Related issues and pull requests on GitHub:*
279 `#1234 <https://github.com/aio-libs/yarl/issues/1234>`__.
280
281 - Improved performance of ``yarl.URL.joinpath()`` -- by `@bdraco <https://github.com/sponsors/bdraco>`__.
282
283 *Related issues and pull requests on GitHub:*
284 `#1248 <https://github.com/aio-libs/yarl/issues/1248>`__, `#1250 <https://github.com/aio-libs/yarl/issues/1250>`__.
285
286 - Improved performance of constructing query strings from ``~multidict.MultiDict`` -- by `@bdraco <https://github.com/sponsors/bdraco>`__.
287
288 *Related issues and pull requests on GitHub:*
289 `#1256 <https://github.com/aio-libs/yarl/issues/1256>`__.
290
291 - Improved performance of constructing query strings with ``int`` values -- by `@bdraco <https://github.com/sponsors/bdraco>`__.
292
293 *Related issues and pull requests on GitHub:*
294 `#1259 <https://github.com/aio-libs/yarl/issues/1259>`__.
295
296
297 ----
298
299
300 1.15.1
301 ======
302
303 *(2024-10-12)*
304
305
306 Miscellaneous internal changes
307 ------------------------------
308
309 - Improved performance of calling ``yarl.URL.build()`` -- by `@bdraco <https://github.com/sponsors/bdraco>`__.
310
311 *Related issues and pull requests on GitHub:*
312 `#1222 <https://github.com/aio-libs/yarl/issues/1222>`__.
313
314 - Improved performance of all ``~yarl.URL`` methods that create new ``~yarl.URL`` objects -- by `@bdraco <https://github.com/sponsors/bdraco>`__.
315
316 *Related issues and pull requests on GitHub:*
317 `#1226 <https://github.com/aio-libs/yarl/issues/1226>`__.
318
319 - Improved performance of ``~yarl.URL`` methods that modify the network location -- by `@bdraco <https://github.com/sponsors/bdraco>`__.
320
321 *Related issues and pull requests on GitHub:*
322 `#1229 <https://github.com/aio-libs/yarl/issues/1229>`__.
323
324
325 ----
326
327
328 1.15.0
329 ======
330
331 *(2024-10-11)*
332
333
334 Bug fixes
335 ---------
336
337 - Fixed validation with ``yarl.URL.with_scheme()`` when passed scheme is not lowercase -- by `@bdraco <https://github.com/sponsors/bdraco>`__.
338
339 *Related issues and pull requests on GitHub:*
340 `#1189 <https://github.com/aio-libs/yarl/issues/1189>`__.
341
342
343 Features
344 --------
345
346 - Started building ``armv7l`` wheels -- by `@bdraco <https://github.com/sponsors/bdraco>`__.
347
348 *Related issues and pull requests on GitHub:*
349 `#1204 <https://github.com/aio-libs/yarl/issues/1204>`__.
350
351
352 Miscellaneous internal changes
353 ------------------------------
354
355 - Improved performance of constructing unencoded ``~yarl.URL`` objects -- by `@bdraco <https://github.com/sponsors/bdraco>`__.
356
357 *Related issues and pull requests on GitHub:*
358 `#1188 <https://github.com/aio-libs/yarl/issues/1188>`__.
359
360 - Added a cache for parsing hosts to reduce overhead of encoding ``~yarl.URL`` -- by `@bdraco <https://github.com/sponsors/bdraco>`__.
361
362 *Related issues and pull requests on GitHub:*
363 `#1190 <https://github.com/aio-libs/yarl/issues/1190>`__.
364
365 - Improved performance of constructing query strings from ``~collections.abc.Mapping`` -- by `@bdraco <https://github.com/sponsors/bdraco>`__.
366
367 *Related issues and pull requests on GitHub:*
368 `#1193 <https://github.com/aio-libs/yarl/issues/1193>`__.
369
370 - Improved performance of converting ``~yarl.URL`` objects to strings -- by `@bdraco <https://github.com/sponsors/bdraco>`__.
371
372 *Related issues and pull requests on GitHub:*
373 `#1198 <https://github.com/aio-libs/yarl/issues/1198>`__.
374
375
376 ----
377
378
379 1.14.0
380 ======
381
382 *(2024-10-08)*
383
384
385 Packaging updates and notes for downstreams
386 -------------------------------------------
387
388 - Switched to using the ``propcache`` package for property caching
389 -- by `@bdraco <https://github.com/sponsors/bdraco>`__.
390
391 The ``propcache`` package is derived from the property caching
392 code in ``yarl`` and has been broken out to avoid maintaining it for multiple
393 projects.
394
395 *Related issues and pull requests on GitHub:*
396 `#1169 <https://github.com/aio-libs/yarl/issues/1169>`__.
397
398
399 Contributor-facing changes
400 --------------------------
401
402 - Started testing with Hypothesis -- by `@webknjaz <https://github.com/sponsors/webknjaz>`__ and `@bdraco <https://github.com/sponsors/bdraco>`__.
403
404 Special thanks to `@Zac-HD <https://github.com/sponsors/Zac-HD>`__ for helping us get started with this framework.
405
406 *Related issues and pull requests on GitHub:*
407 `#860 <https://github.com/aio-libs/yarl/issues/860>`__.
408
409
410 Miscellaneous internal changes
411 ------------------------------
412
413 - Improved performance of ``yarl.URL.is_default_port()`` when no explicit port is set -- by `@bdraco <https://github.com/sponsors/bdraco>`__.
414
415 *Related issues and pull requests on GitHub:*
416 `#1168 <https://github.com/aio-libs/yarl/issues/1168>`__.
417
418 - Improved performance of converting ``~yarl.URL`` to a string when no explicit port is set -- by `@bdraco <https://github.com/sponsors/bdraco>`__.
419
420 *Related issues and pull requests on GitHub:*
421 `#1170 <https://github.com/aio-libs/yarl/issues/1170>`__.
422
423 - Improved performance of the ``yarl.URL.origin()`` method -- by `@bdraco <https://github.com/sponsors/bdraco>`__.
424
425 *Related issues and pull requests on GitHub:*
426 `#1175 <https://github.com/aio-libs/yarl/issues/1175>`__.
427
428 - Improved performance of encoding hosts -- by `@bdraco <https://github.com/sponsors/bdraco>`__.
429
430 *Related issues and pull requests on GitHub:*
431 `#1176 <https://github.com/aio-libs/yarl/issues/1176>`__.
432
433
434 ----
435
436
437 1.13.1
438 ======
439
440 *(2024-09-27)*
441
442
443 Miscellaneous internal changes
444 ------------------------------
445
446 - Improved performance of calling ``yarl.URL.build()`` with ``authority`` -- by `@bdraco <https://github.com/sponsors/bdraco>`__.
447
448 *Related issues and pull requests on GitHub:*
449 `#1163 <https://github.com/aio-libs/yarl/issues/1163>`__.
450
451
452 ----
453
454
455 1.13.0
456 ======
457
458 *(2024-09-26)*
459
460
461 Bug fixes
462 ---------
463
464 - Started rejecting ASCII hostnames with invalid characters. For host strings that
465 look like authority strings, the exception message includes advice on what to do
466 instead -- by `@mjpieters <https://github.com/sponsors/mjpieters>`__.
467
468 *Related issues and pull requests on GitHub:*
469 `#880 <https://github.com/aio-libs/yarl/issues/880>`__, `#954 <https://github.com/aio-libs/yarl/issues/954>`__.
470
471 - Fixed IPv6 addresses missing brackets when the ``~yarl.URL`` was converted to a string -- by `@bdraco <https://github.com/sponsors/bdraco>`__.
472
473 *Related issues and pull requests on GitHub:*
474 `#1157 <https://github.com/aio-libs/yarl/issues/1157>`__, `#1158 <https://github.com/aio-libs/yarl/issues/1158>`__.
475
476
477 Features
478 --------
479
480 - Added ``~yarl.URL.host_subcomponent`` which returns the ``3986#section-3.2.2`` host subcomponent -- by `@bdraco <https://github.com/sponsors/bdraco>`__.
481
482 The only current practical difference between ``~yarl.URL.raw_host`` and ``~yarl.URL.host_subcomponent`` is that IPv6 addresses are returned bracketed.
483
484 *Related issues and pull requests on GitHub:*
485 `#1159 <https://github.com/aio-libs/yarl/issues/1159>`__.
486
487
488 ----
489
490
491 1.12.1
492 ======
493
494 *(2024-09-23)*
495
496
497 No significant changes.
498
499
500 ----
501
502
503 1.12.0
504 ======
505
506 *(2024-09-23)*
507
508
509 Features
510 --------
511
512 - Added ``~yarl.URL.path_safe`` to be able to fetch the path without ``%2F`` and ``%25`` decoded -- by `@bdraco <https://github.com/sponsors/bdraco>`__.
513
514 *Related issues and pull requests on GitHub:*
515 `#1150 <https://github.com/aio-libs/yarl/issues/1150>`__.
516
517
518 Removals and backward incompatible breaking changes
519 ---------------------------------------------------
520
521 - Restore decoding ``%2F`` (``/``) in ``URL.path`` -- by `@bdraco <https://github.com/sponsors/bdraco>`__.
522
523 This change restored the behavior before `#1057 <https://github.com/aio-libs/yarl/issues/1057>`__.
524
525 *Related issues and pull requests on GitHub:*
526 `#1151 <https://github.com/aio-libs/yarl/issues/1151>`__.
527
528
529 Miscellaneous internal changes
530 ------------------------------
531
532 - Improved performance of processing paths -- by `@bdraco <https://github.com/sponsors/bdraco>`__.
533
534 *Related issues and pull requests on GitHub:*
535 `#1143 <https://github.com/aio-libs/yarl/issues/1143>`__.
536
537
538 ----
539
540
541 1.11.1
542 ======
543
544 *(2024-09-09)*
545
546
547 Bug fixes
548 ---------
549
550 - Allowed scheme replacement for relative URLs if the scheme does not require a host -- by `@bdraco <https://github.com/sponsors/bdraco>`__.
551
552 *Related issues and pull requests on GitHub:*
553 `#280 <https://github.com/aio-libs/yarl/issues/280>`__, `#1138 <https://github.com/aio-libs/yarl/issues/1138>`__.
554
555 - Allowed empty host for URL schemes other than the special schemes listed in the WHATWG URL spec -- by `@bdraco <https://github.com/sponsors/bdraco>`__.
556
557 *Related issues and pull requests on GitHub:*
558 `#1136 <https://github.com/aio-libs/yarl/issues/1136>`__.
559
560
561 Features
562 --------
563
564 - Loosened restriction on integers as query string values to allow classes that implement ``__int__`` -- by `@bdraco <https://github.com/sponsors/bdraco>`__.
565
566 *Related issues and pull requests on GitHub:*
567 `#1139 <https://github.com/aio-libs/yarl/issues/1139>`__.
568
569
570 Miscellaneous internal changes
571 ------------------------------
572
573 - Improved performance of normalizing paths -- by `@bdraco <https://github.com/sponsors/bdraco>`__.
574
575 *Related issues and pull requests on GitHub:*
576 `#1137 <https://github.com/aio-libs/yarl/issues/1137>`__.
577
578
579 ----
580
581
582 1.11.0
583 ======
584
585 *(2024-09-08)*
586
587
588 Features
589 --------
590
591 - Added ``URL.extend_query()()`` method, which can be used to extend parameters without replacing same named keys -- by `@bdraco <https://github.com/sponsors/bdraco>`__.
592
593 This method was primarily added to replace the inefficient hand rolled method currently used in ``aiohttp``.
594
595 *Related issues and pull requests on GitHub:*
596 `#1128 <https://github.com/aio-libs/yarl/issues/1128>`__.
597
598
599 Miscellaneous internal changes
600 ------------------------------
601
602 - Improved performance of the Cython ``cached_property`` implementation -- by `@bdraco <https://github.com/sponsors/bdraco>`__.
603
604 *Related issues and pull requests on GitHub:*
605 `#1122 <https://github.com/aio-libs/yarl/issues/1122>`__.
606
607 - Simplified computing ports by removing unnecessary code -- by `@bdraco <https://github.com/sponsors/bdraco>`__.
608
609 *Related issues and pull requests on GitHub:*
610 `#1123 <https://github.com/aio-libs/yarl/issues/1123>`__.
611
612 - Improved performance of encoding non IPv6 hosts -- by `@bdraco <https://github.com/sponsors/bdraco>`__.
613
614 *Related issues and pull requests on GitHub:*
615 `#1125 <https://github.com/aio-libs/yarl/issues/1125>`__.
616
617 - Improved performance of ``URL.build()()`` when the path, query string, or fragment is an empty string -- by `@bdraco <https://github.com/sponsors/bdraco>`__.
618
619 *Related issues and pull requests on GitHub:*
620 `#1126 <https://github.com/aio-libs/yarl/issues/1126>`__.
621
622 - Improved performance of the ``URL.update_query()()`` method -- by `@bdraco <https://github.com/sponsors/bdraco>`__.
623
624 *Related issues and pull requests on GitHub:*
625 `#1130 <https://github.com/aio-libs/yarl/issues/1130>`__.
626
627 - Improved performance of processing query string changes when arguments are ``str`` -- by `@bdraco <https://github.com/sponsors/bdraco>`__.
628
629 *Related issues and pull requests on GitHub:*
630 `#1131 <https://github.com/aio-libs/yarl/issues/1131>`__.
631
632
633 ----
634
635
636 1.10.0
637 ======
638
639 *(2024-09-06)*
640
641
642 Bug fixes
643 ---------
644
645 - Fixed joining a path when the existing path was empty -- by `@bdraco <https://github.com/sponsors/bdraco>`__.
646
647 A regression in ``URL.join()()`` was introduced in `#1082 <https://github.com/aio-libs/yarl/issues/1082>`__.
648
649 *Related issues and pull requests on GitHub:*
650 `#1118 <https://github.com/aio-libs/yarl/issues/1118>`__.
651
652
653 Features
654 --------
655
656 - Added ``URL.without_query_params()()`` method, to drop some parameters from query string -- by `@hongquan <https://github.com/sponsors/hongquan>`__.
657
658 *Related issues and pull requests on GitHub:*
659 `#774 <https://github.com/aio-libs/yarl/issues/774>`__, `#898 <https://github.com/aio-libs/yarl/issues/898>`__, `#1010 <https://github.com/aio-libs/yarl/issues/1010>`__.
660
661 - The previously protected types ``_SimpleQuery``, ``_QueryVariable``, and ``_Query`` are now available for use externally as ``SimpleQuery``, ``QueryVariable``, and ``Query`` -- by `@bdraco <https://github.com/sponsors/bdraco>`__.
662
663 *Related issues and pull requests on GitHub:*
664 `#1050 <https://github.com/aio-libs/yarl/issues/1050>`__, `#1113 <https://github.com/aio-libs/yarl/issues/1113>`__.
665
666
667 Contributor-facing changes
668 --------------------------
669
670 - Replaced all ``~typing.Optional`` with ``~typing.Union`` -- by `@bdraco <https://github.com/sponsors/bdraco>`__.
671
672 *Related issues and pull requests on GitHub:*
673 `#1095 <https://github.com/aio-libs/yarl/issues/1095>`__.
674
675
676 Miscellaneous internal changes
677 ------------------------------
678
679 - Significantly improved performance of parsing the network location -- by `@bdraco <https://github.com/sponsors/bdraco>`__.
680
681 *Related issues and pull requests on GitHub:*
682 `#1112 <https://github.com/aio-libs/yarl/issues/1112>`__.
683
684 - Added internal types to the cache to prevent future refactoring errors -- by `@bdraco <https://github.com/sponsors/bdraco>`__.
685
686 *Related issues and pull requests on GitHub:*
687 `#1117 <https://github.com/aio-libs/yarl/issues/1117>`__.
688
689
690 ----
691
692
693 1.9.11
694 ======
695
696 *(2024-09-04)*
697
698
699 Bug fixes
700 ---------
701
702 - Fixed a ``TypeError`` with ``MultiDictProxy`` and Python 3.8 -- by `@bdraco <https://github.com/sponsors/bdraco>`__.
703
704 *Related issues and pull requests on GitHub:*
705 `#1084 <https://github.com/aio-libs/yarl/issues/1084>`__, `#1105 <https://github.com/aio-libs/yarl/issues/1105>`__, `#1107 <https://github.com/aio-libs/yarl/issues/1107>`__.
706
707
708 Miscellaneous internal changes
709 ------------------------------
710
711 - Improved performance of encoding hosts -- by `@bdraco <https://github.com/sponsors/bdraco>`__.
712
713 Previously, the library would unconditionally try to parse a host as an IP Address. The library now avoids trying to parse a host as an IP Address if the string is not in one of the formats described in ``3986#section-3.2.2``.
714
715 *Related issues and pull requests on GitHub:*
716 `#1104 <https://github.com/aio-libs/yarl/issues/1104>`__.
717
718
719 ----
720
721
722 1.9.10
723 ======
724
725 *(2024-09-04)*
726
727
728 Bug fixes
729 ---------
730
731 - ``URL.join()()`` has been changed to match
732 ``3986`` and align with
733 ``/ operation()`` and ``URL.joinpath()()``
734 when joining URLs with empty segments.
735 Previously ``urllib.parse.urljoin`` was used,
736 which has known issues with empty segments
737 (`python/cpython#84774 <https://github.com/python/cpython/issues/84774>`_).
738
739 Due to the semantics of ``URL.join()()``, joining an
740 URL with scheme requires making it relative, prefixing with ``./``.
741
742 .. code-block:: pycon
743
744 >>> URL("https://web.archive.org/web/").join(URL("./https://github.com/aio-libs/yarl"))
745 URL('https://web.archive.org/web/https://github.com/aio-libs/yarl')
746
747
748 Empty segments are honored in the base as well as the joined part.
749
750 .. code-block:: pycon
751
752 >>> URL("https://web.archive.org/web/https://").join(URL("github.com/aio-libs/yarl"))
753 URL('https://web.archive.org/web/https://github.com/aio-libs/yarl')
754
755
756
757 -- by `@commonism <https://github.com/sponsors/commonism>`__
758
759 This change initially appeared in 1.9.5 but was reverted in 1.9.6 to resolve a problem with query string handling.
760
761 *Related issues and pull requests on GitHub:*
762 `#1039 <https://github.com/aio-libs/yarl/issues/1039>`__, `#1082 <https://github.com/aio-libs/yarl/issues/1082>`__.
763
764
765 Features
766 --------
767
768 - Added ``~yarl.URL.absolute`` which is now preferred over ``URL.is_absolute()`` -- by `@bdraco <https://github.com/sponsors/bdraco>`__.
769
770 *Related issues and pull requests on GitHub:*
771 `#1100 <https://github.com/aio-libs/yarl/issues/1100>`__.
772
773
774 ----
775
776
777 1.9.9
778 =====
779
780 *(2024-09-04)*
781
782
783 Bug fixes
784 ---------
785
786 - Added missing type on ``~yarl.URL.port`` -- by `@bdraco <https://github.com/sponsors/bdraco>`__.
787
788 *Related issues and pull requests on GitHub:*
789 `#1097 <https://github.com/aio-libs/yarl/issues/1097>`__.
790
791
792 ----
793
794
795 1.9.8
796 =====
797
798 *(2024-09-03)*
799
800
801 Features
802 --------
803
804 - Covered the ``~yarl.URL`` object with types -- by `@bdraco <https://github.com/sponsors/bdraco>`__.
805
806 *Related issues and pull requests on GitHub:*
807 `#1084 <https://github.com/aio-libs/yarl/issues/1084>`__.
808
809 - Cache parsing of IP Addresses when encoding hosts -- by `@bdraco <https://github.com/sponsors/bdraco>`__.
810
811 *Related issues and pull requests on GitHub:*
812 `#1086 <https://github.com/aio-libs/yarl/issues/1086>`__.
813
814
815 Contributor-facing changes
816 --------------------------
817
818 - Covered the ``~yarl.URL`` object with types -- by `@bdraco <https://github.com/sponsors/bdraco>`__.
819
820 *Related issues and pull requests on GitHub:*
821 `#1084 <https://github.com/aio-libs/yarl/issues/1084>`__.
822
823
824 Miscellaneous internal changes
825 ------------------------------
826
827 - Improved performance of handling ports -- by `@bdraco <https://github.com/sponsors/bdraco>`__.
828
829 *Related issues and pull requests on GitHub:*
830 `#1081 <https://github.com/aio-libs/yarl/issues/1081>`__.
831
832
833 ----
834
835
836 1.9.7
837 =====
838
839 *(2024-09-01)*
840
841
842 Removals and backward incompatible breaking changes
843 ---------------------------------------------------
844
845 - Removed support ``3986#section-3.2.3`` port normalization when the scheme is not one of ``http``, ``https``, ``wss``, or ``ws`` -- by `@bdraco <https://github.com/sponsors/bdraco>`__.
846
847 Support for port normalization was recently added in `#1033 <https://github.com/aio-libs/yarl/issues/1033>`__ and contained code that would do blocking I/O if the scheme was not one of the four listed above. The code has been removed because this library is intended to be safe for usage with ``asyncio``.
848
849 *Related issues and pull requests on GitHub:*
850 `#1076 <https://github.com/aio-libs/yarl/issues/1076>`__.
851
852
853 Miscellaneous internal changes
854 ------------------------------
855
856 - Improved performance of property caching -- by `@bdraco <https://github.com/sponsors/bdraco>`__.
857
858 The ``reify`` implementation from ``aiohttp`` was adapted to replace the internal ``cached_property`` implementation.
859
860 *Related issues and pull requests on GitHub:*
861 `#1070 <https://github.com/aio-libs/yarl/issues/1070>`__.
862
863
864 ----
865
866
867 1.9.6
868 =====
869
870 *(2024-08-30)*
871
872
873 Bug fixes
874 ---------
875
876 - Reverted ``3986`` compatible ``URL.join()()`` honoring empty segments which was introduced in `#1039 <https://github.com/aio-libs/yarl/issues/1039>`__.
877
878 This change introduced a regression handling query string parameters with joined URLs. The change was reverted to maintain compatibility with the previous behavior.
879
880 *Related issues and pull requests on GitHub:*
881 `#1067 <https://github.com/aio-libs/yarl/issues/1067>`__.
882
883
884 ----
885
886
887 1.9.5
888 =====
889
890 *(2024-08-30)*
891
892
893 Bug fixes
894 ---------
895
896 - Joining URLs with empty segments has been changed
897 to match ``3986``.
898
899 Previously empty segments would be removed from path,
900 breaking use-cases such as
901
902 .. code-block:: python
903
904 URL("https://web.archive.org/web/") / "https://github.com/"
905
906 Now ``/ operation()`` and ``URL.joinpath()()``
907 keep empty segments, but do not introduce new empty segments.
908 e.g.
909
910 .. code-block:: python
911
912 URL("https://example.org/") / ""
913
914 does not introduce an empty segment.
915
916 -- by `@commonism <https://github.com/sponsors/commonism>`__ and `@youtux <https://github.com/sponsors/youtux>`__
917
918 *Related issues and pull requests on GitHub:*
919 `#1026 <https://github.com/aio-libs/yarl/issues/1026>`__.
920
921 - The default protocol ports of well-known URI schemes are now taken into account
922 during the normalization of the URL string representation in accordance with
923 ``3986#section-3.2.3``.
924
925 Specified ports are removed from the ``str`` representation of a ``~yarl.URL``
926 if the port matches the scheme's default port -- by `@commonism <https://github.com/sponsors/commonism>`__.
927
928 *Related issues and pull requests on GitHub:*
929 `#1033 <https://github.com/aio-libs/yarl/issues/1033>`__.
930
931 - ``URL.join()()`` has been changed to match
932 ``3986`` and align with
933 ``/ operation()`` and ``URL.joinpath()()``
934 when joining URLs with empty segments.
935 Previously ``urllib.parse.urljoin`` was used,
936 which has known issues with empty segments
937 (`python/cpython#84774 <https://github.com/python/cpython/issues/84774>`_).
938
939 Due to the semantics of ``URL.join()()``, joining an
940 URL with scheme requires making it relative, prefixing with ``./``.
941
942 .. code-block:: pycon
943
944 >>> URL("https://web.archive.org/web/").join(URL("./https://github.com/aio-libs/yarl"))
945 URL('https://web.archive.org/web/https://github.com/aio-libs/yarl')
946
947
948 Empty segments are honored in the base as well as the joined part.
949
950 .. code-block:: pycon
951
952 >>> URL("https://web.archive.org/web/https://").join(URL("github.com/aio-libs/yarl"))
953 URL('https://web.archive.org/web/https://github.com/aio-libs/yarl')
954
955
956
957 -- by `@commonism <https://github.com/sponsors/commonism>`__
958
959 *Related issues and pull requests on GitHub:*
960 `#1039 <https://github.com/aio-libs/yarl/issues/1039>`__.
961
962
963 Removals and backward incompatible breaking changes
964 ---------------------------------------------------
965
966 - Stopped decoding ``%2F`` (``/``) in ``URL.path``, as this could lead to code incorrectly treating it as a path separator
967 -- by `@Dreamsorcerer <https://github.com/sponsors/Dreamsorcerer>`__.
968
969 *Related issues and pull requests on GitHub:*
970 `#1057 <https://github.com/aio-libs/yarl/issues/1057>`__.
971
972 - Dropped support for Python 3.7 -- by `@Dreamsorcerer <https://github.com/sponsors/Dreamsorcerer>`__.
973
974 *Related issues and pull requests on GitHub:*
975 `#1016 <https://github.com/aio-libs/yarl/issues/1016>`__.
976
977
978 Improved documentation
979 ----------------------
980
981 - On the ``Contributing docs`` page,
982 a link to the ``Towncrier philosophy`` has been fixed.
983
984 *Related issues and pull requests on GitHub:*
985 `#981 <https://github.com/aio-libs/yarl/issues/981>`__.
986
987 - The pre-existing ``/ magic method()``
988 has been documented in the API reference -- by `@commonism <https://github.com/sponsors/commonism>`__.
989
990 *Related issues and pull requests on GitHub:*
991 `#1026 <https://github.com/aio-libs/yarl/issues/1026>`__.
992
993
994 Packaging updates and notes for downstreams
995 -------------------------------------------
996
997 - A flaw in the logic for copying the project directory into a
998 temporary folder that led to infinite recursion when ``TMPDIR``
999 was set to a project subdirectory path. This was happening in Fedora
1000 and its downstream due to the use of `pyproject-rpm-macros
1001 <https://src.fedoraproject.org/rpms/pyproject-rpm-macros>`__. It was
1002 only reproducible with ``pip wheel`` and was not affecting the
1003 ``pyproject-build`` users.
1004
1005 -- by `@hroncok <https://github.com/sponsors/hroncok>`__ and `@webknjaz <https://github.com/sponsors/webknjaz>`__
1006
1007 *Related issues and pull requests on GitHub:*
1008 `#992 <https://github.com/aio-libs/yarl/issues/992>`__, `#1014 <https://github.com/aio-libs/yarl/issues/1014>`__.
1009
1010 - Support Python 3.13 and publish non-free-threaded wheels
1011
1012 *Related issues and pull requests on GitHub:*
1013 `#1054 <https://github.com/aio-libs/yarl/issues/1054>`__.
1014
1015
1016 Contributor-facing changes
1017 --------------------------
1018
1019 - The CI/CD setup has been updated to test ``arm64`` wheels
1020 under macOS 14, except for Python 3.7 that is unsupported
1021 in that environment -- by `@webknjaz <https://github.com/sponsors/webknjaz>`__.
1022
1023 *Related issues and pull requests on GitHub:*
1024 `#1015 <https://github.com/aio-libs/yarl/issues/1015>`__.
1025
1026 - Removed unused type ignores and casts -- by `@hauntsaninja <https://github.com/sponsors/hauntsaninja>`__.
1027
1028 *Related issues and pull requests on GitHub:*
1029 `#1031 <https://github.com/aio-libs/yarl/issues/1031>`__.
1030
1031
1032 Miscellaneous internal changes
1033 ------------------------------
1034
1035 - ``port``, ``scheme``, and ``raw_host`` are now ``cached_property`` -- by `@bdraco <https://github.com/sponsors/bdraco>`__.
1036
1037 ``aiohttp`` accesses these properties quite often, which cause ``urllib`` to build the ``_hostinfo`` property every time. ``port``, ``scheme``, and ``raw_host`` are now cached properties, which will improve performance.
1038
1039 *Related issues and pull requests on GitHub:*
1040 `#1044 <https://github.com/aio-libs/yarl/issues/1044>`__, `#1058 <https://github.com/aio-libs/yarl/issues/1058>`__.
1041
1042
1043 ----
1044
1045
1046 1.9.4 (2023-12-06)
1047 ==================
1048
1049 Bug fixes
1050 ---------
1051
1052 - Started raising ``TypeError`` when a string value is passed into
1053 ``yarl.URL.build()`` as the ``port`` argument -- by `@commonism <https://github.com/sponsors/commonism>`__.
1054
1055 Previously the empty string as port would create malformed URLs when rendered as string representations. (`#883 <https://github.com/aio-libs/yarl/issues/883>`__)
1056
1057
1058 Packaging updates and notes for downstreams
1059 -------------------------------------------
1060
1061 - The leading ``--`` has been dropped from the `PEP 517 <https://peps.python.org/pep-517>`__ in-tree build
1062 backend config setting names. ``--pure-python`` is now just ``pure-python``
1063 -- by `@webknjaz <https://github.com/sponsors/webknjaz>`__.
1064
1065 The usage now looks as follows:
1066
1067 .. code-block:: console
1068
1069 $ python -m build \
1070 --config-setting=pure-python=true \
1071 --config-setting=with-cython-tracing=true
1072
1073 (`#963 <https://github.com/aio-libs/yarl/issues/963>`__)
1074
1075
1076 Contributor-facing changes
1077 --------------------------
1078
1079 - A step-by-step ``Release Guide`` guide has
1080 been added, describing how to release *yarl* -- by `@webknjaz <https://github.com/sponsors/webknjaz>`__.
1081
1082 This is primarily targeting maintainers. (`#960 <https://github.com/aio-libs/yarl/issues/960>`__)
1083 - Coverage collection has been implemented for the Cython modules
1084 -- by `@webknjaz <https://github.com/sponsors/webknjaz>`__.
1085
1086 It will also be reported to Codecov from any non-release CI jobs.
1087
1088 To measure coverage in a development environment, *yarl* can be
1089 installed in editable mode:
1090
1091 .. code-block:: console
1092
1093 $ python -Im pip install -e .
1094
1095 Editable install produces C-files required for the Cython coverage
1096 plugin to map the measurements back to the PYX-files.
1097
1098 `#961 <https://github.com/aio-libs/yarl/issues/961>`__
1099
1100 - It is now possible to request line tracing in Cython builds using the
1101 ``with-cython-tracing`` `PEP 517 <https://peps.python.org/pep-517>`__ config setting
1102 -- `@webknjaz <https://github.com/sponsors/webknjaz>`__.
1103
1104 This can be used in CI and development environment to measure coverage
1105 on Cython modules, but is not normally useful to the end-users or
1106 downstream packagers.
1107
1108 Here's a usage example:
1109
1110 .. code-block:: console
1111
1112 $ python -Im pip install . --config-settings=with-cython-tracing=true
1113
1114 For editable installs, this setting is on by default. Otherwise, it's
1115 off unless requested explicitly.
1116
1117 The following produces C-files required for the Cython coverage
1118 plugin to map the measurements back to the PYX-files:
1119
1120 .. code-block:: console
1121
1122 $ python -Im pip install -e .
1123
1124 Alternatively, the ``YARL_CYTHON_TRACING=1`` environment variable
1125 can be set to do the same as the `PEP 517 <https://peps.python.org/pep-517>`__ config setting.
1126
1127 `#962 <https://github.com/aio-libs/yarl/issues/962>`__
1128
1129
1130 1.9.3 (2023-11-20)
1131 ==================
1132
1133 Bug fixes
1134 ---------
1135
1136 - Stopped dropping trailing slashes in ``yarl.URL.joinpath()`` -- by `@gmacon <https://github.com/sponsors/gmacon>`__. (`#862 <https://github.com/aio-libs/yarl/issues/862>`__, `#866 <https://github.com/aio-libs/yarl/issues/866>`__)
1137 - Started accepting string subclasses in ``yarl.URL.__truediv__()`` operations (``URL / segment``) -- by `@mjpieters <https://github.com/sponsors/mjpieters>`__. (`#871 <https://github.com/aio-libs/yarl/issues/871>`__, `#884 <https://github.com/aio-libs/yarl/issues/884>`__)
1138 - Fixed the human representation of URLs with square brackets in usernames and passwords -- by `@mjpieters <https://github.com/sponsors/mjpieters>`__. (`#876 <https://github.com/aio-libs/yarl/issues/876>`__, `#882 <https://github.com/aio-libs/yarl/issues/882>`__)
1139 - Updated type hints to include ``URL.missing_port()``, ``URL.__bytes__()``
1140 and the ``encoding`` argument to ``yarl.URL.joinpath()``
1141 -- by `@mjpieters <https://github.com/sponsors/mjpieters>`__. (`#891 <https://github.com/aio-libs/yarl/issues/891>`__)
1142
1143
1144 Packaging updates and notes for downstreams
1145 -------------------------------------------
1146
1147 - Integrated Cython 3 to enable building *yarl* under Python 3.12 -- by `@mjpieters <https://github.com/sponsors/mjpieters>`__. (`#829 <https://github.com/aio-libs/yarl/issues/829>`__, `#881 <https://github.com/aio-libs/yarl/issues/881>`__)
1148 - Declared modern ``setuptools.build_meta`` as the `PEP 517 <https://peps.python.org/pep-517>`__ build
1149 backend in ``pyproject.toml`` explicitly -- by `@webknjaz <https://github.com/sponsors/webknjaz>`__. (`#886 <https://github.com/aio-libs/yarl/issues/886>`__)
1150 - Converted most of the packaging setup into a declarative ``setup.cfg``
1151 config -- by `@webknjaz <https://github.com/sponsors/webknjaz>`__. (`#890 <https://github.com/aio-libs/yarl/issues/890>`__)
1152 - The packaging is replaced from an old-fashioned ``setup.py`` to an
1153 in-tree `PEP 517 <https://peps.python.org/pep-517>`__ build backend -- by `@webknjaz <https://github.com/sponsors/webknjaz>`__.
1154
1155 Whenever the end-users or downstream packagers need to build ``yarl`` from
1156 source (a Git checkout or an sdist), they may pass a ``config_settings``
1157 flag ``--pure-python``. If this flag is not set, a C-extension will be built
1158 and included into the distribution.
1159
1160 Here is how this can be done with ``pip``:
1161
1162 .. code-block:: console
1163
1164 $ python -m pip install . --config-settings=--pure-python=false
1165
1166 This will also work with ``-e | --editable``.
1167
1168 The same can be achieved via ``pypa/build``:
1169
1170 .. code-block:: console
1171
1172 $ python -m build --config-setting=--pure-python=false
1173
1174 Adding ``-w | --wheel`` can force ``pypa/build`` produce a wheel from source
1175 directly, as opposed to building an ``sdist`` and then building from it. (`#893 <https://github.com/aio-libs/yarl/issues/893>`__)
1176
1177 .. attention::
1178
1179 v1.9.3 was the only version using the ``--pure-python`` setting name.
1180 Later versions dropped the ``--`` prefix, making it just ``pure-python``.
1181
1182 - Declared Python 3.12 supported officially in the distribution package metadata
1183 -- by `@edgarrmondragon <https://github.com/sponsors/edgarrmondragon>`__. (`#942 <https://github.com/aio-libs/yarl/issues/942>`__)
1184
1185
1186 Contributor-facing changes
1187 --------------------------
1188
1189 - A regression test for no-host URLs was added per `#821 <https://github.com/aio-libs/yarl/issues/821>`__
1190 and ``3986`` -- by `@kenballus <https://github.com/sponsors/kenballus>`__. (`#821 <https://github.com/aio-libs/yarl/issues/821>`__, `#822 <https://github.com/aio-libs/yarl/issues/822>`__)
1191 - Started testing *yarl* against Python 3.12 in CI -- by `@mjpieters <https://github.com/sponsors/mjpieters>`__. (`#881 <https://github.com/aio-libs/yarl/issues/881>`__)
1192 - All Python 3.12 jobs are now marked as required to pass in CI
1193 -- by `@edgarrmondragon <https://github.com/sponsors/edgarrmondragon>`__. (`#942 <https://github.com/aio-libs/yarl/issues/942>`__)
1194 - MyST is now integrated in Sphinx -- by `@webknjaz <https://github.com/sponsors/webknjaz>`__.
1195
1196 This allows the contributors to author new documents in Markdown
1197 when they have difficulties with going straight RST. (`#953 <https://github.com/aio-libs/yarl/issues/953>`__)
1198
1199
1200 1.9.2 (2023-04-25)
1201 ==================
1202
1203 Bugfixes
1204 --------
1205
1206 - Fix regression with ``yarl.URL.__truediv__()`` and absolute URLs with empty paths causing the raw path to lack the leading ``/``.
1207 (`#854 <https://github.com/aio-libs/yarl/issues/854>`_)
1208
1209
1210 1.9.1 (2023-04-21)
1211 ==================
1212
1213 Bugfixes
1214 --------
1215
1216 - Marked tests that fail on older Python patch releases (< 3.7.10, < 3.8.8 and < 3.9.2) as expected to fail due to missing a security fix for CVE-2021-23336. (`#850 <https://github.com/aio-libs/yarl/issues/850>`_)
1217
1218
1219 1.9.0 (2023-04-19)
1220 ==================
1221
1222 This release was never published to PyPI, due to issues with the build process.
1223
1224 Features
1225 --------
1226
1227 - Added ``URL.joinpath(*elements)``, to create a new URL appending multiple path elements. (`#704 <https://github.com/aio-libs/yarl/issues/704>`_)
1228 - Made ``URL.__truediv__()()`` return ``NotImplemented`` if called with an
1229 unsupported type — by `@michaeljpeters <https://github.com/sponsors/michaeljpeters>`__.
1230 (`#832 <https://github.com/aio-libs/yarl/issues/832>`_)
1231
1232
1233 Bugfixes
1234 --------
1235
1236 - Path normalization for absolute URLs no longer raises a ValueError exception
1237 when ``..`` segments would otherwise go beyond the URL path root.
1238 (`#536 <https://github.com/aio-libs/yarl/issues/536>`_)
1239 - Fixed an issue with update_query() not getting rid of the query when argument is None. (`#792 <https://github.com/aio-libs/yarl/issues/792>`_)
1240 - Added some input restrictions on with_port() function to prevent invalid boolean inputs or out of valid port inputs; handled incorrect 0 port representation. (`#793 <https://github.com/aio-libs/yarl/issues/793>`_)
1241 - Made ``yarl.URL.build()`` raise a ``TypeError`` if the ``host`` argument is ``None`` — by `@paulpapacz <https://github.com/sponsors/paulpapacz>`__. (`#808 <https://github.com/aio-libs/yarl/issues/808>`_)
1242 - Fixed an issue with ``update_query()`` getting rid of the query when the argument
1243 is empty but not ``None``. (`#845 <https://github.com/aio-libs/yarl/issues/845>`_)
1244
1245
1246 Misc
1247 ----
1248
1249 - `#220 <https://github.com/aio-libs/yarl/issues/220>`_
1250
1251
1252 1.8.2 (2022-12-03)
1253 ==================
1254
1255 This is the first release that started shipping wheels for Python 3.11.
1256
1257
1258 1.8.1 (2022-08-01)
1259 ==================
1260
1261 Misc
1262 ----
1263
1264 - `#694 <https://github.com/aio-libs/yarl/issues/694>`_, `#699 <https://github.com/aio-libs/yarl/issues/699>`_, `#700 <https://github.com/aio-libs/yarl/issues/700>`_, `#701 <https://github.com/aio-libs/yarl/issues/701>`_, `#702 <https://github.com/aio-libs/yarl/issues/702>`_, `#703 <https://github.com/aio-libs/yarl/issues/703>`_, `#739 <https://github.com/aio-libs/yarl/issues/739>`_
1265
1266
1267 1.8.0 (2022-08-01)
1268 ==================
1269
1270 Features
1271 --------
1272
1273 - Added ``URL.raw_suffix``, ``URL.suffix``, ``URL.raw_suffixes``, ``URL.suffixes``, ``URL.with_suffix``. (`#613 <https://github.com/aio-libs/yarl/issues/613>`_)
1274
1275
1276 Improved Documentation
1277 ----------------------
1278
1279 - Fixed broken internal references to ``yarl.URL.human_repr()``.
1280 (`#665 <https://github.com/aio-libs/yarl/issues/665>`_)
1281 - Fixed broken external references to ``multidict:index`` docs. (`#665 <https://github.com/aio-libs/yarl/issues/665>`_)
1282
1283
1284 Deprecations and Removals
1285 -------------------------
1286
1287 - Dropped Python 3.6 support. (`#672 <https://github.com/aio-libs/yarl/issues/672>`_)
1288
1289
1290 Misc
1291 ----
1292
1293 - `#646 <https://github.com/aio-libs/yarl/issues/646>`_, `#699 <https://github.com/aio-libs/yarl/issues/699>`_, `#701 <https://github.com/aio-libs/yarl/issues/701>`_
1294
1295
1296 1.7.2 (2021-11-01)
1297 ==================
1298
1299 Bugfixes
1300 --------
1301
1302 - Changed call in ``with_port()`` to stop reencoding parts of the URL that were already encoded. (`#623 <https://github.com/aio-libs/yarl/issues/623>`_)
1303
1304
1305 1.7.1 (2021-10-07)
1306 ==================
1307
1308 Bugfixes
1309 --------
1310
1311 - Fix 1.7.0 build error
1312
1313 1.7.0 (2021-10-06)
1314 ==================
1315
1316 Features
1317 --------
1318
1319 - Add ``__bytes__()`` magic method so that ``bytes(url)`` will work and use optimal ASCII encoding.
1320 (`#582 <https://github.com/aio-libs/yarl/issues/582>`_)
1321 - Started shipping platform-specific arm64 wheels for Apple Silicon. (`#622 <https://github.com/aio-libs/yarl/issues/622>`_)
1322 - Started shipping platform-specific wheels with the ``musl`` tag targeting typical Alpine Linux runtimes. (`#622 <https://github.com/aio-libs/yarl/issues/622>`_)
1323 - Added support for Python 3.10. (`#622 <https://github.com/aio-libs/yarl/issues/622>`_)
1324
1325
1326 1.6.3 (2020-11-14)
1327 ==================
1328
1329 Bugfixes
1330 --------
1331
1332 - No longer loose characters when decoding incorrect percent-sequences (like ``%e2%82%f8``). All non-decodable percent-sequences are now preserved.
1333 `#517 <https://github.com/aio-libs/yarl/issues/517>`_
1334 - Provide x86 Windows wheels.
1335 `#535 <https://github.com/aio-libs/yarl/issues/535>`_
1336
1337
1338 ----
1339
1340
1341 1.6.2 (2020-10-12)
1342 ==================
1343
1344
1345 Bugfixes
1346 --------
1347
1348 - Provide generated ``.c`` files in TarBall distribution.
1349 `#530 <https://github.com/aio-libs/multidict/issues/530>`_
1350
1351 1.6.1 (2020-10-12)
1352 ==================
1353
1354 Features
1355 --------
1356
1357 - Provide wheels for ``aarch64``, ``i686``, ``ppc64le``, ``s390x`` architectures on
1358 Linux as well as ``x86_64``.
1359 `#507 <https://github.com/aio-libs/yarl/issues/507>`_
1360 - Provide wheels for Python 3.9.
1361 `#526 <https://github.com/aio-libs/yarl/issues/526>`_
1362
1363 Bugfixes
1364 --------
1365
1366 - ``human_repr()`` now always produces valid representation equivalent to the original URL (if the original URL is valid).
1367 `#511 <https://github.com/aio-libs/yarl/issues/511>`_
1368 - Fixed requoting a single percent followed by a percent-encoded character in the Cython implementation.
1369 `#514 <https://github.com/aio-libs/yarl/issues/514>`_
1370 - Fix ValueError when decoding ``%`` which is not followed by two hexadecimal digits.
1371 `#516 <https://github.com/aio-libs/yarl/issues/516>`_
1372 - Fix decoding ``%`` followed by a space and hexadecimal digit.
1373 `#520 <https://github.com/aio-libs/yarl/issues/520>`_
1374 - Fix annotation of ``with_query()``/``update_query()`` methods for ``key=[val1, val2]`` case.
1375 `#528 <https://github.com/aio-libs/yarl/issues/528>`_
1376
1377 Removal
1378 -------
1379
1380 - Drop Python 3.5 support; Python 3.6 is the minimal supported Python version.
1381
1382
1383 ----
1384
1385
1386 1.6.0 (2020-09-23)
1387 ==================
1388
1389 Features
1390 --------
1391
1392 - Allow for int and float subclasses in query, while still denying bool.
1393 `#492 <https://github.com/aio-libs/yarl/issues/492>`_
1394
1395
1396 Bugfixes
1397 --------
1398
1399 - Do not requote arguments in ``URL.build()``, ``with_xxx()`` and in ``/`` operator.
1400 `#502 <https://github.com/aio-libs/yarl/issues/502>`_
1401 - Keep IPv6 brackets in ``origin()``.
1402 `#504 <https://github.com/aio-libs/yarl/issues/504>`_
1403
1404
1405 ----
1406
1407
1408 1.5.1 (2020-08-01)
1409 ==================
1410
1411 Bugfixes
1412 --------
1413
1414 - Fix including relocated internal ``yarl._quoting_c`` C-extension into published PyPI dists.
1415 `#485 <https://github.com/aio-libs/yarl/issues/485>`_
1416
1417
1418 Misc
1419 ----
1420
1421 - `#484 <https://github.com/aio-libs/yarl/issues/484>`_
1422
1423
1424 ----
1425
1426
1427 1.5.0 (2020-07-26)
1428 ==================
1429
1430 Features
1431 --------
1432
1433 - Convert host to lowercase on URL building.
1434 `#386 <https://github.com/aio-libs/yarl/issues/386>`_
1435 - Allow using ``mod`` operator (``%``) for updating query string (an alias for ``update_query()`` method).
1436 `#435 <https://github.com/aio-libs/yarl/issues/435>`_
1437 - Allow use of sequences such as ``list`` and ``tuple`` in the values
1438 of a mapping such as ``dict`` to represent that a key has many values::
1439
1440 url = URL("http://example.com")
1441 assert url.with_query({"a": [1, 2]}) == URL("http://example.com/?a=1&a=2")
1442
1443 `#443 <https://github.com/aio-libs/yarl/issues/443>`_
1444 - Support ``URL.build()`` with scheme and path (creates a relative URL).
1445 `#464 <https://github.com/aio-libs/yarl/issues/464>`_
1446 - Cache slow IDNA encode/decode calls.
1447 `#476 <https://github.com/aio-libs/yarl/issues/476>`_
1448 - Add ``@final`` / ``Final`` type hints
1449 `#477 <https://github.com/aio-libs/yarl/issues/477>`_
1450 - Support URL authority/raw_authority properties and authority argument of ``URL.build()`` method.
1451 `#478 <https://github.com/aio-libs/yarl/issues/478>`_
1452 - Hide the library implementation details, make the exposed public list very clean.
1453 `#483 <https://github.com/aio-libs/yarl/issues/483>`_
1454
1455
1456 Bugfixes
1457 --------
1458
1459 - Fix tests with newer Python (3.7.6, 3.8.1 and 3.9.0+).
1460 `#409 <https://github.com/aio-libs/yarl/issues/409>`_
1461 - Fix a bug where query component, passed in a form of mapping or sequence, is unquoted in unexpected way.
1462 `#426 <https://github.com/aio-libs/yarl/issues/426>`_
1463 - Hide ``Query`` and ``QueryVariable`` type aliases in ``__init__.pyi``, now they are prefixed with underscore.
1464 `#431 <https://github.com/aio-libs/yarl/issues/431>`_
1465 - Keep IPv6 brackets after updating port/user/password.
1466 `#451 <https://github.com/aio-libs/yarl/issues/451>`_
1467
1468
1469 ----
1470
1471
1472 1.4.2 (2019-12-05)
1473 ==================
1474
1475 Features
1476 --------
1477
1478 - Workaround for missing ``str.isascii()`` in Python 3.6
1479 `#389 <https://github.com/aio-libs/yarl/issues/389>`_
1480
1481
1482 ----
1483
1484
1485 1.4.1 (2019-11-29)
1486 ==================
1487
1488 * Fix regression, make the library work on Python 3.5 and 3.6 again.
1489
1490 1.4.0 (2019-11-29)
1491 ==================
1492
1493 * Distinguish an empty password in URL from a password not provided at all (#262)
1494
1495 * Fixed annotations for optional parameters of ``URL.build`` (#309)
1496
1497 * Use None as default value of ``user`` parameter of ``URL.build`` (#309)
1498
1499 * Enforce building C Accelerated modules when installing from source tarball, use
1500 ``YARL_NO_EXTENSIONS`` environment variable for falling back to (slower) Pure Python
1501 implementation (#329)
1502
1503 * Drop Python 3.5 support
1504
1505 * Fix quoting of plus in path by pure python version (#339)
1506
1507 * Don't create a new URL if fragment is unchanged (#292)
1508
1509 * Included in error message the path that produces starting slash forbidden error (#376)
1510
1511 * Skip slow IDNA encoding for ASCII-only strings (#387)
1512
1513
1514 1.3.0 (2018-12-11)
1515 ==================
1516
1517 * Fix annotations for ``query`` parameter (#207)
1518
1519 * An incoming query sequence can have int variables (the same as for
1520 Mapping type) (#208)
1521
1522 * Add ``URL.explicit_port`` property (#218)
1523
1524 * Give a friendlier error when port can't be converted to int (#168)
1525
1526 * ``bool(URL())`` now returns ``False`` (#272)
1527
1528 1.2.6 (2018-06-14)
1529 ==================
1530
1531 * Drop Python 3.4 trove classifier (#205)
1532
1533 1.2.5 (2018-05-23)
1534 ==================
1535
1536 * Fix annotations for ``build`` (#199)
1537
1538 1.2.4 (2018-05-08)
1539 ==================
1540
1541 * Fix annotations for ``cached_property`` (#195)
1542
1543 1.2.3 (2018-05-03)
1544 ==================
1545
1546 * Accept ``str`` subclasses in ``URL`` constructor (#190)
1547
1548 1.2.2 (2018-05-01)
1549 ==================
1550
1551 * Fix build
1552
1553 1.2.1 (2018-04-30)
1554 ==================
1555
1556 * Pin minimal required Python to 3.5.3 (#189)
1557
1558 1.2.0 (2018-04-30)
1559 ==================
1560
1561 * Forbid inheritance, replace ``__init__`` with ``__new__`` (#171)
1562
1563 * Support PEP-561 (provide type hinting marker) (#182)
1564
1565 1.1.1 (2018-02-17)
1566 ==================
1567
1568 * Fix performance regression: don't encode empty ``netloc`` (#170)
1569
1570 1.1.0 (2018-01-21)
1571 ==================
1572
1573 * Make pure Python quoter consistent with Cython version (#162)
1574
1575 1.0.0 (2018-01-15)
1576 ==================
1577
1578 * Use fast path if quoted string does not need requoting (#154)
1579
1580 * Speed up quoting/unquoting by ``_Quoter`` and ``_Unquoter`` classes (#155)
1581
1582 * Drop ``yarl.quote`` and ``yarl.unquote`` public functions (#155)
1583
1584 * Add custom string writer, reuse static buffer if available (#157)
1585 Code is 50-80 times faster than Pure Python version (was 4-5 times faster)
1586
1587 * Don't recode IP zone (#144)
1588
1589 * Support ``encoded=True`` in ``yarl.URL.build()`` (#158)
1590
1591 * Fix updating query with multiple keys (#160)
1592
1593 0.18.0 (2018-01-10)
1594 ===================
1595
1596 * Fallback to IDNA 2003 if domain name is not IDNA 2008 compatible (#152)
1597
1598 0.17.0 (2017-12-30)
1599 ===================
1600
1601 * Use IDNA 2008 for domain name processing (#149)
1602
1603 0.16.0 (2017-12-07)
1604 ===================
1605
1606 * Fix raising ``TypeError`` by ``url.query_string()`` after
1607 ``url.with_query({})`` (empty mapping) (#141)
1608
1609 0.15.0 (2017-11-23)
1610 ===================
1611
1612 * Add ``raw_path_qs`` attribute (#137)
1613
1614 0.14.2 (2017-11-14)
1615 ===================
1616
1617 * Restore ``strict`` parameter as no-op in ``quote`` / ``unquote``
1618
1619 0.14.1 (2017-11-13)
1620 ===================
1621
1622 * Restore ``strict`` parameter as no-op for sake of compatibility with
1623 aiohttp 2.2
1624
1625 0.14.0 (2017-11-11)
1626 ===================
1627
1628 * Drop strict mode (#123)
1629
1630 * Fix ``"ValueError: Unallowed PCT %"`` when there's a ``"%"`` in the URL (#124)
1631
1632 0.13.0 (2017-10-01)
1633 ===================
1634
1635 * Document ``encoded`` parameter (#102)
1636
1637 * Support relative URLs like ``'?key=value'`` (#100)
1638
1639 * Unsafe encoding for QS fixed. Encode ``;`` character in value parameter (#104)
1640
1641 * Process passwords without user names (#95)
1642
1643 0.12.0 (2017-06-26)
1644 ===================
1645
1646 * Properly support paths without leading slash in ``URL.with_path()`` (#90)
1647
1648 * Enable type annotation checks
1649
1650 0.11.0 (2017-06-26)
1651 ===================
1652
1653 * Normalize path (#86)
1654
1655 * Clear query and fragment parts in ``.with_path()`` (#85)
1656
1657 0.10.3 (2017-06-13)
1658 ===================
1659
1660 * Prevent double URL arguments unquoting (#83)
1661
1662 0.10.2 (2017-05-05)
1663 ===================
1664
1665 * Unexpected hash behavior (#75)
1666
1667
1668 0.10.1 (2017-05-03)
1669 ===================
1670
1671 * Unexpected compare behavior (#73)
1672
1673 * Do not quote or unquote + if not a query string. (#74)
1674
1675
1676 0.10.0 (2017-03-14)
1677 ===================
1678
1679 * Added ``URL.build`` class method (#58)
1680
1681 * Added ``path_qs`` attribute (#42)
1682
1683
1684 0.9.8 (2017-02-16)
1685 ==================
1686
1687 * Do not quote ``:`` in path
1688
1689
1690 0.9.7 (2017-02-16)
1691 ==================
1692
1693 * Load from pickle without _cache (#56)
1694
1695 * Percent-encoded pluses in path variables become spaces (#59)
1696
1697
1698 0.9.6 (2017-02-15)
1699 ==================
1700
1701 * Revert backward incompatible change (BaseURL)
1702
1703
1704 0.9.5 (2017-02-14)
1705 ==================
1706
1707 * Fix BaseURL rich comparison support
1708
1709
1710 0.9.4 (2017-02-14)
1711 ==================
1712
1713 * Use BaseURL
1714
1715
1716 0.9.3 (2017-02-14)
1717 ==================
1718
1719 * Added BaseURL
1720
1721
1722 0.9.2 (2017-02-08)
1723 ==================
1724
1725 * Remove debug print
1726
1727
1728 0.9.1 (2017-02-07)
1729 ==================
1730
1731 * Do not lose tail chars (#45)
1732
1733
1734 0.9.0 (2017-02-07)
1735 ==================
1736
1737 * Allow to quote ``%`` in non strict mode (#21)
1738
1739 * Incorrect parsing of query parameters with %3B (;) inside (#34)
1740
1741 * Fix core dumps (#41)
1742
1743 * ``tmpbuf`` - compiling error (#43)
1744
1745 * Added ``URL.update_path()`` method
1746
1747 * Added ``URL.update_query()`` method (#47)
1748
1749
1750 0.8.1 (2016-12-03)
1751 ==================
1752
1753 * Fix broken aiohttp: revert back ``quote`` / ``unquote``.
1754
1755
1756 0.8.0 (2016-12-03)
1757 ==================
1758
1759 * Support more verbose error messages in ``.with_query()`` (#24)
1760
1761 * Don't percent-encode ``@`` and ``:`` in path (#32)
1762
1763 * Don't expose ``yarl.quote`` and ``yarl.unquote``, these functions are
1764 part of private API
1765
1766 0.7.1 (2016-11-18)
1767 ==================
1768
1769 * Accept not only ``str`` but all classes inherited from ``str`` also (#25)
1770
1771 0.7.0 (2016-11-07)
1772 ==================
1773
1774 * Accept ``int`` as value for ``.with_query()``
1775
1776 0.6.0 (2016-11-07)
1777 ==================
1778
1779 * Explicitly use UTF8 encoding in ``setup.py`` (#20)
1780 * Properly unquote non-UTF8 strings (#19)
1781
1782 0.5.3 (2016-11-02)
1783 ==================
1784
1785 * Don't use ``typing.NamedTuple`` fields but indexes on URL construction
1786
1787 0.5.2 (2016-11-02)
1788 ==================
1789
1790 * Inline ``_encode`` class method
1791
1792 0.5.1 (2016-11-02)
1793 ==================
1794
1795 * Make URL construction faster by removing extra classmethod calls
1796
1797 0.5.0 (2016-11-02)
1798 ==================
1799
1800 * Add Cython optimization for quoting/unquoting
1801 * Provide binary wheels
1802
1803 0.4.3 (2016-09-29)
1804 ==================
1805
1806 * Fix typing stubs
1807
1808 0.4.2 (2016-09-29)
1809 ==================
1810
1811 * Expose ``quote()`` and ``unquote()`` as public API
1812
1813 0.4.1 (2016-09-28)
1814 ==================
1815
1816 * Support empty values in query (``'/path?arg'``)
1817
1818 0.4.0 (2016-09-27)
1819 ==================
1820
1821 * Introduce ``relative()`` (#16)
1822
1823 0.3.2 (2016-09-27)
1824 ==================
1825
1826 * Typo fixes #15
1827
1828 0.3.1 (2016-09-26)
1829 ==================
1830
1831 * Support sequence of pairs as ``with_query()`` parameter
1832
1833 0.3.0 (2016-09-26)
1834 ==================
1835
1836 * Introduce ``is_default_port()``
1837
1838 0.2.1 (2016-09-26)
1839 ==================
1840
1841 * Raise ValueError for URLs like 'http://:8080/'
1842
1843 0.2.0 (2016-09-18)
1844 ==================
1845
1846 * Avoid doubling slashes when joining paths (#13)
1847
1848 * Appending path starting from slash is forbidden (#12)
1849
1850 0.1.4 (2016-09-09)
1851 ==================
1852
1853 * Add ``kwargs`` support for ``with_query()`` (#10)
1854
1855 0.1.3 (2016-09-07)
1856 ==================
1857
1858 * Document ``with_query()``, ``with_fragment()`` and ``origin()``
1859
1860 * Allow ``None`` for ``with_query()`` and ``with_fragment()``
1861
1862 0.1.2 (2016-09-07)
1863 ==================
1864
1865 * Fix links, tune docs theme.
1866
1867 0.1.1 (2016-09-06)
1868 ==================
1869
1870 * Update README, old version used obsolete API
1871
1872 0.1.0 (2016-09-06)
1873 ==================
1874
1875 * The library was deeply refactored, bytes are gone away but all
1876 accepted strings are encoded if needed.
1877
1878 0.0.1 (2016-08-30)
1879 ==================
1880
1881 * The first release.