METADATA 31 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086
  1. Metadata-Version: 2.1
  2. Name: yarl
  3. Version: 1.9.4
  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.7
  28. Classifier: Programming Language :: Python :: 3.8
  29. Classifier: Programming Language :: Python :: 3.9
  30. Classifier: Programming Language :: Python :: 3.10
  31. Classifier: Programming Language :: Python :: 3.11
  32. Classifier: Programming Language :: Python :: 3.12
  33. Classifier: Topic :: Internet :: WWW/HTTP
  34. Classifier: Topic :: Software Development :: Libraries :: Python Modules
  35. Requires-Python: >=3.7
  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: typing-extensions >=3.7.4 ; python_version < "3.8"
  42. yarl
  43. ====
  44. The module provides handy URL class for URL parsing and changing.
  45. .. image:: https://github.com/aio-libs/yarl/workflows/CI/badge.svg
  46. :target: https://github.com/aio-libs/yarl/actions?query=workflow%3ACI
  47. :align: right
  48. .. image:: https://codecov.io/gh/aio-libs/yarl/branch/master/graph/badge.svg
  49. :target: https://codecov.io/gh/aio-libs/yarl
  50. .. image:: https://badge.fury.io/py/yarl.svg
  51. :target: https://badge.fury.io/py/yarl
  52. .. image:: https://readthedocs.org/projects/yarl/badge/?version=latest
  53. :target: https://yarl.aio-libs.org
  54. .. image:: https://img.shields.io/pypi/pyversions/yarl.svg
  55. :target: https://pypi.python.org/pypi/yarl
  56. .. 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
  57. :target: https://matrix.to/#/%23aio-libs:matrix.org
  58. :alt: Matrix Room — #aio-libs:matrix.org
  59. .. 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
  60. :target: https://matrix.to/#/%23aio-libs-space:matrix.org
  61. :alt: Matrix Space — #aio-libs-space:matrix.org
  62. Introduction
  63. ------------
  64. Url is constructed from ``str``:
  65. .. code-block:: pycon
  66. >>> from yarl import URL
  67. >>> url = URL('https://www.python.org/~guido?arg=1#frag')
  68. >>> url
  69. URL('https://www.python.org/~guido?arg=1#frag')
  70. All url parts: *scheme*, *user*, *password*, *host*, *port*, *path*,
  71. *query* and *fragment* are accessible by properties:
  72. .. code-block:: pycon
  73. >>> url.scheme
  74. 'https'
  75. >>> url.host
  76. 'www.python.org'
  77. >>> url.path
  78. '/~guido'
  79. >>> url.query_string
  80. 'arg=1'
  81. >>> url.query
  82. <MultiDictProxy('arg': '1')>
  83. >>> url.fragment
  84. 'frag'
  85. All url manipulations produce a new url object:
  86. .. code-block:: pycon
  87. >>> url = URL('https://www.python.org')
  88. >>> url / 'foo' / 'bar'
  89. URL('https://www.python.org/foo/bar')
  90. >>> url / 'foo' % {'bar': 'baz'}
  91. URL('https://www.python.org/foo?bar=baz')
  92. Strings passed to constructor and modification methods are
  93. automatically encoded giving canonical representation as result:
  94. .. code-block:: pycon
  95. >>> url = URL('https://www.python.org/шлях')
  96. >>> url
  97. URL('https://www.python.org/%D1%88%D0%BB%D1%8F%D1%85')
  98. Regular properties are *percent-decoded*, use ``raw_`` versions for
  99. getting *encoded* strings:
  100. .. code-block:: pycon
  101. >>> url.path
  102. '/шлях'
  103. >>> url.raw_path
  104. '/%D1%88%D0%BB%D1%8F%D1%85'
  105. Human readable representation of URL is available as ``.human_repr()``:
  106. .. code-block:: pycon
  107. >>> url.human_repr()
  108. 'https://www.python.org/шлях'
  109. For full documentation please read https://yarl.aio-libs.org.
  110. Installation
  111. ------------
  112. ::
  113. $ pip install yarl
  114. The library is Python 3 only!
  115. PyPI contains binary wheels for Linux, Windows and MacOS. If you want to install
  116. ``yarl`` on another operating system (like *Alpine Linux*, which is not
  117. manylinux-compliant because of the missing glibc and therefore, cannot be
  118. used with our wheels) the the tarball will be used to compile the library from
  119. the source code. It requires a C compiler and and Python headers installed.
  120. To skip the compilation you must explicitly opt-in by using a PEP 517
  121. configuration setting ``pure-python``, or setting the ``YARL_NO_EXTENSIONS``
  122. environment variable to a non-empty value, e.g.:
  123. .. code-block:: console
  124. $ pip install yarl --config-settings=pure-python=false
  125. Please note that the pure-Python (uncompiled) version is much slower. However,
  126. PyPy always uses a pure-Python implementation, and, as such, it is unaffected
  127. by this variable.
  128. Dependencies
  129. ------------
  130. YARL requires multidict_ library.
  131. API documentation
  132. ------------------
  133. The documentation is located at https://yarl.aio-libs.org.
  134. Why isn't boolean supported by the URL query API?
  135. -------------------------------------------------
  136. There is no standard for boolean representation of boolean values.
  137. Some systems prefer ``true``/``false``, others like ``yes``/``no``, ``on``/``off``,
  138. ``Y``/``N``, ``1``/``0``, etc.
  139. ``yarl`` cannot make an unambiguous decision on how to serialize ``bool`` values because
  140. it is specific to how the end-user's application is built and would be different for
  141. different apps. The library doesn't accept booleans in the API; a user should convert
  142. bools into strings using own preferred translation protocol.
  143. Comparison with other URL libraries
  144. ------------------------------------
  145. * furl (https://pypi.python.org/pypi/furl)
  146. The library has rich functionality but the ``furl`` object is mutable.
  147. I'm afraid to pass this object into foreign code: who knows if the
  148. code will modify my url in a terrible way while I just want to send URL
  149. with handy helpers for accessing URL properties.
  150. ``furl`` has other non-obvious tricky things but the main objection
  151. is mutability.
  152. * URLObject (https://pypi.python.org/pypi/URLObject)
  153. URLObject is immutable, that's pretty good.
  154. Every URL change generates a new URL object.
  155. But the library doesn't do any decode/encode transformations leaving the
  156. end user to cope with these gory details.
  157. Source code
  158. -----------
  159. The project is hosted on GitHub_
  160. Please file an issue on the `bug tracker
  161. <https://github.com/aio-libs/yarl/issues>`_ if you have found a bug
  162. or have some suggestion in order to improve the library.
  163. The library uses `Azure Pipelines <https://dev.azure.com/aio-libs/yarl>`_ for
  164. Continuous Integration.
  165. Discussion list
  166. ---------------
  167. *aio-libs* google group: https://groups.google.com/forum/#!forum/aio-libs
  168. Feel free to post your questions and ideas here.
  169. Authors and License
  170. -------------------
  171. The ``yarl`` package is written by Andrew Svetlov.
  172. It's *Apache 2* licensed and freely available.
  173. .. _GitHub: https://github.com/aio-libs/yarl
  174. .. _multidict: https://github.com/aio-libs/multidict
  175. ..
  176. You should *NOT* be adding new change log entries to this file, this
  177. file is managed by towncrier. You *may* edit previous change logs to
  178. fix problems like typo corrections or such.
  179. To add a new change log entry, please see
  180. https://pip.pypa.io/en/latest/development/#adding-a-news-entry
  181. we named the news folder "changes".
  182. WARNING: Don't drop the next directive!
  183. .. towncrier release notes start
  184. 1.9.4 (2023-12-06)
  185. ==================
  186. Bug fixes
  187. ---------
  188. - Started raising ``TypeError`` when a string value is passed into
  189. ``yarl.URL.build()`` as the ``port`` argument -- by `@commonism <https://github.com/sponsors/commonism>`__.
  190. Previously the empty string as port would create malformed URLs when rendered as string representations. (`#883 <https://github.com/aio-libs/yarl/issues/883>`__)
  191. Packaging updates and notes for downstreams
  192. -------------------------------------------
  193. - The leading ``--`` has been dropped from the `PEP 517 <https://peps.python.org/pep-517>`__ in-tree build
  194. backend config setting names. ``--pure-python`` is now just ``pure-python``
  195. -- by `@webknjaz <https://github.com/sponsors/webknjaz>`__.
  196. The usage now looks as follows:
  197. .. code-block:: console
  198. $ python -m build \
  199. --config-setting=pure-python=true \
  200. --config-setting=with-cython-tracing=true
  201. (`#963 <https://github.com/aio-libs/yarl/issues/963>`__)
  202. Contributor-facing changes
  203. --------------------------
  204. - A step-by-step ``Release Guide`` guide has
  205. been added, describing how to release *yarl* -- by `@webknjaz <https://github.com/sponsors/webknjaz>`__.
  206. This is primarily targeting maintainers. (`#960 <https://github.com/aio-libs/yarl/issues/960>`__)
  207. - Coverage collection has been implemented for the Cython modules
  208. -- by `@webknjaz <https://github.com/sponsors/webknjaz>`__.
  209. It will also be reported to Codecov from any non-release CI jobs.
  210. To measure coverage in a development environment, *yarl* can be
  211. installed in editable mode, which requires an environment variable
  212. ``YARL_CYTHON_TRACING=1`` to be set:
  213. .. code-block:: console
  214. $ YARL_CYTHON_TRACING=1 python -Im pip install -e .
  215. Editable install produces C-files required for the Cython coverage
  216. plugin to map the measurements back to the PYX-files. (`#961 <https://github.com/aio-libs/yarl/issues/961>`__)
  217. - It is now possible to request line tracing in Cython builds using the
  218. ``with-cython-tracing`` `PEP 517 <https://peps.python.org/pep-517>`__ config setting
  219. -- `@webknjaz <https://github.com/sponsors/webknjaz>`__.
  220. This can be used in CI and development environment to measure coverage
  221. on Cython modules, but is not normally useful to the end-users or
  222. downstream packagers.
  223. Here's a usage example:
  224. .. code-block:: console
  225. $ python -Im pip install . --config-settings=with-cython-tracing=true
  226. For editable installs, this setting is on by default. Otherwise, it's
  227. off unless requested explicitly. (`#962 <https://github.com/aio-libs/yarl/issues/962>`__)
  228. 1.9.3 (2023-11-20)
  229. ==================
  230. Bug fixes
  231. ---------
  232. - 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>`__)
  233. - Started accepting string subclasses in ``__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>`__)
  234. - 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>`__)
  235. - Updated type hints to include ``URL.missing_port()``, ``URL.__bytes__()``
  236. and the ``encoding`` argument to ``yarl.URL.joinpath()``
  237. -- by `@mjpieters <https://github.com/sponsors/mjpieters>`__. (`#891 <https://github.com/aio-libs/yarl/issues/891>`__)
  238. Packaging updates and notes for downstreams
  239. -------------------------------------------
  240. - 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>`__)
  241. - Declared modern ``setuptools.build_meta`` as the `PEP 517 <https://peps.python.org/pep-517>`__ build
  242. backend in ``pyproject.toml`` explicitly -- by `@webknjaz <https://github.com/sponsors/webknjaz>`__. (`#886 <https://github.com/aio-libs/yarl/issues/886>`__)
  243. - Converted most of the packaging setup into a declarative ``setup.cfg``
  244. config -- by `@webknjaz <https://github.com/sponsors/webknjaz>`__. (`#890 <https://github.com/aio-libs/yarl/issues/890>`__)
  245. - The packaging is replaced from an old-fashioned ``setup.py`` to an
  246. in-tree `PEP 517 <https://peps.python.org/pep-517>`__ build backend -- by `@webknjaz <https://github.com/sponsors/webknjaz>`__.
  247. Whenever the end-users or downstream packagers need to build ``yarl`` from
  248. source (a Git checkout or an sdist), they may pass a ``config_settings``
  249. flag ``--pure-python``. If this flag is not set, a C-extension will be built
  250. and included into the distribution.
  251. Here is how this can be done with ``pip``:
  252. .. code-block:: console
  253. $ python -m pip install . --config-settings=--pure-python=false
  254. This will also work with ``-e | --editable``.
  255. The same can be achieved via ``pypa/build``:
  256. .. code-block:: console
  257. $ python -m build --config-setting=--pure-python=false
  258. Adding ``-w | --wheel`` can force ``pypa/build`` produce a wheel from source
  259. directly, as opposed to building an ``sdist`` and then building from it. (`#893 <https://github.com/aio-libs/yarl/issues/893>`__)
  260. .. attention::
  261. v1.9.3 was the only version using the ``--pure-python`` setting name.
  262. Later versions dropped the ``--`` prefix, making it just ``pure-python``.
  263. - Declared Python 3.12 supported officially in the distribution package metadata
  264. -- by `@edgarrmondragon <https://github.com/sponsors/edgarrmondragon>`__. (`#942 <https://github.com/aio-libs/yarl/issues/942>`__)
  265. Contributor-facing changes
  266. --------------------------
  267. - A regression test for no-host URLs was added per `#821 <https://github.com/aio-libs/yarl/issues/821>`__
  268. 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>`__)
  269. - 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>`__)
  270. - All Python 3.12 jobs are now marked as required to pass in CI
  271. -- by `@edgarrmondragon <https://github.com/sponsors/edgarrmondragon>`__. (`#942 <https://github.com/aio-libs/yarl/issues/942>`__)
  272. - MyST is now integrated in Sphinx -- by `@webknjaz <https://github.com/sponsors/webknjaz>`__.
  273. This allows the contributors to author new documents in Markdown
  274. when they have difficulties with going straight RST. (`#953 <https://github.com/aio-libs/yarl/issues/953>`__)
  275. 1.9.2 (2023-04-25)
  276. ==================
  277. Bugfixes
  278. --------
  279. - Fix regression with ``__truediv__`` and absolute URLs with empty paths causing the raw path to lack the leading ``/``.
  280. (`#854 <https://github.com/aio-libs/yarl/issues/854>`_)
  281. 1.9.1 (2023-04-21)
  282. ==================
  283. Bugfixes
  284. --------
  285. - 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>`_)
  286. 1.9.0 (2023-04-19)
  287. ==================
  288. This release was never published to PyPI, due to issues with the build process.
  289. Features
  290. --------
  291. - Added ``URL.joinpath(*elements)``, to create a new URL appending multiple path elements. (`#704 <https://github.com/aio-libs/yarl/issues/704>`_)
  292. - Made ``URL.__truediv__()`` return ``NotImplemented`` if called with an
  293. unsupported type — by `@michaeljpeters <https://github.com/sponsors/michaeljpeters>`__.
  294. (`#832 <https://github.com/aio-libs/yarl/issues/832>`_)
  295. Bugfixes
  296. --------
  297. - Path normalization for absolute URLs no longer raises a ValueError exception
  298. when ``..`` segments would otherwise go beyond the URL path root.
  299. (`#536 <https://github.com/aio-libs/yarl/issues/536>`_)
  300. - 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>`_)
  301. - 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>`_)
  302. - 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>`_)
  303. - Fixed an issue with ``update_query()`` getting rid of the query when the argument
  304. is empty but not ``None``. (`#845 <https://github.com/aio-libs/yarl/issues/845>`_)
  305. Misc
  306. ----
  307. - `#220 <https://github.com/aio-libs/yarl/issues/220>`_
  308. 1.8.2 (2022-12-03)
  309. ==================
  310. This is the first release that started shipping wheels for Python 3.11.
  311. 1.8.1 (2022-08-01)
  312. ==================
  313. Misc
  314. ----
  315. - `#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>`_
  316. 1.8.0 (2022-08-01)
  317. ==================
  318. Features
  319. --------
  320. - Added ``URL.raw_suffix``, ``URL.suffix``, ``URL.raw_suffixes``, ``URL.suffixes``, ``URL.with_suffix``. (`#613 <https://github.com/aio-libs/yarl/issues/613>`_)
  321. Improved Documentation
  322. ----------------------
  323. - Fixed broken internal references to ``yarl.URL.human_repr()``.
  324. (`#665 <https://github.com/aio-libs/yarl/issues/665>`_)
  325. - Fixed broken external references to ``multidict:index`` docs. (`#665 <https://github.com/aio-libs/yarl/issues/665>`_)
  326. Deprecations and Removals
  327. -------------------------
  328. - Dropped Python 3.6 support. (`#672 <https://github.com/aio-libs/yarl/issues/672>`_)
  329. Misc
  330. ----
  331. - `#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>`_
  332. 1.7.2 (2021-11-01)
  333. ==================
  334. Bugfixes
  335. --------
  336. - 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>`_)
  337. 1.7.1 (2021-10-07)
  338. ==================
  339. Bugfixes
  340. --------
  341. - Fix 1.7.0 build error
  342. 1.7.0 (2021-10-06)
  343. ==================
  344. Features
  345. --------
  346. - Add ``__bytes__()`` magic method so that ``bytes(url)`` will work and use optimal ASCII encoding.
  347. (`#582 <https://github.com/aio-libs/yarl/issues/582>`_)
  348. - Started shipping platform-specific arm64 wheels for Apple Silicon. (`#622 <https://github.com/aio-libs/yarl/issues/622>`_)
  349. - Started shipping platform-specific wheels with the ``musl`` tag targeting typical Alpine Linux runtimes. (`#622 <https://github.com/aio-libs/yarl/issues/622>`_)
  350. - Added support for Python 3.10. (`#622 <https://github.com/aio-libs/yarl/issues/622>`_)
  351. 1.6.3 (2020-11-14)
  352. ==================
  353. Bugfixes
  354. --------
  355. - No longer loose characters when decoding incorrect percent-sequences (like ``%e2%82%f8``). All non-decodable percent-sequences are now preserved.
  356. `#517 <https://github.com/aio-libs/yarl/issues/517>`_
  357. - Provide x86 Windows wheels.
  358. `#535 <https://github.com/aio-libs/yarl/issues/535>`_
  359. ----
  360. 1.6.2 (2020-10-12)
  361. ==================
  362. Bugfixes
  363. --------
  364. - Provide generated ``.c`` files in TarBall distribution.
  365. `#530 <https://github.com/aio-libs/multidict/issues/530>`_
  366. 1.6.1 (2020-10-12)
  367. ==================
  368. Features
  369. --------
  370. - Provide wheels for ``aarch64``, ``i686``, ``ppc64le``, ``s390x`` architectures on
  371. Linux as well as ``x86_64``.
  372. `#507 <https://github.com/aio-libs/yarl/issues/507>`_
  373. - Provide wheels for Python 3.9.
  374. `#526 <https://github.com/aio-libs/yarl/issues/526>`_
  375. Bugfixes
  376. --------
  377. - ``human_repr()`` now always produces valid representation equivalent to the original URL (if the original URL is valid).
  378. `#511 <https://github.com/aio-libs/yarl/issues/511>`_
  379. - Fixed requoting a single percent followed by a percent-encoded character in the Cython implementation.
  380. `#514 <https://github.com/aio-libs/yarl/issues/514>`_
  381. - Fix ValueError when decoding ``%`` which is not followed by two hexadecimal digits.
  382. `#516 <https://github.com/aio-libs/yarl/issues/516>`_
  383. - Fix decoding ``%`` followed by a space and hexadecimal digit.
  384. `#520 <https://github.com/aio-libs/yarl/issues/520>`_
  385. - Fix annotation of ``with_query()``/``update_query()`` methods for ``key=[val1, val2]`` case.
  386. `#528 <https://github.com/aio-libs/yarl/issues/528>`_
  387. Removal
  388. -------
  389. - Drop Python 3.5 support; Python 3.6 is the minimal supported Python version.
  390. ----
  391. 1.6.0 (2020-09-23)
  392. ==================
  393. Features
  394. --------
  395. - Allow for int and float subclasses in query, while still denying bool.
  396. `#492 <https://github.com/aio-libs/yarl/issues/492>`_
  397. Bugfixes
  398. --------
  399. - Do not requote arguments in ``URL.build()``, ``with_xxx()`` and in ``/`` operator.
  400. `#502 <https://github.com/aio-libs/yarl/issues/502>`_
  401. - Keep IPv6 brackets in ``origin()``.
  402. `#504 <https://github.com/aio-libs/yarl/issues/504>`_
  403. ----
  404. 1.5.1 (2020-08-01)
  405. ==================
  406. Bugfixes
  407. --------
  408. - Fix including relocated internal ``yarl._quoting_c`` C-extension into published PyPI dists.
  409. `#485 <https://github.com/aio-libs/yarl/issues/485>`_
  410. Misc
  411. ----
  412. - `#484 <https://github.com/aio-libs/yarl/issues/484>`_
  413. ----
  414. 1.5.0 (2020-07-26)
  415. ==================
  416. Features
  417. --------
  418. - Convert host to lowercase on URL building.
  419. `#386 <https://github.com/aio-libs/yarl/issues/386>`_
  420. - Allow using ``mod`` operator (``%``) for updating query string (an alias for ``update_query()`` method).
  421. `#435 <https://github.com/aio-libs/yarl/issues/435>`_
  422. - Allow use of sequences such as ``list`` and ``tuple`` in the values
  423. of a mapping such as ``dict`` to represent that a key has many values::
  424. url = URL("http://example.com")
  425. assert url.with_query({"a": [1, 2]}) == URL("http://example.com/?a=1&a=2")
  426. `#443 <https://github.com/aio-libs/yarl/issues/443>`_
  427. - Support ``URL.build()`` with scheme and path (creates a relative URL).
  428. `#464 <https://github.com/aio-libs/yarl/issues/464>`_
  429. - Cache slow IDNA encode/decode calls.
  430. `#476 <https://github.com/aio-libs/yarl/issues/476>`_
  431. - Add ``@final`` / ``Final`` type hints
  432. `#477 <https://github.com/aio-libs/yarl/issues/477>`_
  433. - Support URL authority/raw_authority properties and authority argument of ``URL.build()`` method.
  434. `#478 <https://github.com/aio-libs/yarl/issues/478>`_
  435. - Hide the library implementation details, make the exposed public list very clean.
  436. `#483 <https://github.com/aio-libs/yarl/issues/483>`_
  437. Bugfixes
  438. --------
  439. - Fix tests with newer Python (3.7.6, 3.8.1 and 3.9.0+).
  440. `#409 <https://github.com/aio-libs/yarl/issues/409>`_
  441. - Fix a bug where query component, passed in a form of mapping or sequence, is unquoted in unexpected way.
  442. `#426 <https://github.com/aio-libs/yarl/issues/426>`_
  443. - Hide ``Query`` and ``QueryVariable`` type aliases in ``__init__.pyi``, now they are prefixed with underscore.
  444. `#431 <https://github.com/aio-libs/yarl/issues/431>`_
  445. - Keep IPv6 brackets after updating port/user/password.
  446. `#451 <https://github.com/aio-libs/yarl/issues/451>`_
  447. ----
  448. 1.4.2 (2019-12-05)
  449. ==================
  450. Features
  451. --------
  452. - Workaround for missing ``str.isascii()`` in Python 3.6
  453. `#389 <https://github.com/aio-libs/yarl/issues/389>`_
  454. ----
  455. 1.4.1 (2019-11-29)
  456. ==================
  457. * Fix regression, make the library work on Python 3.5 and 3.6 again.
  458. 1.4.0 (2019-11-29)
  459. ==================
  460. * Distinguish an empty password in URL from a password not provided at all (#262)
  461. * Fixed annotations for optional parameters of ``URL.build`` (#309)
  462. * Use None as default value of ``user`` parameter of ``URL.build`` (#309)
  463. * Enforce building C Accelerated modules when installing from source tarball, use
  464. ``YARL_NO_EXTENSIONS`` environment variable for falling back to (slower) Pure Python
  465. implementation (#329)
  466. * Drop Python 3.5 support
  467. * Fix quoting of plus in path by pure python version (#339)
  468. * Don't create a new URL if fragment is unchanged (#292)
  469. * Included in error message the path that produces starting slash forbidden error (#376)
  470. * Skip slow IDNA encoding for ASCII-only strings (#387)
  471. 1.3.0 (2018-12-11)
  472. ==================
  473. * Fix annotations for ``query`` parameter (#207)
  474. * An incoming query sequence can have int variables (the same as for
  475. Mapping type) (#208)
  476. * Add ``URL.explicit_port`` property (#218)
  477. * Give a friendlier error when port can't be converted to int (#168)
  478. * ``bool(URL())`` now returns ``False`` (#272)
  479. 1.2.6 (2018-06-14)
  480. ==================
  481. * Drop Python 3.4 trove classifier (#205)
  482. 1.2.5 (2018-05-23)
  483. ==================
  484. * Fix annotations for ``build`` (#199)
  485. 1.2.4 (2018-05-08)
  486. ==================
  487. * Fix annotations for ``cached_property`` (#195)
  488. 1.2.3 (2018-05-03)
  489. ==================
  490. * Accept ``str`` subclasses in ``URL`` constructor (#190)
  491. 1.2.2 (2018-05-01)
  492. ==================
  493. * Fix build
  494. 1.2.1 (2018-04-30)
  495. ==================
  496. * Pin minimal required Python to 3.5.3 (#189)
  497. 1.2.0 (2018-04-30)
  498. ==================
  499. * Forbid inheritance, replace ``__init__`` with ``__new__`` (#171)
  500. * Support PEP-561 (provide type hinting marker) (#182)
  501. 1.1.1 (2018-02-17)
  502. ==================
  503. * Fix performance regression: don't encode empty ``netloc`` (#170)
  504. 1.1.0 (2018-01-21)
  505. ==================
  506. * Make pure Python quoter consistent with Cython version (#162)
  507. 1.0.0 (2018-01-15)
  508. ==================
  509. * Use fast path if quoted string does not need requoting (#154)
  510. * Speed up quoting/unquoting by ``_Quoter`` and ``_Unquoter`` classes (#155)
  511. * Drop ``yarl.quote`` and ``yarl.unquote`` public functions (#155)
  512. * Add custom string writer, reuse static buffer if available (#157)
  513. Code is 50-80 times faster than Pure Python version (was 4-5 times faster)
  514. * Don't recode IP zone (#144)
  515. * Support ``encoded=True`` in ``yarl.URL.build()`` (#158)
  516. * Fix updating query with multiple keys (#160)
  517. 0.18.0 (2018-01-10)
  518. ===================
  519. * Fallback to IDNA 2003 if domain name is not IDNA 2008 compatible (#152)
  520. 0.17.0 (2017-12-30)
  521. ===================
  522. * Use IDNA 2008 for domain name processing (#149)
  523. 0.16.0 (2017-12-07)
  524. ===================
  525. * Fix raising ``TypeError`` by ``url.query_string()`` after
  526. ``url.with_query({})`` (empty mapping) (#141)
  527. 0.15.0 (2017-11-23)
  528. ===================
  529. * Add ``raw_path_qs`` attribute (#137)
  530. 0.14.2 (2017-11-14)
  531. ===================
  532. * Restore ``strict`` parameter as no-op in ``quote`` / ``unquote``
  533. 0.14.1 (2017-11-13)
  534. ===================
  535. * Restore ``strict`` parameter as no-op for sake of compatibility with
  536. aiohttp 2.2
  537. 0.14.0 (2017-11-11)
  538. ===================
  539. * Drop strict mode (#123)
  540. * Fix ``"ValueError: Unallowed PCT %"`` when there's a ``"%"`` in the URL (#124)
  541. 0.13.0 (2017-10-01)
  542. ===================
  543. * Document ``encoded`` parameter (#102)
  544. * Support relative URLs like ``'?key=value'`` (#100)
  545. * Unsafe encoding for QS fixed. Encode ``;`` character in value parameter (#104)
  546. * Process passwords without user names (#95)
  547. 0.12.0 (2017-06-26)
  548. ===================
  549. * Properly support paths without leading slash in ``URL.with_path()`` (#90)
  550. * Enable type annotation checks
  551. 0.11.0 (2017-06-26)
  552. ===================
  553. * Normalize path (#86)
  554. * Clear query and fragment parts in ``.with_path()`` (#85)
  555. 0.10.3 (2017-06-13)
  556. ===================
  557. * Prevent double URL arguments unquoting (#83)
  558. 0.10.2 (2017-05-05)
  559. ===================
  560. * Unexpected hash behavior (#75)
  561. 0.10.1 (2017-05-03)
  562. ===================
  563. * Unexpected compare behavior (#73)
  564. * Do not quote or unquote + if not a query string. (#74)
  565. 0.10.0 (2017-03-14)
  566. ===================
  567. * Added ``URL.build`` class method (#58)
  568. * Added ``path_qs`` attribute (#42)
  569. 0.9.8 (2017-02-16)
  570. ==================
  571. * Do not quote ``:`` in path
  572. 0.9.7 (2017-02-16)
  573. ==================
  574. * Load from pickle without _cache (#56)
  575. * Percent-encoded pluses in path variables become spaces (#59)
  576. 0.9.6 (2017-02-15)
  577. ==================
  578. * Revert backward incompatible change (BaseURL)
  579. 0.9.5 (2017-02-14)
  580. ==================
  581. * Fix BaseURL rich comparison support
  582. 0.9.4 (2017-02-14)
  583. ==================
  584. * Use BaseURL
  585. 0.9.3 (2017-02-14)
  586. ==================
  587. * Added BaseURL
  588. 0.9.2 (2017-02-08)
  589. ==================
  590. * Remove debug print
  591. 0.9.1 (2017-02-07)
  592. ==================
  593. * Do not lose tail chars (#45)
  594. 0.9.0 (2017-02-07)
  595. ==================
  596. * Allow to quote ``%`` in non strict mode (#21)
  597. * Incorrect parsing of query parameters with %3B (;) inside (#34)
  598. * Fix core dumps (#41)
  599. * ``tmpbuf`` - compiling error (#43)
  600. * Added ``URL.update_path()`` method
  601. * Added ``URL.update_query()`` method (#47)
  602. 0.8.1 (2016-12-03)
  603. ==================
  604. * Fix broken aiohttp: revert back ``quote`` / ``unquote``.
  605. 0.8.0 (2016-12-03)
  606. ==================
  607. * Support more verbose error messages in ``.with_query()`` (#24)
  608. * Don't percent-encode ``@`` and ``:`` in path (#32)
  609. * Don't expose ``yarl.quote`` and ``yarl.unquote``, these functions are
  610. part of private API
  611. 0.7.1 (2016-11-18)
  612. ==================
  613. * Accept not only ``str`` but all classes inherited from ``str`` also (#25)
  614. 0.7.0 (2016-11-07)
  615. ==================
  616. * Accept ``int`` as value for ``.with_query()``
  617. 0.6.0 (2016-11-07)
  618. ==================
  619. * Explicitly use UTF8 encoding in ``setup.py`` (#20)
  620. * Properly unquote non-UTF8 strings (#19)
  621. 0.5.3 (2016-11-02)
  622. ==================
  623. * Don't use ``typing.NamedTuple`` fields but indexes on URL construction
  624. 0.5.2 (2016-11-02)
  625. ==================
  626. * Inline ``_encode`` class method
  627. 0.5.1 (2016-11-02)
  628. ==================
  629. * Make URL construction faster by removing extra classmethod calls
  630. 0.5.0 (2016-11-02)
  631. ==================
  632. * Add Cython optimization for quoting/unquoting
  633. * Provide binary wheels
  634. 0.4.3 (2016-09-29)
  635. ==================
  636. * Fix typing stubs
  637. 0.4.2 (2016-09-29)
  638. ==================
  639. * Expose ``quote()`` and ``unquote()`` as public API
  640. 0.4.1 (2016-09-28)
  641. ==================
  642. * Support empty values in query (``'/path?arg'``)
  643. 0.4.0 (2016-09-27)
  644. ==================
  645. * Introduce ``relative()`` (#16)
  646. 0.3.2 (2016-09-27)
  647. ==================
  648. * Typo fixes #15
  649. 0.3.1 (2016-09-26)
  650. ==================
  651. * Support sequence of pairs as ``with_query()`` parameter
  652. 0.3.0 (2016-09-26)
  653. ==================
  654. * Introduce ``is_default_port()``
  655. 0.2.1 (2016-09-26)
  656. ==================
  657. * Raise ValueError for URLs like 'http://:8080/'
  658. 0.2.0 (2016-09-18)
  659. ==================
  660. * Avoid doubling slashes when joining paths (#13)
  661. * Appending path starting from slash is forbidden (#12)
  662. 0.1.4 (2016-09-09)
  663. ==================
  664. * Add ``kwargs`` support for ``with_query()`` (#10)
  665. 0.1.3 (2016-09-07)
  666. ==================
  667. * Document ``with_query()``, ``with_fragment()`` and ``origin()``
  668. * Allow ``None`` for ``with_query()`` and ``with_fragment()``
  669. 0.1.2 (2016-09-07)
  670. ==================
  671. * Fix links, tune docs theme.
  672. 0.1.1 (2016-09-06)
  673. ==================
  674. * Update README, old version used obsolete API
  675. 0.1.0 (2016-09-06)
  676. ==================
  677. * The library was deeply refactored, bytes are gone away but all
  678. accepted strings are encoded if needed.
  679. 0.0.1 (2016-08-30)
  680. ==================
  681. * The first release.