Add files using upload-large-folder tool
Browse filesThis view is limited to 50 files because it contains too many changes.
See raw diff
- .cache/pip/http-v2/3/2/2/c/b/322cb2d2fa9c18feda7312c66e98b038ca0bb7446362e84c4a580aa3.body +169 -0
- .cache/pip/http-v2/3/3/9/7/4/33974f84394d9a943f68359da08431dab4af9f86c33962982ea21b5f +0 -0
- .cache/pip/http-v2/3/3/a/d/7/33ad7fe31489f80e15fea42300adbfc4d75c0efc76d75cfab7d2e5b0 +0 -0
- .cache/pip/http-v2/3/3/a/d/7/33ad7fe31489f80e15fea42300adbfc4d75c0efc76d75cfab7d2e5b0.body +0 -0
- .cache/pip/http-v2/3/e/5/3/9/3e539fe82b1fed185245471443d02ce645e9bdc1609842fbef8a265b +0 -0
- .cache/pip/http-v2/3/f/0/b/5/3f0b530a5c9fab3e5025382bf4f606f0e51cb4c0cd8174857429d8fe.body +0 -0
- .cache/pip/http-v2/5/1/f/2/8/51f28abf47f08a699c067b6b49e9b61d7ffb241813480943666c7bcf +0 -0
- .cache/pip/http-v2/5/1/f/2/8/51f28abf47f08a699c067b6b49e9b61d7ffb241813480943666c7bcf.body +87 -0
- .cache/pip/http-v2/5/2/4/e/a/524eaa378c5eeff9b07f34d936ce7bc411da078278be84566970502d +0 -0
- .cache/pip/http-v2/5/2/4/e/a/524eaa378c5eeff9b07f34d936ce7bc411da078278be84566970502d.body +155 -0
- .cache/pip/http-v2/5/2/9/d/8/529d899ead0a44e9413c02620d856780368c083eff8bf2466e326011 +0 -0
- .cache/pip/http-v2/5/4/c/b/6/54cb669eb9a885793334a25ee9e0fbe07bec87103a57cea1aaa59e27 +0 -0
- .cache/pip/http-v2/5/4/c/b/6/54cb669eb9a885793334a25ee9e0fbe07bec87103a57cea1aaa59e27.body +17 -0
- .cache/pip/http-v2/5/6/f/9/d/56f9d9bd534016b34d1660bb01a66bb1704ef80e0f133b683da4f133.body +1655 -0
- .cache/pip/http-v2/5/8/d/9/8/58d9818b2a061ba2b595a1744fd86d4eb017703b38f7209903256e4e +0 -0
- .cache/pip/http-v2/5/9/5/1/1/595119384424f750543e201763b875c3f3e0ff028ba41e4b528b7dca +0 -0
- .cache/pip/http-v2/5/9/5/1/1/595119384424f750543e201763b875c3f3e0ff028ba41e4b528b7dca.body +0 -0
- .cache/pip/http-v2/6/0/1/a/a/601aa27698da49f5bed3bc91bb41d8245b8316b66bd86059ef3b929e.body +360 -0
- .cache/pip/http-v2/6/1/4/f/4/614f46c6d1c16fa5b0800dfd0497e41c5b320e16ee8c9d943d4dd341.body +0 -0
- .cache/pip/http-v2/6/1/6/7/8/61678d682a1ea716fb4acccebc1350da197d2251a96e4b9220061051 +0 -0
- .cache/pip/http-v2/6/1/6/7/8/61678d682a1ea716fb4acccebc1350da197d2251a96e4b9220061051.body +0 -0
- .cache/pip/http-v2/6/6/6/2/c/6662c3d76e9c2f7783002d2625d92517b2c4b994197bd6d5da887f1e.body +0 -0
- .cache/pip/http-v2/8/1/1/c/d/811cdc5b0df1a4862e5588ed7d10948f806b064e30962a3f3e310c26.body +650 -0
- .cache/pip/http-v2/8/1/3/c/c/813cc7096c25ba43edba14a4ab40832db33af638c43e975795995aec.body +0 -0
- .cache/pip/http-v2/8/5/e/f/e/85efe0b09056afaed0a9932320bb2a590a03afe4bc35e3fffc1e85cd +0 -0
- .cache/pip/http-v2/8/7/7/1/9/87719c54152648e1f5dd42370f81c27a1523da9b52543b783f02ec41 +0 -0
- .cache/pip/http-v2/8/7/7/1/9/87719c54152648e1f5dd42370f81c27a1523da9b52543b783f02ec41.body +0 -0
- .cache/pip/http-v2/8/7/9/e/a/879eab407895dd6690258943fd9ec2bee9d83a6d395dfe3e4bf6ce4f.body +212 -0
- .cache/pip/http-v2/8/8/b/8/b/88b8bfb8f1d620e081b2b226e7936019ed96f3fadbfbd878f24e6be7.body +119 -0
- .cache/pip/http-v2/8/9/2/3/0/89230ee5375192cd78aff8dee73d946e2bcfcfb4c3ec4374132fe597 +0 -0
- .cache/pip/http-v2/8/9/2/3/0/89230ee5375192cd78aff8dee73d946e2bcfcfb4c3ec4374132fe597.body +122 -0
- .cache/pip/http-v2/8/9/3/a/9/893a9178010858cecf72b523725b46ddedbe6c23406a020810080ab3.body +0 -0
- .cache/pip/http-v2/8/9/8/0/7/8980772ed68d7fbcfe2ef2b3f1911b9bd45462ad1becf93269532743.body +0 -0
- .cache/pip/http-v2/8/a/c/4/d/8ac4d14dc45e27d21da49fb515570b6f875b78707de9b08ce1088d1b +0 -0
- .cache/pip/http-v2/8/b/4/4/f/8b44f84aaa6a4b33d7e996e7c94310ce3c9a59ef101fc35cc26ec2ba +0 -0
- .cache/pip/http-v2/8/b/4/4/f/8b44f84aaa6a4b33d7e996e7c94310ce3c9a59ef101fc35cc26ec2ba.body +366 -0
- .cache/pip/http-v2/8/c/3/e/c/8c3ecf585c815a73af16247323d407e99afb8fdc40cee3542187ad49 +0 -0
- .cache/pip/http-v2/8/f/4/1/0/8f410bbfc5d1848453018f07fdeb351a0d0ae8a3bcdc5a16f937935c +0 -0
- .cache/pip/http-v2/8/f/4/1/0/8f410bbfc5d1848453018f07fdeb351a0d0ae8a3bcdc5a16f937935c.body +0 -0
- .cache/pip/http-v2/9/0/6/7/9/906797ab7b3f56fdd856b186be66ce1ad5fb99862a404c1091a707b6.body +0 -0
- .cache/pip/http-v2/9/0/7/3/0/907304ab7018846e9404873a6f78d90e1b9bd503bfd85425c068e4ad.body +1077 -0
- .cache/pip/http-v2/9/1/0/a/3/910a34a200b7d0937d776a3a18a9596fb2163b443301e08a7ae6239a.body +0 -0
- .cache/pip/http-v2/9/d/b/4/b/9db4b6605ca6d6ec2ca5f1968d04b28e2b33e27564d483e330c086bf +0 -0
- .cache/pip/http-v2/9/f/e/d/0/9fed0241b6f6a060996284779065d8ed334b4bc0892996ee7a865868.body +54 -0
- .cache/pip/http-v2/c/5/4/0/3/c5403a101bbaf526810b4c472004bc3b03b96b7c8118e06c7a081e63 +0 -0
- .cache/pip/http-v2/c/d/5/d/e/cd5de44b899cbe1869765c21b55cffc53c0c0ffa9d3c6f1fd40a42a2 +0 -0
- .cache/pip/http-v2/d/6/d/3/b/d6d3bac35e834bfc5e17ee1004ced880326c05861c21c39fd8bf43b6.body +0 -0
- .cache/pip/http-v2/d/b/8/2/4/db824c526d765b86c60e3a8f549e4d9f6b2c1e8876b000670174e0bc +0 -0
- .cache/pip/http-v2/d/b/8/2/4/db824c526d765b86c60e3a8f549e4d9f6b2c1e8876b000670174e0bc.body +0 -0
- .cache/pip/http-v2/d/f/6/1/a/df61a06ffc4c1eef85f05660e91777513c5114d2484311bc1038d2a1 +0 -0
.cache/pip/http-v2/3/2/2/c/b/322cb2d2fa9c18feda7312c66e98b038ca0bb7446362e84c4a580aa3.body
ADDED
@@ -0,0 +1,169 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
Metadata-Version: 2.1
|
2 |
+
Name: tiktoken
|
3 |
+
Version: 0.7.0
|
4 |
+
Summary: tiktoken is a fast BPE tokeniser for use with OpenAI's models
|
5 |
+
Author: Shantanu Jain
|
6 |
+
Author-email: shantanu@openai.com
|
7 |
+
License: MIT License
|
8 |
+
|
9 |
+
Copyright (c) 2022 OpenAI, Shantanu Jain
|
10 |
+
|
11 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
12 |
+
of this software and associated documentation files (the "Software"), to deal
|
13 |
+
in the Software without restriction, including without limitation the rights
|
14 |
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
15 |
+
copies of the Software, and to permit persons to whom the Software is
|
16 |
+
furnished to do so, subject to the following conditions:
|
17 |
+
|
18 |
+
The above copyright notice and this permission notice shall be included in all
|
19 |
+
copies or substantial portions of the Software.
|
20 |
+
|
21 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
22 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
23 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
24 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
25 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
26 |
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
27 |
+
SOFTWARE.
|
28 |
+
|
29 |
+
Project-URL: homepage, https://github.com/openai/tiktoken
|
30 |
+
Project-URL: repository, https://github.com/openai/tiktoken
|
31 |
+
Project-URL: changelog, https://github.com/openai/tiktoken/blob/main/CHANGELOG.md
|
32 |
+
Requires-Python: >=3.8
|
33 |
+
Description-Content-Type: text/markdown
|
34 |
+
License-File: LICENSE
|
35 |
+
Requires-Dist: regex >=2022.1.18
|
36 |
+
Requires-Dist: requests >=2.26.0
|
37 |
+
Provides-Extra: blobfile
|
38 |
+
Requires-Dist: blobfile >=2 ; extra == 'blobfile'
|
39 |
+
|
40 |
+
# ⏳ tiktoken
|
41 |
+
|
42 |
+
tiktoken is a fast [BPE](https://en.wikipedia.org/wiki/Byte_pair_encoding) tokeniser for use with
|
43 |
+
OpenAI's models.
|
44 |
+
|
45 |
+
```python
|
46 |
+
import tiktoken
|
47 |
+
enc = tiktoken.get_encoding("cl100k_base")
|
48 |
+
assert enc.decode(enc.encode("hello world")) == "hello world"
|
49 |
+
|
50 |
+
# To get the tokeniser corresponding to a specific model in the OpenAI API:
|
51 |
+
enc = tiktoken.encoding_for_model("gpt-4")
|
52 |
+
```
|
53 |
+
|
54 |
+
The open source version of `tiktoken` can be installed from PyPI:
|
55 |
+
```
|
56 |
+
pip install tiktoken
|
57 |
+
```
|
58 |
+
|
59 |
+
The tokeniser API is documented in `tiktoken/core.py`.
|
60 |
+
|
61 |
+
Example code using `tiktoken` can be found in the
|
62 |
+
[OpenAI Cookbook](https://github.com/openai/openai-cookbook/blob/main/examples/How_to_count_tokens_with_tiktoken.ipynb).
|
63 |
+
|
64 |
+
|
65 |
+
## Performance
|
66 |
+
|
67 |
+
`tiktoken` is between 3-6x faster than a comparable open source tokeniser:
|
68 |
+
|
69 |
+

|
70 |
+
|
71 |
+
Performance measured on 1GB of text using the GPT-2 tokeniser, using `GPT2TokenizerFast` from
|
72 |
+
`tokenizers==0.13.2`, `transformers==4.24.0` and `tiktoken==0.2.0`.
|
73 |
+
|
74 |
+
|
75 |
+
## Getting help
|
76 |
+
|
77 |
+
Please post questions in the [issue tracker](https://github.com/openai/tiktoken/issues).
|
78 |
+
|
79 |
+
If you work at OpenAI, make sure to check the internal documentation or feel free to contact
|
80 |
+
@shantanu.
|
81 |
+
|
82 |
+
## What is BPE anyway?
|
83 |
+
|
84 |
+
Language models don't see text like you and I, instead they see a sequence of numbers (known as tokens).
|
85 |
+
Byte pair encoding (BPE) is a way of converting text into tokens. It has a couple desirable
|
86 |
+
properties:
|
87 |
+
1) It's reversible and lossless, so you can convert tokens back into the original text
|
88 |
+
2) It works on arbitrary text, even text that is not in the tokeniser's training data
|
89 |
+
3) It compresses the text: the token sequence is shorter than the bytes corresponding to the
|
90 |
+
original text. On average, in practice, each token corresponds to about 4 bytes.
|
91 |
+
4) It attempts to let the model see common subwords. For instance, "ing" is a common subword in
|
92 |
+
English, so BPE encodings will often split "encoding" into tokens like "encod" and "ing"
|
93 |
+
(instead of e.g. "enc" and "oding"). Because the model will then see the "ing" token again and
|
94 |
+
again in different contexts, it helps models generalise and better understand grammar.
|
95 |
+
|
96 |
+
`tiktoken` contains an educational submodule that is friendlier if you want to learn more about
|
97 |
+
the details of BPE, including code that helps visualise the BPE procedure:
|
98 |
+
```python
|
99 |
+
from tiktoken._educational import *
|
100 |
+
|
101 |
+
# Train a BPE tokeniser on a small amount of text
|
102 |
+
enc = train_simple_encoding()
|
103 |
+
|
104 |
+
# Visualise how the GPT-4 encoder encodes text
|
105 |
+
enc = SimpleBytePairEncoding.from_tiktoken("cl100k_base")
|
106 |
+
enc.encode("hello world aaaaaaaaaaaa")
|
107 |
+
```
|
108 |
+
|
109 |
+
|
110 |
+
## Extending tiktoken
|
111 |
+
|
112 |
+
You may wish to extend `tiktoken` to support new encodings. There are two ways to do this.
|
113 |
+
|
114 |
+
|
115 |
+
**Create your `Encoding` object exactly the way you want and simply pass it around.**
|
116 |
+
|
117 |
+
```python
|
118 |
+
cl100k_base = tiktoken.get_encoding("cl100k_base")
|
119 |
+
|
120 |
+
# In production, load the arguments directly instead of accessing private attributes
|
121 |
+
# See openai_public.py for examples of arguments for specific encodings
|
122 |
+
enc = tiktoken.Encoding(
|
123 |
+
# If you're changing the set of special tokens, make sure to use a different name
|
124 |
+
# It should be clear from the name what behaviour to expect.
|
125 |
+
name="cl100k_im",
|
126 |
+
pat_str=cl100k_base._pat_str,
|
127 |
+
mergeable_ranks=cl100k_base._mergeable_ranks,
|
128 |
+
special_tokens={
|
129 |
+
**cl100k_base._special_tokens,
|
130 |
+
"<|im_start|>": 100264,
|
131 |
+
"<|im_end|>": 100265,
|
132 |
+
}
|
133 |
+
)
|
134 |
+
```
|
135 |
+
|
136 |
+
**Use the `tiktoken_ext` plugin mechanism to register your `Encoding` objects with `tiktoken`.**
|
137 |
+
|
138 |
+
This is only useful if you need `tiktoken.get_encoding` to find your encoding, otherwise prefer
|
139 |
+
option 1.
|
140 |
+
|
141 |
+
To do this, you'll need to create a namespace package under `tiktoken_ext`.
|
142 |
+
|
143 |
+
Layout your project like this, making sure to omit the `tiktoken_ext/__init__.py` file:
|
144 |
+
```
|
145 |
+
my_tiktoken_extension
|
146 |
+
├── tiktoken_ext
|
147 |
+
│ └── my_encodings.py
|
148 |
+
└── setup.py
|
149 |
+
```
|
150 |
+
|
151 |
+
`my_encodings.py` should be a module that contains a variable named `ENCODING_CONSTRUCTORS`.
|
152 |
+
This is a dictionary from an encoding name to a function that takes no arguments and returns
|
153 |
+
arguments that can be passed to `tiktoken.Encoding` to construct that encoding. For an example, see
|
154 |
+
`tiktoken_ext/openai_public.py`. For precise details, see `tiktoken/registry.py`.
|
155 |
+
|
156 |
+
Your `setup.py` should look something like this:
|
157 |
+
```python
|
158 |
+
from setuptools import setup, find_namespace_packages
|
159 |
+
|
160 |
+
setup(
|
161 |
+
name="my_tiktoken_extension",
|
162 |
+
packages=find_namespace_packages(include=['tiktoken_ext*']),
|
163 |
+
install_requires=["tiktoken"],
|
164 |
+
...
|
165 |
+
)
|
166 |
+
```
|
167 |
+
|
168 |
+
Then simply `pip install ./my_tiktoken_extension` and you should be able to use your
|
169 |
+
custom encodings! Make sure **not** to use an editable install.
|
.cache/pip/http-v2/3/3/9/7/4/33974f84394d9a943f68359da08431dab4af9f86c33962982ea21b5f
ADDED
Binary file (1.81 kB). View file
|
|
.cache/pip/http-v2/3/3/a/d/7/33ad7fe31489f80e15fea42300adbfc4d75c0efc76d75cfab7d2e5b0
ADDED
Binary file (1.81 kB). View file
|
|
.cache/pip/http-v2/3/3/a/d/7/33ad7fe31489f80e15fea42300adbfc4d75c0efc76d75cfab7d2e5b0.body
ADDED
Binary file (22.7 kB). View file
|
|
.cache/pip/http-v2/3/e/5/3/9/3e539fe82b1fed185245471443d02ce645e9bdc1609842fbef8a265b
ADDED
Binary file (1.16 kB). View file
|
|
.cache/pip/http-v2/3/f/0/b/5/3f0b530a5c9fab3e5025382bf4f606f0e51cb4c0cd8174857429d8fe.body
ADDED
Binary file (2.66 kB). View file
|
|
.cache/pip/http-v2/5/1/f/2/8/51f28abf47f08a699c067b6b49e9b61d7ffb241813480943666c7bcf
ADDED
Binary file (1.19 kB). View file
|
|
.cache/pip/http-v2/5/1/f/2/8/51f28abf47f08a699c067b6b49e9b61d7ffb241813480943666c7bcf.body
ADDED
@@ -0,0 +1,87 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
Metadata-Version: 2.1
|
2 |
+
Name: pyarrow
|
3 |
+
Version: 17.0.0
|
4 |
+
Summary: Python library for Apache Arrow
|
5 |
+
Maintainer-email: Apache Arrow Developers <dev@arrow.apache.org>
|
6 |
+
License: Apache Software License
|
7 |
+
Project-URL: Homepage, https://arrow.apache.org/
|
8 |
+
Project-URL: Documentation, https://arrow.apache.org/docs/python
|
9 |
+
Project-URL: Repository, https://github.com/apache/arrow
|
10 |
+
Project-URL: Issues, https://github.com/apache/arrow/issues
|
11 |
+
Classifier: License :: OSI Approved :: Apache Software License
|
12 |
+
Classifier: Programming Language :: Python :: 3.8
|
13 |
+
Classifier: Programming Language :: Python :: 3.9
|
14 |
+
Classifier: Programming Language :: Python :: 3.10
|
15 |
+
Classifier: Programming Language :: Python :: 3.11
|
16 |
+
Classifier: Programming Language :: Python :: 3.12
|
17 |
+
Requires-Python: >=3.8
|
18 |
+
Description-Content-Type: text/markdown
|
19 |
+
License-File: ../LICENSE.txt
|
20 |
+
License-File: ../NOTICE.txt
|
21 |
+
Requires-Dist: numpy >=1.16.6
|
22 |
+
Provides-Extra: test
|
23 |
+
Requires-Dist: pytest ; extra == 'test'
|
24 |
+
Requires-Dist: hypothesis ; extra == 'test'
|
25 |
+
Requires-Dist: cffi ; extra == 'test'
|
26 |
+
Requires-Dist: pytz ; extra == 'test'
|
27 |
+
Requires-Dist: pandas ; extra == 'test'
|
28 |
+
|
29 |
+
<!---
|
30 |
+
Licensed to the Apache Software Foundation (ASF) under one
|
31 |
+
or more contributor license agreements. See the NOTICE file
|
32 |
+
distributed with this work for additional information
|
33 |
+
regarding copyright ownership. The ASF licenses this file
|
34 |
+
to you under the Apache License, Version 2.0 (the
|
35 |
+
"License"); you may not use this file except in compliance
|
36 |
+
with the License. You may obtain a copy of the License at
|
37 |
+
|
38 |
+
http://www.apache.org/licenses/LICENSE-2.0
|
39 |
+
|
40 |
+
Unless required by applicable law or agreed to in writing,
|
41 |
+
software distributed under the License is distributed on an
|
42 |
+
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
43 |
+
KIND, either express or implied. See the License for the
|
44 |
+
specific language governing permissions and limitations
|
45 |
+
under the License.
|
46 |
+
-->
|
47 |
+
|
48 |
+
## Python library for Apache Arrow
|
49 |
+
|
50 |
+
[](https://pypi.org/project/pyarrow/) [](https://anaconda.org/conda-forge/pyarrow)
|
51 |
+
|
52 |
+
This library provides a Python API for functionality provided by the Arrow C++
|
53 |
+
libraries, along with tools for Arrow integration and interoperability with
|
54 |
+
pandas, NumPy, and other software in the Python ecosystem.
|
55 |
+
|
56 |
+
## Installing
|
57 |
+
|
58 |
+
Across platforms, you can install a recent version of pyarrow with the conda
|
59 |
+
package manager:
|
60 |
+
|
61 |
+
```shell
|
62 |
+
conda install pyarrow -c conda-forge
|
63 |
+
```
|
64 |
+
|
65 |
+
On Linux, macOS, and Windows, you can also install binary wheels from PyPI with
|
66 |
+
pip:
|
67 |
+
|
68 |
+
```shell
|
69 |
+
pip install pyarrow
|
70 |
+
```
|
71 |
+
|
72 |
+
If you encounter any issues importing the pip wheels on Windows, you may need
|
73 |
+
to install the [Visual C++ Redistributable for Visual Studio 2015][6].
|
74 |
+
|
75 |
+
## Development
|
76 |
+
|
77 |
+
See [Python Development][2] in the documentation subproject.
|
78 |
+
|
79 |
+
### Building the documentation
|
80 |
+
|
81 |
+
See [documentation build instructions][1] in the documentation subproject.
|
82 |
+
|
83 |
+
[1]: https://github.com/apache/arrow/blob/main/docs/source/developers/documentation.rst
|
84 |
+
[2]: https://github.com/apache/arrow/blob/main/docs/source/developers/python.rst
|
85 |
+
[3]: https://github.com/pandas-dev/pandas
|
86 |
+
[5]: https://arrow.apache.org/docs/latest/python/benchmarks.html
|
87 |
+
[6]: https://www.microsoft.com/en-us/download/details.aspx?id=48145
|
.cache/pip/http-v2/5/2/4/e/a/524eaa378c5eeff9b07f34d936ce7bc411da078278be84566970502d
ADDED
Binary file (1.19 kB). View file
|
|
.cache/pip/http-v2/5/2/4/e/a/524eaa378c5eeff9b07f34d936ce7bc411da078278be84566970502d.body
ADDED
@@ -0,0 +1,155 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
Metadata-Version: 2.1
|
2 |
+
Name: pluggy
|
3 |
+
Version: 1.5.0
|
4 |
+
Summary: plugin and hook calling mechanisms for python
|
5 |
+
Home-page: https://github.com/pytest-dev/pluggy
|
6 |
+
Author: Holger Krekel
|
7 |
+
Author-email: holger@merlinux.eu
|
8 |
+
License: MIT
|
9 |
+
Platform: unix
|
10 |
+
Platform: linux
|
11 |
+
Platform: osx
|
12 |
+
Platform: win32
|
13 |
+
Classifier: Development Status :: 6 - Mature
|
14 |
+
Classifier: Intended Audience :: Developers
|
15 |
+
Classifier: License :: OSI Approved :: MIT License
|
16 |
+
Classifier: Operating System :: POSIX
|
17 |
+
Classifier: Operating System :: Microsoft :: Windows
|
18 |
+
Classifier: Operating System :: MacOS :: MacOS X
|
19 |
+
Classifier: Topic :: Software Development :: Testing
|
20 |
+
Classifier: Topic :: Software Development :: Libraries
|
21 |
+
Classifier: Topic :: Utilities
|
22 |
+
Classifier: Programming Language :: Python :: Implementation :: CPython
|
23 |
+
Classifier: Programming Language :: Python :: Implementation :: PyPy
|
24 |
+
Classifier: Programming Language :: Python :: 3
|
25 |
+
Classifier: Programming Language :: Python :: 3 :: Only
|
26 |
+
Classifier: Programming Language :: Python :: 3.8
|
27 |
+
Classifier: Programming Language :: Python :: 3.9
|
28 |
+
Classifier: Programming Language :: Python :: 3.10
|
29 |
+
Classifier: Programming Language :: Python :: 3.11
|
30 |
+
Requires-Python: >=3.8
|
31 |
+
Description-Content-Type: text/x-rst
|
32 |
+
License-File: LICENSE
|
33 |
+
Provides-Extra: dev
|
34 |
+
Requires-Dist: pre-commit ; extra == 'dev'
|
35 |
+
Requires-Dist: tox ; extra == 'dev'
|
36 |
+
Provides-Extra: testing
|
37 |
+
Requires-Dist: pytest ; extra == 'testing'
|
38 |
+
Requires-Dist: pytest-benchmark ; extra == 'testing'
|
39 |
+
|
40 |
+
====================================================
|
41 |
+
pluggy - A minimalist production ready plugin system
|
42 |
+
====================================================
|
43 |
+
|
44 |
+
|pypi| |conda-forge| |versions| |github-actions| |gitter| |black| |codecov|
|
45 |
+
|
46 |
+
This is the core framework used by the `pytest`_, `tox`_, and `devpi`_ projects.
|
47 |
+
|
48 |
+
Please `read the docs`_ to learn more!
|
49 |
+
|
50 |
+
A definitive example
|
51 |
+
====================
|
52 |
+
.. code-block:: python
|
53 |
+
|
54 |
+
import pluggy
|
55 |
+
|
56 |
+
hookspec = pluggy.HookspecMarker("myproject")
|
57 |
+
hookimpl = pluggy.HookimplMarker("myproject")
|
58 |
+
|
59 |
+
|
60 |
+
class MySpec:
|
61 |
+
"""A hook specification namespace."""
|
62 |
+
|
63 |
+
@hookspec
|
64 |
+
def myhook(self, arg1, arg2):
|
65 |
+
"""My special little hook that you can customize."""
|
66 |
+
|
67 |
+
|
68 |
+
class Plugin_1:
|
69 |
+
"""A hook implementation namespace."""
|
70 |
+
|
71 |
+
@hookimpl
|
72 |
+
def myhook(self, arg1, arg2):
|
73 |
+
print("inside Plugin_1.myhook()")
|
74 |
+
return arg1 + arg2
|
75 |
+
|
76 |
+
|
77 |
+
class Plugin_2:
|
78 |
+
"""A 2nd hook implementation namespace."""
|
79 |
+
|
80 |
+
@hookimpl
|
81 |
+
def myhook(self, arg1, arg2):
|
82 |
+
print("inside Plugin_2.myhook()")
|
83 |
+
return arg1 - arg2
|
84 |
+
|
85 |
+
|
86 |
+
# create a manager and add the spec
|
87 |
+
pm = pluggy.PluginManager("myproject")
|
88 |
+
pm.add_hookspecs(MySpec)
|
89 |
+
|
90 |
+
# register plugins
|
91 |
+
pm.register(Plugin_1())
|
92 |
+
pm.register(Plugin_2())
|
93 |
+
|
94 |
+
# call our ``myhook`` hook
|
95 |
+
results = pm.hook.myhook(arg1=1, arg2=2)
|
96 |
+
print(results)
|
97 |
+
|
98 |
+
|
99 |
+
Running this directly gets us::
|
100 |
+
|
101 |
+
$ python docs/examples/toy-example.py
|
102 |
+
inside Plugin_2.myhook()
|
103 |
+
inside Plugin_1.myhook()
|
104 |
+
[-1, 3]
|
105 |
+
|
106 |
+
|
107 |
+
.. badges
|
108 |
+
|
109 |
+
.. |pypi| image:: https://img.shields.io/pypi/v/pluggy.svg
|
110 |
+
:target: https://pypi.org/pypi/pluggy
|
111 |
+
|
112 |
+
.. |versions| image:: https://img.shields.io/pypi/pyversions/pluggy.svg
|
113 |
+
:target: https://pypi.org/pypi/pluggy
|
114 |
+
|
115 |
+
.. |github-actions| image:: https://github.com/pytest-dev/pluggy/workflows/main/badge.svg
|
116 |
+
:target: https://github.com/pytest-dev/pluggy/actions
|
117 |
+
|
118 |
+
.. |conda-forge| image:: https://img.shields.io/conda/vn/conda-forge/pluggy.svg
|
119 |
+
:target: https://anaconda.org/conda-forge/pytest
|
120 |
+
|
121 |
+
.. |gitter| image:: https://badges.gitter.im/pytest-dev/pluggy.svg
|
122 |
+
:alt: Join the chat at https://gitter.im/pytest-dev/pluggy
|
123 |
+
:target: https://gitter.im/pytest-dev/pluggy?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge
|
124 |
+
|
125 |
+
.. |black| image:: https://img.shields.io/badge/code%20style-black-000000.svg
|
126 |
+
:target: https://github.com/ambv/black
|
127 |
+
|
128 |
+
.. |codecov| image:: https://codecov.io/gh/pytest-dev/pluggy/branch/master/graph/badge.svg
|
129 |
+
:target: https://codecov.io/gh/pytest-dev/pluggy
|
130 |
+
:alt: Code coverage Status
|
131 |
+
|
132 |
+
.. links
|
133 |
+
.. _pytest:
|
134 |
+
http://pytest.org
|
135 |
+
.. _tox:
|
136 |
+
https://tox.readthedocs.org
|
137 |
+
.. _devpi:
|
138 |
+
http://doc.devpi.net
|
139 |
+
.. _read the docs:
|
140 |
+
https://pluggy.readthedocs.io/en/latest/
|
141 |
+
|
142 |
+
|
143 |
+
Support pluggy
|
144 |
+
--------------
|
145 |
+
|
146 |
+
`Open Collective`_ is an online funding platform for open and transparent communities.
|
147 |
+
It provides tools to raise money and share your finances in full transparency.
|
148 |
+
|
149 |
+
It is the platform of choice for individuals and companies that want to make one-time or
|
150 |
+
monthly donations directly to the project.
|
151 |
+
|
152 |
+
``pluggy`` is part of the ``pytest-dev`` project, see more details in the `pytest collective`_.
|
153 |
+
|
154 |
+
.. _Open Collective: https://opencollective.com
|
155 |
+
.. _pytest collective: https://opencollective.com/pytest
|
.cache/pip/http-v2/5/2/9/d/8/529d899ead0a44e9413c02620d856780368c083eff8bf2466e326011
ADDED
Binary file (1.17 kB). View file
|
|
.cache/pip/http-v2/5/4/c/b/6/54cb669eb9a885793334a25ee9e0fbe07bec87103a57cea1aaa59e27
ADDED
Binary file (1.2 kB). View file
|
|
.cache/pip/http-v2/5/4/c/b/6/54cb669eb9a885793334a25ee9e0fbe07bec87103a57cea1aaa59e27.body
ADDED
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
Metadata-Version: 2.1
|
2 |
+
Name: protobuf
|
3 |
+
Author: protobuf@googlegroups.com
|
4 |
+
Author-email: protobuf@googlegroups.com
|
5 |
+
Home-page: https://developers.google.com/protocol-buffers/
|
6 |
+
License: 3-Clause BSD License
|
7 |
+
Classifier: Programming Language :: Python
|
8 |
+
Classifier: Programming Language :: Python :: 3
|
9 |
+
Classifier: Programming Language :: Python :: 3.8
|
10 |
+
Classifier: Programming Language :: Python :: 3.9
|
11 |
+
Classifier: Programming Language :: Python :: 3.10
|
12 |
+
Classifier: Programming Language :: Python :: 3.11
|
13 |
+
Classifier: Programming Language :: Python :: 3.12
|
14 |
+
Requires-Python: >=3.8
|
15 |
+
Version: 5.28.2
|
16 |
+
|
17 |
+
UNKNOWN
|
.cache/pip/http-v2/5/6/f/9/d/56f9d9bd534016b34d1660bb01a66bb1704ef80e0f133b683da4f133.body
ADDED
@@ -0,0 +1,1655 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
Metadata-Version: 2.1
|
2 |
+
Name: yarl
|
3 |
+
Version: 1.12.1
|
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.8
|
28 |
+
Classifier: Programming Language :: Python :: 3.9
|
29 |
+
Classifier: Programming Language :: Python :: 3.10
|
30 |
+
Classifier: Programming Language :: Python :: 3.11
|
31 |
+
Classifier: Programming Language :: Python :: 3.12
|
32 |
+
Classifier: Programming Language :: Python :: 3.13
|
33 |
+
Classifier: Topic :: Internet :: WWW/HTTP
|
34 |
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
35 |
+
Requires-Python: >=3.8
|
36 |
+
Description-Content-Type: text/x-rst
|
37 |
+
License-File: LICENSE
|
38 |
+
License-File: NOTICE
|
39 |
+
Requires-Dist: idna >=2.0
|
40 |
+
Requires-Dist: multidict >=4.0
|
41 |
+
|
42 |
+
yarl
|
43 |
+
====
|
44 |
+
|
45 |
+
The module provides handy URL class for URL parsing and changing.
|
46 |
+
|
47 |
+
.. image:: https://github.com/aio-libs/yarl/workflows/CI/badge.svg
|
48 |
+
:target: https://github.com/aio-libs/yarl/actions?query=workflow%3ACI
|
49 |
+
:align: right
|
50 |
+
|
51 |
+
.. image:: https://codecov.io/gh/aio-libs/yarl/branch/master/graph/badge.svg
|
52 |
+
:target: https://codecov.io/gh/aio-libs/yarl
|
53 |
+
|
54 |
+
.. image:: https://badge.fury.io/py/yarl.svg
|
55 |
+
:target: https://badge.fury.io/py/yarl
|
56 |
+
|
57 |
+
|
58 |
+
.. image:: https://readthedocs.org/projects/yarl/badge/?version=latest
|
59 |
+
:target: https://yarl.aio-libs.org
|
60 |
+
|
61 |
+
|
62 |
+
.. image:: https://img.shields.io/pypi/pyversions/yarl.svg
|
63 |
+
:target: https://pypi.python.org/pypi/yarl
|
64 |
+
|
65 |
+
.. 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
|
66 |
+
:target: https://matrix.to/#/%23aio-libs:matrix.org
|
67 |
+
:alt: Matrix Room — #aio-libs:matrix.org
|
68 |
+
|
69 |
+
.. 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
|
70 |
+
:target: https://matrix.to/#/%23aio-libs-space:matrix.org
|
71 |
+
:alt: Matrix Space — #aio-libs-space:matrix.org
|
72 |
+
|
73 |
+
Introduction
|
74 |
+
------------
|
75 |
+
|
76 |
+
Url is constructed from ``str``:
|
77 |
+
|
78 |
+
.. code-block:: pycon
|
79 |
+
|
80 |
+
>>> from yarl import URL
|
81 |
+
>>> url = URL('https://www.python.org/~guido?arg=1#frag')
|
82 |
+
>>> url
|
83 |
+
URL('https://www.python.org/~guido?arg=1#frag')
|
84 |
+
|
85 |
+
All url parts: *scheme*, *user*, *password*, *host*, *port*, *path*,
|
86 |
+
*query* and *fragment* are accessible by properties:
|
87 |
+
|
88 |
+
.. code-block:: pycon
|
89 |
+
|
90 |
+
>>> url.scheme
|
91 |
+
'https'
|
92 |
+
>>> url.host
|
93 |
+
'www.python.org'
|
94 |
+
>>> url.path
|
95 |
+
'/~guido'
|
96 |
+
>>> url.query_string
|
97 |
+
'arg=1'
|
98 |
+
>>> url.query
|
99 |
+
<MultiDictProxy('arg': '1')>
|
100 |
+
>>> url.fragment
|
101 |
+
'frag'
|
102 |
+
|
103 |
+
All url manipulations produce a new url object:
|
104 |
+
|
105 |
+
.. code-block:: pycon
|
106 |
+
|
107 |
+
>>> url = URL('https://www.python.org')
|
108 |
+
>>> url / 'foo' / 'bar'
|
109 |
+
URL('https://www.python.org/foo/bar')
|
110 |
+
>>> url / 'foo' % {'bar': 'baz'}
|
111 |
+
URL('https://www.python.org/foo?bar=baz')
|
112 |
+
|
113 |
+
Strings passed to constructor and modification methods are
|
114 |
+
automatically encoded giving canonical representation as result:
|
115 |
+
|
116 |
+
.. code-block:: pycon
|
117 |
+
|
118 |
+
>>> url = URL('https://www.python.org/шлях')
|
119 |
+
>>> url
|
120 |
+
URL('https://www.python.org/%D1%88%D0%BB%D1%8F%D1%85')
|
121 |
+
|
122 |
+
Regular properties are *percent-decoded*, use ``raw_`` versions for
|
123 |
+
getting *encoded* strings:
|
124 |
+
|
125 |
+
.. code-block:: pycon
|
126 |
+
|
127 |
+
>>> url.path
|
128 |
+
'/шлях'
|
129 |
+
|
130 |
+
>>> url.raw_path
|
131 |
+
'/%D1%88%D0%BB%D1%8F%D1%85'
|
132 |
+
|
133 |
+
Human readable representation of URL is available as ``.human_repr()``:
|
134 |
+
|
135 |
+
.. code-block:: pycon
|
136 |
+
|
137 |
+
>>> url.human_repr()
|
138 |
+
'https://www.python.org/шлях'
|
139 |
+
|
140 |
+
For full documentation please read https://yarl.aio-libs.org.
|
141 |
+
|
142 |
+
|
143 |
+
Installation
|
144 |
+
------------
|
145 |
+
|
146 |
+
::
|
147 |
+
|
148 |
+
$ pip install yarl
|
149 |
+
|
150 |
+
The library is Python 3 only!
|
151 |
+
|
152 |
+
PyPI contains binary wheels for Linux, Windows and MacOS. If you want to install
|
153 |
+
``yarl`` on another operating system (like *Alpine Linux*, which is not
|
154 |
+
manylinux-compliant because of the missing glibc and therefore, cannot be
|
155 |
+
used with our wheels) the the tarball will be used to compile the library from
|
156 |
+
the source code. It requires a C compiler and and Python headers installed.
|
157 |
+
|
158 |
+
To skip the compilation you must explicitly opt-in by using a PEP 517
|
159 |
+
configuration setting ``pure-python``, or setting the ``YARL_NO_EXTENSIONS``
|
160 |
+
environment variable to a non-empty value, e.g.:
|
161 |
+
|
162 |
+
.. code-block:: console
|
163 |
+
|
164 |
+
$ pip install yarl --config-settings=pure-python=false
|
165 |
+
|
166 |
+
Please note that the pure-Python (uncompiled) version is much slower. However,
|
167 |
+
PyPy always uses a pure-Python implementation, and, as such, it is unaffected
|
168 |
+
by this variable.
|
169 |
+
|
170 |
+
Dependencies
|
171 |
+
------------
|
172 |
+
|
173 |
+
YARL requires multidict_ library.
|
174 |
+
|
175 |
+
|
176 |
+
API documentation
|
177 |
+
------------------
|
178 |
+
|
179 |
+
The documentation is located at https://yarl.aio-libs.org.
|
180 |
+
|
181 |
+
|
182 |
+
Why isn't boolean supported by the URL query API?
|
183 |
+
-------------------------------------------------
|
184 |
+
|
185 |
+
There is no standard for boolean representation of boolean values.
|
186 |
+
|
187 |
+
Some systems prefer ``true``/``false``, others like ``yes``/``no``, ``on``/``off``,
|
188 |
+
``Y``/``N``, ``1``/``0``, etc.
|
189 |
+
|
190 |
+
``yarl`` cannot make an unambiguous decision on how to serialize ``bool`` values because
|
191 |
+
it is specific to how the end-user's application is built and would be different for
|
192 |
+
different apps. The library doesn't accept booleans in the API; a user should convert
|
193 |
+
bools into strings using own preferred translation protocol.
|
194 |
+
|
195 |
+
|
196 |
+
Comparison with other URL libraries
|
197 |
+
------------------------------------
|
198 |
+
|
199 |
+
* furl (https://pypi.python.org/pypi/furl)
|
200 |
+
|
201 |
+
The library has rich functionality but the ``furl`` object is mutable.
|
202 |
+
|
203 |
+
I'm afraid to pass this object into foreign code: who knows if the
|
204 |
+
code will modify my url in a terrible way while I just want to send URL
|
205 |
+
with handy helpers for accessing URL properties.
|
206 |
+
|
207 |
+
``furl`` has other non-obvious tricky things but the main objection
|
208 |
+
is mutability.
|
209 |
+
|
210 |
+
* URLObject (https://pypi.python.org/pypi/URLObject)
|
211 |
+
|
212 |
+
URLObject is immutable, that's pretty good.
|
213 |
+
|
214 |
+
Every URL change generates a new URL object.
|
215 |
+
|
216 |
+
But the library doesn't do any decode/encode transformations leaving the
|
217 |
+
end user to cope with these gory details.
|
218 |
+
|
219 |
+
|
220 |
+
Source code
|
221 |
+
-----------
|
222 |
+
|
223 |
+
The project is hosted on GitHub_
|
224 |
+
|
225 |
+
Please file an issue on the `bug tracker
|
226 |
+
<https://github.com/aio-libs/yarl/issues>`_ if you have found a bug
|
227 |
+
or have some suggestion in order to improve the library.
|
228 |
+
|
229 |
+
Discussion list
|
230 |
+
---------------
|
231 |
+
|
232 |
+
*aio-libs* google group: https://groups.google.com/forum/#!forum/aio-libs
|
233 |
+
|
234 |
+
Feel free to post your questions and ideas here.
|
235 |
+
|
236 |
+
|
237 |
+
Authors and License
|
238 |
+
-------------------
|
239 |
+
|
240 |
+
The ``yarl`` package is written by Andrew Svetlov.
|
241 |
+
|
242 |
+
It's *Apache 2* licensed and freely available.
|
243 |
+
|
244 |
+
|
245 |
+
.. _GitHub: https://github.com/aio-libs/yarl
|
246 |
+
|
247 |
+
.. _multidict: https://github.com/aio-libs/multidict
|
248 |
+
|
249 |
+
=========
|
250 |
+
Changelog
|
251 |
+
=========
|
252 |
+
|
253 |
+
..
|
254 |
+
You should *NOT* be adding new change log entries to this file, this
|
255 |
+
file is managed by towncrier. You *may* edit previous change logs to
|
256 |
+
fix problems like typo corrections or such.
|
257 |
+
To add a new change log entry, please see
|
258 |
+
https://pip.pypa.io/en/latest/development/#adding-a-news-entry
|
259 |
+
we named the news folder "changes".
|
260 |
+
|
261 |
+
WARNING: Don't drop the next directive!
|
262 |
+
|
263 |
+
.. towncrier release notes start
|
264 |
+
|
265 |
+
1.12.1
|
266 |
+
======
|
267 |
+
|
268 |
+
*(2024-09-23)*
|
269 |
+
|
270 |
+
|
271 |
+
No significant changes.
|
272 |
+
|
273 |
+
|
274 |
+
----
|
275 |
+
|
276 |
+
|
277 |
+
1.12.0
|
278 |
+
======
|
279 |
+
|
280 |
+
*(2024-09-23)*
|
281 |
+
|
282 |
+
|
283 |
+
Features
|
284 |
+
--------
|
285 |
+
|
286 |
+
- Added ``~yarl.URL.path_safe`` to be able to fetch the path without ``%2F`` and ``%25`` decoded -- by `@bdraco <https://github.com/sponsors/bdraco>`__.
|
287 |
+
|
288 |
+
*Related issues and pull requests on GitHub:*
|
289 |
+
`#1150 <https://github.com/aio-libs/yarl/issues/1150>`__.
|
290 |
+
|
291 |
+
|
292 |
+
Removals and backward incompatible breaking changes
|
293 |
+
---------------------------------------------------
|
294 |
+
|
295 |
+
- Restore decoding ``%2F`` (``/``) in ``URL.path`` -- by `@bdraco <https://github.com/sponsors/bdraco>`__.
|
296 |
+
|
297 |
+
This change restored the behavior before `#1057 <https://github.com/aio-libs/yarl/issues/1057>`__.
|
298 |
+
|
299 |
+
*Related issues and pull requests on GitHub:*
|
300 |
+
`#1151 <https://github.com/aio-libs/yarl/issues/1151>`__.
|
301 |
+
|
302 |
+
|
303 |
+
Miscellaneous internal changes
|
304 |
+
------------------------------
|
305 |
+
|
306 |
+
- Improved performance of processing paths -- by `@bdraco <https://github.com/sponsors/bdraco>`__.
|
307 |
+
|
308 |
+
*Related issues and pull requests on GitHub:*
|
309 |
+
`#1143 <https://github.com/aio-libs/yarl/issues/1143>`__.
|
310 |
+
|
311 |
+
|
312 |
+
----
|
313 |
+
|
314 |
+
|
315 |
+
1.11.1
|
316 |
+
======
|
317 |
+
|
318 |
+
*(2024-09-09)*
|
319 |
+
|
320 |
+
|
321 |
+
Bug fixes
|
322 |
+
---------
|
323 |
+
|
324 |
+
- Allowed scheme replacement for relative URLs if the scheme does not require a host -- by `@bdraco <https://github.com/sponsors/bdraco>`__.
|
325 |
+
|
326 |
+
*Related issues and pull requests on GitHub:*
|
327 |
+
`#280 <https://github.com/aio-libs/yarl/issues/280>`__, `#1138 <https://github.com/aio-libs/yarl/issues/1138>`__.
|
328 |
+
|
329 |
+
- Allowed empty host for URL schemes other than the special schemes listed in the WHATWG URL spec -- by `@bdraco <https://github.com/sponsors/bdraco>`__.
|
330 |
+
|
331 |
+
*Related issues and pull requests on GitHub:*
|
332 |
+
`#1136 <https://github.com/aio-libs/yarl/issues/1136>`__.
|
333 |
+
|
334 |
+
|
335 |
+
Features
|
336 |
+
--------
|
337 |
+
|
338 |
+
- Loosened restriction on integers as query string values to allow classes that implement ``__int__`` -- by `@bdraco <https://github.com/sponsors/bdraco>`__.
|
339 |
+
|
340 |
+
*Related issues and pull requests on GitHub:*
|
341 |
+
`#1139 <https://github.com/aio-libs/yarl/issues/1139>`__.
|
342 |
+
|
343 |
+
|
344 |
+
Miscellaneous internal changes
|
345 |
+
------------------------------
|
346 |
+
|
347 |
+
- Improved performance of normalizing paths -- by `@bdraco <https://github.com/sponsors/bdraco>`__.
|
348 |
+
|
349 |
+
*Related issues and pull requests on GitHub:*
|
350 |
+
`#1137 <https://github.com/aio-libs/yarl/issues/1137>`__.
|
351 |
+
|
352 |
+
|
353 |
+
----
|
354 |
+
|
355 |
+
|
356 |
+
1.11.0
|
357 |
+
======
|
358 |
+
|
359 |
+
*(2024-09-08)*
|
360 |
+
|
361 |
+
|
362 |
+
Features
|
363 |
+
--------
|
364 |
+
|
365 |
+
- Added ``URL.extend_query()()`` method, which can be used to extend parameters without replacing same named keys -- by `@bdraco <https://github.com/sponsors/bdraco>`__.
|
366 |
+
|
367 |
+
This method was primarily added to replace the inefficient hand rolled method currently used in ``aiohttp``.
|
368 |
+
|
369 |
+
*Related issues and pull requests on GitHub:*
|
370 |
+
`#1128 <https://github.com/aio-libs/yarl/issues/1128>`__.
|
371 |
+
|
372 |
+
|
373 |
+
Miscellaneous internal changes
|
374 |
+
------------------------------
|
375 |
+
|
376 |
+
- Improved performance of the Cython ``cached_property`` implementation -- by `@bdraco <https://github.com/sponsors/bdraco>`__.
|
377 |
+
|
378 |
+
*Related issues and pull requests on GitHub:*
|
379 |
+
`#1122 <https://github.com/aio-libs/yarl/issues/1122>`__.
|
380 |
+
|
381 |
+
- Simplified computing ports by removing unnecessary code -- by `@bdraco <https://github.com/sponsors/bdraco>`__.
|
382 |
+
|
383 |
+
*Related issues and pull requests on GitHub:*
|
384 |
+
`#1123 <https://github.com/aio-libs/yarl/issues/1123>`__.
|
385 |
+
|
386 |
+
- Improved performance of encoding non IPv6 hosts -- by `@bdraco <https://github.com/sponsors/bdraco>`__.
|
387 |
+
|
388 |
+
*Related issues and pull requests on GitHub:*
|
389 |
+
`#1125 <https://github.com/aio-libs/yarl/issues/1125>`__.
|
390 |
+
|
391 |
+
- Improved performance of ``URL.build()()`` when the path, query string, or fragment is an empty string -- by `@bdraco <https://github.com/sponsors/bdraco>`__.
|
392 |
+
|
393 |
+
*Related issues and pull requests on GitHub:*
|
394 |
+
`#1126 <https://github.com/aio-libs/yarl/issues/1126>`__.
|
395 |
+
|
396 |
+
- Improved performance of the ``URL.update_query()()`` method -- by `@bdraco <https://github.com/sponsors/bdraco>`__.
|
397 |
+
|
398 |
+
*Related issues and pull requests on GitHub:*
|
399 |
+
`#1130 <https://github.com/aio-libs/yarl/issues/1130>`__.
|
400 |
+
|
401 |
+
- Improved performance of processing query string changes when arguments are ``str`` -- by `@bdraco <https://github.com/sponsors/bdraco>`__.
|
402 |
+
|
403 |
+
*Related issues and pull requests on GitHub:*
|
404 |
+
`#1131 <https://github.com/aio-libs/yarl/issues/1131>`__.
|
405 |
+
|
406 |
+
|
407 |
+
----
|
408 |
+
|
409 |
+
|
410 |
+
1.10.0
|
411 |
+
======
|
412 |
+
|
413 |
+
*(2024-09-06)*
|
414 |
+
|
415 |
+
|
416 |
+
Bug fixes
|
417 |
+
---------
|
418 |
+
|
419 |
+
- Fixed joining a path when the existing path was empty -- by `@bdraco <https://github.com/sponsors/bdraco>`__.
|
420 |
+
|
421 |
+
A regression in ``URL.join()()`` was introduced in `#1082 <https://github.com/aio-libs/yarl/issues/1082>`__.
|
422 |
+
|
423 |
+
*Related issues and pull requests on GitHub:*
|
424 |
+
`#1118 <https://github.com/aio-libs/yarl/issues/1118>`__.
|
425 |
+
|
426 |
+
|
427 |
+
Features
|
428 |
+
--------
|
429 |
+
|
430 |
+
- Added ``URL.without_query_params()()`` method, to drop some parameters from query string -- by `@hongquan <https://github.com/sponsors/hongquan>`__.
|
431 |
+
|
432 |
+
*Related issues and pull requests on GitHub:*
|
433 |
+
`#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>`__.
|
434 |
+
|
435 |
+
- 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>`__.
|
436 |
+
|
437 |
+
*Related issues and pull requests on GitHub:*
|
438 |
+
`#1050 <https://github.com/aio-libs/yarl/issues/1050>`__, `#1113 <https://github.com/aio-libs/yarl/issues/1113>`__.
|
439 |
+
|
440 |
+
|
441 |
+
Contributor-facing changes
|
442 |
+
--------------------------
|
443 |
+
|
444 |
+
- Replaced all ``~typing.Optional`` with ``~typing.Union`` -- by `@bdraco <https://github.com/sponsors/bdraco>`__.
|
445 |
+
|
446 |
+
*Related issues and pull requests on GitHub:*
|
447 |
+
`#1095 <https://github.com/aio-libs/yarl/issues/1095>`__.
|
448 |
+
|
449 |
+
|
450 |
+
Miscellaneous internal changes
|
451 |
+
------------------------------
|
452 |
+
|
453 |
+
- Significantly improved performance of parsing the network location -- by `@bdraco <https://github.com/sponsors/bdraco>`__.
|
454 |
+
|
455 |
+
*Related issues and pull requests on GitHub:*
|
456 |
+
`#1112 <https://github.com/aio-libs/yarl/issues/1112>`__.
|
457 |
+
|
458 |
+
- Added internal types to the cache to prevent future refactoring errors -- by `@bdraco <https://github.com/sponsors/bdraco>`__.
|
459 |
+
|
460 |
+
*Related issues and pull requests on GitHub:*
|
461 |
+
`#1117 <https://github.com/aio-libs/yarl/issues/1117>`__.
|
462 |
+
|
463 |
+
|
464 |
+
----
|
465 |
+
|
466 |
+
|
467 |
+
1.9.11
|
468 |
+
======
|
469 |
+
|
470 |
+
*(2024-09-04)*
|
471 |
+
|
472 |
+
|
473 |
+
Bug fixes
|
474 |
+
---------
|
475 |
+
|
476 |
+
- Fixed a ``TypeError`` with ``MultiDictProxy`` and Python 3.8 -- by `@bdraco <https://github.com/sponsors/bdraco>`__.
|
477 |
+
|
478 |
+
*Related issues and pull requests on GitHub:*
|
479 |
+
`#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>`__.
|
480 |
+
|
481 |
+
|
482 |
+
Miscellaneous internal changes
|
483 |
+
------------------------------
|
484 |
+
|
485 |
+
- Improved performance of encoding hosts -- by `@bdraco <https://github.com/sponsors/bdraco>`__.
|
486 |
+
|
487 |
+
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``.
|
488 |
+
|
489 |
+
*Related issues and pull requests on GitHub:*
|
490 |
+
`#1104 <https://github.com/aio-libs/yarl/issues/1104>`__.
|
491 |
+
|
492 |
+
|
493 |
+
----
|
494 |
+
|
495 |
+
|
496 |
+
1.9.10
|
497 |
+
======
|
498 |
+
|
499 |
+
*(2024-09-04)*
|
500 |
+
|
501 |
+
|
502 |
+
Bug fixes
|
503 |
+
---------
|
504 |
+
|
505 |
+
- ``URL.join()()`` has been changed to match
|
506 |
+
``3986`` and align with
|
507 |
+
``/ operation()`` and ``URL.joinpath()()``
|
508 |
+
when joining URLs with empty segments.
|
509 |
+
Previously ``urllib.parse.urljoin`` was used,
|
510 |
+
which has known issues with empty segments
|
511 |
+
(`python/cpython#84774 <https://github.com/python/cpython/issues/84774>`_).
|
512 |
+
|
513 |
+
Due to the semantics of ``URL.join()()``, joining an
|
514 |
+
URL with scheme requires making it relative, prefixing with ``./``.
|
515 |
+
|
516 |
+
.. code-block:: pycon
|
517 |
+
|
518 |
+
>>> URL("https://web.archive.org/web/").join(URL("./https://github.com/aio-libs/yarl"))
|
519 |
+
URL('https://web.archive.org/web/https://github.com/aio-libs/yarl')
|
520 |
+
|
521 |
+
|
522 |
+
Empty segments are honored in the base as well as the joined part.
|
523 |
+
|
524 |
+
.. code-block:: pycon
|
525 |
+
|
526 |
+
>>> URL("https://web.archive.org/web/https://").join(URL("github.com/aio-libs/yarl"))
|
527 |
+
URL('https://web.archive.org/web/https://github.com/aio-libs/yarl')
|
528 |
+
|
529 |
+
|
530 |
+
|
531 |
+
-- by `@commonism <https://github.com/sponsors/commonism>`__
|
532 |
+
|
533 |
+
This change initially appeared in 1.9.5 but was reverted in 1.9.6 to resolve a problem with query string handling.
|
534 |
+
|
535 |
+
*Related issues and pull requests on GitHub:*
|
536 |
+
`#1039 <https://github.com/aio-libs/yarl/issues/1039>`__, `#1082 <https://github.com/aio-libs/yarl/issues/1082>`__.
|
537 |
+
|
538 |
+
|
539 |
+
Features
|
540 |
+
--------
|
541 |
+
|
542 |
+
- Added ``~yarl.URL.absolute`` which is now preferred over ``URL.is_absolute()`` -- by `@bdraco <https://github.com/sponsors/bdraco>`__.
|
543 |
+
|
544 |
+
*Related issues and pull requests on GitHub:*
|
545 |
+
`#1100 <https://github.com/aio-libs/yarl/issues/1100>`__.
|
546 |
+
|
547 |
+
|
548 |
+
----
|
549 |
+
|
550 |
+
|
551 |
+
1.9.9
|
552 |
+
=====
|
553 |
+
|
554 |
+
*(2024-09-04)*
|
555 |
+
|
556 |
+
|
557 |
+
Bug fixes
|
558 |
+
---------
|
559 |
+
|
560 |
+
- Added missing type on ``~yarl.URL.port`` -- by `@bdraco <https://github.com/sponsors/bdraco>`__.
|
561 |
+
|
562 |
+
*Related issues and pull requests on GitHub:*
|
563 |
+
`#1097 <https://github.com/aio-libs/yarl/issues/1097>`__.
|
564 |
+
|
565 |
+
|
566 |
+
----
|
567 |
+
|
568 |
+
|
569 |
+
1.9.8
|
570 |
+
=====
|
571 |
+
|
572 |
+
*(2024-09-03)*
|
573 |
+
|
574 |
+
|
575 |
+
Features
|
576 |
+
--------
|
577 |
+
|
578 |
+
- Covered the ``~yarl.URL`` object with types -- by `@bdraco <https://github.com/sponsors/bdraco>`__.
|
579 |
+
|
580 |
+
*Related issues and pull requests on GitHub:*
|
581 |
+
`#1084 <https://github.com/aio-libs/yarl/issues/1084>`__.
|
582 |
+
|
583 |
+
- Cache parsing of IP Addresses when encoding hosts -- by `@bdraco <https://github.com/sponsors/bdraco>`__.
|
584 |
+
|
585 |
+
*Related issues and pull requests on GitHub:*
|
586 |
+
`#1086 <https://github.com/aio-libs/yarl/issues/1086>`__.
|
587 |
+
|
588 |
+
|
589 |
+
Contributor-facing changes
|
590 |
+
--------------------------
|
591 |
+
|
592 |
+
- Covered the ``~yarl.URL`` object with types -- by `@bdraco <https://github.com/sponsors/bdraco>`__.
|
593 |
+
|
594 |
+
*Related issues and pull requests on GitHub:*
|
595 |
+
`#1084 <https://github.com/aio-libs/yarl/issues/1084>`__.
|
596 |
+
|
597 |
+
|
598 |
+
Miscellaneous internal changes
|
599 |
+
------------------------------
|
600 |
+
|
601 |
+
- Improved performance of handling ports -- by `@bdraco <https://github.com/sponsors/bdraco>`__.
|
602 |
+
|
603 |
+
*Related issues and pull requests on GitHub:*
|
604 |
+
`#1081 <https://github.com/aio-libs/yarl/issues/1081>`__.
|
605 |
+
|
606 |
+
|
607 |
+
----
|
608 |
+
|
609 |
+
|
610 |
+
1.9.7
|
611 |
+
=====
|
612 |
+
|
613 |
+
*(2024-09-01)*
|
614 |
+
|
615 |
+
|
616 |
+
Removals and backward incompatible breaking changes
|
617 |
+
---------------------------------------------------
|
618 |
+
|
619 |
+
- 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>`__.
|
620 |
+
|
621 |
+
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``.
|
622 |
+
|
623 |
+
*Related issues and pull requests on GitHub:*
|
624 |
+
`#1076 <https://github.com/aio-libs/yarl/issues/1076>`__.
|
625 |
+
|
626 |
+
|
627 |
+
Miscellaneous internal changes
|
628 |
+
------------------------------
|
629 |
+
|
630 |
+
- Improved performance of property caching -- by `@bdraco <https://github.com/sponsors/bdraco>`__.
|
631 |
+
|
632 |
+
The ``reify`` implementation from ``aiohttp`` was adapted to replace the internal ``cached_property`` implementation.
|
633 |
+
|
634 |
+
*Related issues and pull requests on GitHub:*
|
635 |
+
`#1070 <https://github.com/aio-libs/yarl/issues/1070>`__.
|
636 |
+
|
637 |
+
|
638 |
+
----
|
639 |
+
|
640 |
+
|
641 |
+
1.9.6
|
642 |
+
=====
|
643 |
+
|
644 |
+
*(2024-08-30)*
|
645 |
+
|
646 |
+
|
647 |
+
Bug fixes
|
648 |
+
---------
|
649 |
+
|
650 |
+
- Reverted ``3986`` compatible ``URL.join()()`` honoring empty segments which was introduced in `#1039 <https://github.com/aio-libs/yarl/issues/1039>`__.
|
651 |
+
|
652 |
+
This change introduced a regression handling query string parameters with joined URLs. The change was reverted to maintain compatibility with the previous behavior.
|
653 |
+
|
654 |
+
*Related issues and pull requests on GitHub:*
|
655 |
+
`#1067 <https://github.com/aio-libs/yarl/issues/1067>`__.
|
656 |
+
|
657 |
+
|
658 |
+
----
|
659 |
+
|
660 |
+
|
661 |
+
1.9.5
|
662 |
+
=====
|
663 |
+
|
664 |
+
*(2024-08-30)*
|
665 |
+
|
666 |
+
|
667 |
+
Bug fixes
|
668 |
+
---------
|
669 |
+
|
670 |
+
- Joining URLs with empty segments has been changed
|
671 |
+
to match ``3986``.
|
672 |
+
|
673 |
+
Previously empty segments would be removed from path,
|
674 |
+
breaking use-cases such as
|
675 |
+
|
676 |
+
.. code-block:: python
|
677 |
+
|
678 |
+
URL("https://web.archive.org/web/") / "https://github.com/"
|
679 |
+
|
680 |
+
Now ``/ operation()`` and ``URL.joinpath()()``
|
681 |
+
keep empty segments, but do not introduce new empty segments.
|
682 |
+
e.g.
|
683 |
+
|
684 |
+
.. code-block:: python
|
685 |
+
|
686 |
+
URL("https://example.org/") / ""
|
687 |
+
|
688 |
+
does not introduce an empty segment.
|
689 |
+
|
690 |
+
-- by `@commonism <https://github.com/sponsors/commonism>`__ and `@youtux <https://github.com/sponsors/youtux>`__
|
691 |
+
|
692 |
+
*Related issues and pull requests on GitHub:*
|
693 |
+
`#1026 <https://github.com/aio-libs/yarl/issues/1026>`__.
|
694 |
+
|
695 |
+
- The default protocol ports of well-known URI schemes are now taken into account
|
696 |
+
during the normalization of the URL string representation in accordance with
|
697 |
+
``3986#section-3.2.3``.
|
698 |
+
|
699 |
+
Specified ports are removed from the ``str`` representation of a ``~yarl.URL``
|
700 |
+
if the port matches the scheme's default port -- by `@commonism <https://github.com/sponsors/commonism>`__.
|
701 |
+
|
702 |
+
*Related issues and pull requests on GitHub:*
|
703 |
+
`#1033 <https://github.com/aio-libs/yarl/issues/1033>`__.
|
704 |
+
|
705 |
+
- ``URL.join()()`` has been changed to match
|
706 |
+
``3986`` and align with
|
707 |
+
``/ operation()`` and ``URL.joinpath()()``
|
708 |
+
when joining URLs with empty segments.
|
709 |
+
Previously ``urllib.parse.urljoin`` was used,
|
710 |
+
which has known issues with empty segments
|
711 |
+
(`python/cpython#84774 <https://github.com/python/cpython/issues/84774>`_).
|
712 |
+
|
713 |
+
Due to the semantics of ``URL.join()()``, joining an
|
714 |
+
URL with scheme requires making it relative, prefixing with ``./``.
|
715 |
+
|
716 |
+
.. code-block:: pycon
|
717 |
+
|
718 |
+
>>> URL("https://web.archive.org/web/").join(URL("./https://github.com/aio-libs/yarl"))
|
719 |
+
URL('https://web.archive.org/web/https://github.com/aio-libs/yarl')
|
720 |
+
|
721 |
+
|
722 |
+
Empty segments are honored in the base as well as the joined part.
|
723 |
+
|
724 |
+
.. code-block:: pycon
|
725 |
+
|
726 |
+
>>> URL("https://web.archive.org/web/https://").join(URL("github.com/aio-libs/yarl"))
|
727 |
+
URL('https://web.archive.org/web/https://github.com/aio-libs/yarl')
|
728 |
+
|
729 |
+
|
730 |
+
|
731 |
+
-- by `@commonism <https://github.com/sponsors/commonism>`__
|
732 |
+
|
733 |
+
*Related issues and pull requests on GitHub:*
|
734 |
+
`#1039 <https://github.com/aio-libs/yarl/issues/1039>`__.
|
735 |
+
|
736 |
+
|
737 |
+
Removals and backward incompatible breaking changes
|
738 |
+
---------------------------------------------------
|
739 |
+
|
740 |
+
- Stopped decoding ``%2F`` (``/``) in ``URL.path``, as this could lead to code incorrectly treating it as a path separator
|
741 |
+
-- by `@Dreamsorcerer <https://github.com/sponsors/Dreamsorcerer>`__.
|
742 |
+
|
743 |
+
*Related issues and pull requests on GitHub:*
|
744 |
+
`#1057 <https://github.com/aio-libs/yarl/issues/1057>`__.
|
745 |
+
|
746 |
+
- Dropped support for Python 3.7 -- by `@Dreamsorcerer <https://github.com/sponsors/Dreamsorcerer>`__.
|
747 |
+
|
748 |
+
*Related issues and pull requests on GitHub:*
|
749 |
+
`#1016 <https://github.com/aio-libs/yarl/issues/1016>`__.
|
750 |
+
|
751 |
+
|
752 |
+
Improved documentation
|
753 |
+
----------------------
|
754 |
+
|
755 |
+
- On the ``Contributing docs`` page,
|
756 |
+
a link to the ``Towncrier philosophy`` has been fixed.
|
757 |
+
|
758 |
+
*Related issues and pull requests on GitHub:*
|
759 |
+
`#981 <https://github.com/aio-libs/yarl/issues/981>`__.
|
760 |
+
|
761 |
+
- The pre-existing ``/ magic method()``
|
762 |
+
has been documented in the API reference -- by `@commonism <https://github.com/sponsors/commonism>`__.
|
763 |
+
|
764 |
+
*Related issues and pull requests on GitHub:*
|
765 |
+
`#1026 <https://github.com/aio-libs/yarl/issues/1026>`__.
|
766 |
+
|
767 |
+
|
768 |
+
Packaging updates and notes for downstreams
|
769 |
+
-------------------------------------------
|
770 |
+
|
771 |
+
- A flaw in the logic for copying the project directory into a
|
772 |
+
temporary folder that led to infinite recursion when ``TMPDIR``
|
773 |
+
was set to a project subdirectory path. This was happening in Fedora
|
774 |
+
and its downstream due to the use of `pyproject-rpm-macros
|
775 |
+
<https://src.fedoraproject.org/rpms/pyproject-rpm-macros>`__. It was
|
776 |
+
only reproducible with ``pip wheel`` and was not affecting the
|
777 |
+
``pyproject-build`` users.
|
778 |
+
|
779 |
+
-- by `@hroncok <https://github.com/sponsors/hroncok>`__ and `@webknjaz <https://github.com/sponsors/webknjaz>`__
|
780 |
+
|
781 |
+
*Related issues and pull requests on GitHub:*
|
782 |
+
`#992 <https://github.com/aio-libs/yarl/issues/992>`__, `#1014 <https://github.com/aio-libs/yarl/issues/1014>`__.
|
783 |
+
|
784 |
+
- Support Python 3.13 and publish non-free-threaded wheels
|
785 |
+
|
786 |
+
*Related issues and pull requests on GitHub:*
|
787 |
+
`#1054 <https://github.com/aio-libs/yarl/issues/1054>`__.
|
788 |
+
|
789 |
+
|
790 |
+
Contributor-facing changes
|
791 |
+
--------------------------
|
792 |
+
|
793 |
+
- The CI/CD setup has been updated to test ``arm64`` wheels
|
794 |
+
under macOS 14, except for Python 3.7 that is unsupported
|
795 |
+
in that environment -- by `@webknjaz <https://github.com/sponsors/webknjaz>`__.
|
796 |
+
|
797 |
+
*Related issues and pull requests on GitHub:*
|
798 |
+
`#1015 <https://github.com/aio-libs/yarl/issues/1015>`__.
|
799 |
+
|
800 |
+
- Removed unused type ignores and casts -- by `@hauntsaninja <https://github.com/sponsors/hauntsaninja>`__.
|
801 |
+
|
802 |
+
*Related issues and pull requests on GitHub:*
|
803 |
+
`#1031 <https://github.com/aio-libs/yarl/issues/1031>`__.
|
804 |
+
|
805 |
+
|
806 |
+
Miscellaneous internal changes
|
807 |
+
------------------------------
|
808 |
+
|
809 |
+
- ``port``, ``scheme``, and ``raw_host`` are now ``cached_property`` -- by `@bdraco <https://github.com/sponsors/bdraco>`__.
|
810 |
+
|
811 |
+
``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.
|
812 |
+
|
813 |
+
*Related issues and pull requests on GitHub:*
|
814 |
+
`#1044 <https://github.com/aio-libs/yarl/issues/1044>`__, `#1058 <https://github.com/aio-libs/yarl/issues/1058>`__.
|
815 |
+
|
816 |
+
|
817 |
+
----
|
818 |
+
|
819 |
+
|
820 |
+
1.9.4 (2023-12-06)
|
821 |
+
==================
|
822 |
+
|
823 |
+
Bug fixes
|
824 |
+
---------
|
825 |
+
|
826 |
+
- Started raising ``TypeError`` when a string value is passed into
|
827 |
+
``yarl.URL.build()`` as the ``port`` argument -- by `@commonism <https://github.com/sponsors/commonism>`__.
|
828 |
+
|
829 |
+
Previously the empty string as port would create malformed URLs when rendered as string representations. (`#883 <https://github.com/aio-libs/yarl/issues/883>`__)
|
830 |
+
|
831 |
+
|
832 |
+
Packaging updates and notes for downstreams
|
833 |
+
-------------------------------------------
|
834 |
+
|
835 |
+
- The leading ``--`` has been dropped from the `PEP 517 <https://peps.python.org/pep-517>`__ in-tree build
|
836 |
+
backend config setting names. ``--pure-python`` is now just ``pure-python``
|
837 |
+
-- by `@webknjaz <https://github.com/sponsors/webknjaz>`__.
|
838 |
+
|
839 |
+
The usage now looks as follows:
|
840 |
+
|
841 |
+
.. code-block:: console
|
842 |
+
|
843 |
+
$ python -m build \
|
844 |
+
--config-setting=pure-python=true \
|
845 |
+
--config-setting=with-cython-tracing=true
|
846 |
+
|
847 |
+
(`#963 <https://github.com/aio-libs/yarl/issues/963>`__)
|
848 |
+
|
849 |
+
|
850 |
+
Contributor-facing changes
|
851 |
+
--------------------------
|
852 |
+
|
853 |
+
- A step-by-step ``Release Guide`` guide has
|
854 |
+
been added, describing how to release *yarl* -- by `@webknjaz <https://github.com/sponsors/webknjaz>`__.
|
855 |
+
|
856 |
+
This is primarily targeting maintainers. (`#960 <https://github.com/aio-libs/yarl/issues/960>`__)
|
857 |
+
- Coverage collection has been implemented for the Cython modules
|
858 |
+
-- by `@webknjaz <https://github.com/sponsors/webknjaz>`__.
|
859 |
+
|
860 |
+
It will also be reported to Codecov from any non-release CI jobs.
|
861 |
+
|
862 |
+
To measure coverage in a development environment, *yarl* can be
|
863 |
+
installed in editable mode:
|
864 |
+
|
865 |
+
.. code-block:: console
|
866 |
+
|
867 |
+
$ python -Im pip install -e .
|
868 |
+
|
869 |
+
Editable install produces C-files required for the Cython coverage
|
870 |
+
plugin to map the measurements back to the PYX-files.
|
871 |
+
|
872 |
+
`#961 <https://github.com/aio-libs/yarl/issues/961>`__
|
873 |
+
|
874 |
+
- It is now possible to request line tracing in Cython builds using the
|
875 |
+
``with-cython-tracing`` `PEP 517 <https://peps.python.org/pep-517>`__ config setting
|
876 |
+
-- `@webknjaz <https://github.com/sponsors/webknjaz>`__.
|
877 |
+
|
878 |
+
This can be used in CI and development environment to measure coverage
|
879 |
+
on Cython modules, but is not normally useful to the end-users or
|
880 |
+
downstream packagers.
|
881 |
+
|
882 |
+
Here's a usage example:
|
883 |
+
|
884 |
+
.. code-block:: console
|
885 |
+
|
886 |
+
$ python -Im pip install . --config-settings=with-cython-tracing=true
|
887 |
+
|
888 |
+
For editable installs, this setting is on by default. Otherwise, it's
|
889 |
+
off unless requested explicitly.
|
890 |
+
|
891 |
+
The following produces C-files required for the Cython coverage
|
892 |
+
plugin to map the measurements back to the PYX-files:
|
893 |
+
|
894 |
+
.. code-block:: console
|
895 |
+
|
896 |
+
$ python -Im pip install -e .
|
897 |
+
|
898 |
+
Alternatively, the ``YARL_CYTHON_TRACING=1`` environment variable
|
899 |
+
can be set to do the same as the `PEP 517 <https://peps.python.org/pep-517>`__ config setting.
|
900 |
+
|
901 |
+
`#962 <https://github.com/aio-libs/yarl/issues/962>`__
|
902 |
+
|
903 |
+
|
904 |
+
1.9.3 (2023-11-20)
|
905 |
+
==================
|
906 |
+
|
907 |
+
Bug fixes
|
908 |
+
---------
|
909 |
+
|
910 |
+
- 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>`__)
|
911 |
+
- 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>`__)
|
912 |
+
- 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>`__)
|
913 |
+
- Updated type hints to include ``URL.missing_port()``, ``URL.__bytes__()``
|
914 |
+
and the ``encoding`` argument to ``yarl.URL.joinpath()``
|
915 |
+
-- by `@mjpieters <https://github.com/sponsors/mjpieters>`__. (`#891 <https://github.com/aio-libs/yarl/issues/891>`__)
|
916 |
+
|
917 |
+
|
918 |
+
Packaging updates and notes for downstreams
|
919 |
+
-------------------------------------------
|
920 |
+
|
921 |
+
- 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>`__)
|
922 |
+
- Declared modern ``setuptools.build_meta`` as the `PEP 517 <https://peps.python.org/pep-517>`__ build
|
923 |
+
backend in ``pyproject.toml`` explicitly -- by `@webknjaz <https://github.com/sponsors/webknjaz>`__. (`#886 <https://github.com/aio-libs/yarl/issues/886>`__)
|
924 |
+
- Converted most of the packaging setup into a declarative ``setup.cfg``
|
925 |
+
config -- by `@webknjaz <https://github.com/sponsors/webknjaz>`__. (`#890 <https://github.com/aio-libs/yarl/issues/890>`__)
|
926 |
+
- The packaging is replaced from an old-fashioned ``setup.py`` to an
|
927 |
+
in-tree `PEP 517 <https://peps.python.org/pep-517>`__ build backend -- by `@webknjaz <https://github.com/sponsors/webknjaz>`__.
|
928 |
+
|
929 |
+
Whenever the end-users or downstream packagers need to build ``yarl`` from
|
930 |
+
source (a Git checkout or an sdist), they may pass a ``config_settings``
|
931 |
+
flag ``--pure-python``. If this flag is not set, a C-extension will be built
|
932 |
+
and included into the distribution.
|
933 |
+
|
934 |
+
Here is how this can be done with ``pip``:
|
935 |
+
|
936 |
+
.. code-block:: console
|
937 |
+
|
938 |
+
$ python -m pip install . --config-settings=--pure-python=false
|
939 |
+
|
940 |
+
This will also work with ``-e | --editable``.
|
941 |
+
|
942 |
+
The same can be achieved via ``pypa/build``:
|
943 |
+
|
944 |
+
.. code-block:: console
|
945 |
+
|
946 |
+
$ python -m build --config-setting=--pure-python=false
|
947 |
+
|
948 |
+
Adding ``-w | --wheel`` can force ``pypa/build`` produce a wheel from source
|
949 |
+
directly, as opposed to building an ``sdist`` and then building from it. (`#893 <https://github.com/aio-libs/yarl/issues/893>`__)
|
950 |
+
|
951 |
+
.. attention::
|
952 |
+
|
953 |
+
v1.9.3 was the only version using the ``--pure-python`` setting name.
|
954 |
+
Later versions dropped the ``--`` prefix, making it just ``pure-python``.
|
955 |
+
|
956 |
+
- Declared Python 3.12 supported officially in the distribution package metadata
|
957 |
+
-- by `@edgarrmondragon <https://github.com/sponsors/edgarrmondragon>`__. (`#942 <https://github.com/aio-libs/yarl/issues/942>`__)
|
958 |
+
|
959 |
+
|
960 |
+
Contributor-facing changes
|
961 |
+
--------------------------
|
962 |
+
|
963 |
+
- A regression test for no-host URLs was added per `#821 <https://github.com/aio-libs/yarl/issues/821>`__
|
964 |
+
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>`__)
|
965 |
+
- 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>`__)
|
966 |
+
- All Python 3.12 jobs are now marked as required to pass in CI
|
967 |
+
-- by `@edgarrmondragon <https://github.com/sponsors/edgarrmondragon>`__. (`#942 <https://github.com/aio-libs/yarl/issues/942>`__)
|
968 |
+
- MyST is now integrated in Sphinx -- by `@webknjaz <https://github.com/sponsors/webknjaz>`__.
|
969 |
+
|
970 |
+
This allows the contributors to author new documents in Markdown
|
971 |
+
when they have difficulties with going straight RST. (`#953 <https://github.com/aio-libs/yarl/issues/953>`__)
|
972 |
+
|
973 |
+
|
974 |
+
1.9.2 (2023-04-25)
|
975 |
+
==================
|
976 |
+
|
977 |
+
Bugfixes
|
978 |
+
--------
|
979 |
+
|
980 |
+
- Fix regression with ``yarl.URL.__truediv__()`` and absolute URLs with empty paths causing the raw path to lack the leading ``/``.
|
981 |
+
(`#854 <https://github.com/aio-libs/yarl/issues/854>`_)
|
982 |
+
|
983 |
+
|
984 |
+
1.9.1 (2023-04-21)
|
985 |
+
==================
|
986 |
+
|
987 |
+
Bugfixes
|
988 |
+
--------
|
989 |
+
|
990 |
+
- 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>`_)
|
991 |
+
|
992 |
+
|
993 |
+
1.9.0 (2023-04-19)
|
994 |
+
==================
|
995 |
+
|
996 |
+
This release was never published to PyPI, due to issues with the build process.
|
997 |
+
|
998 |
+
Features
|
999 |
+
--------
|
1000 |
+
|
1001 |
+
- Added ``URL.joinpath(*elements)``, to create a new URL appending multiple path elements. (`#704 <https://github.com/aio-libs/yarl/issues/704>`_)
|
1002 |
+
- Made ``URL.__truediv__()()`` return ``NotImplemented`` if called with an
|
1003 |
+
unsupported type — by `@michaeljpeters <https://github.com/sponsors/michaeljpeters>`__.
|
1004 |
+
(`#832 <https://github.com/aio-libs/yarl/issues/832>`_)
|
1005 |
+
|
1006 |
+
|
1007 |
+
Bugfixes
|
1008 |
+
--------
|
1009 |
+
|
1010 |
+
- Path normalization for absolute URLs no longer raises a ValueError exception
|
1011 |
+
when ``..`` segments would otherwise go beyond the URL path root.
|
1012 |
+
(`#536 <https://github.com/aio-libs/yarl/issues/536>`_)
|
1013 |
+
- 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>`_)
|
1014 |
+
- 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>`_)
|
1015 |
+
- 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>`_)
|
1016 |
+
- Fixed an issue with ``update_query()`` getting rid of the query when the argument
|
1017 |
+
is empty but not ``None``. (`#845 <https://github.com/aio-libs/yarl/issues/845>`_)
|
1018 |
+
|
1019 |
+
|
1020 |
+
Misc
|
1021 |
+
----
|
1022 |
+
|
1023 |
+
- `#220 <https://github.com/aio-libs/yarl/issues/220>`_
|
1024 |
+
|
1025 |
+
|
1026 |
+
1.8.2 (2022-12-03)
|
1027 |
+
==================
|
1028 |
+
|
1029 |
+
This is the first release that started shipping wheels for Python 3.11.
|
1030 |
+
|
1031 |
+
|
1032 |
+
1.8.1 (2022-08-01)
|
1033 |
+
==================
|
1034 |
+
|
1035 |
+
Misc
|
1036 |
+
----
|
1037 |
+
|
1038 |
+
- `#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>`_
|
1039 |
+
|
1040 |
+
|
1041 |
+
1.8.0 (2022-08-01)
|
1042 |
+
==================
|
1043 |
+
|
1044 |
+
Features
|
1045 |
+
--------
|
1046 |
+
|
1047 |
+
- Added ``URL.raw_suffix``, ``URL.suffix``, ``URL.raw_suffixes``, ``URL.suffixes``, ``URL.with_suffix``. (`#613 <https://github.com/aio-libs/yarl/issues/613>`_)
|
1048 |
+
|
1049 |
+
|
1050 |
+
Improved Documentation
|
1051 |
+
----------------------
|
1052 |
+
|
1053 |
+
- Fixed broken internal references to ``yarl.URL.human_repr()``.
|
1054 |
+
(`#665 <https://github.com/aio-libs/yarl/issues/665>`_)
|
1055 |
+
- Fixed broken external references to ``multidict:index`` docs. (`#665 <https://github.com/aio-libs/yarl/issues/665>`_)
|
1056 |
+
|
1057 |
+
|
1058 |
+
Deprecations and Removals
|
1059 |
+
-------------------------
|
1060 |
+
|
1061 |
+
- Dropped Python 3.6 support. (`#672 <https://github.com/aio-libs/yarl/issues/672>`_)
|
1062 |
+
|
1063 |
+
|
1064 |
+
Misc
|
1065 |
+
----
|
1066 |
+
|
1067 |
+
- `#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>`_
|
1068 |
+
|
1069 |
+
|
1070 |
+
1.7.2 (2021-11-01)
|
1071 |
+
==================
|
1072 |
+
|
1073 |
+
Bugfixes
|
1074 |
+
--------
|
1075 |
+
|
1076 |
+
- 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>`_)
|
1077 |
+
|
1078 |
+
|
1079 |
+
1.7.1 (2021-10-07)
|
1080 |
+
==================
|
1081 |
+
|
1082 |
+
Bugfixes
|
1083 |
+
--------
|
1084 |
+
|
1085 |
+
- Fix 1.7.0 build error
|
1086 |
+
|
1087 |
+
1.7.0 (2021-10-06)
|
1088 |
+
==================
|
1089 |
+
|
1090 |
+
Features
|
1091 |
+
--------
|
1092 |
+
|
1093 |
+
- Add ``__bytes__()`` magic method so that ``bytes(url)`` will work and use optimal ASCII encoding.
|
1094 |
+
(`#582 <https://github.com/aio-libs/yarl/issues/582>`_)
|
1095 |
+
- Started shipping platform-specific arm64 wheels for Apple Silicon. (`#622 <https://github.com/aio-libs/yarl/issues/622>`_)
|
1096 |
+
- Started shipping platform-specific wheels with the ``musl`` tag targeting typical Alpine Linux runtimes. (`#622 <https://github.com/aio-libs/yarl/issues/622>`_)
|
1097 |
+
- Added support for Python 3.10. (`#622 <https://github.com/aio-libs/yarl/issues/622>`_)
|
1098 |
+
|
1099 |
+
|
1100 |
+
1.6.3 (2020-11-14)
|
1101 |
+
==================
|
1102 |
+
|
1103 |
+
Bugfixes
|
1104 |
+
--------
|
1105 |
+
|
1106 |
+
- No longer loose characters when decoding incorrect percent-sequences (like ``%e2%82%f8``). All non-decodable percent-sequences are now preserved.
|
1107 |
+
`#517 <https://github.com/aio-libs/yarl/issues/517>`_
|
1108 |
+
- Provide x86 Windows wheels.
|
1109 |
+
`#535 <https://github.com/aio-libs/yarl/issues/535>`_
|
1110 |
+
|
1111 |
+
|
1112 |
+
----
|
1113 |
+
|
1114 |
+
|
1115 |
+
1.6.2 (2020-10-12)
|
1116 |
+
==================
|
1117 |
+
|
1118 |
+
|
1119 |
+
Bugfixes
|
1120 |
+
--------
|
1121 |
+
|
1122 |
+
- Provide generated ``.c`` files in TarBall distribution.
|
1123 |
+
`#530 <https://github.com/aio-libs/multidict/issues/530>`_
|
1124 |
+
|
1125 |
+
1.6.1 (2020-10-12)
|
1126 |
+
==================
|
1127 |
+
|
1128 |
+
Features
|
1129 |
+
--------
|
1130 |
+
|
1131 |
+
- Provide wheels for ``aarch64``, ``i686``, ``ppc64le``, ``s390x`` architectures on
|
1132 |
+
Linux as well as ``x86_64``.
|
1133 |
+
`#507 <https://github.com/aio-libs/yarl/issues/507>`_
|
1134 |
+
- Provide wheels for Python 3.9.
|
1135 |
+
`#526 <https://github.com/aio-libs/yarl/issues/526>`_
|
1136 |
+
|
1137 |
+
Bugfixes
|
1138 |
+
--------
|
1139 |
+
|
1140 |
+
- ``human_repr()`` now always produces valid representation equivalent to the original URL (if the original URL is valid).
|
1141 |
+
`#511 <https://github.com/aio-libs/yarl/issues/511>`_
|
1142 |
+
- Fixed requoting a single percent followed by a percent-encoded character in the Cython implementation.
|
1143 |
+
`#514 <https://github.com/aio-libs/yarl/issues/514>`_
|
1144 |
+
- Fix ValueError when decoding ``%`` which is not followed by two hexadecimal digits.
|
1145 |
+
`#516 <https://github.com/aio-libs/yarl/issues/516>`_
|
1146 |
+
- Fix decoding ``%`` followed by a space and hexadecimal digit.
|
1147 |
+
`#520 <https://github.com/aio-libs/yarl/issues/520>`_
|
1148 |
+
- Fix annotation of ``with_query()``/``update_query()`` methods for ``key=[val1, val2]`` case.
|
1149 |
+
`#528 <https://github.com/aio-libs/yarl/issues/528>`_
|
1150 |
+
|
1151 |
+
Removal
|
1152 |
+
-------
|
1153 |
+
|
1154 |
+
- Drop Python 3.5 support; Python 3.6 is the minimal supported Python version.
|
1155 |
+
|
1156 |
+
|
1157 |
+
----
|
1158 |
+
|
1159 |
+
|
1160 |
+
1.6.0 (2020-09-23)
|
1161 |
+
==================
|
1162 |
+
|
1163 |
+
Features
|
1164 |
+
--------
|
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 |
+
|
1169 |
+
|
1170 |
+
Bugfixes
|
1171 |
+
--------
|
1172 |
+
|
1173 |
+
- Do not requote arguments in ``URL.build()``, ``with_xxx()`` and in ``/`` operator.
|
1174 |
+
`#502 <https://github.com/aio-libs/yarl/issues/502>`_
|
1175 |
+
- Keep IPv6 brackets in ``origin()``.
|
1176 |
+
`#504 <https://github.com/aio-libs/yarl/issues/504>`_
|
1177 |
+
|
1178 |
+
|
1179 |
+
----
|
1180 |
+
|
1181 |
+
|
1182 |
+
1.5.1 (2020-08-01)
|
1183 |
+
==================
|
1184 |
+
|
1185 |
+
Bugfixes
|
1186 |
+
--------
|
1187 |
+
|
1188 |
+
- Fix including relocated internal ``yarl._quoting_c`` C-extension into published PyPI dists.
|
1189 |
+
`#485 <https://github.com/aio-libs/yarl/issues/485>`_
|
1190 |
+
|
1191 |
+
|
1192 |
+
Misc
|
1193 |
+
----
|
1194 |
+
|
1195 |
+
- `#484 <https://github.com/aio-libs/yarl/issues/484>`_
|
1196 |
+
|
1197 |
+
|
1198 |
+
----
|
1199 |
+
|
1200 |
+
|
1201 |
+
1.5.0 (2020-07-26)
|
1202 |
+
==================
|
1203 |
+
|
1204 |
+
Features
|
1205 |
+
--------
|
1206 |
+
|
1207 |
+
- Convert host to lowercase on URL building.
|
1208 |
+
`#386 <https://github.com/aio-libs/yarl/issues/386>`_
|
1209 |
+
- Allow using ``mod`` operator (``%``) for updating query string (an alias for ``update_query()`` method).
|
1210 |
+
`#435 <https://github.com/aio-libs/yarl/issues/435>`_
|
1211 |
+
- Allow use of sequences such as ``list`` and ``tuple`` in the values
|
1212 |
+
of a mapping such as ``dict`` to represent that a key has many values::
|
1213 |
+
|
1214 |
+
url = URL("http://example.com")
|
1215 |
+
assert url.with_query({"a": [1, 2]}) == URL("http://example.com/?a=1&a=2")
|
1216 |
+
|
1217 |
+
`#443 <https://github.com/aio-libs/yarl/issues/443>`_
|
1218 |
+
- Support ``URL.build()`` with scheme and path (creates a relative URL).
|
1219 |
+
`#464 <https://github.com/aio-libs/yarl/issues/464>`_
|
1220 |
+
- Cache slow IDNA encode/decode calls.
|
1221 |
+
`#476 <https://github.com/aio-libs/yarl/issues/476>`_
|
1222 |
+
- Add ``@final`` / ``Final`` type hints
|
1223 |
+
`#477 <https://github.com/aio-libs/yarl/issues/477>`_
|
1224 |
+
- Support URL authority/raw_authority properties and authority argument of ``URL.build()`` method.
|
1225 |
+
`#478 <https://github.com/aio-libs/yarl/issues/478>`_
|
1226 |
+
- Hide the library implementation details, make the exposed public list very clean.
|
1227 |
+
`#483 <https://github.com/aio-libs/yarl/issues/483>`_
|
1228 |
+
|
1229 |
+
|
1230 |
+
Bugfixes
|
1231 |
+
--------
|
1232 |
+
|
1233 |
+
- Fix tests with newer Python (3.7.6, 3.8.1 and 3.9.0+).
|
1234 |
+
`#409 <https://github.com/aio-libs/yarl/issues/409>`_
|
1235 |
+
- Fix a bug where query component, passed in a form of mapping or sequence, is unquoted in unexpected way.
|
1236 |
+
`#426 <https://github.com/aio-libs/yarl/issues/426>`_
|
1237 |
+
- Hide ``Query`` and ``QueryVariable`` type aliases in ``__init__.pyi``, now they are prefixed with underscore.
|
1238 |
+
`#431 <https://github.com/aio-libs/yarl/issues/431>`_
|
1239 |
+
- Keep IPv6 brackets after updating port/user/password.
|
1240 |
+
`#451 <https://github.com/aio-libs/yarl/issues/451>`_
|
1241 |
+
|
1242 |
+
|
1243 |
+
----
|
1244 |
+
|
1245 |
+
|
1246 |
+
1.4.2 (2019-12-05)
|
1247 |
+
==================
|
1248 |
+
|
1249 |
+
Features
|
1250 |
+
--------
|
1251 |
+
|
1252 |
+
- Workaround for missing ``str.isascii()`` in Python 3.6
|
1253 |
+
`#389 <https://github.com/aio-libs/yarl/issues/389>`_
|
1254 |
+
|
1255 |
+
|
1256 |
+
----
|
1257 |
+
|
1258 |
+
|
1259 |
+
1.4.1 (2019-11-29)
|
1260 |
+
==================
|
1261 |
+
|
1262 |
+
* Fix regression, make the library work on Python 3.5 and 3.6 again.
|
1263 |
+
|
1264 |
+
1.4.0 (2019-11-29)
|
1265 |
+
==================
|
1266 |
+
|
1267 |
+
* Distinguish an empty password in URL from a password not provided at all (#262)
|
1268 |
+
|
1269 |
+
* Fixed annotations for optional parameters of ``URL.build`` (#309)
|
1270 |
+
|
1271 |
+
* Use None as default value of ``user`` parameter of ``URL.build`` (#309)
|
1272 |
+
|
1273 |
+
* Enforce building C Accelerated modules when installing from source tarball, use
|
1274 |
+
``YARL_NO_EXTENSIONS`` environment variable for falling back to (slower) Pure Python
|
1275 |
+
implementation (#329)
|
1276 |
+
|
1277 |
+
* Drop Python 3.5 support
|
1278 |
+
|
1279 |
+
* Fix quoting of plus in path by pure python version (#339)
|
1280 |
+
|
1281 |
+
* Don't create a new URL if fragment is unchanged (#292)
|
1282 |
+
|
1283 |
+
* Included in error message the path that produces starting slash forbidden error (#376)
|
1284 |
+
|
1285 |
+
* Skip slow IDNA encoding for ASCII-only strings (#387)
|
1286 |
+
|
1287 |
+
|
1288 |
+
1.3.0 (2018-12-11)
|
1289 |
+
==================
|
1290 |
+
|
1291 |
+
* Fix annotations for ``query`` parameter (#207)
|
1292 |
+
|
1293 |
+
* An incoming query sequence can have int variables (the same as for
|
1294 |
+
Mapping type) (#208)
|
1295 |
+
|
1296 |
+
* Add ``URL.explicit_port`` property (#218)
|
1297 |
+
|
1298 |
+
* Give a friendlier error when port can't be converted to int (#168)
|
1299 |
+
|
1300 |
+
* ``bool(URL())`` now returns ``False`` (#272)
|
1301 |
+
|
1302 |
+
1.2.6 (2018-06-14)
|
1303 |
+
==================
|
1304 |
+
|
1305 |
+
* Drop Python 3.4 trove classifier (#205)
|
1306 |
+
|
1307 |
+
1.2.5 (2018-05-23)
|
1308 |
+
==================
|
1309 |
+
|
1310 |
+
* Fix annotations for ``build`` (#199)
|
1311 |
+
|
1312 |
+
1.2.4 (2018-05-08)
|
1313 |
+
==================
|
1314 |
+
|
1315 |
+
* Fix annotations for ``cached_property`` (#195)
|
1316 |
+
|
1317 |
+
1.2.3 (2018-05-03)
|
1318 |
+
==================
|
1319 |
+
|
1320 |
+
* Accept ``str`` subclasses in ``URL`` constructor (#190)
|
1321 |
+
|
1322 |
+
1.2.2 (2018-05-01)
|
1323 |
+
==================
|
1324 |
+
|
1325 |
+
* Fix build
|
1326 |
+
|
1327 |
+
1.2.1 (2018-04-30)
|
1328 |
+
==================
|
1329 |
+
|
1330 |
+
* Pin minimal required Python to 3.5.3 (#189)
|
1331 |
+
|
1332 |
+
1.2.0 (2018-04-30)
|
1333 |
+
==================
|
1334 |
+
|
1335 |
+
* Forbid inheritance, replace ``__init__`` with ``__new__`` (#171)
|
1336 |
+
|
1337 |
+
* Support PEP-561 (provide type hinting marker) (#182)
|
1338 |
+
|
1339 |
+
1.1.1 (2018-02-17)
|
1340 |
+
==================
|
1341 |
+
|
1342 |
+
* Fix performance regression: don't encode empty ``netloc`` (#170)
|
1343 |
+
|
1344 |
+
1.1.0 (2018-01-21)
|
1345 |
+
==================
|
1346 |
+
|
1347 |
+
* Make pure Python quoter consistent with Cython version (#162)
|
1348 |
+
|
1349 |
+
1.0.0 (2018-01-15)
|
1350 |
+
==================
|
1351 |
+
|
1352 |
+
* Use fast path if quoted string does not need requoting (#154)
|
1353 |
+
|
1354 |
+
* Speed up quoting/unquoting by ``_Quoter`` and ``_Unquoter`` classes (#155)
|
1355 |
+
|
1356 |
+
* Drop ``yarl.quote`` and ``yarl.unquote`` public functions (#155)
|
1357 |
+
|
1358 |
+
* Add custom string writer, reuse static buffer if available (#157)
|
1359 |
+
Code is 50-80 times faster than Pure Python version (was 4-5 times faster)
|
1360 |
+
|
1361 |
+
* Don't recode IP zone (#144)
|
1362 |
+
|
1363 |
+
* Support ``encoded=True`` in ``yarl.URL.build()`` (#158)
|
1364 |
+
|
1365 |
+
* Fix updating query with multiple keys (#160)
|
1366 |
+
|
1367 |
+
0.18.0 (2018-01-10)
|
1368 |
+
===================
|
1369 |
+
|
1370 |
+
* Fallback to IDNA 2003 if domain name is not IDNA 2008 compatible (#152)
|
1371 |
+
|
1372 |
+
0.17.0 (2017-12-30)
|
1373 |
+
===================
|
1374 |
+
|
1375 |
+
* Use IDNA 2008 for domain name processing (#149)
|
1376 |
+
|
1377 |
+
0.16.0 (2017-12-07)
|
1378 |
+
===================
|
1379 |
+
|
1380 |
+
* Fix raising ``TypeError`` by ``url.query_string()`` after
|
1381 |
+
``url.with_query({})`` (empty mapping) (#141)
|
1382 |
+
|
1383 |
+
0.15.0 (2017-11-23)
|
1384 |
+
===================
|
1385 |
+
|
1386 |
+
* Add ``raw_path_qs`` attribute (#137)
|
1387 |
+
|
1388 |
+
0.14.2 (2017-11-14)
|
1389 |
+
===================
|
1390 |
+
|
1391 |
+
* Restore ``strict`` parameter as no-op in ``quote`` / ``unquote``
|
1392 |
+
|
1393 |
+
0.14.1 (2017-11-13)
|
1394 |
+
===================
|
1395 |
+
|
1396 |
+
* Restore ``strict`` parameter as no-op for sake of compatibility with
|
1397 |
+
aiohttp 2.2
|
1398 |
+
|
1399 |
+
0.14.0 (2017-11-11)
|
1400 |
+
===================
|
1401 |
+
|
1402 |
+
* Drop strict mode (#123)
|
1403 |
+
|
1404 |
+
* Fix ``"ValueError: Unallowed PCT %"`` when there's a ``"%"`` in the URL (#124)
|
1405 |
+
|
1406 |
+
0.13.0 (2017-10-01)
|
1407 |
+
===================
|
1408 |
+
|
1409 |
+
* Document ``encoded`` parameter (#102)
|
1410 |
+
|
1411 |
+
* Support relative URLs like ``'?key=value'`` (#100)
|
1412 |
+
|
1413 |
+
* Unsafe encoding for QS fixed. Encode ``;`` character in value parameter (#104)
|
1414 |
+
|
1415 |
+
* Process passwords without user names (#95)
|
1416 |
+
|
1417 |
+
0.12.0 (2017-06-26)
|
1418 |
+
===================
|
1419 |
+
|
1420 |
+
* Properly support paths without leading slash in ``URL.with_path()`` (#90)
|
1421 |
+
|
1422 |
+
* Enable type annotation checks
|
1423 |
+
|
1424 |
+
0.11.0 (2017-06-26)
|
1425 |
+
===================
|
1426 |
+
|
1427 |
+
* Normalize path (#86)
|
1428 |
+
|
1429 |
+
* Clear query and fragment parts in ``.with_path()`` (#85)
|
1430 |
+
|
1431 |
+
0.10.3 (2017-06-13)
|
1432 |
+
===================
|
1433 |
+
|
1434 |
+
* Prevent double URL arguments unquoting (#83)
|
1435 |
+
|
1436 |
+
0.10.2 (2017-05-05)
|
1437 |
+
===================
|
1438 |
+
|
1439 |
+
* Unexpected hash behavior (#75)
|
1440 |
+
|
1441 |
+
|
1442 |
+
0.10.1 (2017-05-03)
|
1443 |
+
===================
|
1444 |
+
|
1445 |
+
* Unexpected compare behavior (#73)
|
1446 |
+
|
1447 |
+
* Do not quote or unquote + if not a query string. (#74)
|
1448 |
+
|
1449 |
+
|
1450 |
+
0.10.0 (2017-03-14)
|
1451 |
+
===================
|
1452 |
+
|
1453 |
+
* Added ``URL.build`` class method (#58)
|
1454 |
+
|
1455 |
+
* Added ``path_qs`` attribute (#42)
|
1456 |
+
|
1457 |
+
|
1458 |
+
0.9.8 (2017-02-16)
|
1459 |
+
==================
|
1460 |
+
|
1461 |
+
* Do not quote ``:`` in path
|
1462 |
+
|
1463 |
+
|
1464 |
+
0.9.7 (2017-02-16)
|
1465 |
+
==================
|
1466 |
+
|
1467 |
+
* Load from pickle without _cache (#56)
|
1468 |
+
|
1469 |
+
* Percent-encoded pluses in path variables become spaces (#59)
|
1470 |
+
|
1471 |
+
|
1472 |
+
0.9.6 (2017-02-15)
|
1473 |
+
==================
|
1474 |
+
|
1475 |
+
* Revert backward incompatible change (BaseURL)
|
1476 |
+
|
1477 |
+
|
1478 |
+
0.9.5 (2017-02-14)
|
1479 |
+
==================
|
1480 |
+
|
1481 |
+
* Fix BaseURL rich comparison support
|
1482 |
+
|
1483 |
+
|
1484 |
+
0.9.4 (2017-02-14)
|
1485 |
+
==================
|
1486 |
+
|
1487 |
+
* Use BaseURL
|
1488 |
+
|
1489 |
+
|
1490 |
+
0.9.3 (2017-02-14)
|
1491 |
+
==================
|
1492 |
+
|
1493 |
+
* Added BaseURL
|
1494 |
+
|
1495 |
+
|
1496 |
+
0.9.2 (2017-02-08)
|
1497 |
+
==================
|
1498 |
+
|
1499 |
+
* Remove debug print
|
1500 |
+
|
1501 |
+
|
1502 |
+
0.9.1 (2017-02-07)
|
1503 |
+
==================
|
1504 |
+
|
1505 |
+
* Do not lose tail chars (#45)
|
1506 |
+
|
1507 |
+
|
1508 |
+
0.9.0 (2017-02-07)
|
1509 |
+
==================
|
1510 |
+
|
1511 |
+
* Allow to quote ``%`` in non strict mode (#21)
|
1512 |
+
|
1513 |
+
* Incorrect parsing of query parameters with %3B (;) inside (#34)
|
1514 |
+
|
1515 |
+
* Fix core dumps (#41)
|
1516 |
+
|
1517 |
+
* ``tmpbuf`` - compiling error (#43)
|
1518 |
+
|
1519 |
+
* Added ``URL.update_path()`` method
|
1520 |
+
|
1521 |
+
* Added ``URL.update_query()`` method (#47)
|
1522 |
+
|
1523 |
+
|
1524 |
+
0.8.1 (2016-12-03)
|
1525 |
+
==================
|
1526 |
+
|
1527 |
+
* Fix broken aiohttp: revert back ``quote`` / ``unquote``.
|
1528 |
+
|
1529 |
+
|
1530 |
+
0.8.0 (2016-12-03)
|
1531 |
+
==================
|
1532 |
+
|
1533 |
+
* Support more verbose error messages in ``.with_query()`` (#24)
|
1534 |
+
|
1535 |
+
* Don't percent-encode ``@`` and ``:`` in path (#32)
|
1536 |
+
|
1537 |
+
* Don't expose ``yarl.quote`` and ``yarl.unquote``, these functions are
|
1538 |
+
part of private API
|
1539 |
+
|
1540 |
+
0.7.1 (2016-11-18)
|
1541 |
+
==================
|
1542 |
+
|
1543 |
+
* Accept not only ``str`` but all classes inherited from ``str`` also (#25)
|
1544 |
+
|
1545 |
+
0.7.0 (2016-11-07)
|
1546 |
+
==================
|
1547 |
+
|
1548 |
+
* Accept ``int`` as value for ``.with_query()``
|
1549 |
+
|
1550 |
+
0.6.0 (2016-11-07)
|
1551 |
+
==================
|
1552 |
+
|
1553 |
+
* Explicitly use UTF8 encoding in ``setup.py`` (#20)
|
1554 |
+
* Properly unquote non-UTF8 strings (#19)
|
1555 |
+
|
1556 |
+
0.5.3 (2016-11-02)
|
1557 |
+
==================
|
1558 |
+
|
1559 |
+
* Don't use ``typing.NamedTuple`` fields but indexes on URL construction
|
1560 |
+
|
1561 |
+
0.5.2 (2016-11-02)
|
1562 |
+
==================
|
1563 |
+
|
1564 |
+
* Inline ``_encode`` class method
|
1565 |
+
|
1566 |
+
0.5.1 (2016-11-02)
|
1567 |
+
==================
|
1568 |
+
|
1569 |
+
* Make URL construction faster by removing extra classmethod calls
|
1570 |
+
|
1571 |
+
0.5.0 (2016-11-02)
|
1572 |
+
==================
|
1573 |
+
|
1574 |
+
* Add Cython optimization for quoting/unquoting
|
1575 |
+
* Provide binary wheels
|
1576 |
+
|
1577 |
+
0.4.3 (2016-09-29)
|
1578 |
+
==================
|
1579 |
+
|
1580 |
+
* Fix typing stubs
|
1581 |
+
|
1582 |
+
0.4.2 (2016-09-29)
|
1583 |
+
==================
|
1584 |
+
|
1585 |
+
* Expose ``quote()`` and ``unquote()`` as public API
|
1586 |
+
|
1587 |
+
0.4.1 (2016-09-28)
|
1588 |
+
==================
|
1589 |
+
|
1590 |
+
* Support empty values in query (``'/path?arg'``)
|
1591 |
+
|
1592 |
+
0.4.0 (2016-09-27)
|
1593 |
+
==================
|
1594 |
+
|
1595 |
+
* Introduce ``relative()`` (#16)
|
1596 |
+
|
1597 |
+
0.3.2 (2016-09-27)
|
1598 |
+
==================
|
1599 |
+
|
1600 |
+
* Typo fixes #15
|
1601 |
+
|
1602 |
+
0.3.1 (2016-09-26)
|
1603 |
+
==================
|
1604 |
+
|
1605 |
+
* Support sequence of pairs as ``with_query()`` parameter
|
1606 |
+
|
1607 |
+
0.3.0 (2016-09-26)
|
1608 |
+
==================
|
1609 |
+
|
1610 |
+
* Introduce ``is_default_port()``
|
1611 |
+
|
1612 |
+
0.2.1 (2016-09-26)
|
1613 |
+
==================
|
1614 |
+
|
1615 |
+
* Raise ValueError for URLs like 'http://:8080/'
|
1616 |
+
|
1617 |
+
0.2.0 (2016-09-18)
|
1618 |
+
==================
|
1619 |
+
|
1620 |
+
* Avoid doubling slashes when joining paths (#13)
|
1621 |
+
|
1622 |
+
* Appending path starting from slash is forbidden (#12)
|
1623 |
+
|
1624 |
+
0.1.4 (2016-09-09)
|
1625 |
+
==================
|
1626 |
+
|
1627 |
+
* Add ``kwargs`` support for ``with_query()`` (#10)
|
1628 |
+
|
1629 |
+
0.1.3 (2016-09-07)
|
1630 |
+
==================
|
1631 |
+
|
1632 |
+
* Document ``with_query()``, ``with_fragment()`` and ``origin()``
|
1633 |
+
|
1634 |
+
* Allow ``None`` for ``with_query()`` and ``with_fragment()``
|
1635 |
+
|
1636 |
+
0.1.2 (2016-09-07)
|
1637 |
+
==================
|
1638 |
+
|
1639 |
+
* Fix links, tune docs theme.
|
1640 |
+
|
1641 |
+
0.1.1 (2016-09-06)
|
1642 |
+
==================
|
1643 |
+
|
1644 |
+
* Update README, old version used obsolete API
|
1645 |
+
|
1646 |
+
0.1.0 (2016-09-06)
|
1647 |
+
==================
|
1648 |
+
|
1649 |
+
* The library was deeply refactored, bytes are gone away but all
|
1650 |
+
accepted strings are encoded if needed.
|
1651 |
+
|
1652 |
+
0.0.1 (2016-08-30)
|
1653 |
+
==================
|
1654 |
+
|
1655 |
+
* The first release.
|
.cache/pip/http-v2/5/8/d/9/8/58d9818b2a061ba2b595a1744fd86d4eb017703b38f7209903256e4e
ADDED
Binary file (1.2 kB). View file
|
|
.cache/pip/http-v2/5/9/5/1/1/595119384424f750543e201763b875c3f3e0ff028ba41e4b528b7dca
ADDED
Binary file (1.18 kB). View file
|
|
.cache/pip/http-v2/5/9/5/1/1/595119384424f750543e201763b875c3f3e0ff028ba41e4b528b7dca.body
ADDED
Binary file (5.29 kB). View file
|
|
.cache/pip/http-v2/6/0/1/a/a/601aa27698da49f5bed3bc91bb41d8245b8316b66bd86059ef3b929e.body
ADDED
@@ -0,0 +1,360 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
Metadata-Version: 2.3
|
2 |
+
Name: einops
|
3 |
+
Version: 0.8.0
|
4 |
+
Summary: A new flavour of deep learning operations
|
5 |
+
Project-URL: Homepage, https://github.com/arogozhnikov/einops
|
6 |
+
Author: Alex Rogozhnikov
|
7 |
+
License: MIT
|
8 |
+
License-File: LICENSE
|
9 |
+
Keywords: deep learning,einops,machine learning,neural networks,scientific computations,tensor manipulation
|
10 |
+
Classifier: Intended Audience :: Science/Research
|
11 |
+
Classifier: License :: OSI Approved :: MIT License
|
12 |
+
Classifier: Programming Language :: Python :: 3
|
13 |
+
Requires-Python: >=3.8
|
14 |
+
Description-Content-Type: text/markdown
|
15 |
+
|
16 |
+
|
17 |
+
<!--
|
18 |
+
<a href='http://arogozhnikov.github.io/images/einops/einops_video.mp4' >
|
19 |
+
<div align="center">
|
20 |
+
<img src="http://arogozhnikov.github.io/images/einops/einops_video.gif" alt="einops package examples" />
|
21 |
+
<br>
|
22 |
+
<small><a href='http://arogozhnikov.github.io/images/einops/einops_video.mp4'>This video in high quality (mp4)</a></small>
|
23 |
+
<br><br>
|
24 |
+
</div>
|
25 |
+
</a>
|
26 |
+
-->
|
27 |
+
|
28 |
+
<!-- this link magically rendered as video, unfortunately not in docs -->
|
29 |
+
|
30 |
+
https://user-images.githubusercontent.com/6318811/177030658-66f0eb5d-e136-44d8-99c9-86ae298ead5b.mp4
|
31 |
+
|
32 |
+
|
33 |
+
|
34 |
+
|
35 |
+
# einops
|
36 |
+
[](https://github.com/arogozhnikov/einops/actions/workflows/run_tests.yml)
|
37 |
+
[](https://badge.fury.io/py/einops)
|
38 |
+
[](https://einops.rocks/)
|
39 |
+

|
40 |
+
|
41 |
+
|
42 |
+
Flexible and powerful tensor operations for readable and reliable code. <br />
|
43 |
+
Supports numpy, pytorch, tensorflow, jax, and [others](#supported-frameworks).
|
44 |
+
|
45 |
+
## Recent updates:
|
46 |
+
|
47 |
+
- 0.7.0: no-hassle `torch.compile`, support of [array api standard](https://data-apis.org/array-api/latest/API_specification/index.html) and more
|
48 |
+
- 10'000🎉: github reports that more than 10k project use einops
|
49 |
+
- einops 0.6.1: paddle backend added
|
50 |
+
- einops 0.6 introduces [packing and unpacking](https://github.com/arogozhnikov/einops/blob/master/docs/4-pack-and-unpack.ipynb)
|
51 |
+
- einops 0.5: einsum is now a part of einops
|
52 |
+
- [Einops paper](https://openreview.net/pdf?id=oapKSVM2bcj) is accepted for oral presentation at ICLR 2022 (yes, it worth reading).
|
53 |
+
Talk recordings are [available](https://iclr.cc/virtual/2022/oral/6603)
|
54 |
+
|
55 |
+
|
56 |
+
<details markdown="1">
|
57 |
+
<summary>Previous updates</summary>
|
58 |
+
- flax and oneflow backend added
|
59 |
+
- torch.jit.script is supported for pytorch layers
|
60 |
+
- powerful EinMix added to einops. [Einmix tutorial notebook](https://github.com/arogozhnikov/einops/blob/master/docs/3-einmix-layer.ipynb)
|
61 |
+
</details>
|
62 |
+
|
63 |
+
<!--<div align="center">
|
64 |
+
<img src="http://arogozhnikov.github.io/images/einops/einops_logo_350x350.png"
|
65 |
+
alt="einops package logo" width="250" height="250" />
|
66 |
+
<br><br>
|
67 |
+
</div> -->
|
68 |
+
|
69 |
+
|
70 |
+
## Tweets
|
71 |
+
|
72 |
+
> In case you need convincing arguments for setting aside time to learn about einsum and einops...
|
73 |
+
[Tim Rocktäschel](https://twitter.com/_rockt/status/1230818967205425152)
|
74 |
+
|
75 |
+
> Writing better code with PyTorch and einops 👌
|
76 |
+
[Andrej Karpathy](https://twitter.com/karpathy/status/1290826075916779520)
|
77 |
+
|
78 |
+
> Slowly but surely, einops is seeping in to every nook and cranny of my code. If you find yourself shuffling around bazillion dimensional tensors, this might change your life
|
79 |
+
[Nasim Rahaman](https://twitter.com/nasim_rahaman/status/1216022614755463169)
|
80 |
+
|
81 |
+
[More testimonials](https://einops.rocks/pages/testimonials/)
|
82 |
+
|
83 |
+
<!--
|
84 |
+
## Recordings of talk at ICLR 2022
|
85 |
+
|
86 |
+
<a href='https://iclr.cc/virtual/2022/oral/6603'>
|
87 |
+
<img width="922" alt="Screen Shot 2022-07-03 at 1 00 15 AM" src="https://user-images.githubusercontent.com/6318811/177030789-89d349bf-ef75-4af5-a71f-609896d1c8d9.png">
|
88 |
+
</a>
|
89 |
+
|
90 |
+
Watch [a 15-minute talk](https://iclr.cc/virtual/2022/oral/6603) focused on main problems of standard tensor manipulation methods, and how einops improves this process.
|
91 |
+
-->
|
92 |
+
|
93 |
+
## Contents
|
94 |
+
|
95 |
+
- [Installation](#Installation)
|
96 |
+
- [Documentation](https://einops.rocks/)
|
97 |
+
- [Tutorial](#Tutorials)
|
98 |
+
- [API micro-reference](#API)
|
99 |
+
- [Why using einops](#Why-using-einops-notation)
|
100 |
+
- [Supported frameworks](#Supported-frameworks)
|
101 |
+
- [Citing](#Citing)
|
102 |
+
- [Repository](https://github.com/arogozhnikov/einops) and [discussions](https://github.com/arogozhnikov/einops/discussions)
|
103 |
+
|
104 |
+
## Installation <a name="Installation"></a>
|
105 |
+
|
106 |
+
Plain and simple:
|
107 |
+
```bash
|
108 |
+
pip install einops
|
109 |
+
```
|
110 |
+
|
111 |
+
<!--
|
112 |
+
`einops` has no mandatory dependencies (code examples also require jupyter, pillow + backends).
|
113 |
+
To obtain the latest github version
|
114 |
+
|
115 |
+
```bash
|
116 |
+
pip install https://github.com/arogozhnikov/einops/archive/master.zip
|
117 |
+
```
|
118 |
+
-->
|
119 |
+
|
120 |
+
## Tutorials <a name="Tutorials"></a>
|
121 |
+
|
122 |
+
Tutorials are the most convenient way to see `einops` in action
|
123 |
+
|
124 |
+
- part 1: [einops fundamentals](https://github.com/arogozhnikov/einops/blob/master/docs/1-einops-basics.ipynb)
|
125 |
+
- part 2: [einops for deep learning](https://github.com/arogozhnikov/einops/blob/master/docs/2-einops-for-deep-learning.ipynb)
|
126 |
+
- part 3: [packing and unpacking](https://github.com/arogozhnikov/einops/blob/master/docs/4-pack-and-unpack.ipynb)
|
127 |
+
- part 4: [improve pytorch code with einops](http://einops.rocks/pytorch-examples.html)
|
128 |
+
|
129 |
+
Kapil Sachdeva recorded a small [intro to einops](https://www.youtube.com/watch?v=xGy75Pjsqzo).
|
130 |
+
|
131 |
+
## API <a name="API"></a>
|
132 |
+
|
133 |
+
`einops` has a minimalistic yet powerful API.
|
134 |
+
|
135 |
+
Three core operations provided ([einops tutorial](https://github.com/arogozhnikov/einops/blob/master/docs/)
|
136 |
+
shows those cover stacking, reshape, transposition, squeeze/unsqueeze, repeat, tile, concatenate, view and numerous reductions)
|
137 |
+
|
138 |
+
```python
|
139 |
+
from einops import rearrange, reduce, repeat
|
140 |
+
# rearrange elements according to the pattern
|
141 |
+
output_tensor = rearrange(input_tensor, 't b c -> b c t')
|
142 |
+
# combine rearrangement and reduction
|
143 |
+
output_tensor = reduce(input_tensor, 'b c (h h2) (w w2) -> b h w c', 'mean', h2=2, w2=2)
|
144 |
+
# copy along a new axis
|
145 |
+
output_tensor = repeat(input_tensor, 'h w -> h w c', c=3)
|
146 |
+
```
|
147 |
+
|
148 |
+
Later additions to the family are `pack` and `unpack` functions (better than stack/split/concatenate):
|
149 |
+
|
150 |
+
```python
|
151 |
+
from einops import pack, unpack
|
152 |
+
# pack and unpack allow reversibly 'packing' multiple tensors into one.
|
153 |
+
# Packed tensors may be of different dimensionality:
|
154 |
+
packed, ps = pack([class_token_bc, image_tokens_bhwc, text_tokens_btc], 'b * c')
|
155 |
+
class_emb_bc, image_emb_bhwc, text_emb_btc = unpack(transformer(packed), ps, 'b * c')
|
156 |
+
```
|
157 |
+
|
158 |
+
Finally, einops provides einsum with a support of multi-lettered names:
|
159 |
+
|
160 |
+
```python
|
161 |
+
from einops import einsum, pack, unpack
|
162 |
+
# einsum is like ... einsum, generic and flexible dot-product
|
163 |
+
# but 1) axes can be multi-lettered 2) pattern goes last 3) works with multiple frameworks
|
164 |
+
C = einsum(A, B, 'b t1 head c, b t2 head c -> b head t1 t2')
|
165 |
+
```
|
166 |
+
|
167 |
+
### EinMix
|
168 |
+
|
169 |
+
`EinMix` is a generic linear layer, perfect for MLP Mixers and similar architectures.
|
170 |
+
|
171 |
+
### Layers
|
172 |
+
|
173 |
+
Einops provides layers (`einops` keeps a separate version for each framework) that reflect corresponding functions
|
174 |
+
|
175 |
+
```python
|
176 |
+
from einops.layers.torch import Rearrange, Reduce
|
177 |
+
from einops.layers.tensorflow import Rearrange, Reduce
|
178 |
+
from einops.layers.flax import Rearrange, Reduce
|
179 |
+
from einops.layers.paddle import Rearrange, Reduce
|
180 |
+
from einops.layers.chainer import Rearrange, Reduce
|
181 |
+
```
|
182 |
+
|
183 |
+
<details markdown="1">
|
184 |
+
<summary>Example of using layers within a pytorch model</summary>
|
185 |
+
Example given for pytorch, but code in other frameworks is almost identical
|
186 |
+
|
187 |
+
```python
|
188 |
+
from torch.nn import Sequential, Conv2d, MaxPool2d, Linear, ReLU
|
189 |
+
from einops.layers.torch import Rearrange
|
190 |
+
|
191 |
+
model = Sequential(
|
192 |
+
...,
|
193 |
+
Conv2d(6, 16, kernel_size=5),
|
194 |
+
MaxPool2d(kernel_size=2),
|
195 |
+
# flattening without need to write forward
|
196 |
+
Rearrange('b c h w -> b (c h w)'),
|
197 |
+
Linear(16*5*5, 120),
|
198 |
+
ReLU(),
|
199 |
+
Linear(120, 10),
|
200 |
+
)
|
201 |
+
```
|
202 |
+
|
203 |
+
No more flatten needed!
|
204 |
+
|
205 |
+
Additionally, torch users will benefit from layers as those are script-able and compile-able.
|
206 |
+
</details>
|
207 |
+
|
208 |
+
|
209 |
+
|
210 |
+
|
211 |
+
## Naming <a name="Naming"></a>
|
212 |
+
|
213 |
+
`einops` stands for Einstein-Inspired Notation for operations
|
214 |
+
(though "Einstein operations" is more attractive and easier to remember).
|
215 |
+
|
216 |
+
Notation was loosely inspired by Einstein summation (in particular by `numpy.einsum` operation).
|
217 |
+
|
218 |
+
## Why use `einops` notation?! <a name="Why-using-einops-notation"></a>
|
219 |
+
|
220 |
+
|
221 |
+
### Semantic information (being verbose in expectations)
|
222 |
+
|
223 |
+
```python
|
224 |
+
y = x.view(x.shape[0], -1)
|
225 |
+
y = rearrange(x, 'b c h w -> b (c h w)')
|
226 |
+
```
|
227 |
+
While these two lines are doing the same job in *some* context,
|
228 |
+
the second one provides information about the input and output.
|
229 |
+
In other words, `einops` focuses on interface: *what is the input and output*, not *how* the output is computed.
|
230 |
+
|
231 |
+
The next operation looks similar:
|
232 |
+
|
233 |
+
```python
|
234 |
+
y = rearrange(x, 'time c h w -> time (c h w)')
|
235 |
+
```
|
236 |
+
but it gives the reader a hint:
|
237 |
+
this is not an independent batch of images we are processing,
|
238 |
+
but rather a sequence (video).
|
239 |
+
|
240 |
+
Semantic information makes the code easier to read and maintain.
|
241 |
+
|
242 |
+
### Convenient checks
|
243 |
+
|
244 |
+
Reconsider the same example:
|
245 |
+
|
246 |
+
```python
|
247 |
+
y = x.view(x.shape[0], -1) # x: (batch, 256, 19, 19)
|
248 |
+
y = rearrange(x, 'b c h w -> b (c h w)')
|
249 |
+
```
|
250 |
+
The second line checks that the input has four dimensions,
|
251 |
+
but you can also specify particular dimensions.
|
252 |
+
That's opposed to just writing comments about shapes since comments don't prevent mistakes, not tested, and without code review tend to be outdated
|
253 |
+
```python
|
254 |
+
y = x.view(x.shape[0], -1) # x: (batch, 256, 19, 19)
|
255 |
+
y = rearrange(x, 'b c h w -> b (c h w)', c=256, h=19, w=19)
|
256 |
+
```
|
257 |
+
|
258 |
+
### Result is strictly determined
|
259 |
+
|
260 |
+
Below we have at least two ways to define the depth-to-space operation
|
261 |
+
```python
|
262 |
+
# depth-to-space
|
263 |
+
rearrange(x, 'b c (h h2) (w w2) -> b (c h2 w2) h w', h2=2, w2=2)
|
264 |
+
rearrange(x, 'b c (h h2) (w w2) -> b (h2 w2 c) h w', h2=2, w2=2)
|
265 |
+
```
|
266 |
+
There are at least four more ways to do it. Which one is used by the framework?
|
267 |
+
|
268 |
+
These details are ignored, since *usually* it makes no difference,
|
269 |
+
but it can make a big difference (e.g. if you use grouped convolutions in the next stage),
|
270 |
+
and you'd like to specify this in your code.
|
271 |
+
|
272 |
+
|
273 |
+
### Uniformity
|
274 |
+
|
275 |
+
```python
|
276 |
+
reduce(x, 'b c (x dx) -> b c x', 'max', dx=2)
|
277 |
+
reduce(x, 'b c (x dx) (y dy) -> b c x y', 'max', dx=2, dy=3)
|
278 |
+
reduce(x, 'b c (x dx) (y dy) (z dz) -> b c x y z', 'max', dx=2, dy=3, dz=4)
|
279 |
+
```
|
280 |
+
These examples demonstrated that we don't use separate operations for 1d/2d/3d pooling,
|
281 |
+
those are all defined in a uniform way.
|
282 |
+
|
283 |
+
Space-to-depth and depth-to space are defined in many frameworks but how about width-to-height? Here you go:
|
284 |
+
|
285 |
+
```python
|
286 |
+
rearrange(x, 'b c h (w w2) -> b c (h w2) w', w2=2)
|
287 |
+
```
|
288 |
+
|
289 |
+
### Framework independent behavior
|
290 |
+
|
291 |
+
Even simple functions are defined differently by different frameworks
|
292 |
+
|
293 |
+
```python
|
294 |
+
y = x.flatten() # or flatten(x)
|
295 |
+
```
|
296 |
+
|
297 |
+
Suppose `x`'s shape was `(3, 4, 5)`, then `y` has shape ...
|
298 |
+
|
299 |
+
- numpy, pytorch, cupy, chainer: `(60,)`
|
300 |
+
- keras, tensorflow.layers, gluon: `(3, 20)`
|
301 |
+
|
302 |
+
`einops` works the same way in all frameworks.
|
303 |
+
|
304 |
+
### Independence of framework terminology
|
305 |
+
|
306 |
+
Example: `tile` vs `repeat` causes lots of confusion. To copy image along width:
|
307 |
+
```python
|
308 |
+
np.tile(image, (1, 2)) # in numpy
|
309 |
+
image.repeat(1, 2) # pytorch's repeat ~ numpy's tile
|
310 |
+
```
|
311 |
+
|
312 |
+
With einops you don't need to decipher which axis was repeated:
|
313 |
+
```python
|
314 |
+
repeat(image, 'h w -> h (tile w)', tile=2) # in numpy
|
315 |
+
repeat(image, 'h w -> h (tile w)', tile=2) # in pytorch
|
316 |
+
repeat(image, 'h w -> h (tile w)', tile=2) # in tf
|
317 |
+
repeat(image, 'h w -> h (tile w)', tile=2) # in jax
|
318 |
+
repeat(image, 'h w -> h (tile w)', tile=2) # in cupy
|
319 |
+
... (etc.)
|
320 |
+
```
|
321 |
+
|
322 |
+
[Testimonials](https://einops.rocks/pages/testimonials/) provide users' perspective on the same question.
|
323 |
+
|
324 |
+
## Supported frameworks <a name="Supported-frameworks"></a>
|
325 |
+
|
326 |
+
Einops works with ...
|
327 |
+
|
328 |
+
- [numpy](http://www.numpy.org/)
|
329 |
+
- [pytorch](https://pytorch.org/)
|
330 |
+
- [tensorflow](https://www.tensorflow.org/)
|
331 |
+
- [jax](https://github.com/google/jax)
|
332 |
+
- [cupy](https://cupy.chainer.org/)
|
333 |
+
- [chainer](https://chainer.org/)
|
334 |
+
- [tf.keras](https://www.tensorflow.org/guide/keras)
|
335 |
+
- [flax](https://github.com/google/flax) (experimental)
|
336 |
+
- [paddle](https://github.com/PaddlePaddle/Paddle) (experimental)
|
337 |
+
- [oneflow](https://github.com/Oneflow-Inc/oneflow) (community)
|
338 |
+
- [tinygrad](https://github.com/tinygrad/tinygrad) (community)
|
339 |
+
|
340 |
+
Additionally, starting from einops 0.7.0 einops can be used with any framework that supports [Python array API standard](https://data-apis.org/array-api/latest/API_specification/index.html)
|
341 |
+
|
342 |
+
## Citing einops <a name="Citing"></a>
|
343 |
+
|
344 |
+
Please use the following bibtex record
|
345 |
+
|
346 |
+
```text
|
347 |
+
@inproceedings{
|
348 |
+
rogozhnikov2022einops,
|
349 |
+
title={Einops: Clear and Reliable Tensor Manipulations with Einstein-like Notation},
|
350 |
+
author={Alex Rogozhnikov},
|
351 |
+
booktitle={International Conference on Learning Representations},
|
352 |
+
year={2022},
|
353 |
+
url={https://openreview.net/forum?id=oapKSVM2bcj}
|
354 |
+
}
|
355 |
+
```
|
356 |
+
|
357 |
+
|
358 |
+
## Supported python versions
|
359 |
+
|
360 |
+
`einops` works with python 3.8 or later.
|
.cache/pip/http-v2/6/1/4/f/4/614f46c6d1c16fa5b0800dfd0497e41c5b320e16ee8c9d943d4dd341.body
ADDED
Binary file (32.2 kB). View file
|
|
.cache/pip/http-v2/6/1/6/7/8/61678d682a1ea716fb4acccebc1350da197d2251a96e4b9220061051
ADDED
Binary file (1.82 kB). View file
|
|
.cache/pip/http-v2/6/1/6/7/8/61678d682a1ea716fb4acccebc1350da197d2251a96e4b9220061051.body
ADDED
Binary file (68.9 kB). View file
|
|
.cache/pip/http-v2/6/6/6/2/c/6662c3d76e9c2f7783002d2625d92517b2c4b994197bd6d5da887f1e.body
ADDED
Binary file (43.2 kB). View file
|
|
.cache/pip/http-v2/8/1/1/c/d/811cdc5b0df1a4862e5588ed7d10948f806b064e30962a3f3e310c26.body
ADDED
@@ -0,0 +1,650 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
Metadata-Version: 2.1
|
2 |
+
Name: pytz
|
3 |
+
Version: 2024.2
|
4 |
+
Summary: World timezone definitions, modern and historical
|
5 |
+
Home-page: http://pythonhosted.org/pytz
|
6 |
+
Author: Stuart Bishop
|
7 |
+
Author-email: stuart@stuartbishop.net
|
8 |
+
Maintainer: Stuart Bishop
|
9 |
+
Maintainer-email: stuart@stuartbishop.net
|
10 |
+
License: MIT
|
11 |
+
Download-URL: https://pypi.org/project/pytz/
|
12 |
+
Keywords: timezone,tzinfo,datetime,olson,time
|
13 |
+
Platform: Independent
|
14 |
+
Classifier: Development Status :: 6 - Mature
|
15 |
+
Classifier: Intended Audience :: Developers
|
16 |
+
Classifier: License :: OSI Approved :: MIT License
|
17 |
+
Classifier: Natural Language :: English
|
18 |
+
Classifier: Operating System :: OS Independent
|
19 |
+
Classifier: Programming Language :: Python
|
20 |
+
Classifier: Programming Language :: Python :: 2
|
21 |
+
Classifier: Programming Language :: Python :: 2.4
|
22 |
+
Classifier: Programming Language :: Python :: 2.5
|
23 |
+
Classifier: Programming Language :: Python :: 2.6
|
24 |
+
Classifier: Programming Language :: Python :: 2.7
|
25 |
+
Classifier: Programming Language :: Python :: 3
|
26 |
+
Classifier: Programming Language :: Python :: 3.1
|
27 |
+
Classifier: Programming Language :: Python :: 3.2
|
28 |
+
Classifier: Programming Language :: Python :: 3.3
|
29 |
+
Classifier: Programming Language :: Python :: 3.4
|
30 |
+
Classifier: Programming Language :: Python :: 3.5
|
31 |
+
Classifier: Programming Language :: Python :: 3.6
|
32 |
+
Classifier: Programming Language :: Python :: 3.7
|
33 |
+
Classifier: Programming Language :: Python :: 3.8
|
34 |
+
Classifier: Programming Language :: Python :: 3.9
|
35 |
+
Classifier: Programming Language :: Python :: 3.10
|
36 |
+
Classifier: Programming Language :: Python :: 3.11
|
37 |
+
Classifier: Programming Language :: Python :: 3.12
|
38 |
+
Classifier: Programming Language :: Python :: 3.13
|
39 |
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
40 |
+
License-File: LICENSE.txt
|
41 |
+
|
42 |
+
pytz - World Timezone Definitions for Python
|
43 |
+
============================================
|
44 |
+
|
45 |
+
:Author: Stuart Bishop <stuart@stuartbishop.net>
|
46 |
+
|
47 |
+
Introduction
|
48 |
+
~~~~~~~~~~~~
|
49 |
+
|
50 |
+
pytz brings the Olson tz database into Python. This library allows
|
51 |
+
accurate and cross platform timezone calculations using Python 2.4
|
52 |
+
or higher. It also solves the issue of ambiguous times at the end
|
53 |
+
of daylight saving time, which you can read more about in the Python
|
54 |
+
Library Reference (``datetime.tzinfo``).
|
55 |
+
|
56 |
+
Almost all of the Olson timezones are supported.
|
57 |
+
|
58 |
+
.. note::
|
59 |
+
|
60 |
+
Projects using Python 3.9 or later should be using the support
|
61 |
+
now included as part of the standard library, and third party
|
62 |
+
packages work with it such as `tzdata <https://pypi.org/project/tzdata/>`_.
|
63 |
+
pytz offers no advantages beyond backwards compatibility with
|
64 |
+
code written for earlier versions of Python.
|
65 |
+
|
66 |
+
.. note::
|
67 |
+
|
68 |
+
This library differs from the documented Python API for
|
69 |
+
tzinfo implementations; if you want to create local wallclock
|
70 |
+
times you need to use the ``localize()`` method documented in this
|
71 |
+
document. In addition, if you perform date arithmetic on local
|
72 |
+
times that cross DST boundaries, the result may be in an incorrect
|
73 |
+
timezone (ie. subtract 1 minute from 2002-10-27 1:00 EST and you get
|
74 |
+
2002-10-27 0:59 EST instead of the correct 2002-10-27 1:59 EDT). A
|
75 |
+
``normalize()`` method is provided to correct this. Unfortunately these
|
76 |
+
issues cannot be resolved without modifying the Python datetime
|
77 |
+
implementation (see PEP-431).
|
78 |
+
|
79 |
+
|
80 |
+
Installation
|
81 |
+
~~~~~~~~~~~~
|
82 |
+
|
83 |
+
This package can either be installed using ``pip`` or from a tarball using the
|
84 |
+
standard Python distutils.
|
85 |
+
|
86 |
+
If you are installing using ``pip``, you don't need to download anything as the
|
87 |
+
latest version will be downloaded for you from PyPI::
|
88 |
+
|
89 |
+
pip install pytz
|
90 |
+
|
91 |
+
If you are installing from a tarball, run the following command as an
|
92 |
+
administrative user::
|
93 |
+
|
94 |
+
python setup.py install
|
95 |
+
|
96 |
+
|
97 |
+
pytz for Enterprise
|
98 |
+
~~~~~~~~~~~~~~~~~~~
|
99 |
+
|
100 |
+
Available as part of the Tidelift Subscription.
|
101 |
+
|
102 |
+
The maintainers of pytz and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. `Learn more. <https://tidelift.com/subscription/pkg/pypi-pytz?utm_source=pypi-pytz&utm_medium=referral&utm_campaign=enterprise&utm_term=repo>`_.
|
103 |
+
|
104 |
+
|
105 |
+
Example & Usage
|
106 |
+
~~~~~~~~~~~~~~~
|
107 |
+
|
108 |
+
Localized times and date arithmetic
|
109 |
+
-----------------------------------
|
110 |
+
|
111 |
+
>>> from datetime import datetime, timedelta
|
112 |
+
>>> from pytz import timezone
|
113 |
+
>>> import pytz
|
114 |
+
>>> utc = pytz.utc
|
115 |
+
>>> utc.zone
|
116 |
+
'UTC'
|
117 |
+
>>> eastern = timezone('US/Eastern')
|
118 |
+
>>> eastern.zone
|
119 |
+
'US/Eastern'
|
120 |
+
>>> amsterdam = timezone('Europe/Amsterdam')
|
121 |
+
>>> fmt = '%Y-%m-%d %H:%M:%S %Z%z'
|
122 |
+
|
123 |
+
This library only supports two ways of building a localized time. The
|
124 |
+
first is to use the ``localize()`` method provided by the pytz library.
|
125 |
+
This is used to localize a naive datetime (datetime with no timezone
|
126 |
+
information):
|
127 |
+
|
128 |
+
>>> loc_dt = eastern.localize(datetime(2002, 10, 27, 6, 0, 0))
|
129 |
+
>>> print(loc_dt.strftime(fmt))
|
130 |
+
2002-10-27 06:00:00 EST-0500
|
131 |
+
|
132 |
+
The second way of building a localized time is by converting an existing
|
133 |
+
localized time using the standard ``astimezone()`` method:
|
134 |
+
|
135 |
+
>>> ams_dt = loc_dt.astimezone(amsterdam)
|
136 |
+
>>> ams_dt.strftime(fmt)
|
137 |
+
'2002-10-27 12:00:00 CET+0100'
|
138 |
+
|
139 |
+
Unfortunately using the tzinfo argument of the standard datetime
|
140 |
+
constructors ''does not work'' with pytz for many timezones.
|
141 |
+
|
142 |
+
>>> datetime(2002, 10, 27, 12, 0, 0, tzinfo=amsterdam).strftime(fmt) # /!\ Does not work this way!
|
143 |
+
'2002-10-27 12:00:00 LMT+0018'
|
144 |
+
|
145 |
+
It is safe for timezones without daylight saving transitions though, such
|
146 |
+
as UTC:
|
147 |
+
|
148 |
+
>>> datetime(2002, 10, 27, 12, 0, 0, tzinfo=pytz.utc).strftime(fmt) # /!\ Not recommended except for UTC
|
149 |
+
'2002-10-27 12:00:00 UTC+0000'
|
150 |
+
|
151 |
+
The preferred way of dealing with times is to always work in UTC,
|
152 |
+
converting to localtime only when generating output to be read
|
153 |
+
by humans.
|
154 |
+
|
155 |
+
>>> utc_dt = datetime(2002, 10, 27, 6, 0, 0, tzinfo=utc)
|
156 |
+
>>> loc_dt = utc_dt.astimezone(eastern)
|
157 |
+
>>> loc_dt.strftime(fmt)
|
158 |
+
'2002-10-27 01:00:00 EST-0500'
|
159 |
+
|
160 |
+
This library also allows you to do date arithmetic using local
|
161 |
+
times, although it is more complicated than working in UTC as you
|
162 |
+
need to use the ``normalize()`` method to handle daylight saving time
|
163 |
+
and other timezone transitions. In this example, ``loc_dt`` is set
|
164 |
+
to the instant when daylight saving time ends in the US/Eastern
|
165 |
+
timezone.
|
166 |
+
|
167 |
+
>>> before = loc_dt - timedelta(minutes=10)
|
168 |
+
>>> before.strftime(fmt)
|
169 |
+
'2002-10-27 00:50:00 EST-0500'
|
170 |
+
>>> eastern.normalize(before).strftime(fmt)
|
171 |
+
'2002-10-27 01:50:00 EDT-0400'
|
172 |
+
>>> after = eastern.normalize(before + timedelta(minutes=20))
|
173 |
+
>>> after.strftime(fmt)
|
174 |
+
'2002-10-27 01:10:00 EST-0500'
|
175 |
+
|
176 |
+
Creating local times is also tricky, and the reason why working with
|
177 |
+
local times is not recommended. Unfortunately, you cannot just pass
|
178 |
+
a ``tzinfo`` argument when constructing a datetime (see the next
|
179 |
+
section for more details)
|
180 |
+
|
181 |
+
>>> dt = datetime(2002, 10, 27, 1, 30, 0)
|
182 |
+
>>> dt1 = eastern.localize(dt, is_dst=True)
|
183 |
+
>>> dt1.strftime(fmt)
|
184 |
+
'2002-10-27 01:30:00 EDT-0400'
|
185 |
+
>>> dt2 = eastern.localize(dt, is_dst=False)
|
186 |
+
>>> dt2.strftime(fmt)
|
187 |
+
'2002-10-27 01:30:00 EST-0500'
|
188 |
+
|
189 |
+
Converting between timezones is more easily done, using the
|
190 |
+
standard astimezone method.
|
191 |
+
|
192 |
+
>>> utc_dt = datetime.fromtimestamp(1143408899, tz=utc)
|
193 |
+
>>> utc_dt.strftime(fmt)
|
194 |
+
'2006-03-26 21:34:59 UTC+0000'
|
195 |
+
>>> au_tz = timezone('Australia/Sydney')
|
196 |
+
>>> au_dt = utc_dt.astimezone(au_tz)
|
197 |
+
>>> au_dt.strftime(fmt)
|
198 |
+
'2006-03-27 08:34:59 AEDT+1100'
|
199 |
+
>>> utc_dt2 = au_dt.astimezone(utc)
|
200 |
+
>>> utc_dt2.strftime(fmt)
|
201 |
+
'2006-03-26 21:34:59 UTC+0000'
|
202 |
+
>>> utc_dt == utc_dt2
|
203 |
+
True
|
204 |
+
|
205 |
+
You can take shortcuts when dealing with the UTC side of timezone
|
206 |
+
conversions. ``normalize()`` and ``localize()`` are not really
|
207 |
+
necessary when there are no daylight saving time transitions to
|
208 |
+
deal with.
|
209 |
+
|
210 |
+
>>> utc_dt = datetime.fromtimestamp(1143408899, tz=utc)
|
211 |
+
>>> utc_dt.strftime(fmt)
|
212 |
+
'2006-03-26 21:34:59 UTC+0000'
|
213 |
+
>>> au_tz = timezone('Australia/Sydney')
|
214 |
+
>>> au_dt = au_tz.normalize(utc_dt.astimezone(au_tz))
|
215 |
+
>>> au_dt.strftime(fmt)
|
216 |
+
'2006-03-27 08:34:59 AEDT+1100'
|
217 |
+
>>> utc_dt2 = au_dt.astimezone(utc)
|
218 |
+
>>> utc_dt2.strftime(fmt)
|
219 |
+
'2006-03-26 21:34:59 UTC+0000'
|
220 |
+
|
221 |
+
|
222 |
+
``tzinfo`` API
|
223 |
+
--------------
|
224 |
+
|
225 |
+
The ``tzinfo`` instances returned by the ``timezone()`` function have
|
226 |
+
been extended to cope with ambiguous times by adding an ``is_dst``
|
227 |
+
parameter to the ``utcoffset()``, ``dst()`` && ``tzname()`` methods.
|
228 |
+
|
229 |
+
>>> tz = timezone('America/St_Johns')
|
230 |
+
|
231 |
+
>>> normal = datetime(2009, 9, 1)
|
232 |
+
>>> ambiguous = datetime(2009, 10, 31, 23, 30)
|
233 |
+
|
234 |
+
The ``is_dst`` parameter is ignored for most timestamps. It is only used
|
235 |
+
during DST transition ambiguous periods to resolve that ambiguity.
|
236 |
+
|
237 |
+
>>> print(tz.utcoffset(normal, is_dst=True))
|
238 |
+
-1 day, 21:30:00
|
239 |
+
>>> print(tz.dst(normal, is_dst=True))
|
240 |
+
1:00:00
|
241 |
+
>>> tz.tzname(normal, is_dst=True)
|
242 |
+
'NDT'
|
243 |
+
|
244 |
+
>>> print(tz.utcoffset(ambiguous, is_dst=True))
|
245 |
+
-1 day, 21:30:00
|
246 |
+
>>> print(tz.dst(ambiguous, is_dst=True))
|
247 |
+
1:00:00
|
248 |
+
>>> tz.tzname(ambiguous, is_dst=True)
|
249 |
+
'NDT'
|
250 |
+
|
251 |
+
>>> print(tz.utcoffset(normal, is_dst=False))
|
252 |
+
-1 day, 21:30:00
|
253 |
+
>>> tz.dst(normal, is_dst=False).seconds
|
254 |
+
3600
|
255 |
+
>>> tz.tzname(normal, is_dst=False)
|
256 |
+
'NDT'
|
257 |
+
|
258 |
+
>>> print(tz.utcoffset(ambiguous, is_dst=False))
|
259 |
+
-1 day, 20:30:00
|
260 |
+
>>> tz.dst(ambiguous, is_dst=False)
|
261 |
+
datetime.timedelta(0)
|
262 |
+
>>> tz.tzname(ambiguous, is_dst=False)
|
263 |
+
'NST'
|
264 |
+
|
265 |
+
If ``is_dst`` is not specified, ambiguous timestamps will raise
|
266 |
+
an ``pytz.exceptions.AmbiguousTimeError`` exception.
|
267 |
+
|
268 |
+
>>> print(tz.utcoffset(normal))
|
269 |
+
-1 day, 21:30:00
|
270 |
+
>>> print(tz.dst(normal))
|
271 |
+
1:00:00
|
272 |
+
>>> tz.tzname(normal)
|
273 |
+
'NDT'
|
274 |
+
|
275 |
+
>>> import pytz.exceptions
|
276 |
+
>>> try:
|
277 |
+
... tz.utcoffset(ambiguous)
|
278 |
+
... except pytz.exceptions.AmbiguousTimeError:
|
279 |
+
... print('pytz.exceptions.AmbiguousTimeError: %s' % ambiguous)
|
280 |
+
pytz.exceptions.AmbiguousTimeError: 2009-10-31 23:30:00
|
281 |
+
>>> try:
|
282 |
+
... tz.dst(ambiguous)
|
283 |
+
... except pytz.exceptions.AmbiguousTimeError:
|
284 |
+
... print('pytz.exceptions.AmbiguousTimeError: %s' % ambiguous)
|
285 |
+
pytz.exceptions.AmbiguousTimeError: 2009-10-31 23:30:00
|
286 |
+
>>> try:
|
287 |
+
... tz.tzname(ambiguous)
|
288 |
+
... except pytz.exceptions.AmbiguousTimeError:
|
289 |
+
... print('pytz.exceptions.AmbiguousTimeError: %s' % ambiguous)
|
290 |
+
pytz.exceptions.AmbiguousTimeError: 2009-10-31 23:30:00
|
291 |
+
|
292 |
+
|
293 |
+
Problems with Localtime
|
294 |
+
~~~~~~~~~~~~~~~~~~~~~~~
|
295 |
+
|
296 |
+
The major problem we have to deal with is that certain datetimes
|
297 |
+
may occur twice in a year. For example, in the US/Eastern timezone
|
298 |
+
on the last Sunday morning in October, the following sequence
|
299 |
+
happens:
|
300 |
+
|
301 |
+
- 01:00 EDT occurs
|
302 |
+
- 1 hour later, instead of 2:00am the clock is turned back 1 hour
|
303 |
+
and 01:00 happens again (this time 01:00 EST)
|
304 |
+
|
305 |
+
In fact, every instant between 01:00 and 02:00 occurs twice. This means
|
306 |
+
that if you try and create a time in the 'US/Eastern' timezone
|
307 |
+
the standard datetime syntax, there is no way to specify if you meant
|
308 |
+
before of after the end-of-daylight-saving-time transition. Using the
|
309 |
+
pytz custom syntax, the best you can do is make an educated guess:
|
310 |
+
|
311 |
+
>>> loc_dt = eastern.localize(datetime(2002, 10, 27, 1, 30, 00))
|
312 |
+
>>> loc_dt.strftime(fmt)
|
313 |
+
'2002-10-27 01:30:00 EST-0500'
|
314 |
+
|
315 |
+
As you can see, the system has chosen one for you and there is a 50%
|
316 |
+
chance of it being out by one hour. For some applications, this does
|
317 |
+
not matter. However, if you are trying to schedule meetings with people
|
318 |
+
in different timezones or analyze log files it is not acceptable.
|
319 |
+
|
320 |
+
The best and simplest solution is to stick with using UTC. The pytz
|
321 |
+
package encourages using UTC for internal timezone representation by
|
322 |
+
including a special UTC implementation based on the standard Python
|
323 |
+
reference implementation in the Python documentation.
|
324 |
+
|
325 |
+
The UTC timezone unpickles to be the same instance, and pickles to a
|
326 |
+
smaller size than other pytz tzinfo instances. The UTC implementation
|
327 |
+
can be obtained as pytz.utc, pytz.UTC, or pytz.timezone('UTC').
|
328 |
+
|
329 |
+
>>> import pickle, pytz
|
330 |
+
>>> dt = datetime(2005, 3, 1, 14, 13, 21, tzinfo=utc)
|
331 |
+
>>> naive = dt.replace(tzinfo=None)
|
332 |
+
>>> p = pickle.dumps(dt, 1)
|
333 |
+
>>> naive_p = pickle.dumps(naive, 1)
|
334 |
+
>>> len(p) - len(naive_p)
|
335 |
+
17
|
336 |
+
>>> new = pickle.loads(p)
|
337 |
+
>>> new == dt
|
338 |
+
True
|
339 |
+
>>> new is dt
|
340 |
+
False
|
341 |
+
>>> new.tzinfo is dt.tzinfo
|
342 |
+
True
|
343 |
+
>>> pytz.utc is pytz.UTC is pytz.timezone('UTC')
|
344 |
+
True
|
345 |
+
|
346 |
+
Note that some other timezones are commonly thought of as the same (GMT,
|
347 |
+
Greenwich, Universal, etc.). The definition of UTC is distinct from these
|
348 |
+
other timezones, and they are not equivalent. For this reason, they will
|
349 |
+
not compare the same in Python.
|
350 |
+
|
351 |
+
>>> utc == pytz.timezone('GMT')
|
352 |
+
False
|
353 |
+
|
354 |
+
See the section `What is UTC`_, below.
|
355 |
+
|
356 |
+
If you insist on working with local times, this library provides a
|
357 |
+
facility for constructing them unambiguously:
|
358 |
+
|
359 |
+
>>> loc_dt = datetime(2002, 10, 27, 1, 30, 00)
|
360 |
+
>>> est_dt = eastern.localize(loc_dt, is_dst=True)
|
361 |
+
>>> edt_dt = eastern.localize(loc_dt, is_dst=False)
|
362 |
+
>>> print(est_dt.strftime(fmt) + ' / ' + edt_dt.strftime(fmt))
|
363 |
+
2002-10-27 01:30:00 EDT-0400 / 2002-10-27 01:30:00 EST-0500
|
364 |
+
|
365 |
+
If you pass None as the is_dst flag to localize(), pytz will refuse to
|
366 |
+
guess and raise exceptions if you try to build ambiguous or non-existent
|
367 |
+
times.
|
368 |
+
|
369 |
+
For example, 1:30am on 27th Oct 2002 happened twice in the US/Eastern
|
370 |
+
timezone when the clocks where put back at the end of Daylight Saving
|
371 |
+
Time:
|
372 |
+
|
373 |
+
>>> dt = datetime(2002, 10, 27, 1, 30, 00)
|
374 |
+
>>> try:
|
375 |
+
... eastern.localize(dt, is_dst=None)
|
376 |
+
... except pytz.exceptions.AmbiguousTimeError:
|
377 |
+
... print('pytz.exceptions.AmbiguousTimeError: %s' % dt)
|
378 |
+
pytz.exceptions.AmbiguousTimeError: 2002-10-27 01:30:00
|
379 |
+
|
380 |
+
Similarly, 2:30am on 7th April 2002 never happened at all in the
|
381 |
+
US/Eastern timezone, as the clocks where put forward at 2:00am skipping
|
382 |
+
the entire hour:
|
383 |
+
|
384 |
+
>>> dt = datetime(2002, 4, 7, 2, 30, 00)
|
385 |
+
>>> try:
|
386 |
+
... eastern.localize(dt, is_dst=None)
|
387 |
+
... except pytz.exceptions.NonExistentTimeError:
|
388 |
+
... print('pytz.exceptions.NonExistentTimeError: %s' % dt)
|
389 |
+
pytz.exceptions.NonExistentTimeError: 2002-04-07 02:30:00
|
390 |
+
|
391 |
+
Both of these exceptions share a common base class to make error handling
|
392 |
+
easier:
|
393 |
+
|
394 |
+
>>> isinstance(pytz.AmbiguousTimeError(), pytz.InvalidTimeError)
|
395 |
+
True
|
396 |
+
>>> isinstance(pytz.NonExistentTimeError(), pytz.InvalidTimeError)
|
397 |
+
True
|
398 |
+
|
399 |
+
|
400 |
+
A special case is where countries change their timezone definitions
|
401 |
+
with no daylight savings time switch. For example, in 1915 Warsaw
|
402 |
+
switched from Warsaw time to Central European time with no daylight savings
|
403 |
+
transition. So at the stroke of midnight on August 5th 1915 the clocks
|
404 |
+
were wound back 24 minutes creating an ambiguous time period that cannot
|
405 |
+
be specified without referring to the timezone abbreviation or the
|
406 |
+
actual UTC offset. In this case midnight happened twice, neither time
|
407 |
+
during a daylight saving time period. pytz handles this transition by
|
408 |
+
treating the ambiguous period before the switch as daylight savings
|
409 |
+
time, and the ambiguous period after as standard time.
|
410 |
+
|
411 |
+
|
412 |
+
>>> warsaw = pytz.timezone('Europe/Warsaw')
|
413 |
+
>>> amb_dt1 = warsaw.localize(datetime(1915, 8, 4, 23, 59, 59), is_dst=True)
|
414 |
+
>>> amb_dt1.strftime(fmt)
|
415 |
+
'1915-08-04 23:59:59 WMT+0124'
|
416 |
+
>>> amb_dt2 = warsaw.localize(datetime(1915, 8, 4, 23, 59, 59), is_dst=False)
|
417 |
+
>>> amb_dt2.strftime(fmt)
|
418 |
+
'1915-08-04 23:59:59 CET+0100'
|
419 |
+
>>> switch_dt = warsaw.localize(datetime(1915, 8, 5, 00, 00, 00), is_dst=False)
|
420 |
+
>>> switch_dt.strftime(fmt)
|
421 |
+
'1915-08-05 00:00:00 CET+0100'
|
422 |
+
>>> str(switch_dt - amb_dt1)
|
423 |
+
'0:24:01'
|
424 |
+
>>> str(switch_dt - amb_dt2)
|
425 |
+
'0:00:01'
|
426 |
+
|
427 |
+
The best way of creating a time during an ambiguous time period is
|
428 |
+
by converting from another timezone such as UTC:
|
429 |
+
|
430 |
+
>>> utc_dt = datetime(1915, 8, 4, 22, 36, tzinfo=pytz.utc)
|
431 |
+
>>> utc_dt.astimezone(warsaw).strftime(fmt)
|
432 |
+
'1915-08-04 23:36:00 CET+0100'
|
433 |
+
|
434 |
+
The standard Python way of handling all these ambiguities is not to
|
435 |
+
handle them, such as demonstrated in this example using the US/Eastern
|
436 |
+
timezone definition from the Python documentation (Note that this
|
437 |
+
implementation only works for dates between 1987 and 2006 - it is
|
438 |
+
included for tests only!):
|
439 |
+
|
440 |
+
>>> from pytz.reference import Eastern # pytz.reference only for tests
|
441 |
+
>>> dt = datetime(2002, 10, 27, 0, 30, tzinfo=Eastern)
|
442 |
+
>>> str(dt)
|
443 |
+
'2002-10-27 00:30:00-04:00'
|
444 |
+
>>> str(dt + timedelta(hours=1))
|
445 |
+
'2002-10-27 01:30:00-05:00'
|
446 |
+
>>> str(dt + timedelta(hours=2))
|
447 |
+
'2002-10-27 02:30:00-05:00'
|
448 |
+
>>> str(dt + timedelta(hours=3))
|
449 |
+
'2002-10-27 03:30:00-05:00'
|
450 |
+
|
451 |
+
Notice the first two results? At first glance you might think they are
|
452 |
+
correct, but taking the UTC offset into account you find that they are
|
453 |
+
actually two hours appart instead of the 1 hour we asked for.
|
454 |
+
|
455 |
+
>>> from pytz.reference import UTC # pytz.reference only for tests
|
456 |
+
>>> str(dt.astimezone(UTC))
|
457 |
+
'2002-10-27 04:30:00+00:00'
|
458 |
+
>>> str((dt + timedelta(hours=1)).astimezone(UTC))
|
459 |
+
'2002-10-27 06:30:00+00:00'
|
460 |
+
|
461 |
+
|
462 |
+
Country Information
|
463 |
+
~~~~~~~~~~~~~~~~~~~
|
464 |
+
|
465 |
+
A mechanism is provided to access the timezones commonly in use
|
466 |
+
for a particular country, looked up using the ISO 3166 country code.
|
467 |
+
It returns a list of strings that can be used to retrieve the relevant
|
468 |
+
tzinfo instance using ``pytz.timezone()``:
|
469 |
+
|
470 |
+
>>> print(' '.join(pytz.country_timezones['nz']))
|
471 |
+
Pacific/Auckland Pacific/Chatham
|
472 |
+
|
473 |
+
The Olson database comes with a ISO 3166 country code to English country
|
474 |
+
name mapping that pytz exposes as a dictionary:
|
475 |
+
|
476 |
+
>>> print(pytz.country_names['nz'])
|
477 |
+
New Zealand
|
478 |
+
|
479 |
+
|
480 |
+
What is UTC
|
481 |
+
~~~~~~~~~~~
|
482 |
+
|
483 |
+
'UTC' is `Coordinated Universal Time`_. It is a successor to, but distinct
|
484 |
+
from, Greenwich Mean Time (GMT) and the various definitions of Universal
|
485 |
+
Time. UTC is now the worldwide standard for regulating clocks and time
|
486 |
+
measurement.
|
487 |
+
|
488 |
+
All other timezones are defined relative to UTC, and include offsets like
|
489 |
+
UTC+0800 - hours to add or subtract from UTC to derive the local time. No
|
490 |
+
daylight saving time occurs in UTC, making it a useful timezone to perform
|
491 |
+
date arithmetic without worrying about the confusion and ambiguities caused
|
492 |
+
by daylight saving time transitions, your country changing its timezone, or
|
493 |
+
mobile computers that roam through multiple timezones.
|
494 |
+
|
495 |
+
.. _Coordinated Universal Time: https://en.wikipedia.org/wiki/Coordinated_Universal_Time
|
496 |
+
|
497 |
+
|
498 |
+
Helpers
|
499 |
+
~~~~~~~
|
500 |
+
|
501 |
+
There are two lists of timezones provided.
|
502 |
+
|
503 |
+
``all_timezones`` is the exhaustive list of the timezone names that can
|
504 |
+
be used.
|
505 |
+
|
506 |
+
>>> from pytz import all_timezones
|
507 |
+
>>> len(all_timezones) >= 500
|
508 |
+
True
|
509 |
+
>>> 'Etc/Greenwich' in all_timezones
|
510 |
+
True
|
511 |
+
|
512 |
+
``common_timezones`` is a list of useful, current timezones. It doesn't
|
513 |
+
contain deprecated zones or historical zones, except for a few I've
|
514 |
+
deemed in common usage, such as US/Eastern (open a bug report if you
|
515 |
+
think other timezones are deserving of being included here). It is also
|
516 |
+
a sequence of strings.
|
517 |
+
|
518 |
+
>>> from pytz import common_timezones
|
519 |
+
>>> len(common_timezones) < len(all_timezones)
|
520 |
+
True
|
521 |
+
>>> 'Etc/Greenwich' in common_timezones
|
522 |
+
False
|
523 |
+
>>> 'Australia/Melbourne' in common_timezones
|
524 |
+
True
|
525 |
+
>>> 'US/Eastern' in common_timezones
|
526 |
+
True
|
527 |
+
>>> 'Canada/Eastern' in common_timezones
|
528 |
+
True
|
529 |
+
>>> 'Australia/Yancowinna' in all_timezones
|
530 |
+
True
|
531 |
+
>>> 'Australia/Yancowinna' in common_timezones
|
532 |
+
False
|
533 |
+
|
534 |
+
Both ``common_timezones`` and ``all_timezones`` are alphabetically
|
535 |
+
sorted:
|
536 |
+
|
537 |
+
>>> common_timezones_dupe = common_timezones[:]
|
538 |
+
>>> common_timezones_dupe.sort()
|
539 |
+
>>> common_timezones == common_timezones_dupe
|
540 |
+
True
|
541 |
+
>>> all_timezones_dupe = all_timezones[:]
|
542 |
+
>>> all_timezones_dupe.sort()
|
543 |
+
>>> all_timezones == all_timezones_dupe
|
544 |
+
True
|
545 |
+
|
546 |
+
``all_timezones`` and ``common_timezones`` are also available as sets.
|
547 |
+
|
548 |
+
>>> from pytz import all_timezones_set, common_timezones_set
|
549 |
+
>>> 'US/Eastern' in all_timezones_set
|
550 |
+
True
|
551 |
+
>>> 'US/Eastern' in common_timezones_set
|
552 |
+
True
|
553 |
+
>>> 'Australia/Victoria' in common_timezones_set
|
554 |
+
False
|
555 |
+
|
556 |
+
You can also retrieve lists of timezones used by particular countries
|
557 |
+
using the ``country_timezones()`` function. It requires an ISO-3166
|
558 |
+
two letter country code.
|
559 |
+
|
560 |
+
>>> from pytz import country_timezones
|
561 |
+
>>> print(' '.join(country_timezones('ch')))
|
562 |
+
Europe/Zurich
|
563 |
+
>>> print(' '.join(country_timezones('CH')))
|
564 |
+
Europe/Zurich
|
565 |
+
|
566 |
+
|
567 |
+
Internationalization - i18n/l10n
|
568 |
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
569 |
+
|
570 |
+
Pytz is an interface to the IANA database, which uses ASCII names. The `Unicode Consortium's Unicode Locales (CLDR) <http://cldr.unicode.org>`_
|
571 |
+
project provides translations. Python packages such as
|
572 |
+
`Babel <https://babel.pocoo.org/en/latest/api/dates.html#timezone-functionality>`_
|
573 |
+
and Thomas Khyn's `l18n <https://pypi.org/project/l18n/>`_ package can be used
|
574 |
+
to access these translations from Python.
|
575 |
+
|
576 |
+
|
577 |
+
License
|
578 |
+
~~~~~~~
|
579 |
+
|
580 |
+
MIT license.
|
581 |
+
|
582 |
+
This code is also available as part of Zope 3 under the Zope Public
|
583 |
+
License, Version 2.1 (ZPL).
|
584 |
+
|
585 |
+
I'm happy to relicense this code if necessary for inclusion in other
|
586 |
+
open source projects.
|
587 |
+
|
588 |
+
|
589 |
+
Latest Versions
|
590 |
+
~~~~~~~~~~~~~~~
|
591 |
+
|
592 |
+
This package will be updated after releases of the Olson timezone
|
593 |
+
database. The latest version can be downloaded from the `Python Package
|
594 |
+
Index <https://pypi.org/project/pytz/>`_. The code that is used
|
595 |
+
to generate this distribution is hosted on Github and available
|
596 |
+
using git::
|
597 |
+
|
598 |
+
git clone https://github.com/stub42/pytz.git
|
599 |
+
|
600 |
+
Announcements of new releases are made on
|
601 |
+
`Launchpad <https://launchpad.net/pytz>`_, and the
|
602 |
+
`Atom feed <http://feeds.launchpad.net/pytz/announcements.atom>`_
|
603 |
+
hosted there.
|
604 |
+
|
605 |
+
|
606 |
+
Bugs, Feature Requests & Patches
|
607 |
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
608 |
+
|
609 |
+
Bugs should be reported on `Github <https://github.com/stub42/pytz/issues>`_.
|
610 |
+
Feature requests are unlikely to be considered, and efforts instead directed
|
611 |
+
to timezone support now built into Python or packages that work with it.
|
612 |
+
|
613 |
+
|
614 |
+
Security Issues
|
615 |
+
~~~~~~~~~~~~~~~
|
616 |
+
|
617 |
+
Reports about security issues can be made via `Tidelift <https://tidelift.com/security>`_.
|
618 |
+
|
619 |
+
|
620 |
+
Issues & Limitations
|
621 |
+
~~~~~~~~~~~~~~~~~~~~
|
622 |
+
|
623 |
+
- This project is in maintenance mode. Projects using Python 3.9 or later
|
624 |
+
are best served by using the timezone functionaly now included in core
|
625 |
+
Python and packages that work with it such as `tzdata <https://pypi.org/project/tzdata/>`_.
|
626 |
+
|
627 |
+
- Offsets from UTC are rounded to the nearest whole minute, so timezones
|
628 |
+
such as Europe/Amsterdam pre 1937 will be up to 30 seconds out. This
|
629 |
+
was a limitation of the Python datetime library.
|
630 |
+
|
631 |
+
- If you think a timezone definition is incorrect, I probably can't fix
|
632 |
+
it. pytz is a direct translation of the Olson timezone database, and
|
633 |
+
changes to the timezone definitions need to be made to this source.
|
634 |
+
If you find errors they should be reported to the time zone mailing
|
635 |
+
list, linked from http://www.iana.org/time-zones.
|
636 |
+
|
637 |
+
|
638 |
+
Further Reading
|
639 |
+
~~~~~~~~~~~~~~~
|
640 |
+
|
641 |
+
More info than you want to know about timezones:
|
642 |
+
https://data.iana.org/time-zones/tz-link.html
|
643 |
+
|
644 |
+
|
645 |
+
Contact
|
646 |
+
~~~~~~~
|
647 |
+
|
648 |
+
Stuart Bishop <stuart@stuartbishop.net>
|
649 |
+
|
650 |
+
|
.cache/pip/http-v2/8/1/3/c/c/813cc7096c25ba43edba14a4ab40832db33af638c43e975795995aec.body
ADDED
Binary file (610 kB). View file
|
|
.cache/pip/http-v2/8/5/e/f/e/85efe0b09056afaed0a9932320bb2a590a03afe4bc35e3fffc1e85cd
ADDED
Binary file (1.15 kB). View file
|
|
.cache/pip/http-v2/8/7/7/1/9/87719c54152648e1f5dd42370f81c27a1523da9b52543b783f02ec41
ADDED
Binary file (1.81 kB). View file
|
|
.cache/pip/http-v2/8/7/7/1/9/87719c54152648e1f5dd42370f81c27a1523da9b52543b783f02ec41.body
ADDED
Binary file (3.42 kB). View file
|
|
.cache/pip/http-v2/8/7/9/e/a/879eab407895dd6690258943fd9ec2bee9d83a6d395dfe3e4bf6ce4f.body
ADDED
@@ -0,0 +1,212 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
Metadata-Version: 2.1
|
2 |
+
Name: wandb
|
3 |
+
Version: 0.18.1
|
4 |
+
Summary: A CLI and library for interacting with the Weights & Biases API.
|
5 |
+
Project-URL: Source, https://github.com/wandb/wandb
|
6 |
+
Project-URL: Bug Reports, https://github.com/wandb/wandb/issues
|
7 |
+
Project-URL: Documentation, https://docs.wandb.ai/
|
8 |
+
Author-email: Weights & Biases <support@wandb.com>
|
9 |
+
License: MIT License
|
10 |
+
|
11 |
+
Copyright (c) 2021 Weights and Biases, Inc.
|
12 |
+
|
13 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
14 |
+
of this software and associated documentation files (the "Software"), to deal
|
15 |
+
in the Software without restriction, including without limitation the rights
|
16 |
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
17 |
+
copies of the Software, and to permit persons to whom the Software is
|
18 |
+
furnished to do so, subject to the following conditions:
|
19 |
+
|
20 |
+
The above copyright notice and this permission notice shall be included in all
|
21 |
+
copies or substantial portions of the Software.
|
22 |
+
|
23 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
24 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
25 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
26 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
27 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
28 |
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
29 |
+
SOFTWARE.
|
30 |
+
License-File: LICENSE
|
31 |
+
Classifier: Development Status :: 5 - Production/Stable
|
32 |
+
Classifier: Intended Audience :: Developers
|
33 |
+
Classifier: Intended Audience :: Science/Research
|
34 |
+
Classifier: License :: OSI Approved :: MIT License
|
35 |
+
Classifier: Natural Language :: English
|
36 |
+
Classifier: Programming Language :: Python :: 3
|
37 |
+
Classifier: Programming Language :: Python :: 3 :: Only
|
38 |
+
Classifier: Programming Language :: Python :: 3.7
|
39 |
+
Classifier: Programming Language :: Python :: 3.8
|
40 |
+
Classifier: Programming Language :: Python :: 3.9
|
41 |
+
Classifier: Programming Language :: Python :: 3.10
|
42 |
+
Classifier: Programming Language :: Python :: 3.11
|
43 |
+
Classifier: Programming Language :: Python :: 3.12
|
44 |
+
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
45 |
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
46 |
+
Classifier: Topic :: System :: Logging
|
47 |
+
Classifier: Topic :: System :: Monitoring
|
48 |
+
Requires-Python: >=3.7
|
49 |
+
Requires-Dist: click!=8.0.0,>=7.1
|
50 |
+
Requires-Dist: docker-pycreds>=0.4.0
|
51 |
+
Requires-Dist: gitpython!=3.1.29,>=1.0.0
|
52 |
+
Requires-Dist: platformdirs
|
53 |
+
Requires-Dist: protobuf!=4.21.0,!=5.28.0,<6,>=3.12.0; python_version < '3.9' and sys_platform == 'linux'
|
54 |
+
Requires-Dist: protobuf!=4.21.0,!=5.28.0,<6,>=3.15.0; python_version == '3.9' and sys_platform == 'linux'
|
55 |
+
Requires-Dist: protobuf!=4.21.0,!=5.28.0,<6,>=3.19.0; python_version > '3.9' and sys_platform == 'linux'
|
56 |
+
Requires-Dist: protobuf!=4.21.0,!=5.28.0,<6,>=3.19.0; sys_platform != 'linux'
|
57 |
+
Requires-Dist: psutil>=5.0.0
|
58 |
+
Requires-Dist: pyyaml
|
59 |
+
Requires-Dist: requests<3,>=2.0.0
|
60 |
+
Requires-Dist: sentry-sdk>=1.0.0
|
61 |
+
Requires-Dist: setproctitle
|
62 |
+
Requires-Dist: setuptools
|
63 |
+
Requires-Dist: typing-extensions; python_version < '3.10'
|
64 |
+
Provides-Extra: aws
|
65 |
+
Requires-Dist: boto3; extra == 'aws'
|
66 |
+
Provides-Extra: azure
|
67 |
+
Requires-Dist: azure-identity; extra == 'azure'
|
68 |
+
Requires-Dist: azure-storage-blob; extra == 'azure'
|
69 |
+
Provides-Extra: gcp
|
70 |
+
Requires-Dist: google-cloud-storage; extra == 'gcp'
|
71 |
+
Provides-Extra: importers
|
72 |
+
Requires-Dist: filelock; extra == 'importers'
|
73 |
+
Requires-Dist: mlflow; extra == 'importers'
|
74 |
+
Requires-Dist: polars<=1.2.1; extra == 'importers'
|
75 |
+
Requires-Dist: rich; extra == 'importers'
|
76 |
+
Requires-Dist: tenacity; extra == 'importers'
|
77 |
+
Provides-Extra: kubeflow
|
78 |
+
Requires-Dist: google-cloud-storage; extra == 'kubeflow'
|
79 |
+
Requires-Dist: kubernetes; extra == 'kubeflow'
|
80 |
+
Requires-Dist: minio; extra == 'kubeflow'
|
81 |
+
Requires-Dist: sh; extra == 'kubeflow'
|
82 |
+
Provides-Extra: launch
|
83 |
+
Requires-Dist: awscli; extra == 'launch'
|
84 |
+
Requires-Dist: azure-containerregistry; extra == 'launch'
|
85 |
+
Requires-Dist: azure-identity; extra == 'launch'
|
86 |
+
Requires-Dist: azure-storage-blob; extra == 'launch'
|
87 |
+
Requires-Dist: boto3; extra == 'launch'
|
88 |
+
Requires-Dist: botocore; extra == 'launch'
|
89 |
+
Requires-Dist: chardet; extra == 'launch'
|
90 |
+
Requires-Dist: google-auth; extra == 'launch'
|
91 |
+
Requires-Dist: google-cloud-aiplatform; extra == 'launch'
|
92 |
+
Requires-Dist: google-cloud-artifact-registry; extra == 'launch'
|
93 |
+
Requires-Dist: google-cloud-compute; extra == 'launch'
|
94 |
+
Requires-Dist: google-cloud-storage; extra == 'launch'
|
95 |
+
Requires-Dist: iso8601; extra == 'launch'
|
96 |
+
Requires-Dist: jsonschema; extra == 'launch'
|
97 |
+
Requires-Dist: kubernetes; extra == 'launch'
|
98 |
+
Requires-Dist: kubernetes-asyncio; extra == 'launch'
|
99 |
+
Requires-Dist: nbconvert; extra == 'launch'
|
100 |
+
Requires-Dist: nbformat; extra == 'launch'
|
101 |
+
Requires-Dist: optuna; extra == 'launch'
|
102 |
+
Requires-Dist: pydantic; extra == 'launch'
|
103 |
+
Requires-Dist: pyyaml>=6.0.0; extra == 'launch'
|
104 |
+
Requires-Dist: tomli; extra == 'launch'
|
105 |
+
Requires-Dist: typing-extensions; extra == 'launch'
|
106 |
+
Provides-Extra: media
|
107 |
+
Requires-Dist: bokeh; extra == 'media'
|
108 |
+
Requires-Dist: moviepy; extra == 'media'
|
109 |
+
Requires-Dist: numpy; extra == 'media'
|
110 |
+
Requires-Dist: pillow; extra == 'media'
|
111 |
+
Requires-Dist: plotly>=5.18.0; extra == 'media'
|
112 |
+
Requires-Dist: rdkit-pypi; extra == 'media'
|
113 |
+
Requires-Dist: soundfile; extra == 'media'
|
114 |
+
Provides-Extra: models
|
115 |
+
Requires-Dist: cloudpickle; extra == 'models'
|
116 |
+
Provides-Extra: perf
|
117 |
+
Requires-Dist: orjson; extra == 'perf'
|
118 |
+
Provides-Extra: sweeps
|
119 |
+
Requires-Dist: sweeps>=0.2.0; extra == 'sweeps'
|
120 |
+
Provides-Extra: workspaces
|
121 |
+
Requires-Dist: wandb-workspaces; extra == 'workspaces'
|
122 |
+
Description-Content-Type: text/markdown
|
123 |
+
|
124 |
+
<div align="center">
|
125 |
+
<img src="https://i.imgur.com/RUtiVzH.png" width="600" /><br><br>
|
126 |
+
</div>
|
127 |
+
|
128 |
+
# Weights and Biases [](https://pypi.python.org/pypi/wandb) [](https://anaconda.org/conda-forge/wandb) [](https://circleci.com/gh/wandb/wandb) [](https://codecov.io/gh/wandb/wandb)
|
129 |
+
|
130 |
+
Use W&B to build better models faster. Track and visualize all the pieces of your machine learning pipeline, from datasets to production machine learning models. Get started with W&B today, [sign up for an account!](https://wandb.com?utm_source=github&utm_medium=code&utm_campaign=wandb&utm_content=readme)
|
131 |
+
|
132 |
+
|
133 |
+
|
134 |
+
See the [W&B Developer Guide](https://docs.wandb.ai/?utm_source=github&utm_medium=code&utm_campaign=wandb&utm_content=documentation) and [API Reference Guide](https://docs.wandb.ai/ref?utm_source=github&utm_medium=code&utm_campaign=wandb&utm_content=documentation) for a full technical description of the W&B platform.
|
135 |
+
|
136 |
+
|
137 |
+
|
138 |
+
# Quickstart
|
139 |
+
|
140 |
+
Get started with W&B in four steps:
|
141 |
+
|
142 |
+
1. First, sign up for a [W&B account](https://wandb.ai/login?utm_source=github&utm_medium=code&utm_campaign=wandb&utm_content=quickstart).
|
143 |
+
|
144 |
+
2. Second, install the W&B SDK with [pip](https://pip.pypa.io/en/stable/). Navigate to your terminal and type the following command:
|
145 |
+
|
146 |
+
```shell
|
147 |
+
pip install wandb
|
148 |
+
```
|
149 |
+
|
150 |
+
3. Third, log into W&B:
|
151 |
+
|
152 |
+
```python
|
153 |
+
wandb.login()
|
154 |
+
```
|
155 |
+
|
156 |
+
4. Use the example code snippet below as a template to integrate W&B to your Python script:
|
157 |
+
|
158 |
+
```python
|
159 |
+
import wandb
|
160 |
+
|
161 |
+
# Start a W&B Run with wandb.init
|
162 |
+
run = wandb.init(project="my_first_project")
|
163 |
+
|
164 |
+
# Save model inputs and hyperparameters in a wandb.config object
|
165 |
+
config = run.config
|
166 |
+
config.learning_rate = 0.01
|
167 |
+
|
168 |
+
# Model training code here ...
|
169 |
+
|
170 |
+
# Log metrics over time to visualize performance with wandb.log
|
171 |
+
for i in range(10):
|
172 |
+
run.log({"loss": ...})
|
173 |
+
|
174 |
+
# Mark the run as finished, and finish uploading all data
|
175 |
+
run.finish()
|
176 |
+
```
|
177 |
+
|
178 |
+
For example, if the preceding code was stored in a script called train.py:
|
179 |
+
|
180 |
+
```shell
|
181 |
+
python train.py
|
182 |
+
```
|
183 |
+
|
184 |
+
You will see a URL in your terminal logs when your script starts and finishes. Data is staged locally in a directory named _wandb_ relative to your script. Navigate to the W&B App to view a dashboard of your first W&B Experiment. Use the W&B App to compare multiple experiments in a unified place, dive into the results of a single run, and much more!
|
185 |
+
|
186 |
+
|
187 |
+
|
188 |
+
# Integrations
|
189 |
+
|
190 |
+
Use your favorite framework with W&B. W&B integrations make it fast and easy to set up experiment tracking and data versioning inside existing projects. For more information on how to integrate W&B with the framework of your choice, see [W&B Integrations](https://docs.wandb.ai/guides/integrations) in the W&B Developer Guide.
|
191 |
+
|
192 |
+
|
193 |
+
|
194 |
+
# Contribution guidelines
|
195 |
+
Weights & Biases ❤️ open source, and we welcome contributions from the community! See the [Contribution guide](https://github.com/wandb/wandb/blob/main/CONTRIBUTING.md) for more information on the development workflow and the internals of the wandb library. For wandb bugs and feature requests, visit [GitHub Issues](https://github.com/wandb/wandb/issues) or contact support@wandb.com.
|
196 |
+
|
197 |
+
|
198 |
+
|
199 |
+
# Academic Researchers
|
200 |
+
Reach out to W&B Support at support@wandb.com to get a [free academic license](https://www.wandb.com/academic) for you and your research group.
|
201 |
+
|
202 |
+
|
203 |
+
|
204 |
+
# W&B Community
|
205 |
+
|
206 |
+
Be a part of the growing W&B Community and interact with the W&B team in our [Discord](https://wandb.me/discord). Stay connected with the latest ML updates and tutorials with [W&B Fully Connected](https://wandb.ai/fully-connected).
|
207 |
+
|
208 |
+
|
209 |
+
|
210 |
+
# License
|
211 |
+
|
212 |
+
[MIT License](https://github.com/wandb/wandb/blob/main/LICENSE)
|
.cache/pip/http-v2/8/8/b/8/b/88b8bfb8f1d620e081b2b226e7936019ed96f3fadbfbd878f24e6be7.body
ADDED
@@ -0,0 +1,119 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
Metadata-Version: 2.1
|
2 |
+
Name: requests
|
3 |
+
Version: 2.32.3
|
4 |
+
Summary: Python HTTP for Humans.
|
5 |
+
Home-page: https://requests.readthedocs.io
|
6 |
+
Author: Kenneth Reitz
|
7 |
+
Author-email: me@kennethreitz.org
|
8 |
+
License: Apache-2.0
|
9 |
+
Project-URL: Documentation, https://requests.readthedocs.io
|
10 |
+
Project-URL: Source, https://github.com/psf/requests
|
11 |
+
Classifier: Development Status :: 5 - Production/Stable
|
12 |
+
Classifier: Environment :: Web Environment
|
13 |
+
Classifier: Intended Audience :: Developers
|
14 |
+
Classifier: License :: OSI Approved :: Apache Software License
|
15 |
+
Classifier: Natural Language :: English
|
16 |
+
Classifier: Operating System :: OS Independent
|
17 |
+
Classifier: Programming Language :: Python
|
18 |
+
Classifier: Programming Language :: Python :: 3
|
19 |
+
Classifier: Programming Language :: Python :: 3.8
|
20 |
+
Classifier: Programming Language :: Python :: 3.9
|
21 |
+
Classifier: Programming Language :: Python :: 3.10
|
22 |
+
Classifier: Programming Language :: Python :: 3.11
|
23 |
+
Classifier: Programming Language :: Python :: 3.12
|
24 |
+
Classifier: Programming Language :: Python :: 3 :: Only
|
25 |
+
Classifier: Programming Language :: Python :: Implementation :: CPython
|
26 |
+
Classifier: Programming Language :: Python :: Implementation :: PyPy
|
27 |
+
Classifier: Topic :: Internet :: WWW/HTTP
|
28 |
+
Classifier: Topic :: Software Development :: Libraries
|
29 |
+
Requires-Python: >=3.8
|
30 |
+
Description-Content-Type: text/markdown
|
31 |
+
License-File: LICENSE
|
32 |
+
Requires-Dist: charset-normalizer <4,>=2
|
33 |
+
Requires-Dist: idna <4,>=2.5
|
34 |
+
Requires-Dist: urllib3 <3,>=1.21.1
|
35 |
+
Requires-Dist: certifi >=2017.4.17
|
36 |
+
Provides-Extra: security
|
37 |
+
Provides-Extra: socks
|
38 |
+
Requires-Dist: PySocks !=1.5.7,>=1.5.6 ; extra == 'socks'
|
39 |
+
Provides-Extra: use_chardet_on_py3
|
40 |
+
Requires-Dist: chardet <6,>=3.0.2 ; extra == 'use_chardet_on_py3'
|
41 |
+
|
42 |
+
# Requests
|
43 |
+
|
44 |
+
**Requests** is a simple, yet elegant, HTTP library.
|
45 |
+
|
46 |
+
```python
|
47 |
+
>>> import requests
|
48 |
+
>>> r = requests.get('https://httpbin.org/basic-auth/user/pass', auth=('user', 'pass'))
|
49 |
+
>>> r.status_code
|
50 |
+
200
|
51 |
+
>>> r.headers['content-type']
|
52 |
+
'application/json; charset=utf8'
|
53 |
+
>>> r.encoding
|
54 |
+
'utf-8'
|
55 |
+
>>> r.text
|
56 |
+
'{"authenticated": true, ...'
|
57 |
+
>>> r.json()
|
58 |
+
{'authenticated': True, ...}
|
59 |
+
```
|
60 |
+
|
61 |
+
Requests allows you to send HTTP/1.1 requests extremely easily. There’s no need to manually add query strings to your URLs, or to form-encode your `PUT` & `POST` data — but nowadays, just use the `json` method!
|
62 |
+
|
63 |
+
Requests is one of the most downloaded Python packages today, pulling in around `30M downloads / week`— according to GitHub, Requests is currently [depended upon](https://github.com/psf/requests/network/dependents?package_id=UGFja2FnZS01NzA4OTExNg%3D%3D) by `1,000,000+` repositories. You may certainly put your trust in this code.
|
64 |
+
|
65 |
+
[](https://pepy.tech/project/requests)
|
66 |
+
[](https://pypi.org/project/requests)
|
67 |
+
[](https://github.com/psf/requests/graphs/contributors)
|
68 |
+
|
69 |
+
## Installing Requests and Supported Versions
|
70 |
+
|
71 |
+
Requests is available on PyPI:
|
72 |
+
|
73 |
+
```console
|
74 |
+
$ python -m pip install requests
|
75 |
+
```
|
76 |
+
|
77 |
+
Requests officially supports Python 3.8+.
|
78 |
+
|
79 |
+
## Supported Features & Best–Practices
|
80 |
+
|
81 |
+
Requests is ready for the demands of building robust and reliable HTTP–speaking applications, for the needs of today.
|
82 |
+
|
83 |
+
- Keep-Alive & Connection Pooling
|
84 |
+
- International Domains and URLs
|
85 |
+
- Sessions with Cookie Persistence
|
86 |
+
- Browser-style TLS/SSL Verification
|
87 |
+
- Basic & Digest Authentication
|
88 |
+
- Familiar `dict`–like Cookies
|
89 |
+
- Automatic Content Decompression and Decoding
|
90 |
+
- Multi-part File Uploads
|
91 |
+
- SOCKS Proxy Support
|
92 |
+
- Connection Timeouts
|
93 |
+
- Streaming Downloads
|
94 |
+
- Automatic honoring of `.netrc`
|
95 |
+
- Chunked HTTP Requests
|
96 |
+
|
97 |
+
## API Reference and User Guide available on [Read the Docs](https://requests.readthedocs.io)
|
98 |
+
|
99 |
+
[](https://requests.readthedocs.io)
|
100 |
+
|
101 |
+
## Cloning the repository
|
102 |
+
|
103 |
+
When cloning the Requests repository, you may need to add the `-c
|
104 |
+
fetch.fsck.badTimezone=ignore` flag to avoid an error about a bad commit (see
|
105 |
+
[this issue](https://github.com/psf/requests/issues/2690) for more background):
|
106 |
+
|
107 |
+
```shell
|
108 |
+
git clone -c fetch.fsck.badTimezone=ignore https://github.com/psf/requests.git
|
109 |
+
```
|
110 |
+
|
111 |
+
You can also apply this setting to your global Git config:
|
112 |
+
|
113 |
+
```shell
|
114 |
+
git config --global fetch.fsck.badTimezone ignore
|
115 |
+
```
|
116 |
+
|
117 |
+
---
|
118 |
+
|
119 |
+
[](https://kennethreitz.org) [](https://www.python.org/psf)
|
.cache/pip/http-v2/8/9/2/3/0/89230ee5375192cd78aff8dee73d946e2bcfcfb4c3ec4374132fe597
ADDED
Binary file (1.2 kB). View file
|
|
.cache/pip/http-v2/8/9/2/3/0/89230ee5375192cd78aff8dee73d946e2bcfcfb4c3ec4374132fe597.body
ADDED
@@ -0,0 +1,122 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
Metadata-Version: 2.1
|
2 |
+
Name: aiohappyeyeballs
|
3 |
+
Version: 2.4.0
|
4 |
+
Summary: Happy Eyeballs for asyncio
|
5 |
+
Home-page: https://github.com/aio-libs/aiohappyeyeballs
|
6 |
+
License: Python-2.0.1
|
7 |
+
Author: J. Nick Koston
|
8 |
+
Author-email: nick@koston.org
|
9 |
+
Requires-Python: >=3.8
|
10 |
+
Classifier: Development Status :: 5 - Production/Stable
|
11 |
+
Classifier: Intended Audience :: Developers
|
12 |
+
Classifier: License :: OSI Approved :: Python Software Foundation License
|
13 |
+
Classifier: License :: Other/Proprietary License
|
14 |
+
Classifier: Natural Language :: English
|
15 |
+
Classifier: Operating System :: OS Independent
|
16 |
+
Classifier: Programming Language :: Python :: 3
|
17 |
+
Classifier: Programming Language :: Python :: 3.8
|
18 |
+
Classifier: Programming Language :: Python :: 3.9
|
19 |
+
Classifier: Programming Language :: Python :: 3.10
|
20 |
+
Classifier: Programming Language :: Python :: 3.11
|
21 |
+
Classifier: Programming Language :: Python :: 3.12
|
22 |
+
Classifier: Programming Language :: Python :: 3.13
|
23 |
+
Classifier: Topic :: Software Development :: Libraries
|
24 |
+
Project-URL: Bug Tracker, https://github.com/aio-libs/aiohappyeyeballs/issues
|
25 |
+
Project-URL: Changelog, https://github.com/aio-libs/aiohappyeyeballs/blob/main/CHANGELOG.md
|
26 |
+
Project-URL: Documentation, https://aiohappyeyeballs.readthedocs.io
|
27 |
+
Project-URL: Repository, https://github.com/aio-libs/aiohappyeyeballs
|
28 |
+
Description-Content-Type: text/markdown
|
29 |
+
|
30 |
+
# aiohappyeyeballs
|
31 |
+
|
32 |
+
<p align="center">
|
33 |
+
<a href="https://github.com/aio-libs/aiohappyeyeballs/actions/workflows/ci.yml?query=branch%3Amain">
|
34 |
+
<img src="https://img.shields.io/github/actions/workflow/status/aio-libs/aiohappyeyeballs/ci-cd.yml?branch=main&label=CI&logo=github&style=flat-square" alt="CI Status" >
|
35 |
+
</a>
|
36 |
+
<a href="https://aiohappyeyeballs.readthedocs.io">
|
37 |
+
<img src="https://img.shields.io/readthedocs/aiohappyeyeballs.svg?logo=read-the-docs&logoColor=fff&style=flat-square" alt="Documentation Status">
|
38 |
+
</a>
|
39 |
+
<a href="https://codecov.io/gh/aio-libs/aiohappyeyeballs">
|
40 |
+
<img src="https://img.shields.io/codecov/c/github/aio-libs/aiohappyeyeballs.svg?logo=codecov&logoColor=fff&style=flat-square" alt="Test coverage percentage">
|
41 |
+
</a>
|
42 |
+
</p>
|
43 |
+
<p align="center">
|
44 |
+
<a href="https://python-poetry.org/">
|
45 |
+
<img src="https://img.shields.io/badge/packaging-poetry-299bd7?style=flat-square&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAASCAYAAABrXO8xAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAJJSURBVHgBfZLPa1NBEMe/s7tNXoxW1KJQKaUHkXhQvHgW6UHQQ09CBS/6V3hKc/AP8CqCrUcpmop3Cx48eDB4yEECjVQrlZb80CRN8t6OM/teagVxYZi38+Yz853dJbzoMV3MM8cJUcLMSUKIE8AzQ2PieZzFxEJOHMOgMQQ+dUgSAckNXhapU/NMhDSWLs1B24A8sO1xrN4NECkcAC9ASkiIJc6k5TRiUDPhnyMMdhKc+Zx19l6SgyeW76BEONY9exVQMzKExGKwwPsCzza7KGSSWRWEQhyEaDXp6ZHEr416ygbiKYOd7TEWvvcQIeusHYMJGhTwF9y7sGnSwaWyFAiyoxzqW0PM/RjghPxF2pWReAowTEXnDh0xgcLs8l2YQmOrj3N7ByiqEoH0cARs4u78WgAVkoEDIDoOi3AkcLOHU60RIg5wC4ZuTC7FaHKQm8Hq1fQuSOBvX/sodmNJSB5geaF5CPIkUeecdMxieoRO5jz9bheL6/tXjrwCyX/UYBUcjCaWHljx1xiX6z9xEjkYAzbGVnB8pvLmyXm9ep+W8CmsSHQQY77Zx1zboxAV0w7ybMhQmfqdmmw3nEp1I0Z+FGO6M8LZdoyZnuzzBdjISicKRnpxzI9fPb+0oYXsNdyi+d3h9bm9MWYHFtPeIZfLwzmFDKy1ai3p+PDls1Llz4yyFpferxjnyjJDSEy9CaCx5m2cJPerq6Xm34eTrZt3PqxYO1XOwDYZrFlH1fWnpU38Y9HRze3lj0vOujZcXKuuXm3jP+s3KbZVra7y2EAAAAAASUVORK5CYII=" alt="Poetry">
|
46 |
+
</a>
|
47 |
+
<a href="https://github.com/ambv/black">
|
48 |
+
<img src="https://img.shields.io/badge/code%20style-black-000000.svg?style=flat-square" alt="black">
|
49 |
+
</a>
|
50 |
+
<a href="https://github.com/pre-commit/pre-commit">
|
51 |
+
<img src="https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white&style=flat-square" alt="pre-commit">
|
52 |
+
</a>
|
53 |
+
</p>
|
54 |
+
<p align="center">
|
55 |
+
<a href="https://pypi.org/project/aiohappyeyeballs/">
|
56 |
+
<img src="https://img.shields.io/pypi/v/aiohappyeyeballs.svg?logo=python&logoColor=fff&style=flat-square" alt="PyPI Version">
|
57 |
+
</a>
|
58 |
+
<img src="https://img.shields.io/pypi/pyversions/aiohappyeyeballs.svg?style=flat-square&logo=python&logoColor=fff" alt="Supported Python versions">
|
59 |
+
<img src="https://img.shields.io/pypi/l/aiohappyeyeballs.svg?style=flat-square" alt="License">
|
60 |
+
</p>
|
61 |
+
|
62 |
+
---
|
63 |
+
|
64 |
+
**Documentation**: <a href="https://aiohappyeyeballs.readthedocs.io" target="_blank">https://aiohappyeyeballs.readthedocs.io </a>
|
65 |
+
|
66 |
+
**Source Code**: <a href="https://github.com/aio-libs/aiohappyeyeballs" target="_blank">https://github.com/aio-libs/aiohappyeyeballs </a>
|
67 |
+
|
68 |
+
---
|
69 |
+
|
70 |
+
[Happy Eyeballs](https://en.wikipedia.org/wiki/Happy_Eyeballs)
|
71 |
+
([RFC 8305](https://www.rfc-editor.org/rfc/rfc8305.html))
|
72 |
+
|
73 |
+
## Use case
|
74 |
+
|
75 |
+
This library exists to allow connecting with
|
76 |
+
[Happy Eyeballs](https://en.wikipedia.org/wiki/Happy_Eyeballs)
|
77 |
+
([RFC 8305](https://www.rfc-editor.org/rfc/rfc8305.html))
|
78 |
+
when you
|
79 |
+
already have a list of addrinfo and not a DNS name.
|
80 |
+
|
81 |
+
The stdlib version of `loop.create_connection()`
|
82 |
+
will only work when you pass in an unresolved name which
|
83 |
+
is not a good fit when using DNS caching or resolving
|
84 |
+
names via another method such as `zeroconf`.
|
85 |
+
|
86 |
+
## Installation
|
87 |
+
|
88 |
+
Install this via pip (or your favourite package manager):
|
89 |
+
|
90 |
+
`pip install aiohappyeyeballs`
|
91 |
+
|
92 |
+
## Example usage
|
93 |
+
|
94 |
+
```python
|
95 |
+
|
96 |
+
addr_infos = await loop.getaddrinfo("example.org", 80)
|
97 |
+
|
98 |
+
socket = await start_connection(addr_infos)
|
99 |
+
socket = await start_connection(addr_infos, local_addr_infos=local_addr_infos, happy_eyeballs_delay=0.2)
|
100 |
+
|
101 |
+
transport, protocol = await loop.create_connection(
|
102 |
+
MyProtocol, sock=socket, ...)
|
103 |
+
|
104 |
+
# Remove the first address for each family from addr_info
|
105 |
+
pop_addr_infos_interleave(addr_info, 1)
|
106 |
+
|
107 |
+
# Remove all matching address from addr_info
|
108 |
+
remove_addr_infos(addr_info, "dead::beef::")
|
109 |
+
|
110 |
+
# Convert a local_addr to local_addr_infos
|
111 |
+
local_addr_infos = addr_to_addr_infos(("127.0.0.1",0))
|
112 |
+
```
|
113 |
+
|
114 |
+
## Credits
|
115 |
+
|
116 |
+
This package contains code from cpython and is licensed under the same terms as cpython itself.
|
117 |
+
|
118 |
+
This package was created with
|
119 |
+
[Copier](https://copier.readthedocs.io/) and the
|
120 |
+
[browniebroke/pypackage-template](https://github.com/browniebroke/pypackage-template)
|
121 |
+
project template.
|
122 |
+
|
.cache/pip/http-v2/8/9/3/a/9/893a9178010858cecf72b523725b46ddedbe6c23406a020810080ab3.body
ADDED
Binary file (79.2 kB). View file
|
|
.cache/pip/http-v2/8/9/8/0/7/8980772ed68d7fbcfe2ef2b3f1911b9bd45462ad1becf93269532743.body
ADDED
Binary file (530 kB). View file
|
|
.cache/pip/http-v2/8/a/c/4/d/8ac4d14dc45e27d21da49fb515570b6f875b78707de9b08ce1088d1b
ADDED
Binary file (1.82 kB). View file
|
|
.cache/pip/http-v2/8/b/4/4/f/8b44f84aaa6a4b33d7e996e7c94310ce3c9a59ef101fc35cc26ec2ba
ADDED
Binary file (1.2 kB). View file
|
|
.cache/pip/http-v2/8/b/4/4/f/8b44f84aaa6a4b33d7e996e7c94310ce3c9a59ef101fc35cc26ec2ba.body
ADDED
@@ -0,0 +1,366 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
Metadata-Version: 2.1
|
2 |
+
Name: datasets
|
3 |
+
Version: 3.0.0
|
4 |
+
Summary: HuggingFace community-driven open-source library of datasets
|
5 |
+
Home-page: https://github.com/huggingface/datasets
|
6 |
+
Author: HuggingFace Inc.
|
7 |
+
Author-email: thomas@huggingface.co
|
8 |
+
License: Apache 2.0
|
9 |
+
Download-URL: https://github.com/huggingface/datasets/tags
|
10 |
+
Keywords: datasets machine learning datasets
|
11 |
+
Platform: UNKNOWN
|
12 |
+
Classifier: Development Status :: 5 - Production/Stable
|
13 |
+
Classifier: Intended Audience :: Developers
|
14 |
+
Classifier: Intended Audience :: Education
|
15 |
+
Classifier: Intended Audience :: Science/Research
|
16 |
+
Classifier: License :: OSI Approved :: Apache Software License
|
17 |
+
Classifier: Operating System :: OS Independent
|
18 |
+
Classifier: Programming Language :: Python :: 3
|
19 |
+
Classifier: Programming Language :: Python :: 3.8
|
20 |
+
Classifier: Programming Language :: Python :: 3.9
|
21 |
+
Classifier: Programming Language :: Python :: 3.10
|
22 |
+
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
23 |
+
Requires-Python: >=3.8.0
|
24 |
+
Description-Content-Type: text/markdown
|
25 |
+
License-File: LICENSE
|
26 |
+
License-File: AUTHORS
|
27 |
+
Requires-Dist: filelock
|
28 |
+
Requires-Dist: numpy (>=1.17)
|
29 |
+
Requires-Dist: pyarrow (>=15.0.0)
|
30 |
+
Requires-Dist: dill (<0.3.9,>=0.3.0)
|
31 |
+
Requires-Dist: pandas
|
32 |
+
Requires-Dist: requests (>=2.32.2)
|
33 |
+
Requires-Dist: tqdm (>=4.66.3)
|
34 |
+
Requires-Dist: xxhash
|
35 |
+
Requires-Dist: multiprocess
|
36 |
+
Requires-Dist: fsspec[http] (<=2024.6.1,>=2023.1.0)
|
37 |
+
Requires-Dist: aiohttp
|
38 |
+
Requires-Dist: huggingface-hub (>=0.22.0)
|
39 |
+
Requires-Dist: packaging
|
40 |
+
Requires-Dist: pyyaml (>=5.1)
|
41 |
+
Provides-Extra: audio
|
42 |
+
Requires-Dist: soundfile (>=0.12.1) ; extra == 'audio'
|
43 |
+
Requires-Dist: librosa ; extra == 'audio'
|
44 |
+
Requires-Dist: soxr (>=0.4.0) ; (python_version >= "3.9") and extra == 'audio'
|
45 |
+
Provides-Extra: benchmarks
|
46 |
+
Requires-Dist: tensorflow (==2.12.0) ; extra == 'benchmarks'
|
47 |
+
Requires-Dist: torch (==2.0.1) ; extra == 'benchmarks'
|
48 |
+
Requires-Dist: transformers (==4.30.1) ; extra == 'benchmarks'
|
49 |
+
Provides-Extra: dev
|
50 |
+
Requires-Dist: absl-py ; extra == 'dev'
|
51 |
+
Requires-Dist: decorator ; extra == 'dev'
|
52 |
+
Requires-Dist: joblib (<1.3.0) ; extra == 'dev'
|
53 |
+
Requires-Dist: joblibspark ; extra == 'dev'
|
54 |
+
Requires-Dist: pytest ; extra == 'dev'
|
55 |
+
Requires-Dist: pytest-datadir ; extra == 'dev'
|
56 |
+
Requires-Dist: pytest-xdist ; extra == 'dev'
|
57 |
+
Requires-Dist: elasticsearch (<8.0.0) ; extra == 'dev'
|
58 |
+
Requires-Dist: faiss-cpu (>=1.8.0.post1) ; extra == 'dev'
|
59 |
+
Requires-Dist: lz4 ; extra == 'dev'
|
60 |
+
Requires-Dist: moto[server] ; extra == 'dev'
|
61 |
+
Requires-Dist: pyspark (>=3.4) ; extra == 'dev'
|
62 |
+
Requires-Dist: py7zr ; extra == 'dev'
|
63 |
+
Requires-Dist: rarfile (>=4.0) ; extra == 'dev'
|
64 |
+
Requires-Dist: sqlalchemy ; extra == 'dev'
|
65 |
+
Requires-Dist: s3fs (>=2021.11.1) ; extra == 'dev'
|
66 |
+
Requires-Dist: protobuf (<4.0.0) ; extra == 'dev'
|
67 |
+
Requires-Dist: tiktoken ; extra == 'dev'
|
68 |
+
Requires-Dist: torch (>=2.0.0) ; extra == 'dev'
|
69 |
+
Requires-Dist: soundfile (>=0.12.1) ; extra == 'dev'
|
70 |
+
Requires-Dist: transformers (>=4.42.0) ; extra == 'dev'
|
71 |
+
Requires-Dist: zstandard ; extra == 'dev'
|
72 |
+
Requires-Dist: polars[timezone] (>=0.20.0) ; extra == 'dev'
|
73 |
+
Requires-Dist: Pillow (>=9.4.0) ; extra == 'dev'
|
74 |
+
Requires-Dist: librosa ; extra == 'dev'
|
75 |
+
Requires-Dist: ruff (>=0.3.0) ; extra == 'dev'
|
76 |
+
Requires-Dist: s3fs ; extra == 'dev'
|
77 |
+
Requires-Dist: transformers ; extra == 'dev'
|
78 |
+
Requires-Dist: torch ; extra == 'dev'
|
79 |
+
Requires-Dist: tensorflow (>=2.6.0) ; extra == 'dev'
|
80 |
+
Requires-Dist: tensorflow (>=2.6.0) ; (python_version < "3.10") and extra == 'dev'
|
81 |
+
Requires-Dist: tensorflow (>=2.16.0) ; (python_version >= "3.10") and extra == 'dev'
|
82 |
+
Requires-Dist: soxr (>=0.4.0) ; (python_version >= "3.9") and extra == 'dev'
|
83 |
+
Requires-Dist: jax (>=0.3.14) ; (sys_platform != "win32") and extra == 'dev'
|
84 |
+
Requires-Dist: jaxlib (>=0.3.14) ; (sys_platform != "win32") and extra == 'dev'
|
85 |
+
Provides-Extra: docs
|
86 |
+
Requires-Dist: s3fs ; extra == 'docs'
|
87 |
+
Requires-Dist: transformers ; extra == 'docs'
|
88 |
+
Requires-Dist: torch ; extra == 'docs'
|
89 |
+
Requires-Dist: tensorflow (>=2.6.0) ; extra == 'docs'
|
90 |
+
Provides-Extra: jax
|
91 |
+
Requires-Dist: jax (>=0.3.14) ; extra == 'jax'
|
92 |
+
Requires-Dist: jaxlib (>=0.3.14) ; extra == 'jax'
|
93 |
+
Provides-Extra: quality
|
94 |
+
Requires-Dist: ruff (>=0.3.0) ; extra == 'quality'
|
95 |
+
Provides-Extra: s3
|
96 |
+
Requires-Dist: s3fs ; extra == 's3'
|
97 |
+
Provides-Extra: streaming
|
98 |
+
Provides-Extra: tensorflow
|
99 |
+
Requires-Dist: tensorflow (>=2.6.0) ; extra == 'tensorflow'
|
100 |
+
Provides-Extra: tensorflow_gpu
|
101 |
+
Requires-Dist: tensorflow (>=2.6.0) ; extra == 'tensorflow_gpu'
|
102 |
+
Provides-Extra: tests
|
103 |
+
Requires-Dist: absl-py ; extra == 'tests'
|
104 |
+
Requires-Dist: decorator ; extra == 'tests'
|
105 |
+
Requires-Dist: joblib (<1.3.0) ; extra == 'tests'
|
106 |
+
Requires-Dist: joblibspark ; extra == 'tests'
|
107 |
+
Requires-Dist: pytest ; extra == 'tests'
|
108 |
+
Requires-Dist: pytest-datadir ; extra == 'tests'
|
109 |
+
Requires-Dist: pytest-xdist ; extra == 'tests'
|
110 |
+
Requires-Dist: elasticsearch (<8.0.0) ; extra == 'tests'
|
111 |
+
Requires-Dist: faiss-cpu (>=1.8.0.post1) ; extra == 'tests'
|
112 |
+
Requires-Dist: lz4 ; extra == 'tests'
|
113 |
+
Requires-Dist: moto[server] ; extra == 'tests'
|
114 |
+
Requires-Dist: pyspark (>=3.4) ; extra == 'tests'
|
115 |
+
Requires-Dist: py7zr ; extra == 'tests'
|
116 |
+
Requires-Dist: rarfile (>=4.0) ; extra == 'tests'
|
117 |
+
Requires-Dist: sqlalchemy ; extra == 'tests'
|
118 |
+
Requires-Dist: s3fs (>=2021.11.1) ; extra == 'tests'
|
119 |
+
Requires-Dist: protobuf (<4.0.0) ; extra == 'tests'
|
120 |
+
Requires-Dist: tiktoken ; extra == 'tests'
|
121 |
+
Requires-Dist: torch (>=2.0.0) ; extra == 'tests'
|
122 |
+
Requires-Dist: soundfile (>=0.12.1) ; extra == 'tests'
|
123 |
+
Requires-Dist: transformers (>=4.42.0) ; extra == 'tests'
|
124 |
+
Requires-Dist: zstandard ; extra == 'tests'
|
125 |
+
Requires-Dist: polars[timezone] (>=0.20.0) ; extra == 'tests'
|
126 |
+
Requires-Dist: Pillow (>=9.4.0) ; extra == 'tests'
|
127 |
+
Requires-Dist: librosa ; extra == 'tests'
|
128 |
+
Requires-Dist: tensorflow (>=2.6.0) ; (python_version < "3.10") and extra == 'tests'
|
129 |
+
Requires-Dist: tensorflow (>=2.16.0) ; (python_version >= "3.10") and extra == 'tests'
|
130 |
+
Requires-Dist: soxr (>=0.4.0) ; (python_version >= "3.9") and extra == 'tests'
|
131 |
+
Requires-Dist: jax (>=0.3.14) ; (sys_platform != "win32") and extra == 'tests'
|
132 |
+
Requires-Dist: jaxlib (>=0.3.14) ; (sys_platform != "win32") and extra == 'tests'
|
133 |
+
Provides-Extra: tests_numpy2
|
134 |
+
Requires-Dist: absl-py ; extra == 'tests_numpy2'
|
135 |
+
Requires-Dist: decorator ; extra == 'tests_numpy2'
|
136 |
+
Requires-Dist: joblib (<1.3.0) ; extra == 'tests_numpy2'
|
137 |
+
Requires-Dist: joblibspark ; extra == 'tests_numpy2'
|
138 |
+
Requires-Dist: pytest ; extra == 'tests_numpy2'
|
139 |
+
Requires-Dist: pytest-datadir ; extra == 'tests_numpy2'
|
140 |
+
Requires-Dist: pytest-xdist ; extra == 'tests_numpy2'
|
141 |
+
Requires-Dist: elasticsearch (<8.0.0) ; extra == 'tests_numpy2'
|
142 |
+
Requires-Dist: lz4 ; extra == 'tests_numpy2'
|
143 |
+
Requires-Dist: moto[server] ; extra == 'tests_numpy2'
|
144 |
+
Requires-Dist: pyspark (>=3.4) ; extra == 'tests_numpy2'
|
145 |
+
Requires-Dist: py7zr ; extra == 'tests_numpy2'
|
146 |
+
Requires-Dist: rarfile (>=4.0) ; extra == 'tests_numpy2'
|
147 |
+
Requires-Dist: sqlalchemy ; extra == 'tests_numpy2'
|
148 |
+
Requires-Dist: s3fs (>=2021.11.1) ; extra == 'tests_numpy2'
|
149 |
+
Requires-Dist: protobuf (<4.0.0) ; extra == 'tests_numpy2'
|
150 |
+
Requires-Dist: tiktoken ; extra == 'tests_numpy2'
|
151 |
+
Requires-Dist: torch (>=2.0.0) ; extra == 'tests_numpy2'
|
152 |
+
Requires-Dist: soundfile (>=0.12.1) ; extra == 'tests_numpy2'
|
153 |
+
Requires-Dist: transformers (>=4.42.0) ; extra == 'tests_numpy2'
|
154 |
+
Requires-Dist: zstandard ; extra == 'tests_numpy2'
|
155 |
+
Requires-Dist: polars[timezone] (>=0.20.0) ; extra == 'tests_numpy2'
|
156 |
+
Requires-Dist: Pillow (>=9.4.0) ; extra == 'tests_numpy2'
|
157 |
+
Requires-Dist: soxr (>=0.4.0) ; (python_version >= "3.9") and extra == 'tests_numpy2'
|
158 |
+
Requires-Dist: jax (>=0.3.14) ; (sys_platform != "win32") and extra == 'tests_numpy2'
|
159 |
+
Requires-Dist: jaxlib (>=0.3.14) ; (sys_platform != "win32") and extra == 'tests_numpy2'
|
160 |
+
Provides-Extra: torch
|
161 |
+
Requires-Dist: torch ; extra == 'torch'
|
162 |
+
Provides-Extra: vision
|
163 |
+
Requires-Dist: Pillow (>=9.4.0) ; extra == 'vision'
|
164 |
+
|
165 |
+
<p align="center">
|
166 |
+
<picture>
|
167 |
+
<source media="(prefers-color-scheme: dark)" srcset="https://huggingface.co/datasets/huggingface/documentation-images/raw/main/datasets-logo-dark.svg">
|
168 |
+
<source media="(prefers-color-scheme: light)" srcset="https://huggingface.co/datasets/huggingface/documentation-images/raw/main/datasets-logo-light.svg">
|
169 |
+
<img alt="Hugging Face Datasets Library" src="https://huggingface.co/datasets/huggingface/documentation-images/raw/main/datasets-logo-light.svg" width="352" height="59" style="max-width: 100%;">
|
170 |
+
</picture>
|
171 |
+
<br/>
|
172 |
+
<br/>
|
173 |
+
</p>
|
174 |
+
|
175 |
+
<p align="center">
|
176 |
+
<a href="https://github.com/huggingface/datasets/actions/workflows/ci.yml?query=branch%3Amain"><img alt="Build" src="https://github.com/huggingface/datasets/actions/workflows/ci.yml/badge.svg?branch=main"></a>
|
177 |
+
<a href="https://github.com/huggingface/datasets/blob/main/LICENSE"><img alt="GitHub" src="https://img.shields.io/github/license/huggingface/datasets.svg?color=blue"></a>
|
178 |
+
<a href="https://huggingface.co/docs/datasets/index.html"><img alt="Documentation" src="https://img.shields.io/website/http/huggingface.co/docs/datasets/index.html.svg?down_color=red&down_message=offline&up_message=online"></a>
|
179 |
+
<a href="https://github.com/huggingface/datasets/releases"><img alt="GitHub release" src="https://img.shields.io/github/release/huggingface/datasets.svg"></a>
|
180 |
+
<a href="https://huggingface.co/datasets/"><img alt="Number of datasets" src="https://img.shields.io/endpoint?url=https://huggingface.co/api/shields/datasets&color=brightgreen"></a>
|
181 |
+
<a href="CODE_OF_CONDUCT.md"><img alt="Contributor Covenant" src="https://img.shields.io/badge/Contributor%20Covenant-2.0-4baaaa.svg"></a>
|
182 |
+
<a href="https://zenodo.org/badge/latestdoi/250213286"><img src="https://zenodo.org/badge/250213286.svg" alt="DOI"></a>
|
183 |
+
</p>
|
184 |
+
|
185 |
+
🤗 Datasets is a lightweight library providing **two** main features:
|
186 |
+
|
187 |
+
- **one-line dataloaders for many public datasets**: one-liners to download and pre-process any of the  major public datasets (image datasets, audio datasets, text datasets in 467 languages and dialects, etc.) provided on the [HuggingFace Datasets Hub](https://huggingface.co/datasets). With a simple command like `squad_dataset = load_dataset("squad")`, get any of these datasets ready to use in a dataloader for training/evaluating a ML model (Numpy/Pandas/PyTorch/TensorFlow/JAX),
|
188 |
+
- **efficient data pre-processing**: simple, fast and reproducible data pre-processing for the public datasets as well as your own local datasets in CSV, JSON, text, PNG, JPEG, WAV, MP3, Parquet, etc. With simple commands like `processed_dataset = dataset.map(process_example)`, efficiently prepare the dataset for inspection and ML model evaluation and training.
|
189 |
+
|
190 |
+
[🎓 **Documentation**](https://huggingface.co/docs/datasets/) [🔎 **Find a dataset in the Hub**](https://huggingface.co/datasets) [🌟 **Share a dataset on the Hub**](https://huggingface.co/docs/datasets/share)
|
191 |
+
|
192 |
+
<h3 align="center">
|
193 |
+
<a href="https://hf.co/course"><img src="https://raw.githubusercontent.com/huggingface/datasets/main/docs/source/imgs/course_banner.png"></a>
|
194 |
+
</h3>
|
195 |
+
|
196 |
+
🤗 Datasets is designed to let the community easily add and share new datasets.
|
197 |
+
|
198 |
+
🤗 Datasets has many additional interesting features:
|
199 |
+
|
200 |
+
- Thrive on large datasets: 🤗 Datasets naturally frees the user from RAM memory limitation, all datasets are memory-mapped using an efficient zero-serialization cost backend (Apache Arrow).
|
201 |
+
- Smart caching: never wait for your data to process several times.
|
202 |
+
- Lightweight and fast with a transparent and pythonic API (multi-processing/caching/memory-mapping).
|
203 |
+
- Built-in interoperability with NumPy, pandas, PyTorch, TensorFlow 2 and JAX.
|
204 |
+
- Native support for audio and image data.
|
205 |
+
- Enable streaming mode to save disk space and start iterating over the dataset immediately.
|
206 |
+
|
207 |
+
🤗 Datasets originated from a fork of the awesome [TensorFlow Datasets](https://github.com/tensorflow/datasets) and the HuggingFace team want to deeply thank the TensorFlow Datasets team for building this amazing library. More details on the differences between 🤗 Datasets and `tfds` can be found in the section [Main differences between 🤗 Datasets and `tfds`](#main-differences-between--datasets-and-tfds).
|
208 |
+
|
209 |
+
# Installation
|
210 |
+
|
211 |
+
## With pip
|
212 |
+
|
213 |
+
🤗 Datasets can be installed from PyPi and has to be installed in a virtual environment (venv or conda for instance)
|
214 |
+
|
215 |
+
```bash
|
216 |
+
pip install datasets
|
217 |
+
```
|
218 |
+
|
219 |
+
## With conda
|
220 |
+
|
221 |
+
🤗 Datasets can be installed using conda as follows:
|
222 |
+
|
223 |
+
```bash
|
224 |
+
conda install -c huggingface -c conda-forge datasets
|
225 |
+
```
|
226 |
+
|
227 |
+
Follow the installation pages of TensorFlow and PyTorch to see how to install them with conda.
|
228 |
+
|
229 |
+
For more details on installation, check the installation page in the documentation: https://huggingface.co/docs/datasets/installation
|
230 |
+
|
231 |
+
## Installation to use with PyTorch/TensorFlow/pandas
|
232 |
+
|
233 |
+
If you plan to use 🤗 Datasets with PyTorch (1.0+), TensorFlow (2.2+) or pandas, you should also install PyTorch, TensorFlow or pandas.
|
234 |
+
|
235 |
+
For more details on using the library with NumPy, pandas, PyTorch or TensorFlow, check the quick start page in the documentation: https://huggingface.co/docs/datasets/quickstart
|
236 |
+
|
237 |
+
# Usage
|
238 |
+
|
239 |
+
🤗 Datasets is made to be very simple to use - the API is centered around a single function, `datasets.load_dataset(dataset_name, **kwargs)`, that instantiates a dataset.
|
240 |
+
|
241 |
+
This library can be used for text/image/audio/etc. datasets. Here is an example to load a text dataset:
|
242 |
+
|
243 |
+
Here is a quick example:
|
244 |
+
|
245 |
+
```python
|
246 |
+
from datasets import load_dataset
|
247 |
+
|
248 |
+
# Print all the available datasets
|
249 |
+
from huggingface_hub import list_datasets
|
250 |
+
print([dataset.id for dataset in list_datasets()])
|
251 |
+
|
252 |
+
# Load a dataset and print the first example in the training set
|
253 |
+
squad_dataset = load_dataset('squad')
|
254 |
+
print(squad_dataset['train'][0])
|
255 |
+
|
256 |
+
# Process the dataset - add a column with the length of the context texts
|
257 |
+
dataset_with_length = squad_dataset.map(lambda x: {"length": len(x["context"])})
|
258 |
+
|
259 |
+
# Process the dataset - tokenize the context texts (using a tokenizer from the 🤗 Transformers library)
|
260 |
+
from transformers import AutoTokenizer
|
261 |
+
tokenizer = AutoTokenizer.from_pretrained('bert-base-cased')
|
262 |
+
|
263 |
+
tokenized_dataset = squad_dataset.map(lambda x: tokenizer(x['context']), batched=True)
|
264 |
+
```
|
265 |
+
|
266 |
+
If your dataset is bigger than your disk or if you don't want to wait to download the data, you can use streaming:
|
267 |
+
|
268 |
+
```python
|
269 |
+
# If you want to use the dataset immediately and efficiently stream the data as you iterate over the dataset
|
270 |
+
image_dataset = load_dataset('cifar100', streaming=True)
|
271 |
+
for example in image_dataset["train"]:
|
272 |
+
break
|
273 |
+
```
|
274 |
+
|
275 |
+
For more details on using the library, check the quick start page in the documentation: https://huggingface.co/docs/datasets/quickstart and the specific pages on:
|
276 |
+
|
277 |
+
- Loading a dataset: https://huggingface.co/docs/datasets/loading
|
278 |
+
- What's in a Dataset: https://huggingface.co/docs/datasets/access
|
279 |
+
- Processing data with 🤗 Datasets: https://huggingface.co/docs/datasets/process
|
280 |
+
- Processing audio data: https://huggingface.co/docs/datasets/audio_process
|
281 |
+
- Processing image data: https://huggingface.co/docs/datasets/image_process
|
282 |
+
- Processing text data: https://huggingface.co/docs/datasets/nlp_process
|
283 |
+
- Streaming a dataset: https://huggingface.co/docs/datasets/stream
|
284 |
+
- Writing your own dataset loading script: https://huggingface.co/docs/datasets/dataset_script
|
285 |
+
- etc.
|
286 |
+
|
287 |
+
# Add a new dataset to the Hub
|
288 |
+
|
289 |
+
We have a very detailed step-by-step guide to add a new dataset to the  datasets already provided on the [HuggingFace Datasets Hub](https://huggingface.co/datasets).
|
290 |
+
|
291 |
+
You can find:
|
292 |
+
- [how to upload a dataset to the Hub using your web browser or Python](https://huggingface.co/docs/datasets/upload_dataset) and also
|
293 |
+
- [how to upload it using Git](https://huggingface.co/docs/datasets/share).
|
294 |
+
|
295 |
+
# Main differences between 🤗 Datasets and `tfds`
|
296 |
+
|
297 |
+
If you are familiar with the great TensorFlow Datasets, here are the main differences between 🤗 Datasets and `tfds`:
|
298 |
+
|
299 |
+
- the scripts in 🤗 Datasets are not provided within the library but are queried, downloaded/cached and dynamically loaded upon request
|
300 |
+
- the backend serialization of 🤗 Datasets is based on [Apache Arrow](https://arrow.apache.org/) instead of TF Records and leverage python dataclasses for info and features with some diverging features (we mostly don't do encoding and store the raw data as much as possible in the backend serialization cache).
|
301 |
+
- the user-facing dataset object of 🤗 Datasets is not a `tf.data.Dataset` but a built-in framework-agnostic dataset class with methods inspired by what we like in `tf.data` (like a `map()` method). It basically wraps a memory-mapped Arrow table cache.
|
302 |
+
|
303 |
+
# Disclaimers
|
304 |
+
|
305 |
+
🤗 Datasets may run Python code defined by the dataset authors to parse certain data formats or structures. For security reasons, we ask users to:
|
306 |
+
- check the dataset scripts they're going to run beforehand and
|
307 |
+
- pin the `revision` of the repositories they use.
|
308 |
+
|
309 |
+
If you're a dataset owner and wish to update any part of it (description, citation, license, etc.), or do not want your dataset to be included in the Hugging Face Hub, please get in touch by opening a discussion or a pull request in the Community tab of the dataset page. Thanks for your contribution to the ML community!
|
310 |
+
|
311 |
+
## BibTeX
|
312 |
+
|
313 |
+
If you want to cite our 🤗 Datasets library, you can use our [paper](https://arxiv.org/abs/2109.02846):
|
314 |
+
|
315 |
+
```bibtex
|
316 |
+
@inproceedings{lhoest-etal-2021-datasets,
|
317 |
+
title = "Datasets: A Community Library for Natural Language Processing",
|
318 |
+
author = "Lhoest, Quentin and
|
319 |
+
Villanova del Moral, Albert and
|
320 |
+
Jernite, Yacine and
|
321 |
+
Thakur, Abhishek and
|
322 |
+
von Platen, Patrick and
|
323 |
+
Patil, Suraj and
|
324 |
+
Chaumond, Julien and
|
325 |
+
Drame, Mariama and
|
326 |
+
Plu, Julien and
|
327 |
+
Tunstall, Lewis and
|
328 |
+
Davison, Joe and
|
329 |
+
{\v{S}}a{\v{s}}ko, Mario and
|
330 |
+
Chhablani, Gunjan and
|
331 |
+
Malik, Bhavitvya and
|
332 |
+
Brandeis, Simon and
|
333 |
+
Le Scao, Teven and
|
334 |
+
Sanh, Victor and
|
335 |
+
Xu, Canwen and
|
336 |
+
Patry, Nicolas and
|
337 |
+
McMillan-Major, Angelina and
|
338 |
+
Schmid, Philipp and
|
339 |
+
Gugger, Sylvain and
|
340 |
+
Delangue, Cl{\'e}ment and
|
341 |
+
Matussi{\`e}re, Th{\'e}o and
|
342 |
+
Debut, Lysandre and
|
343 |
+
Bekman, Stas and
|
344 |
+
Cistac, Pierric and
|
345 |
+
Goehringer, Thibault and
|
346 |
+
Mustar, Victor and
|
347 |
+
Lagunas, Fran{\c{c}}ois and
|
348 |
+
Rush, Alexander and
|
349 |
+
Wolf, Thomas",
|
350 |
+
booktitle = "Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing: System Demonstrations",
|
351 |
+
month = nov,
|
352 |
+
year = "2021",
|
353 |
+
address = "Online and Punta Cana, Dominican Republic",
|
354 |
+
publisher = "Association for Computational Linguistics",
|
355 |
+
url = "https://aclanthology.org/2021.emnlp-demo.21",
|
356 |
+
pages = "175--184",
|
357 |
+
abstract = "The scale, variety, and quantity of publicly-available NLP datasets has grown rapidly as researchers propose new tasks, larger models, and novel benchmarks. Datasets is a community library for contemporary NLP designed to support this ecosystem. Datasets aims to standardize end-user interfaces, versioning, and documentation, while providing a lightweight front-end that behaves similarly for small datasets as for internet-scale corpora. The design of the library incorporates a distributed, community-driven approach to adding datasets and documenting usage. After a year of development, the library now includes more than 650 unique datasets, has more than 250 contributors, and has helped support a variety of novel cross-dataset research projects and shared tasks. The library is available at https://github.com/huggingface/datasets.",
|
358 |
+
eprint={2109.02846},
|
359 |
+
archivePrefix={arXiv},
|
360 |
+
primaryClass={cs.CL},
|
361 |
+
}
|
362 |
+
```
|
363 |
+
|
364 |
+
If you need to cite a specific version of our 🤗 Datasets library for reproducibility, you can use the corresponding version Zenodo DOI from this [list](https://zenodo.org/search?q=conceptrecid:%224817768%22&sort=-version&all_versions=True).
|
365 |
+
|
366 |
+
|
.cache/pip/http-v2/8/c/3/e/c/8c3ecf585c815a73af16247323d407e99afb8fdc40cee3542187ad49
ADDED
Binary file (1.15 kB). View file
|
|
.cache/pip/http-v2/8/f/4/1/0/8f410bbfc5d1848453018f07fdeb351a0d0ae8a3bcdc5a16f937935c
ADDED
Binary file (1.15 kB). View file
|
|
.cache/pip/http-v2/8/f/4/1/0/8f410bbfc5d1848453018f07fdeb351a0d0ae8a3bcdc5a16f937935c.body
ADDED
Binary file (447 kB). View file
|
|
.cache/pip/http-v2/9/0/6/7/9/906797ab7b3f56fdd856b186be66ce1ad5fb99862a404c1091a707b6.body
ADDED
Binary file (33.4 kB). View file
|
|
.cache/pip/http-v2/9/0/7/3/0/907304ab7018846e9404873a6f78d90e1b9bd503bfd85425c068e4ad.body
ADDED
@@ -0,0 +1,1077 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
Metadata-Version: 2.1
|
2 |
+
Name: scipy
|
3 |
+
Version: 1.14.1
|
4 |
+
Summary: Fundamental algorithms for scientific computing in Python
|
5 |
+
Home-page: https://scipy.org/
|
6 |
+
Maintainer-Email: SciPy Developers <scipy-dev@python.org>
|
7 |
+
License: Copyright (c) 2001-2002 Enthought, Inc. 2003-2024, SciPy Developers.
|
8 |
+
All rights reserved.
|
9 |
+
|
10 |
+
Redistribution and use in source and binary forms, with or without
|
11 |
+
modification, are permitted provided that the following conditions
|
12 |
+
are met:
|
13 |
+
|
14 |
+
1. Redistributions of source code must retain the above copyright
|
15 |
+
notice, this list of conditions and the following disclaimer.
|
16 |
+
|
17 |
+
2. Redistributions in binary form must reproduce the above
|
18 |
+
copyright notice, this list of conditions and the following
|
19 |
+
disclaimer in the documentation and/or other materials provided
|
20 |
+
with the distribution.
|
21 |
+
|
22 |
+
3. Neither the name of the copyright holder nor the names of its
|
23 |
+
contributors may be used to endorse or promote products derived
|
24 |
+
from this software without specific prior written permission.
|
25 |
+
|
26 |
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
27 |
+
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
28 |
+
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
29 |
+
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
30 |
+
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
31 |
+
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
32 |
+
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
33 |
+
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
34 |
+
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
35 |
+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
36 |
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
37 |
+
|
38 |
+
----
|
39 |
+
|
40 |
+
This binary distribution of SciPy also bundles the following software:
|
41 |
+
|
42 |
+
|
43 |
+
Name: OpenBLAS
|
44 |
+
Files: scipy.libs/libopenblas*.so
|
45 |
+
Description: bundled as a dynamically linked library
|
46 |
+
Availability: https://github.com/OpenMathLib/OpenBLAS/
|
47 |
+
License: BSD-3-Clause-Attribution
|
48 |
+
Copyright (c) 2011-2014, The OpenBLAS Project
|
49 |
+
All rights reserved.
|
50 |
+
|
51 |
+
Redistribution and use in source and binary forms, with or without
|
52 |
+
modification, are permitted provided that the following conditions are
|
53 |
+
met:
|
54 |
+
|
55 |
+
1. Redistributions of source code must retain the above copyright
|
56 |
+
notice, this list of conditions and the following disclaimer.
|
57 |
+
|
58 |
+
2. Redistributions in binary form must reproduce the above copyright
|
59 |
+
notice, this list of conditions and the following disclaimer in
|
60 |
+
the documentation and/or other materials provided with the
|
61 |
+
distribution.
|
62 |
+
3. Neither the name of the OpenBLAS project nor the names of
|
63 |
+
its contributors may be used to endorse or promote products
|
64 |
+
derived from this software without specific prior written
|
65 |
+
permission.
|
66 |
+
|
67 |
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
68 |
+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
69 |
+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
70 |
+
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
71 |
+
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
72 |
+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
73 |
+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
74 |
+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
75 |
+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
|
76 |
+
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
77 |
+
|
78 |
+
|
79 |
+
Name: LAPACK
|
80 |
+
Files: scipy.libs/libopenblas*.so
|
81 |
+
Description: bundled in OpenBLAS
|
82 |
+
Availability: https://github.com/OpenMathLib/OpenBLAS/
|
83 |
+
License: BSD-3-Clause-Attribution
|
84 |
+
Copyright (c) 1992-2013 The University of Tennessee and The University
|
85 |
+
of Tennessee Research Foundation. All rights
|
86 |
+
reserved.
|
87 |
+
Copyright (c) 2000-2013 The University of California Berkeley. All
|
88 |
+
rights reserved.
|
89 |
+
Copyright (c) 2006-2013 The University of Colorado Denver. All rights
|
90 |
+
reserved.
|
91 |
+
|
92 |
+
$COPYRIGHT$
|
93 |
+
|
94 |
+
Additional copyrights may follow
|
95 |
+
|
96 |
+
$HEADER$
|
97 |
+
|
98 |
+
Redistribution and use in source and binary forms, with or without
|
99 |
+
modification, are permitted provided that the following conditions are
|
100 |
+
met:
|
101 |
+
|
102 |
+
- Redistributions of source code must retain the above copyright
|
103 |
+
notice, this list of conditions and the following disclaimer.
|
104 |
+
|
105 |
+
- Redistributions in binary form must reproduce the above copyright
|
106 |
+
notice, this list of conditions and the following disclaimer listed
|
107 |
+
in this license in the documentation and/or other materials
|
108 |
+
provided with the distribution.
|
109 |
+
|
110 |
+
- Neither the name of the copyright holders nor the names of its
|
111 |
+
contributors may be used to endorse or promote products derived from
|
112 |
+
this software without specific prior written permission.
|
113 |
+
|
114 |
+
The copyright holders provide no reassurances that the source code
|
115 |
+
provided does not infringe any patent, copyright, or any other
|
116 |
+
intellectual property rights of third parties. The copyright holders
|
117 |
+
disclaim any liability to any recipient for claims brought against
|
118 |
+
recipient by any third party for infringement of that parties
|
119 |
+
intellectual property rights.
|
120 |
+
|
121 |
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
122 |
+
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
123 |
+
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
124 |
+
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
125 |
+
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
126 |
+
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
127 |
+
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
128 |
+
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
129 |
+
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
130 |
+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
131 |
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
132 |
+
|
133 |
+
|
134 |
+
Name: GCC runtime library
|
135 |
+
Files: scipy.libs/libgfortran*.so
|
136 |
+
Description: dynamically linked to files compiled with gcc
|
137 |
+
Availability: https://gcc.gnu.org/git/?p=gcc.git;a=tree;f=libgfortran
|
138 |
+
License: GPL-3.0-with-GCC-exception
|
139 |
+
Copyright (C) 2002-2017 Free Software Foundation, Inc.
|
140 |
+
|
141 |
+
Libgfortran is free software; you can redistribute it and/or modify
|
142 |
+
it under the terms of the GNU General Public License as published by
|
143 |
+
the Free Software Foundation; either version 3, or (at your option)
|
144 |
+
any later version.
|
145 |
+
|
146 |
+
Libgfortran is distributed in the hope that it will be useful,
|
147 |
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
148 |
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
149 |
+
GNU General Public License for more details.
|
150 |
+
|
151 |
+
Under Section 7 of GPL version 3, you are granted additional
|
152 |
+
permissions described in the GCC Runtime Library Exception, version
|
153 |
+
3.1, as published by the Free Software Foundation.
|
154 |
+
|
155 |
+
You should have received a copy of the GNU General Public License and
|
156 |
+
a copy of the GCC Runtime Library Exception along with this program;
|
157 |
+
see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
|
158 |
+
<http://www.gnu.org/licenses/>.
|
159 |
+
|
160 |
+
----
|
161 |
+
|
162 |
+
Full text of license texts referred to above follows (that they are
|
163 |
+
listed below does not necessarily imply the conditions apply to the
|
164 |
+
present binary release):
|
165 |
+
|
166 |
+
----
|
167 |
+
|
168 |
+
GCC RUNTIME LIBRARY EXCEPTION
|
169 |
+
|
170 |
+
Version 3.1, 31 March 2009
|
171 |
+
|
172 |
+
Copyright (C) 2009 Free Software Foundation, Inc. <http://fsf.org/>
|
173 |
+
|
174 |
+
Everyone is permitted to copy and distribute verbatim copies of this
|
175 |
+
license document, but changing it is not allowed.
|
176 |
+
|
177 |
+
This GCC Runtime Library Exception ("Exception") is an additional
|
178 |
+
permission under section 7 of the GNU General Public License, version
|
179 |
+
3 ("GPLv3"). It applies to a given file (the "Runtime Library") that
|
180 |
+
bears a notice placed by the copyright holder of the file stating that
|
181 |
+
the file is governed by GPLv3 along with this Exception.
|
182 |
+
|
183 |
+
When you use GCC to compile a program, GCC may combine portions of
|
184 |
+
certain GCC header files and runtime libraries with the compiled
|
185 |
+
program. The purpose of this Exception is to allow compilation of
|
186 |
+
non-GPL (including proprietary) programs to use, in this way, the
|
187 |
+
header files and runtime libraries covered by this Exception.
|
188 |
+
|
189 |
+
0. Definitions.
|
190 |
+
|
191 |
+
A file is an "Independent Module" if it either requires the Runtime
|
192 |
+
Library for execution after a Compilation Process, or makes use of an
|
193 |
+
interface provided by the Runtime Library, but is not otherwise based
|
194 |
+
on the Runtime Library.
|
195 |
+
|
196 |
+
"GCC" means a version of the GNU Compiler Collection, with or without
|
197 |
+
modifications, governed by version 3 (or a specified later version) of
|
198 |
+
the GNU General Public License (GPL) with the option of using any
|
199 |
+
subsequent versions published by the FSF.
|
200 |
+
|
201 |
+
"GPL-compatible Software" is software whose conditions of propagation,
|
202 |
+
modification and use would permit combination with GCC in accord with
|
203 |
+
the license of GCC.
|
204 |
+
|
205 |
+
"Target Code" refers to output from any compiler for a real or virtual
|
206 |
+
target processor architecture, in executable form or suitable for
|
207 |
+
input to an assembler, loader, linker and/or execution
|
208 |
+
phase. Notwithstanding that, Target Code does not include data in any
|
209 |
+
format that is used as a compiler intermediate representation, or used
|
210 |
+
for producing a compiler intermediate representation.
|
211 |
+
|
212 |
+
The "Compilation Process" transforms code entirely represented in
|
213 |
+
non-intermediate languages designed for human-written code, and/or in
|
214 |
+
Java Virtual Machine byte code, into Target Code. Thus, for example,
|
215 |
+
use of source code generators and preprocessors need not be considered
|
216 |
+
part of the Compilation Process, since the Compilation Process can be
|
217 |
+
understood as starting with the output of the generators or
|
218 |
+
preprocessors.
|
219 |
+
|
220 |
+
A Compilation Process is "Eligible" if it is done using GCC, alone or
|
221 |
+
with other GPL-compatible software, or if it is done without using any
|
222 |
+
work based on GCC. For example, using non-GPL-compatible Software to
|
223 |
+
optimize any GCC intermediate representations would not qualify as an
|
224 |
+
Eligible Compilation Process.
|
225 |
+
|
226 |
+
1. Grant of Additional Permission.
|
227 |
+
|
228 |
+
You have permission to propagate a work of Target Code formed by
|
229 |
+
combining the Runtime Library with Independent Modules, even if such
|
230 |
+
propagation would otherwise violate the terms of GPLv3, provided that
|
231 |
+
all Target Code was generated by Eligible Compilation Processes. You
|
232 |
+
may then convey such a combination under terms of your choice,
|
233 |
+
consistent with the licensing of the Independent Modules.
|
234 |
+
|
235 |
+
2. No Weakening of GCC Copyleft.
|
236 |
+
|
237 |
+
The availability of this Exception does not imply any general
|
238 |
+
presumption that third-party software is unaffected by the copyleft
|
239 |
+
requirements of the license of GCC.
|
240 |
+
|
241 |
+
----
|
242 |
+
|
243 |
+
GNU GENERAL PUBLIC LICENSE
|
244 |
+
Version 3, 29 June 2007
|
245 |
+
|
246 |
+
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
247 |
+
Everyone is permitted to copy and distribute verbatim copies
|
248 |
+
of this license document, but changing it is not allowed.
|
249 |
+
|
250 |
+
Preamble
|
251 |
+
|
252 |
+
The GNU General Public License is a free, copyleft license for
|
253 |
+
software and other kinds of works.
|
254 |
+
|
255 |
+
The licenses for most software and other practical works are designed
|
256 |
+
to take away your freedom to share and change the works. By contrast,
|
257 |
+
the GNU General Public License is intended to guarantee your freedom to
|
258 |
+
share and change all versions of a program--to make sure it remains free
|
259 |
+
software for all its users. We, the Free Software Foundation, use the
|
260 |
+
GNU General Public License for most of our software; it applies also to
|
261 |
+
any other work released this way by its authors. You can apply it to
|
262 |
+
your programs, too.
|
263 |
+
|
264 |
+
When we speak of free software, we are referring to freedom, not
|
265 |
+
price. Our General Public Licenses are designed to make sure that you
|
266 |
+
have the freedom to distribute copies of free software (and charge for
|
267 |
+
them if you wish), that you receive source code or can get it if you
|
268 |
+
want it, that you can change the software or use pieces of it in new
|
269 |
+
free programs, and that you know you can do these things.
|
270 |
+
|
271 |
+
To protect your rights, we need to prevent others from denying you
|
272 |
+
these rights or asking you to surrender the rights. Therefore, you have
|
273 |
+
certain responsibilities if you distribute copies of the software, or if
|
274 |
+
you modify it: responsibilities to respect the freedom of others.
|
275 |
+
|
276 |
+
For example, if you distribute copies of such a program, whether
|
277 |
+
gratis or for a fee, you must pass on to the recipients the same
|
278 |
+
freedoms that you received. You must make sure that they, too, receive
|
279 |
+
or can get the source code. And you must show them these terms so they
|
280 |
+
know their rights.
|
281 |
+
|
282 |
+
Developers that use the GNU GPL protect your rights with two steps:
|
283 |
+
(1) assert copyright on the software, and (2) offer you this License
|
284 |
+
giving you legal permission to copy, distribute and/or modify it.
|
285 |
+
|
286 |
+
For the developers' and authors' protection, the GPL clearly explains
|
287 |
+
that there is no warranty for this free software. For both users' and
|
288 |
+
authors' sake, the GPL requires that modified versions be marked as
|
289 |
+
changed, so that their problems will not be attributed erroneously to
|
290 |
+
authors of previous versions.
|
291 |
+
|
292 |
+
Some devices are designed to deny users access to install or run
|
293 |
+
modified versions of the software inside them, although the manufacturer
|
294 |
+
can do so. This is fundamentally incompatible with the aim of
|
295 |
+
protecting users' freedom to change the software. The systematic
|
296 |
+
pattern of such abuse occurs in the area of products for individuals to
|
297 |
+
use, which is precisely where it is most unacceptable. Therefore, we
|
298 |
+
have designed this version of the GPL to prohibit the practice for those
|
299 |
+
products. If such problems arise substantially in other domains, we
|
300 |
+
stand ready to extend this provision to those domains in future versions
|
301 |
+
of the GPL, as needed to protect the freedom of users.
|
302 |
+
|
303 |
+
Finally, every program is threatened constantly by software patents.
|
304 |
+
States should not allow patents to restrict development and use of
|
305 |
+
software on general-purpose computers, but in those that do, we wish to
|
306 |
+
avoid the special danger that patents applied to a free program could
|
307 |
+
make it effectively proprietary. To prevent this, the GPL assures that
|
308 |
+
patents cannot be used to render the program non-free.
|
309 |
+
|
310 |
+
The precise terms and conditions for copying, distribution and
|
311 |
+
modification follow.
|
312 |
+
|
313 |
+
TERMS AND CONDITIONS
|
314 |
+
|
315 |
+
0. Definitions.
|
316 |
+
|
317 |
+
"This License" refers to version 3 of the GNU General Public License.
|
318 |
+
|
319 |
+
"Copyright" also means copyright-like laws that apply to other kinds of
|
320 |
+
works, such as semiconductor masks.
|
321 |
+
|
322 |
+
"The Program" refers to any copyrightable work licensed under this
|
323 |
+
License. Each licensee is addressed as "you". "Licensees" and
|
324 |
+
"recipients" may be individuals or organizations.
|
325 |
+
|
326 |
+
To "modify" a work means to copy from or adapt all or part of the work
|
327 |
+
in a fashion requiring copyright permission, other than the making of an
|
328 |
+
exact copy. The resulting work is called a "modified version" of the
|
329 |
+
earlier work or a work "based on" the earlier work.
|
330 |
+
|
331 |
+
A "covered work" means either the unmodified Program or a work based
|
332 |
+
on the Program.
|
333 |
+
|
334 |
+
To "propagate" a work means to do anything with it that, without
|
335 |
+
permission, would make you directly or secondarily liable for
|
336 |
+
infringement under applicable copyright law, except executing it on a
|
337 |
+
computer or modifying a private copy. Propagation includes copying,
|
338 |
+
distribution (with or without modification), making available to the
|
339 |
+
public, and in some countries other activities as well.
|
340 |
+
|
341 |
+
To "convey" a work means any kind of propagation that enables other
|
342 |
+
parties to make or receive copies. Mere interaction with a user through
|
343 |
+
a computer network, with no transfer of a copy, is not conveying.
|
344 |
+
|
345 |
+
An interactive user interface displays "Appropriate Legal Notices"
|
346 |
+
to the extent that it includes a convenient and prominently visible
|
347 |
+
feature that (1) displays an appropriate copyright notice, and (2)
|
348 |
+
tells the user that there is no warranty for the work (except to the
|
349 |
+
extent that warranties are provided), that licensees may convey the
|
350 |
+
work under this License, and how to view a copy of this License. If
|
351 |
+
the interface presents a list of user commands or options, such as a
|
352 |
+
menu, a prominent item in the list meets this criterion.
|
353 |
+
|
354 |
+
1. Source Code.
|
355 |
+
|
356 |
+
The "source code" for a work means the preferred form of the work
|
357 |
+
for making modifications to it. "Object code" means any non-source
|
358 |
+
form of a work.
|
359 |
+
|
360 |
+
A "Standard Interface" means an interface that either is an official
|
361 |
+
standard defined by a recognized standards body, or, in the case of
|
362 |
+
interfaces specified for a particular programming language, one that
|
363 |
+
is widely used among developers working in that language.
|
364 |
+
|
365 |
+
The "System Libraries" of an executable work include anything, other
|
366 |
+
than the work as a whole, that (a) is included in the normal form of
|
367 |
+
packaging a Major Component, but which is not part of that Major
|
368 |
+
Component, and (b) serves only to enable use of the work with that
|
369 |
+
Major Component, or to implement a Standard Interface for which an
|
370 |
+
implementation is available to the public in source code form. A
|
371 |
+
"Major Component", in this context, means a major essential component
|
372 |
+
(kernel, window system, and so on) of the specific operating system
|
373 |
+
(if any) on which the executable work runs, or a compiler used to
|
374 |
+
produce the work, or an object code interpreter used to run it.
|
375 |
+
|
376 |
+
The "Corresponding Source" for a work in object code form means all
|
377 |
+
the source code needed to generate, install, and (for an executable
|
378 |
+
work) run the object code and to modify the work, including scripts to
|
379 |
+
control those activities. However, it does not include the work's
|
380 |
+
System Libraries, or general-purpose tools or generally available free
|
381 |
+
programs which are used unmodified in performing those activities but
|
382 |
+
which are not part of the work. For example, Corresponding Source
|
383 |
+
includes interface definition files associated with source files for
|
384 |
+
the work, and the source code for shared libraries and dynamically
|
385 |
+
linked subprograms that the work is specifically designed to require,
|
386 |
+
such as by intimate data communication or control flow between those
|
387 |
+
subprograms and other parts of the work.
|
388 |
+
|
389 |
+
The Corresponding Source need not include anything that users
|
390 |
+
can regenerate automatically from other parts of the Corresponding
|
391 |
+
Source.
|
392 |
+
|
393 |
+
The Corresponding Source for a work in source code form is that
|
394 |
+
same work.
|
395 |
+
|
396 |
+
2. Basic Permissions.
|
397 |
+
|
398 |
+
All rights granted under this License are granted for the term of
|
399 |
+
copyright on the Program, and are irrevocable provided the stated
|
400 |
+
conditions are met. This License explicitly affirms your unlimited
|
401 |
+
permission to run the unmodified Program. The output from running a
|
402 |
+
covered work is covered by this License only if the output, given its
|
403 |
+
content, constitutes a covered work. This License acknowledges your
|
404 |
+
rights of fair use or other equivalent, as provided by copyright law.
|
405 |
+
|
406 |
+
You may make, run and propagate covered works that you do not
|
407 |
+
convey, without conditions so long as your license otherwise remains
|
408 |
+
in force. You may convey covered works to others for the sole purpose
|
409 |
+
of having them make modifications exclusively for you, or provide you
|
410 |
+
with facilities for running those works, provided that you comply with
|
411 |
+
the terms of this License in conveying all material for which you do
|
412 |
+
not control copyright. Those thus making or running the covered works
|
413 |
+
for you must do so exclusively on your behalf, under your direction
|
414 |
+
and control, on terms that prohibit them from making any copies of
|
415 |
+
your copyrighted material outside their relationship with you.
|
416 |
+
|
417 |
+
Conveying under any other circumstances is permitted solely under
|
418 |
+
the conditions stated below. Sublicensing is not allowed; section 10
|
419 |
+
makes it unnecessary.
|
420 |
+
|
421 |
+
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
422 |
+
|
423 |
+
No covered work shall be deemed part of an effective technological
|
424 |
+
measure under any applicable law fulfilling obligations under article
|
425 |
+
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
426 |
+
similar laws prohibiting or restricting circumvention of such
|
427 |
+
measures.
|
428 |
+
|
429 |
+
When you convey a covered work, you waive any legal power to forbid
|
430 |
+
circumvention of technological measures to the extent such circumvention
|
431 |
+
is effected by exercising rights under this License with respect to
|
432 |
+
the covered work, and you disclaim any intention to limit operation or
|
433 |
+
modification of the work as a means of enforcing, against the work's
|
434 |
+
users, your or third parties' legal rights to forbid circumvention of
|
435 |
+
technological measures.
|
436 |
+
|
437 |
+
4. Conveying Verbatim Copies.
|
438 |
+
|
439 |
+
You may convey verbatim copies of the Program's source code as you
|
440 |
+
receive it, in any medium, provided that you conspicuously and
|
441 |
+
appropriately publish on each copy an appropriate copyright notice;
|
442 |
+
keep intact all notices stating that this License and any
|
443 |
+
non-permissive terms added in accord with section 7 apply to the code;
|
444 |
+
keep intact all notices of the absence of any warranty; and give all
|
445 |
+
recipients a copy of this License along with the Program.
|
446 |
+
|
447 |
+
You may charge any price or no price for each copy that you convey,
|
448 |
+
and you may offer support or warranty protection for a fee.
|
449 |
+
|
450 |
+
5. Conveying Modified Source Versions.
|
451 |
+
|
452 |
+
You may convey a work based on the Program, or the modifications to
|
453 |
+
produce it from the Program, in the form of source code under the
|
454 |
+
terms of section 4, provided that you also meet all of these conditions:
|
455 |
+
|
456 |
+
a) The work must carry prominent notices stating that you modified
|
457 |
+
it, and giving a relevant date.
|
458 |
+
|
459 |
+
b) The work must carry prominent notices stating that it is
|
460 |
+
released under this License and any conditions added under section
|
461 |
+
7. This requirement modifies the requirement in section 4 to
|
462 |
+
"keep intact all notices".
|
463 |
+
|
464 |
+
c) You must license the entire work, as a whole, under this
|
465 |
+
License to anyone who comes into possession of a copy. This
|
466 |
+
License will therefore apply, along with any applicable section 7
|
467 |
+
additional terms, to the whole of the work, and all its parts,
|
468 |
+
regardless of how they are packaged. This License gives no
|
469 |
+
permission to license the work in any other way, but it does not
|
470 |
+
invalidate such permission if you have separately received it.
|
471 |
+
|
472 |
+
d) If the work has interactive user interfaces, each must display
|
473 |
+
Appropriate Legal Notices; however, if the Program has interactive
|
474 |
+
interfaces that do not display Appropriate Legal Notices, your
|
475 |
+
work need not make them do so.
|
476 |
+
|
477 |
+
A compilation of a covered work with other separate and independent
|
478 |
+
works, which are not by their nature extensions of the covered work,
|
479 |
+
and which are not combined with it such as to form a larger program,
|
480 |
+
in or on a volume of a storage or distribution medium, is called an
|
481 |
+
"aggregate" if the compilation and its resulting copyright are not
|
482 |
+
used to limit the access or legal rights of the compilation's users
|
483 |
+
beyond what the individual works permit. Inclusion of a covered work
|
484 |
+
in an aggregate does not cause this License to apply to the other
|
485 |
+
parts of the aggregate.
|
486 |
+
|
487 |
+
6. Conveying Non-Source Forms.
|
488 |
+
|
489 |
+
You may convey a covered work in object code form under the terms
|
490 |
+
of sections 4 and 5, provided that you also convey the
|
491 |
+
machine-readable Corresponding Source under the terms of this License,
|
492 |
+
in one of these ways:
|
493 |
+
|
494 |
+
a) Convey the object code in, or embodied in, a physical product
|
495 |
+
(including a physical distribution medium), accompanied by the
|
496 |
+
Corresponding Source fixed on a durable physical medium
|
497 |
+
customarily used for software interchange.
|
498 |
+
|
499 |
+
b) Convey the object code in, or embodied in, a physical product
|
500 |
+
(including a physical distribution medium), accompanied by a
|
501 |
+
written offer, valid for at least three years and valid for as
|
502 |
+
long as you offer spare parts or customer support for that product
|
503 |
+
model, to give anyone who possesses the object code either (1) a
|
504 |
+
copy of the Corresponding Source for all the software in the
|
505 |
+
product that is covered by this License, on a durable physical
|
506 |
+
medium customarily used for software interchange, for a price no
|
507 |
+
more than your reasonable cost of physically performing this
|
508 |
+
conveying of source, or (2) access to copy the
|
509 |
+
Corresponding Source from a network server at no charge.
|
510 |
+
|
511 |
+
c) Convey individual copies of the object code with a copy of the
|
512 |
+
written offer to provide the Corresponding Source. This
|
513 |
+
alternative is allowed only occasionally and noncommercially, and
|
514 |
+
only if you received the object code with such an offer, in accord
|
515 |
+
with subsection 6b.
|
516 |
+
|
517 |
+
d) Convey the object code by offering access from a designated
|
518 |
+
place (gratis or for a charge), and offer equivalent access to the
|
519 |
+
Corresponding Source in the same way through the same place at no
|
520 |
+
further charge. You need not require recipients to copy the
|
521 |
+
Corresponding Source along with the object code. If the place to
|
522 |
+
copy the object code is a network server, the Corresponding Source
|
523 |
+
may be on a different server (operated by you or a third party)
|
524 |
+
that supports equivalent copying facilities, provided you maintain
|
525 |
+
clear directions next to the object code saying where to find the
|
526 |
+
Corresponding Source. Regardless of what server hosts the
|
527 |
+
Corresponding Source, you remain obligated to ensure that it is
|
528 |
+
available for as long as needed to satisfy these requirements.
|
529 |
+
|
530 |
+
e) Convey the object code using peer-to-peer transmission, provided
|
531 |
+
you inform other peers where the object code and Corresponding
|
532 |
+
Source of the work are being offered to the general public at no
|
533 |
+
charge under subsection 6d.
|
534 |
+
|
535 |
+
A separable portion of the object code, whose source code is excluded
|
536 |
+
from the Corresponding Source as a System Library, need not be
|
537 |
+
included in conveying the object code work.
|
538 |
+
|
539 |
+
A "User Product" is either (1) a "consumer product", which means any
|
540 |
+
tangible personal property which is normally used for personal, family,
|
541 |
+
or household purposes, or (2) anything designed or sold for incorporation
|
542 |
+
into a dwelling. In determining whether a product is a consumer product,
|
543 |
+
doubtful cases shall be resolved in favor of coverage. For a particular
|
544 |
+
product received by a particular user, "normally used" refers to a
|
545 |
+
typical or common use of that class of product, regardless of the status
|
546 |
+
of the particular user or of the way in which the particular user
|
547 |
+
actually uses, or expects or is expected to use, the product. A product
|
548 |
+
is a consumer product regardless of whether the product has substantial
|
549 |
+
commercial, industrial or non-consumer uses, unless such uses represent
|
550 |
+
the only significant mode of use of the product.
|
551 |
+
|
552 |
+
"Installation Information" for a User Product means any methods,
|
553 |
+
procedures, authorization keys, or other information required to install
|
554 |
+
and execute modified versions of a covered work in that User Product from
|
555 |
+
a modified version of its Corresponding Source. The information must
|
556 |
+
suffice to ensure that the continued functioning of the modified object
|
557 |
+
code is in no case prevented or interfered with solely because
|
558 |
+
modification has been made.
|
559 |
+
|
560 |
+
If you convey an object code work under this section in, or with, or
|
561 |
+
specifically for use in, a User Product, and the conveying occurs as
|
562 |
+
part of a transaction in which the right of possession and use of the
|
563 |
+
User Product is transferred to the recipient in perpetuity or for a
|
564 |
+
fixed term (regardless of how the transaction is characterized), the
|
565 |
+
Corresponding Source conveyed under this section must be accompanied
|
566 |
+
by the Installation Information. But this requirement does not apply
|
567 |
+
if neither you nor any third party retains the ability to install
|
568 |
+
modified object code on the User Product (for example, the work has
|
569 |
+
been installed in ROM).
|
570 |
+
|
571 |
+
The requirement to provide Installation Information does not include a
|
572 |
+
requirement to continue to provide support service, warranty, or updates
|
573 |
+
for a work that has been modified or installed by the recipient, or for
|
574 |
+
the User Product in which it has been modified or installed. Access to a
|
575 |
+
network may be denied when the modification itself materially and
|
576 |
+
adversely affects the operation of the network or violates the rules and
|
577 |
+
protocols for communication across the network.
|
578 |
+
|
579 |
+
Corresponding Source conveyed, and Installation Information provided,
|
580 |
+
in accord with this section must be in a format that is publicly
|
581 |
+
documented (and with an implementation available to the public in
|
582 |
+
source code form), and must require no special password or key for
|
583 |
+
unpacking, reading or copying.
|
584 |
+
|
585 |
+
7. Additional Terms.
|
586 |
+
|
587 |
+
"Additional permissions" are terms that supplement the terms of this
|
588 |
+
License by making exceptions from one or more of its conditions.
|
589 |
+
Additional permissions that are applicable to the entire Program shall
|
590 |
+
be treated as though they were included in this License, to the extent
|
591 |
+
that they are valid under applicable law. If additional permissions
|
592 |
+
apply only to part of the Program, that part may be used separately
|
593 |
+
under those permissions, but the entire Program remains governed by
|
594 |
+
this License without regard to the additional permissions.
|
595 |
+
|
596 |
+
When you convey a copy of a covered work, you may at your option
|
597 |
+
remove any additional permissions from that copy, or from any part of
|
598 |
+
it. (Additional permissions may be written to require their own
|
599 |
+
removal in certain cases when you modify the work.) You may place
|
600 |
+
additional permissions on material, added by you to a covered work,
|
601 |
+
for which you have or can give appropriate copyright permission.
|
602 |
+
|
603 |
+
Notwithstanding any other provision of this License, for material you
|
604 |
+
add to a covered work, you may (if authorized by the copyright holders of
|
605 |
+
that material) supplement the terms of this License with terms:
|
606 |
+
|
607 |
+
a) Disclaiming warranty or limiting liability differently from the
|
608 |
+
terms of sections 15 and 16 of this License; or
|
609 |
+
|
610 |
+
b) Requiring preservation of specified reasonable legal notices or
|
611 |
+
author attributions in that material or in the Appropriate Legal
|
612 |
+
Notices displayed by works containing it; or
|
613 |
+
|
614 |
+
c) Prohibiting misrepresentation of the origin of that material, or
|
615 |
+
requiring that modified versions of such material be marked in
|
616 |
+
reasonable ways as different from the original version; or
|
617 |
+
|
618 |
+
d) Limiting the use for publicity purposes of names of licensors or
|
619 |
+
authors of the material; or
|
620 |
+
|
621 |
+
e) Declining to grant rights under trademark law for use of some
|
622 |
+
trade names, trademarks, or service marks; or
|
623 |
+
|
624 |
+
f) Requiring indemnification of licensors and authors of that
|
625 |
+
material by anyone who conveys the material (or modified versions of
|
626 |
+
it) with contractual assumptions of liability to the recipient, for
|
627 |
+
any liability that these contractual assumptions directly impose on
|
628 |
+
those licensors and authors.
|
629 |
+
|
630 |
+
All other non-permissive additional terms are considered "further
|
631 |
+
restrictions" within the meaning of section 10. If the Program as you
|
632 |
+
received it, or any part of it, contains a notice stating that it is
|
633 |
+
governed by this License along with a term that is a further
|
634 |
+
restriction, you may remove that term. If a license document contains
|
635 |
+
a further restriction but permits relicensing or conveying under this
|
636 |
+
License, you may add to a covered work material governed by the terms
|
637 |
+
of that license document, provided that the further restriction does
|
638 |
+
not survive such relicensing or conveying.
|
639 |
+
|
640 |
+
If you add terms to a covered work in accord with this section, you
|
641 |
+
must place, in the relevant source files, a statement of the
|
642 |
+
additional terms that apply to those files, or a notice indicating
|
643 |
+
where to find the applicable terms.
|
644 |
+
|
645 |
+
Additional terms, permissive or non-permissive, may be stated in the
|
646 |
+
form of a separately written license, or stated as exceptions;
|
647 |
+
the above requirements apply either way.
|
648 |
+
|
649 |
+
8. Termination.
|
650 |
+
|
651 |
+
You may not propagate or modify a covered work except as expressly
|
652 |
+
provided under this License. Any attempt otherwise to propagate or
|
653 |
+
modify it is void, and will automatically terminate your rights under
|
654 |
+
this License (including any patent licenses granted under the third
|
655 |
+
paragraph of section 11).
|
656 |
+
|
657 |
+
However, if you cease all violation of this License, then your
|
658 |
+
license from a particular copyright holder is reinstated (a)
|
659 |
+
provisionally, unless and until the copyright holder explicitly and
|
660 |
+
finally terminates your license, and (b) permanently, if the copyright
|
661 |
+
holder fails to notify you of the violation by some reasonable means
|
662 |
+
prior to 60 days after the cessation.
|
663 |
+
|
664 |
+
Moreover, your license from a particular copyright holder is
|
665 |
+
reinstated permanently if the copyright holder notifies you of the
|
666 |
+
violation by some reasonable means, this is the first time you have
|
667 |
+
received notice of violation of this License (for any work) from that
|
668 |
+
copyright holder, and you cure the violation prior to 30 days after
|
669 |
+
your receipt of the notice.
|
670 |
+
|
671 |
+
Termination of your rights under this section does not terminate the
|
672 |
+
licenses of parties who have received copies or rights from you under
|
673 |
+
this License. If your rights have been terminated and not permanently
|
674 |
+
reinstated, you do not qualify to receive new licenses for the same
|
675 |
+
material under section 10.
|
676 |
+
|
677 |
+
9. Acceptance Not Required for Having Copies.
|
678 |
+
|
679 |
+
You are not required to accept this License in order to receive or
|
680 |
+
run a copy of the Program. Ancillary propagation of a covered work
|
681 |
+
occurring solely as a consequence of using peer-to-peer transmission
|
682 |
+
to receive a copy likewise does not require acceptance. However,
|
683 |
+
nothing other than this License grants you permission to propagate or
|
684 |
+
modify any covered work. These actions infringe copyright if you do
|
685 |
+
not accept this License. Therefore, by modifying or propagating a
|
686 |
+
covered work, you indicate your acceptance of this License to do so.
|
687 |
+
|
688 |
+
10. Automatic Licensing of Downstream Recipients.
|
689 |
+
|
690 |
+
Each time you convey a covered work, the recipient automatically
|
691 |
+
receives a license from the original licensors, to run, modify and
|
692 |
+
propagate that work, subject to this License. You are not responsible
|
693 |
+
for enforcing compliance by third parties with this License.
|
694 |
+
|
695 |
+
An "entity transaction" is a transaction transferring control of an
|
696 |
+
organization, or substantially all assets of one, or subdividing an
|
697 |
+
organization, or merging organizations. If propagation of a covered
|
698 |
+
work results from an entity transaction, each party to that
|
699 |
+
transaction who receives a copy of the work also receives whatever
|
700 |
+
licenses to the work the party's predecessor in interest had or could
|
701 |
+
give under the previous paragraph, plus a right to possession of the
|
702 |
+
Corresponding Source of the work from the predecessor in interest, if
|
703 |
+
the predecessor has it or can get it with reasonable efforts.
|
704 |
+
|
705 |
+
You may not impose any further restrictions on the exercise of the
|
706 |
+
rights granted or affirmed under this License. For example, you may
|
707 |
+
not impose a license fee, royalty, or other charge for exercise of
|
708 |
+
rights granted under this License, and you may not initiate litigation
|
709 |
+
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
710 |
+
any patent claim is infringed by making, using, selling, offering for
|
711 |
+
sale, or importing the Program or any portion of it.
|
712 |
+
|
713 |
+
11. Patents.
|
714 |
+
|
715 |
+
A "contributor" is a copyright holder who authorizes use under this
|
716 |
+
License of the Program or a work on which the Program is based. The
|
717 |
+
work thus licensed is called the contributor's "contributor version".
|
718 |
+
|
719 |
+
A contributor's "essential patent claims" are all patent claims
|
720 |
+
owned or controlled by the contributor, whether already acquired or
|
721 |
+
hereafter acquired, that would be infringed by some manner, permitted
|
722 |
+
by this License, of making, using, or selling its contributor version,
|
723 |
+
but do not include claims that would be infringed only as a
|
724 |
+
consequence of further modification of the contributor version. For
|
725 |
+
purposes of this definition, "control" includes the right to grant
|
726 |
+
patent sublicenses in a manner consistent with the requirements of
|
727 |
+
this License.
|
728 |
+
|
729 |
+
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
730 |
+
patent license under the contributor's essential patent claims, to
|
731 |
+
make, use, sell, offer for sale, import and otherwise run, modify and
|
732 |
+
propagate the contents of its contributor version.
|
733 |
+
|
734 |
+
In the following three paragraphs, a "patent license" is any express
|
735 |
+
agreement or commitment, however denominated, not to enforce a patent
|
736 |
+
(such as an express permission to practice a patent or covenant not to
|
737 |
+
sue for patent infringement). To "grant" such a patent license to a
|
738 |
+
party means to make such an agreement or commitment not to enforce a
|
739 |
+
patent against the party.
|
740 |
+
|
741 |
+
If you convey a covered work, knowingly relying on a patent license,
|
742 |
+
and the Corresponding Source of the work is not available for anyone
|
743 |
+
to copy, free of charge and under the terms of this License, through a
|
744 |
+
publicly available network server or other readily accessible means,
|
745 |
+
then you must either (1) cause the Corresponding Source to be so
|
746 |
+
available, or (2) arrange to deprive yourself of the benefit of the
|
747 |
+
patent license for this particular work, or (3) arrange, in a manner
|
748 |
+
consistent with the requirements of this License, to extend the patent
|
749 |
+
license to downstream recipients. "Knowingly relying" means you have
|
750 |
+
actual knowledge that, but for the patent license, your conveying the
|
751 |
+
covered work in a country, or your recipient's use of the covered work
|
752 |
+
in a country, would infringe one or more identifiable patents in that
|
753 |
+
country that you have reason to believe are valid.
|
754 |
+
|
755 |
+
If, pursuant to or in connection with a single transaction or
|
756 |
+
arrangement, you convey, or propagate by procuring conveyance of, a
|
757 |
+
covered work, and grant a patent license to some of the parties
|
758 |
+
receiving the covered work authorizing them to use, propagate, modify
|
759 |
+
or convey a specific copy of the covered work, then the patent license
|
760 |
+
you grant is automatically extended to all recipients of the covered
|
761 |
+
work and works based on it.
|
762 |
+
|
763 |
+
A patent license is "discriminatory" if it does not include within
|
764 |
+
the scope of its coverage, prohibits the exercise of, or is
|
765 |
+
conditioned on the non-exercise of one or more of the rights that are
|
766 |
+
specifically granted under this License. You may not convey a covered
|
767 |
+
work if you are a party to an arrangement with a third party that is
|
768 |
+
in the business of distributing software, under which you make payment
|
769 |
+
to the third party based on the extent of your activity of conveying
|
770 |
+
the work, and under which the third party grants, to any of the
|
771 |
+
parties who would receive the covered work from you, a discriminatory
|
772 |
+
patent license (a) in connection with copies of the covered work
|
773 |
+
conveyed by you (or copies made from those copies), or (b) primarily
|
774 |
+
for and in connection with specific products or compilations that
|
775 |
+
contain the covered work, unless you entered into that arrangement,
|
776 |
+
or that patent license was granted, prior to 28 March 2007.
|
777 |
+
|
778 |
+
Nothing in this License shall be construed as excluding or limiting
|
779 |
+
any implied license or other defenses to infringement that may
|
780 |
+
otherwise be available to you under applicable patent law.
|
781 |
+
|
782 |
+
12. No Surrender of Others' Freedom.
|
783 |
+
|
784 |
+
If conditions are imposed on you (whether by court order, agreement or
|
785 |
+
otherwise) that contradict the conditions of this License, they do not
|
786 |
+
excuse you from the conditions of this License. If you cannot convey a
|
787 |
+
covered work so as to satisfy simultaneously your obligations under this
|
788 |
+
License and any other pertinent obligations, then as a consequence you may
|
789 |
+
not convey it at all. For example, if you agree to terms that obligate you
|
790 |
+
to collect a royalty for further conveying from those to whom you convey
|
791 |
+
the Program, the only way you could satisfy both those terms and this
|
792 |
+
License would be to refrain entirely from conveying the Program.
|
793 |
+
|
794 |
+
13. Use with the GNU Affero General Public License.
|
795 |
+
|
796 |
+
Notwithstanding any other provision of this License, you have
|
797 |
+
permission to link or combine any covered work with a work licensed
|
798 |
+
under version 3 of the GNU Affero General Public License into a single
|
799 |
+
combined work, and to convey the resulting work. The terms of this
|
800 |
+
License will continue to apply to the part which is the covered work,
|
801 |
+
but the special requirements of the GNU Affero General Public License,
|
802 |
+
section 13, concerning interaction through a network will apply to the
|
803 |
+
combination as such.
|
804 |
+
|
805 |
+
14. Revised Versions of this License.
|
806 |
+
|
807 |
+
The Free Software Foundation may publish revised and/or new versions of
|
808 |
+
the GNU General Public License from time to time. Such new versions will
|
809 |
+
be similar in spirit to the present version, but may differ in detail to
|
810 |
+
address new problems or concerns.
|
811 |
+
|
812 |
+
Each version is given a distinguishing version number. If the
|
813 |
+
Program specifies that a certain numbered version of the GNU General
|
814 |
+
Public License "or any later version" applies to it, you have the
|
815 |
+
option of following the terms and conditions either of that numbered
|
816 |
+
version or of any later version published by the Free Software
|
817 |
+
Foundation. If the Program does not specify a version number of the
|
818 |
+
GNU General Public License, you may choose any version ever published
|
819 |
+
by the Free Software Foundation.
|
820 |
+
|
821 |
+
If the Program specifies that a proxy can decide which future
|
822 |
+
versions of the GNU General Public License can be used, that proxy's
|
823 |
+
public statement of acceptance of a version permanently authorizes you
|
824 |
+
to choose that version for the Program.
|
825 |
+
|
826 |
+
Later license versions may give you additional or different
|
827 |
+
permissions. However, no additional obligations are imposed on any
|
828 |
+
author or copyright holder as a result of your choosing to follow a
|
829 |
+
later version.
|
830 |
+
|
831 |
+
15. Disclaimer of Warranty.
|
832 |
+
|
833 |
+
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
834 |
+
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
835 |
+
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
836 |
+
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
837 |
+
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
838 |
+
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
839 |
+
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
840 |
+
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
841 |
+
|
842 |
+
16. Limitation of Liability.
|
843 |
+
|
844 |
+
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
845 |
+
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
846 |
+
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
847 |
+
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
848 |
+
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
849 |
+
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
850 |
+
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
851 |
+
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
852 |
+
SUCH DAMAGES.
|
853 |
+
|
854 |
+
17. Interpretation of Sections 15 and 16.
|
855 |
+
|
856 |
+
If the disclaimer of warranty and limitation of liability provided
|
857 |
+
above cannot be given local legal effect according to their terms,
|
858 |
+
reviewing courts shall apply local law that most closely approximates
|
859 |
+
an absolute waiver of all civil liability in connection with the
|
860 |
+
Program, unless a warranty or assumption of liability accompanies a
|
861 |
+
copy of the Program in return for a fee.
|
862 |
+
|
863 |
+
END OF TERMS AND CONDITIONS
|
864 |
+
|
865 |
+
How to Apply These Terms to Your New Programs
|
866 |
+
|
867 |
+
If you develop a new program, and you want it to be of the greatest
|
868 |
+
possible use to the public, the best way to achieve this is to make it
|
869 |
+
free software which everyone can redistribute and change under these terms.
|
870 |
+
|
871 |
+
To do so, attach the following notices to the program. It is safest
|
872 |
+
to attach them to the start of each source file to most effectively
|
873 |
+
state the exclusion of warranty; and each file should have at least
|
874 |
+
the "copyright" line and a pointer to where the full notice is found.
|
875 |
+
|
876 |
+
<one line to give the program's name and a brief idea of what it does.>
|
877 |
+
Copyright (C) <year> <name of author>
|
878 |
+
|
879 |
+
This program is free software: you can redistribute it and/or modify
|
880 |
+
it under the terms of the GNU General Public License as published by
|
881 |
+
the Free Software Foundation, either version 3 of the License, or
|
882 |
+
(at your option) any later version.
|
883 |
+
|
884 |
+
This program is distributed in the hope that it will be useful,
|
885 |
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
886 |
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
887 |
+
GNU General Public License for more details.
|
888 |
+
|
889 |
+
You should have received a copy of the GNU General Public License
|
890 |
+
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
891 |
+
|
892 |
+
Also add information on how to contact you by electronic and paper mail.
|
893 |
+
|
894 |
+
If the program does terminal interaction, make it output a short
|
895 |
+
notice like this when it starts in an interactive mode:
|
896 |
+
|
897 |
+
<program> Copyright (C) <year> <name of author>
|
898 |
+
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
899 |
+
This is free software, and you are welcome to redistribute it
|
900 |
+
under certain conditions; type `show c' for details.
|
901 |
+
|
902 |
+
The hypothetical commands `show w' and `show c' should show the appropriate
|
903 |
+
parts of the General Public License. Of course, your program's commands
|
904 |
+
might be different; for a GUI interface, you would use an "about box".
|
905 |
+
|
906 |
+
You should also get your employer (if you work as a programmer) or school,
|
907 |
+
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
908 |
+
For more information on this, and how to apply and follow the GNU GPL, see
|
909 |
+
<http://www.gnu.org/licenses/>.
|
910 |
+
|
911 |
+
The GNU General Public License does not permit incorporating your program
|
912 |
+
into proprietary programs. If your program is a subroutine library, you
|
913 |
+
may consider it more useful to permit linking proprietary applications with
|
914 |
+
the library. If this is what you want to do, use the GNU Lesser General
|
915 |
+
Public License instead of this License. But first, please read
|
916 |
+
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
|
917 |
+
|
918 |
+
|
919 |
+
Name: libquadmath
|
920 |
+
Files: scipy.libs/libquadmath*.so
|
921 |
+
Description: dynamically linked to files compiled with gcc
|
922 |
+
Availability: https://gcc.gnu.org/git/?p=gcc.git;a=tree;f=libquadmath
|
923 |
+
License: LGPL-2.1-or-later
|
924 |
+
|
925 |
+
GCC Quad-Precision Math Library
|
926 |
+
Copyright (C) 2010-2019 Free Software Foundation, Inc.
|
927 |
+
Written by Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
|
928 |
+
|
929 |
+
This file is part of the libquadmath library.
|
930 |
+
Libquadmath is free software; you can redistribute it and/or
|
931 |
+
modify it under the terms of the GNU Library General Public
|
932 |
+
License as published by the Free Software Foundation; either
|
933 |
+
version 2.1 of the License, or (at your option) any later version.
|
934 |
+
|
935 |
+
Libquadmath is distributed in the hope that it will be useful,
|
936 |
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
937 |
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
938 |
+
Lesser General Public License for more details.
|
939 |
+
https://www.gnu.org/licenses/old-licenses/lgpl-2.1.html
|
940 |
+
Classifier: Development Status :: 5 - Production/Stable
|
941 |
+
Classifier: Intended Audience :: Science/Research
|
942 |
+
Classifier: Intended Audience :: Developers
|
943 |
+
Classifier: License :: OSI Approved :: BSD License
|
944 |
+
Classifier: Programming Language :: C
|
945 |
+
Classifier: Programming Language :: Python
|
946 |
+
Classifier: Programming Language :: Python :: 3
|
947 |
+
Classifier: Programming Language :: Python :: 3.10
|
948 |
+
Classifier: Programming Language :: Python :: 3.11
|
949 |
+
Classifier: Programming Language :: Python :: 3.12
|
950 |
+
Classifier: Topic :: Software Development :: Libraries
|
951 |
+
Classifier: Topic :: Scientific/Engineering
|
952 |
+
Classifier: Operating System :: Microsoft :: Windows
|
953 |
+
Classifier: Operating System :: POSIX :: Linux
|
954 |
+
Classifier: Operating System :: POSIX
|
955 |
+
Classifier: Operating System :: Unix
|
956 |
+
Classifier: Operating System :: MacOS
|
957 |
+
Project-URL: Homepage, https://scipy.org/
|
958 |
+
Project-URL: Documentation, https://docs.scipy.org/doc/scipy/
|
959 |
+
Project-URL: Source, https://github.com/scipy/scipy
|
960 |
+
Project-URL: Download, https://github.com/scipy/scipy/releases
|
961 |
+
Project-URL: Tracker, https://github.com/scipy/scipy/issues
|
962 |
+
Requires-Python: >=3.10
|
963 |
+
Requires-Dist: numpy<2.3,>=1.23.5
|
964 |
+
Requires-Dist: pytest; extra == "test"
|
965 |
+
Requires-Dist: pytest-cov; extra == "test"
|
966 |
+
Requires-Dist: pytest-timeout; extra == "test"
|
967 |
+
Requires-Dist: pytest-xdist; extra == "test"
|
968 |
+
Requires-Dist: asv; extra == "test"
|
969 |
+
Requires-Dist: mpmath; extra == "test"
|
970 |
+
Requires-Dist: gmpy2; extra == "test"
|
971 |
+
Requires-Dist: threadpoolctl; extra == "test"
|
972 |
+
Requires-Dist: scikit-umfpack; extra == "test"
|
973 |
+
Requires-Dist: pooch; extra == "test"
|
974 |
+
Requires-Dist: hypothesis>=6.30; extra == "test"
|
975 |
+
Requires-Dist: array-api-strict>=2.0; extra == "test"
|
976 |
+
Requires-Dist: Cython; extra == "test"
|
977 |
+
Requires-Dist: meson; extra == "test"
|
978 |
+
Requires-Dist: ninja; sys_platform != "emscripten" and extra == "test"
|
979 |
+
Requires-Dist: sphinx<=7.3.7,>=5.0.0; extra == "doc"
|
980 |
+
Requires-Dist: pydata-sphinx-theme>=0.15.2; extra == "doc"
|
981 |
+
Requires-Dist: sphinx-design>=0.4.0; extra == "doc"
|
982 |
+
Requires-Dist: matplotlib>=3.5; extra == "doc"
|
983 |
+
Requires-Dist: numpydoc; extra == "doc"
|
984 |
+
Requires-Dist: jupytext; extra == "doc"
|
985 |
+
Requires-Dist: myst-nb; extra == "doc"
|
986 |
+
Requires-Dist: pooch; extra == "doc"
|
987 |
+
Requires-Dist: jupyterlite-sphinx>=0.13.1; extra == "doc"
|
988 |
+
Requires-Dist: jupyterlite-pyodide-kernel; extra == "doc"
|
989 |
+
Requires-Dist: mypy==1.10.0; extra == "dev"
|
990 |
+
Requires-Dist: typing_extensions; extra == "dev"
|
991 |
+
Requires-Dist: types-psutil; extra == "dev"
|
992 |
+
Requires-Dist: pycodestyle; extra == "dev"
|
993 |
+
Requires-Dist: ruff>=0.0.292; extra == "dev"
|
994 |
+
Requires-Dist: cython-lint>=0.12.2; extra == "dev"
|
995 |
+
Requires-Dist: rich-click; extra == "dev"
|
996 |
+
Requires-Dist: doit>=0.36.0; extra == "dev"
|
997 |
+
Requires-Dist: pydevtool; extra == "dev"
|
998 |
+
Provides-Extra: test
|
999 |
+
Provides-Extra: doc
|
1000 |
+
Provides-Extra: dev
|
1001 |
+
Description-Content-Type: text/x-rst
|
1002 |
+
|
1003 |
+
.. image:: https://raw.githubusercontent.com/scipy/scipy/main/doc/source/_static/logo.svg
|
1004 |
+
:target: https://scipy.org
|
1005 |
+
:width: 110
|
1006 |
+
:height: 110
|
1007 |
+
:align: left
|
1008 |
+
|
1009 |
+
.. image:: https://img.shields.io/badge/powered%20by-NumFOCUS-orange.svg?style=flat&colorA=E1523D&colorB=007D8A
|
1010 |
+
:target: https://numfocus.org
|
1011 |
+
|
1012 |
+
.. image:: https://img.shields.io/pypi/dm/scipy.svg?label=Pypi%20downloads
|
1013 |
+
:target: https://pypi.org/project/scipy/
|
1014 |
+
|
1015 |
+
.. image:: https://img.shields.io/conda/dn/conda-forge/scipy.svg?label=Conda%20downloads
|
1016 |
+
:target: https://anaconda.org/conda-forge/scipy
|
1017 |
+
|
1018 |
+
.. image:: https://img.shields.io/badge/stackoverflow-Ask%20questions-blue.svg
|
1019 |
+
:target: https://stackoverflow.com/questions/tagged/scipy
|
1020 |
+
|
1021 |
+
.. image:: https://img.shields.io/badge/DOI-10.1038%2Fs41592--019--0686--2-blue.svg
|
1022 |
+
:target: https://www.nature.com/articles/s41592-019-0686-2
|
1023 |
+
|
1024 |
+
SciPy (pronounced "Sigh Pie") is an open-source software for mathematics,
|
1025 |
+
science, and engineering. It includes modules for statistics, optimization,
|
1026 |
+
integration, linear algebra, Fourier transforms, signal and image processing,
|
1027 |
+
ODE solvers, and more.
|
1028 |
+
|
1029 |
+
- **Website:** https://scipy.org
|
1030 |
+
- **Documentation:** https://docs.scipy.org/doc/scipy/
|
1031 |
+
- **Development version of the documentation:** https://scipy.github.io/devdocs
|
1032 |
+
- **SciPy development forum:** https://discuss.scientific-python.org/c/contributor/scipy
|
1033 |
+
- **Source code:** https://github.com/scipy/scipy
|
1034 |
+
- **Contributing:** https://scipy.github.io/devdocs/dev/index.html
|
1035 |
+
- **Bug reports:** https://github.com/scipy/scipy/issues
|
1036 |
+
- **Code of Conduct:** https://docs.scipy.org/doc/scipy/dev/conduct/code_of_conduct.html
|
1037 |
+
- **Report a security vulnerability:** https://tidelift.com/docs/security
|
1038 |
+
- **Citing in your work:** https://www.scipy.org/citing-scipy/
|
1039 |
+
|
1040 |
+
SciPy is built to work with
|
1041 |
+
NumPy arrays, and provides many user-friendly and efficient numerical routines,
|
1042 |
+
such as routines for numerical integration and optimization. Together, they
|
1043 |
+
run on all popular operating systems, are quick to install, and are free of
|
1044 |
+
charge. NumPy and SciPy are easy to use, but powerful enough to be depended
|
1045 |
+
upon by some of the world's leading scientists and engineers. If you need to
|
1046 |
+
manipulate numbers on a computer and display or publish the results, give
|
1047 |
+
SciPy a try!
|
1048 |
+
|
1049 |
+
For the installation instructions, see `our install
|
1050 |
+
guide <https://scipy.org/install/>`__.
|
1051 |
+
|
1052 |
+
|
1053 |
+
Call for Contributions
|
1054 |
+
----------------------
|
1055 |
+
|
1056 |
+
We appreciate and welcome contributions. Small improvements or fixes are always appreciated; issues labeled as "good
|
1057 |
+
first issue" may be a good starting point. Have a look at `our contributing
|
1058 |
+
guide <https://scipy.github.io/devdocs/dev/index.html>`__.
|
1059 |
+
|
1060 |
+
Writing code isn’t the only way to contribute to SciPy. You can also:
|
1061 |
+
|
1062 |
+
- review pull requests
|
1063 |
+
- triage issues
|
1064 |
+
- develop tutorials, presentations, and other educational materials
|
1065 |
+
- maintain and improve `our website <https://github.com/scipy/scipy.org>`__
|
1066 |
+
- develop graphic design for our brand assets and promotional materials
|
1067 |
+
- help with outreach and onboard new contributors
|
1068 |
+
- write grant proposals and help with other fundraising efforts
|
1069 |
+
|
1070 |
+
If you’re unsure where to start or how your skills fit in, reach out! You can
|
1071 |
+
ask on the `forum <https://discuss.scientific-python.org/c/contributor/scipy>`__
|
1072 |
+
or here, on GitHub, by leaving a comment on a relevant issue that is already
|
1073 |
+
open.
|
1074 |
+
|
1075 |
+
If you are new to contributing to open source, `this
|
1076 |
+
guide <https://opensource.guide/how-to-contribute/>`__ helps explain why, what,
|
1077 |
+
and how to get involved.
|
.cache/pip/http-v2/9/1/0/a/3/910a34a200b7d0937d776a3a18a9596fb2163b443301e08a7ae6239a.body
ADDED
Binary file (240 kB). View file
|
|
.cache/pip/http-v2/9/d/b/4/b/9db4b6605ca6d6ec2ca5f1968d04b28e2b33e27564d483e330c086bf
ADDED
Binary file (1.13 kB). View file
|
|
.cache/pip/http-v2/9/f/e/d/0/9fed0241b6f6a060996284779065d8ed334b4bc0892996ee7a865868.body
ADDED
@@ -0,0 +1,54 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
Metadata-Version: 2.1
|
2 |
+
Name: jupyter
|
3 |
+
Version: 1.1.1
|
4 |
+
Summary: Jupyter metapackage. Install all the Jupyter components in one go.
|
5 |
+
Home-page: https://jupyter.org
|
6 |
+
Author: Jupyter Development Team
|
7 |
+
Author-email: jupyter@googlegroups.org
|
8 |
+
License: BSD
|
9 |
+
Classifier: Intended Audience :: Developers
|
10 |
+
Classifier: Intended Audience :: System Administrators
|
11 |
+
Classifier: Intended Audience :: Science/Research
|
12 |
+
Classifier: License :: OSI Approved :: BSD License
|
13 |
+
Classifier: Programming Language :: Python
|
14 |
+
Classifier: Programming Language :: Python :: 3
|
15 |
+
Classifier: Programming Language :: Python :: 3.6
|
16 |
+
Classifier: Programming Language :: Python :: 3.7
|
17 |
+
Classifier: Programming Language :: Python :: 3.8
|
18 |
+
Classifier: Programming Language :: Python :: 3.9
|
19 |
+
Description-Content-Type: text/markdown
|
20 |
+
License-File: LICENSE
|
21 |
+
Requires-Dist: notebook
|
22 |
+
Requires-Dist: jupyter-console
|
23 |
+
Requires-Dist: nbconvert
|
24 |
+
Requires-Dist: ipykernel
|
25 |
+
Requires-Dist: ipywidgets
|
26 |
+
Requires-Dist: jupyterlab
|
27 |
+
|
28 |
+
# Jupyter metapackage
|
29 |
+
|
30 |
+
Find more information on [the Jupyter homepage](https://jupyter.org).
|
31 |
+
|
32 |
+
## A default installation of most common Jupyter packages
|
33 |
+
|
34 |
+
`pip install jupyter` installs the Jupyter Notebook, JupyterLab, and the IPython Kernel.
|
35 |
+
|
36 |
+
This is an empty metapackage for user convenience,
|
37 |
+
only expressing dependencies on multiple Jupyter packages.
|
38 |
+
`jupyter` should not be used as a dependency for any packages.
|
39 |
+
|
40 |
+
For more efficient installation of what you need,
|
41 |
+
all Jupyter components installed by `pip install jupyter` can be installed separately.
|
42 |
+
For example:
|
43 |
+
|
44 |
+
- `notebook` - Jupyter Notebook
|
45 |
+
- `jupyterlab` - JupyterLab (added to metapackage v1.1)
|
46 |
+
- `ipython` - IPython (terminal)
|
47 |
+
- `ipykernel` - IPython Kernel for Jupyter
|
48 |
+
- `jupyter-console` - terminal Jupyter client
|
49 |
+
- `nbconvert` - convert notebooks between formats
|
50 |
+
- `ipywidgets` - interactive widgets package for IPython
|
51 |
+
|
52 |
+
No longer included in `pip install jupyter`, but still supported:
|
53 |
+
|
54 |
+
- `qtconsole` - Qt Console (removed in metapackage v1.1)
|
.cache/pip/http-v2/c/5/4/0/3/c5403a101bbaf526810b4c472004bc3b03b96b7c8118e06c7a081e63
ADDED
Binary file (1.82 kB). View file
|
|
.cache/pip/http-v2/c/d/5/d/e/cd5de44b899cbe1869765c21b55cffc53c0c0ffa9d3c6f1fd40a42a2
ADDED
Binary file (1.82 kB). View file
|
|
.cache/pip/http-v2/d/6/d/3/b/d6d3bac35e834bfc5e17ee1004ced880326c05861c21c39fd8bf43b6.body
ADDED
Binary file (133 kB). View file
|
|
.cache/pip/http-v2/d/b/8/2/4/db824c526d765b86c60e3a8f549e4d9f6b2c1e8876b000670174e0bc
ADDED
Binary file (1.81 kB). View file
|
|
.cache/pip/http-v2/d/b/8/2/4/db824c526d765b86c60e3a8f549e4d9f6b2c1e8876b000670174e0bc.body
ADDED
Binary file (2.43 kB). View file
|
|
.cache/pip/http-v2/d/f/6/1/a/df61a06ffc4c1eef85f05660e91777513c5114d2484311bc1038d2a1
ADDED
Binary file (1.15 kB). View file
|
|