METADATA 70 KB

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