METADATA 73 KB

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