You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

537 lines
11 KiB

4 years ago
  1. Metadata-Version: 2.1
  2. Name: yarl
  3. Version: 1.2.6
  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. License: Apache 2
  9. Platform: UNKNOWN
  10. Classifier: License :: OSI Approved :: Apache Software License
  11. Classifier: Intended Audience :: Developers
  12. Classifier: Programming Language :: Python
  13. Classifier: Programming Language :: Python :: 3
  14. Classifier: Programming Language :: Python :: 3.5
  15. Classifier: Programming Language :: Python :: 3.6
  16. Classifier: Topic :: Internet :: WWW/HTTP
  17. Requires-Python: >=3.5.3
  18. Requires-Dist: multidict (>=4.0)
  19. Requires-Dist: idna (>=2.0)
  20. yarl
  21. ====
  22. .. image:: https://travis-ci.org/aio-libs/yarl.svg?branch=master
  23. :target: https://travis-ci.org/aio-libs/yarl
  24. :align: right
  25. .. image:: https://codecov.io/gh/aio-libs/yarl/branch/master/graph/badge.svg
  26. :target: https://codecov.io/gh/aio-libs/yarl
  27. .. image:: https://badge.fury.io/py/yarl.svg
  28. :target: https://badge.fury.io/py/yarl
  29. .. image:: https://readthedocs.org/projects/yarl/badge/?version=latest
  30. :target: https://yarl.readthedocs.io
  31. .. image:: https://img.shields.io/pypi/pyversions/yarl.svg
  32. :target: https://pypi.python.org/pypi/yarl
  33. .. image:: https://badges.gitter.im/Join%20Chat.svg
  34. :target: https://gitter.im/aio-libs/Lobby
  35. :alt: Chat on Gitter
  36. Introduction
  37. ------------
  38. Url is constructed from ``str``::
  39. >>> from yarl import URL
  40. >>> url = URL('https://www.python.org/~guido?arg=1#frag')
  41. >>> url
  42. URL('https://www.python.org/~guido?arg=1#frag')
  43. All url parts: *scheme*, *user*, *password*, *host*, *port*, *path*,
  44. *query* and *fragment* are accessible by properties::
  45. >>> url.scheme
  46. 'https'
  47. >>> url.host
  48. 'www.python.org'
  49. >>> url.path
  50. '/~guido'
  51. >>> url.query_string
  52. 'arg=1'
  53. >>> url.query
  54. <MultiDictProxy('arg': '1')>
  55. >>> url.fragment
  56. 'frag'
  57. All url manipulations produce a new url object::
  58. >>> url.parent / 'downloads/source'
  59. URL('https://www.python.org/downloads/source')
  60. Strings passed to constructor and modification methods are
  61. automatically encoded giving canonical representation as result::
  62. >>> url = URL('https://www.python.org/путь')
  63. >>> url
  64. URL('https://www.python.org/%D0%BF%D1%83%D1%82%D1%8C')
  65. Regular properties are *percent-decoded*, use ``raw_`` versions for
  66. getting *encoded* strings::
  67. >>> url.path
  68. '/путь'
  69. >>> url.raw_path
  70. '/%D0%BF%D1%83%D1%82%D1%8C'
  71. Human readable representation of URL is available as ``.human_repr()``::
  72. >>> url.human_repr()
  73. 'https://www.python.org/путь'
  74. For full documentation please read https://yarl.readthedocs.org.
  75. Installation
  76. ------------
  77. ::
  78. $ pip install yarl
  79. The library is Python 3 only!
  80. Dependencies
  81. ------------
  82. YARL requires multidict_ library.
  83. API documentation
  84. ------------------
  85. The documentation is located at https://yarl.readthedocs.org
  86. Comparison with other URL libraries
  87. ------------------------------------
  88. * furl (https://pypi.python.org/pypi/furl)
  89. The library has rich functionality but the ``furl`` object is mutable.
  90. I'm afraid to pass this object into foreign code: who knows if the
  91. code will modify my url in a terrible way while I just want to send URL
  92. with handy helpers for accessing URL properties.
  93. ``furl`` has other non-obvious tricky things but the main objection
  94. is mutability.
  95. * URLObject (https://pypi.python.org/pypi/URLObject)
  96. URLObject is immutable, that's pretty good.
  97. Every URL change generates a new URL object.
  98. But the library doesn't do any decode/encode transformations leaving the
  99. end user to cope with these gory details.
  100. Source code
  101. -----------
  102. The project is hosted on GitHub_
  103. Please file an issue on the `bug tracker
  104. <https://github.com/aio-libs/yarl/issues>`_ if you have found a bug
  105. or have some suggestion in order to improve the library.
  106. The library uses `Travis <https://travis-ci.org/aio-libs/yarl>`_ for
  107. Continuous Integration.
  108. Discussion list
  109. ---------------
  110. *aio-libs* google group: https://groups.google.com/forum/#!forum/aio-libs
  111. Feel free to post your questions and ideas here.
  112. Authors and License
  113. -------------------
  114. The ``yarl`` package is written by Andrew Svetlov.
  115. It's *Apache 2* licensed and freely available.
  116. .. _GitHub: https://github.com/aio-libs/yarl
  117. .. _multidict: https://github.com/aio-libs/multidict
  118. CHANGES
  119. =======
  120. 1.2.6 (2018-06-14)
  121. ------------------
  122. * Drop Python 3.4 trove classifier (#205)
  123. 1.2.5 (2018-05-23)
  124. ------------------
  125. * Fix annotations for `build` (#199)
  126. 1.2.4 (2018-05-08)
  127. ------------------
  128. * Fix annotations for `cached_property` (#195)
  129. 1.2.3 (2018-05-03)
  130. ------------------
  131. * Accept `str` subclasses in `URL` constructor (#190)
  132. 1.2.2 (2018-05-01)
  133. ------------------
  134. * Fix build
  135. 1.2.1 (2018-04-30)
  136. ------------------
  137. * Pin minimal required Python to 3.5.3 (#189)
  138. 1.2.0 (2018-04-30)
  139. ------------------
  140. * Forbid inheritance, replace `__init__` with `__new__` (#171)
  141. * Support PEP-561 (provide type hinting marker) (#182)
  142. 1.1.1 (2018-02-17)
  143. ------------------
  144. * Fix performance regression: don't encode enmpty netloc (#170)
  145. 1.1.0 (2018-01-21)
  146. ------------------
  147. * Make pure Python quoter consistent with Cython version (#162)
  148. 1.0.0 (2018-01-15)
  149. ------------------
  150. * Use fast path if quoted string does not need requoting (#154)
  151. * Speed up quoting/unquoting by `_Quoter` and `_Unquoter` classes (#155)
  152. * Drop `yarl.quote` and `yarl.unquote` public functions (#155)
  153. * Add custom string writer, reuse static buffer if available (#157)
  154. Code is 50-80 times faster than Pure Python version (was 4-5 times faster)
  155. * Don't recode IP zone (#144)
  156. * Support `encoded=True` in `yarl.URL.build()` (#158)
  157. * Fix updating query with multiple keys (#160)
  158. 0.18.0 (2018-01-10)
  159. -------------------
  160. * Fallback to IDNA 2003 if domain name is not IDNA 2008 compatible (#152)
  161. 0.17.0 (2017-12-30)
  162. -------------------
  163. * Use IDNA 2008 for domain name processing (#149)
  164. 0.16.0 (2017-12-07)
  165. -------------------
  166. * Fix raising `TypeError` by `url.query_string()` after
  167. `url.with_query({})` (empty mapping) (#141)
  168. 0.15.0 (2017-11-23)
  169. -------------------
  170. * Add `raw_path_qs` attribute (#137)
  171. 0.14.2 (2017-11-14)
  172. -------------------
  173. * Restore `strict` parameter as no-op in `quote`/`unquote`
  174. 0.14.1 (2017-11-13)
  175. -------------------
  176. * Restore `strict` parameter as no-op for sake of compatibility with
  177. aiohttp 2.2
  178. 0.14.0 (2017-11-11)
  179. -------------------
  180. * Drop strict mode (#123)
  181. * Fix `"ValueError: Unallowed PCT %"` when there's a `"%"` in the url (#124)
  182. 0.13.0 (2017-10-01)
  183. -------------------
  184. * Document `encoded` parameter (#102)
  185. * Support relative urls like `'?key=value'` (#100)
  186. * Unsafe encoding for QS fixed. Encode `;` char in value param (#104)
  187. * Process passwords without user names (#95)
  188. 0.12.0 (2017-06-26)
  189. -------------------
  190. * Properly support paths without leading slash in `URL.with_path()` (#90)
  191. * Enable type annotation checks
  192. 0.11.0 (2017-06-26)
  193. -------------------
  194. * Normalize path (#86)
  195. * Clear query and fragment parts in `.with_path()` (#85)
  196. 0.10.3 (2017-06-13)
  197. -------------------
  198. * Prevent double URL args unquoting (#83)
  199. 0.10.2 (2017-05-05)
  200. -------------------
  201. * Unexpected hash behaviour (#75)
  202. 0.10.1 (2017-05-03)
  203. -------------------
  204. * Unexpected compare behaviour (#73)
  205. * Do not quote or unquote + if not a query string. (#74)
  206. 0.10.0 (2017-03-14)
  207. -------------------
  208. * Added `URL.build` class method (#58)
  209. * Added `path_qs` attribute (#42)
  210. 0.9.8 (2017-02-16)
  211. ------------------
  212. * Do not quote ":" in path
  213. 0.9.7 (2017-02-16)
  214. ------------------
  215. * Load from pickle without _cache (#56)
  216. * Percent-encoded pluses in path variables become spaces (#59)
  217. 0.9.6 (2017-02-15)
  218. ------------------
  219. * Revert backward incompatible change (BaseURL)
  220. 0.9.5 (2017-02-14)
  221. ------------------
  222. * Fix BaseURL rich comparison support
  223. 0.9.4 (2017-02-14)
  224. ------------------
  225. * Use BaseURL
  226. 0.9.3 (2017-02-14)
  227. ------------------
  228. * Added BaseURL
  229. 0.9.2 (2017-02-08)
  230. ------------------
  231. * Remove debug print
  232. 0.9.1 (2017-02-07)
  233. ------------------
  234. * Do not lose tail chars (#45)
  235. 0.9.0 (2017-02-07)
  236. ------------------
  237. * Allow to quote % in non strict mode (#21)
  238. * Incorrect parsing of query parameters with %3B (;) inside (#34)
  239. * core dumps (#41)
  240. * tmpbuf - compiling error (#43)
  241. * Added `URL.update_path()` method
  242. * Added `URL.update_query()` method (#47)
  243. 0.8.1 (2016-12-03)
  244. ------------------
  245. * Fix broken aiohttp: revert back `quote` / `unquote`.
  246. 0.8.0 (2016-12-03)
  247. ------------------
  248. * Support more verbose error messages in `.with_query()` (#24)
  249. * Don't percent-encode `@` and `:` in path (#32)
  250. * Don't expose `yarl.quote` and `yarl.unquote`, these functions are
  251. part of private API
  252. 0.7.1 (2016-11-18)
  253. ------------------
  254. * Accept not only `str` but all classes inherited from `str` also (#25)
  255. 0.7.0 (2016-11-07)
  256. ------------------
  257. * Accept `int` as value for `.with_query()`
  258. 0.6.0 (2016-11-07)
  259. ------------------
  260. * Explicitly use UTF8 encoding in setup.py (#20)
  261. * Properly unquote non-UTF8 strings (#19)
  262. 0.5.3 (2016-11-02)
  263. ------------------
  264. * Don't use namedtuple fields but indexes on URL construction
  265. 0.5.2 (2016-11-02)
  266. ------------------
  267. * Inline `_encode` class method
  268. 0.5.1 (2016-11-02)
  269. ------------------
  270. * Make URL construction faster by removing extra classmethod calls
  271. 0.5.0 (2016-11-02)
  272. ------------------
  273. * Add cython optimization for quoting/unquoting
  274. * Provide binary wheels
  275. 0.4.3 (2016-09-29)
  276. ------------------
  277. * Fix typing stubs
  278. 0.4.2 (2016-09-29)
  279. ------------------
  280. * Expose quote() and unquote() as public API
  281. 0.4.1 (2016-09-28)
  282. ------------------
  283. * Support empty values in query ('/path?arg')
  284. 0.4.0 (2016-09-27)
  285. ------------------
  286. * Introduce relative() (#16)
  287. 0.3.2 (2016-09-27)
  288. ------------------
  289. * Typo fixes #15
  290. 0.3.1 (2016-09-26)
  291. ------------------
  292. * Support sequence of pairs as with_query() parameter
  293. 0.3.0 (2016-09-26)
  294. ------------------
  295. * Introduce is_default_port()
  296. 0.2.1 (2016-09-26)
  297. ------------------
  298. * Raise ValueError for URLs like 'http://:8080/'
  299. 0.2.0 (2016-09-18)
  300. ------------------
  301. * Avoid doubling slashes when joining paths (#13)
  302. * Appending path starting from slash is forbidden (#12)
  303. 0.1.4 (2016-09-09)
  304. ------------------
  305. * Add kwargs support for with_query() (#10)
  306. 0.1.3 (2016-09-07)
  307. ------------------
  308. * Document with_query(), with_fragment() and origin()
  309. * Allow None for with_query() and with_fragment()
  310. 0.1.2 (2016-09-07)
  311. ------------------
  312. * Fix links, tune docs theme.
  313. 0.1.1 (2016-09-06)
  314. ------------------
  315. * Update README, old version used obsolete API
  316. 0.1.0 (2016-09-06)
  317. ------------------
  318. * The library was deeply refactored, bytes are gone away but all
  319. accepted strings are encoded if needed.
  320. 0.0.1 (2016-08-30)
  321. ------------------
  322. * The first release.