1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
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 "272 KB">
|
---|
11 | <!ENTITY urllib3-buildsize "3.2 MB (add 49 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 | &lfs120_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/mock/">mock</ulink>,
|
---|
79 | <ulink url="https://pypi.org/project/PySocks/">PySocks</ulink>,
|
---|
80 | <!-- <ulink url="https://pypi.org/project/pytest-freezegun/">pytest-freezegun</ulink>,-->
|
---|
81 | <ulink url="https://pypi.org/project/pytest-timeout/">pytest-timeout</ulink>,
|
---|
82 | <ulink url="https://pypi.org/project/python-dateutil/">python-dateutil</ulink>,
|
---|
83 | <ulink url="https://pypi.org/project/tornado/">tornado</ulink>, and
|
---|
84 | <ulink url="https://pypi.org/project/trustme/">trustme</ulink>
|
---|
85 | </para>
|
---|
86 |
|
---|
87 | </sect3>
|
---|
88 |
|
---|
89 | <sect3 role="installation">
|
---|
90 | <title>Installation of Urllib3</title>
|
---|
91 |
|
---|
92 | <para> If you want to run the tests, remove some that may hang: </para>
|
---|
93 |
|
---|
94 | <screen><userinput>rm -v test/test_retry.py \
|
---|
95 | test/contrib/test_pyopenssl.py \
|
---|
96 | test/contrib/test_securetransport.py \
|
---|
97 | test/with_dummyserver/test_socketlevel.py</userinput></screen>
|
---|
98 |
|
---|
99 | <para> Build the module: </para>
|
---|
100 |
|
---|
101 | &build-wheel;
|
---|
102 |
|
---|
103 | <para>
|
---|
104 | Now, as the <systemitem class="username">root</systemitem> user:
|
---|
105 | </para>
|
---|
106 |
|
---|
107 | <screen role="root"><userinput>&install-wheel; urllib3</userinput></screen>
|
---|
108 |
|
---|
109 | <note>
|
---|
110 | <para>
|
---|
111 | Running the tests may result in the procedure below hanging and are
|
---|
112 | not recommended.
|
---|
113 | </para>
|
---|
114 | </note>
|
---|
115 |
|
---|
116 | <para>
|
---|
117 | Assuming <xref linkend="pytest"/> is installed, but the other optional
|
---|
118 | dependencies are not, the installation can be tested with the following
|
---|
119 | commands:
|
---|
120 | </para>
|
---|
121 |
|
---|
122 | <screen remap="test"><userinput>python3 -m venv --system-site-packages testenv &&
|
---|
123 | source testenv/bin/activate &&
|
---|
124 | pip3 install trustme \
|
---|
125 | tornado \
|
---|
126 | python-dateutil \
|
---|
127 | mock \
|
---|
128 | pysocks \
|
---|
129 | pytest-timeout &&
|
---|
130 | python3 /usr/bin/pytest<!-- no && because of a possible error -->
|
---|
131 | deactivate</userinput></screen>
|
---|
132 |
|
---|
133 | <para>
|
---|
134 | A few errors are known to occur.
|
---|
135 | </para>
|
---|
136 |
|
---|
137 | </sect3>
|
---|
138 |
|
---|
139 | <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
|
---|
140 | href="../../../xincludes/pip3-cmd-explain.xml"/>
|
---|
141 |
|
---|
142 | <sect3 role="content">
|
---|
143 | <title>Contents</title>
|
---|
144 |
|
---|
145 | <segmentedlist>
|
---|
146 | <segtitle>Installed Programs</segtitle>
|
---|
147 | <segtitle>Installed Libraries</segtitle>
|
---|
148 | <segtitle>Installed Directories</segtitle>
|
---|
149 |
|
---|
150 | <seglistitem>
|
---|
151 | <seg>None</seg>
|
---|
152 | <seg>None</seg>
|
---|
153 | <seg>
|
---|
154 | /usr/lib/python&python3-majorver;/site-packages/urllib3 and
|
---|
155 | /usr/lib/python&python3-majorver;/site-packages/urllib3-&urllib3-version;.dist-info
|
---|
156 | </seg>
|
---|
157 | </seglistitem>
|
---|
158 | </segmentedlist>
|
---|
159 |
|
---|
160 | </sect3>
|
---|
161 |
|
---|
162 | </sect2>
|
---|