[ab4fdfc] | 1 | <?xml version="1.0" encoding="UTF-8"?>
|
---|
[036821b] | 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 |
|
---|
[301c411] | 7 | <!ENTITY urllib3-download-http "https://files.pythonhosted.org/packages/source/u/urllib3/urllib3-&urllib3-version;.tar.gz">
|
---|
[036821b] | 8 | <!ENTITY urllib3-download-ftp " ">
|
---|
[569925c7] | 9 | <!ENTITY urllib3-md5sum "&urllib3-md5sum;">
|
---|
[234bc845] | 10 | <!ENTITY urllib3-size "288 KB">
|
---|
| 11 | <!ENTITY urllib3-buildsize "3.2 MB (add 38 MB for tests)">
|
---|
[bc0b251] | 12 | <!ENTITY urllib3-time "less than 0.1 SBU (1.6 SBU for tests)">
|
---|
[036821b] | 13 | ]>
|
---|
| 14 |
|
---|
| 15 | <sect2 id="urllib3" xreflabel="urllib3-&urllib3-version;">
|
---|
| 16 |
|
---|
[b3e18015] | 17 | <title>Urllib3-&urllib3-version;</title>
|
---|
[036821b] | 18 |
|
---|
| 19 | <indexterm zone="urllib3">
|
---|
| 20 | <primary sortas="a-urllib3">urllib3</primary>
|
---|
| 21 | </indexterm>
|
---|
| 22 |
|
---|
| 23 | <sect3 role="package">
|
---|
[b3e18015] | 24 | <title>Introduction to Urllib3 Module</title>
|
---|
[036821b] | 25 |
|
---|
| 26 | <para>
|
---|
[b3e18015] | 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.
|
---|
[036821b] | 30 | </para>
|
---|
| 31 |
|
---|
[09ddf35a] | 32 | &lfs122_checked;
|
---|
[036821b] | 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 |
|
---|
[74434cc] | 68 | <bridgehead renderas="sect4">Urllib3 Dependencies</bridgehead>
|
---|
| 69 |
|
---|
[35087ed] | 70 | <bridgehead renderas="sect5">Required</bridgehead>
|
---|
| 71 | <para role="required">
|
---|
| 72 | <xref linkend="hatchling"/>
|
---|
| 73 | </para>
|
---|
| 74 |
|
---|
[74434cc] | 75 | <bridgehead renderas="sect5">Optional (for tests)</bridgehead>
|
---|
| 76 | <para role="optional">
|
---|
| 77 | <xref linkend="pytest"/>,
|
---|
[234bc845] | 78 | <ulink url="https://pypi.org/project/httpx/">httpx</ulink>,
|
---|
| 79 | <ulink url="https://pypi.org/project/Hypercorn/">hypercorn</ulink>,
|
---|
[74434cc] | 80 | <ulink url="https://pypi.org/project/mock/">mock</ulink>,
|
---|
| 81 | <ulink url="https://pypi.org/project/PySocks/">PySocks</ulink>,
|
---|
[bc0b251] | 82 | <!-- <ulink url="https://pypi.org/project/pytest-freezegun/">pytest-freezegun</ulink>,-->
|
---|
[74434cc] | 83 | <ulink url="https://pypi.org/project/pytest-timeout/">pytest-timeout</ulink>,
|
---|
| 84 | <ulink url="https://pypi.org/project/python-dateutil/">python-dateutil</ulink>,
|
---|
[234bc845] | 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
|
---|
[74434cc] | 89 | <ulink url="https://pypi.org/project/trustme/">trustme</ulink>
|
---|
| 90 | </para>
|
---|
| 91 |
|
---|
[036821b] | 92 | </sect3>
|
---|
| 93 |
|
---|
| 94 | <sect3 role="installation">
|
---|
[acd69075] | 95 | <title>Installation of Urllib3</title>
|
---|
[036821b] | 96 |
|
---|
[234bc845] | 97 | <!--
|
---|
[bc0b251] | 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>
|
---|
[234bc845] | 104 | -->
|
---|
[bc0b251] | 105 |
|
---|
[036821b] | 106 | <para> Build the module: </para>
|
---|
| 107 |
|
---|
[082e722] | 108 | &build-wheel;
|
---|
[036821b] | 109 |
|
---|
| 110 | <para>
|
---|
[74434cc] | 111 | Now, as the <systemitem class="username">root</systemitem> user:
|
---|
[036821b] | 112 | </para>
|
---|
| 113 |
|
---|
[082e722] | 114 | <screen role="root"><userinput>&install-wheel; urllib3</userinput></screen>
|
---|
[74434cc] | 115 |
|
---|
[234bc845] | 116 | <!--
|
---|
[bc0b251] | 117 | <note>
|
---|
| 118 | <para>
|
---|
| 119 | Running the tests may result in the procedure below hanging and are
|
---|
[e440af5] | 120 | not recommended.
|
---|
[bc0b251] | 121 | </para>
|
---|
| 122 | </note>
|
---|
[234bc845] | 123 | -->
|
---|
[bc0b251] | 124 |
|
---|
[036821b] | 125 | <para>
|
---|
[74434cc] | 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:
|
---|
[036821b] | 129 | </para>
|
---|
| 130 |
|
---|
[74434cc] | 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 \
|
---|
[234bc845] | 138 | pytest-timeout \
|
---|
| 139 | trio \
|
---|
| 140 | hypercom \
|
---|
| 141 | quart \
|
---|
| 142 | quart_trio \
|
---|
| 143 | httpx &&
|
---|
[74434cc] | 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>
|
---|
[036821b] | 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>
|
---|