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