1 | <?xml version="1.0" encoding="UTF-8"?>
|
---|
2 | <!DOCTYPE sect2 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
---|
3 | "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
---|
4 | <!ENTITY % general-entities SYSTEM "../../../general.ent">
|
---|
5 | %general-entities;
|
---|
6 |
|
---|
7 | <!ENTITY urllib3-download-http "https://files.pythonhosted.org/packages/source/u/urllib3/urllib3-&urllib3-version;.tar.gz">
|
---|
8 | <!ENTITY urllib3-download-ftp " ">
|
---|
9 | <!ENTITY urllib3-md5sum "&urllib3-md5sum;">
|
---|
10 | <!ENTITY urllib3-size "288 KB">
|
---|
11 | <!ENTITY urllib3-buildsize "3.2 MB (add 38 MB for tests)">
|
---|
12 | <!ENTITY urllib3-time "less than 0.1 SBU (1.6 SBU for tests)">
|
---|
13 | ]>
|
---|
14 |
|
---|
15 | <sect2 id="urllib3" xreflabel="urllib3-&urllib3-version;">
|
---|
16 |
|
---|
17 | <title>Urllib3-&urllib3-version;</title>
|
---|
18 |
|
---|
19 | <indexterm zone="urllib3">
|
---|
20 | <primary sortas="a-urllib3">urllib3</primary>
|
---|
21 | </indexterm>
|
---|
22 |
|
---|
23 | <sect3 role="package">
|
---|
24 | <title>Introduction to Urllib3 Module</title>
|
---|
25 |
|
---|
26 | <para>
|
---|
27 | The <application>Urllib3</application> module is a powerful,
|
---|
28 | user-friendly HTTP client for Python. It brings many critical
|
---|
29 | features that are missing from the Python standard libraries.
|
---|
30 | </para>
|
---|
31 |
|
---|
32 | &lfs122_checked;
|
---|
33 |
|
---|
34 | <bridgehead renderas="sect4">Package Information</bridgehead>
|
---|
35 | <itemizedlist spacing="compact">
|
---|
36 | <listitem>
|
---|
37 | <para>
|
---|
38 | Download (HTTP): <ulink url="&urllib3-download-http;"/>
|
---|
39 | </para>
|
---|
40 | </listitem>
|
---|
41 | <listitem>
|
---|
42 | <para>
|
---|
43 | Download (FTP): <ulink url="&urllib3-download-ftp;"/>
|
---|
44 | </para>
|
---|
45 | </listitem>
|
---|
46 | <listitem>
|
---|
47 | <para>
|
---|
48 | Download MD5 sum: &urllib3-md5sum;
|
---|
49 | </para>
|
---|
50 | </listitem>
|
---|
51 | <listitem>
|
---|
52 | <para>
|
---|
53 | Download size: &urllib3-size;
|
---|
54 | </para>
|
---|
55 | </listitem>
|
---|
56 | <listitem>
|
---|
57 | <para>
|
---|
58 | Estimated disk space required: &urllib3-buildsize;
|
---|
59 | </para>
|
---|
60 | </listitem>
|
---|
61 | <listitem>
|
---|
62 | <para>
|
---|
63 | Estimated build time: &urllib3-time;
|
---|
64 | </para>
|
---|
65 | </listitem>
|
---|
66 | </itemizedlist>
|
---|
67 |
|
---|
68 | <bridgehead renderas="sect4">Urllib3 Dependencies</bridgehead>
|
---|
69 |
|
---|
70 | <bridgehead renderas="sect5">Required</bridgehead>
|
---|
71 | <para role="required">
|
---|
72 | <xref linkend="hatchling"/>
|
---|
73 | </para>
|
---|
74 |
|
---|
75 | <bridgehead renderas="sect5">Optional (for tests)</bridgehead>
|
---|
76 | <para role="optional">
|
---|
77 | <xref linkend="pytest"/>,
|
---|
78 | <ulink url="https://pypi.org/project/httpx/">httpx</ulink>,
|
---|
79 | <ulink url="https://pypi.org/project/Hypercorn/">hypercorn</ulink>,
|
---|
80 | <ulink url="https://pypi.org/project/mock/">mock</ulink>,
|
---|
81 | <ulink url="https://pypi.org/project/PySocks/">PySocks</ulink>,
|
---|
82 | <!-- <ulink url="https://pypi.org/project/pytest-freezegun/">pytest-freezegun</ulink>,-->
|
---|
83 | <ulink url="https://pypi.org/project/pytest-timeout/">pytest-timeout</ulink>,
|
---|
84 | <ulink url="https://pypi.org/project/python-dateutil/">python-dateutil</ulink>,
|
---|
85 | <ulink url="https://pypi.org/project/Quart/">quart</ulink>,
|
---|
86 | <ulink url="https://pypi.org/project/quart-trio/">quart-trio</ulink>,
|
---|
87 | <ulink url="https://pypi.org/project/tornado/">tornado</ulink>,
|
---|
88 | <ulink url="https://pypi.org/project/trio/">trio</ulink>, and
|
---|
89 | <ulink url="https://pypi.org/project/trustme/">trustme</ulink>
|
---|
90 | </para>
|
---|
91 |
|
---|
92 | </sect3>
|
---|
93 |
|
---|
94 | <sect3 role="installation">
|
---|
95 | <title>Installation of Urllib3</title>
|
---|
96 |
|
---|
97 | <!--
|
---|
98 | <para> If you want to run the tests, remove some that may hang: </para>
|
---|
99 |
|
---|
100 | <screen><userinput>rm -v test/test_retry.py \
|
---|
101 | test/contrib/test_pyopenssl.py \
|
---|
102 | test/contrib/test_securetransport.py \
|
---|
103 | test/with_dummyserver/test_socketlevel.py</userinput></screen>
|
---|
104 | -->
|
---|
105 |
|
---|
106 | <para> Build the module: </para>
|
---|
107 |
|
---|
108 | &build-wheel;
|
---|
109 |
|
---|
110 | <para>
|
---|
111 | Now, as the <systemitem class="username">root</systemitem> user:
|
---|
112 | </para>
|
---|
113 |
|
---|
114 | <screen role="root"><userinput>&install-wheel; urllib3</userinput></screen>
|
---|
115 |
|
---|
116 | <!--
|
---|
117 | <note>
|
---|
118 | <para>
|
---|
119 | Running the tests may result in the procedure below hanging and are
|
---|
120 | not recommended.
|
---|
121 | </para>
|
---|
122 | </note>
|
---|
123 | -->
|
---|
124 |
|
---|
125 | <para>
|
---|
126 | Assuming <xref linkend="pytest"/> is installed, but the other optional
|
---|
127 | dependencies are not, the installation can be tested with the following
|
---|
128 | commands:
|
---|
129 | </para>
|
---|
130 |
|
---|
131 | <screen remap="test"><userinput>python3 -m venv --system-site-packages testenv &&
|
---|
132 | source testenv/bin/activate &&
|
---|
133 | pip3 install trustme \
|
---|
134 | tornado \
|
---|
135 | python-dateutil \
|
---|
136 | mock \
|
---|
137 | pysocks \
|
---|
138 | pytest-timeout \
|
---|
139 | trio \
|
---|
140 | hypercom \
|
---|
141 | quart \
|
---|
142 | quart_trio \
|
---|
143 | httpx &&
|
---|
144 | python3 /usr/bin/pytest<!-- no && because of a possible error -->
|
---|
145 | deactivate</userinput></screen>
|
---|
146 |
|
---|
147 | <para>
|
---|
148 | A few errors are known to occur.
|
---|
149 | </para>
|
---|
150 |
|
---|
151 | </sect3>
|
---|
152 |
|
---|
153 | <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
|
---|
154 | href="../../../xincludes/pip3-cmd-explain.xml"/>
|
---|
155 |
|
---|
156 | <sect3 role="content">
|
---|
157 | <title>Contents</title>
|
---|
158 |
|
---|
159 | <segmentedlist>
|
---|
160 | <segtitle>Installed Programs</segtitle>
|
---|
161 | <segtitle>Installed Libraries</segtitle>
|
---|
162 | <segtitle>Installed Directories</segtitle>
|
---|
163 |
|
---|
164 | <seglistitem>
|
---|
165 | <seg>None</seg>
|
---|
166 | <seg>None</seg>
|
---|
167 | <seg>
|
---|
168 | /usr/lib/python&python3-majorver;/site-packages/urllib3 and
|
---|
169 | /usr/lib/python&python3-majorver;/site-packages/urllib3-&urllib3-version;.dist-info
|
---|
170 | </seg>
|
---|
171 | </seglistitem>
|
---|
172 | </segmentedlist>
|
---|
173 |
|
---|
174 | </sect3>
|
---|
175 |
|
---|
176 | </sect2>
|
---|