8c0d90828d
- update for multipython build - synchronize with python 3 version - debundle urllib3 and chardet - enable test suite - update urllib3 requirement to 1.19.1 - add idna requirement, refresh unbundling patch OBS-URL: https://build.opensuse.org/request/show/486162 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-requests?expand=0&rev=96
30 lines
1.5 KiB
Plaintext
30 lines
1.5 KiB
Plaintext
Requests is a tricky package.
|
|
|
|
The unbundling of urllib3 is unsupported by upstream; AFAICT, mostly because
|
|
people are being unreasonable and *third-party packages* expect the bundled
|
|
urllib3 to exist. And requests upstream wants to support that usecase.
|
|
|
|
Therefore, extra care must be taken with the unbundling.
|
|
|
|
First, upstream also recognizes that we distributors will unbundle, and
|
|
actually include a helpful shim in requests/packages/__init__.py. This is to
|
|
make sure that importing `requests.packages.urllib3` works even if it is
|
|
unbundled, and also that you will get the identical import (unlike if we
|
|
installed symlinks, in which case Python would consider `r.p.urrlib3` and
|
|
`urllib3` to be different packages. See the file __init__.py for more
|
|
information.
|
|
|
|
We want to keep the shim, so we must install requests/packages/__init__.py
|
|
even though we don't install the subdirectories.
|
|
|
|
Second, it is our job to set requirements in the egg-info properly, so that
|
|
users of virtualenvs get the right thing in certain unusual configurations.
|
|
|
|
Third, requests are at times sensitive to version of urllib3. Historically,
|
|
requests even bundled pre-release versions. This will probably not happen
|
|
again, but it does mean that we must express requirements for a certain
|
|
version of urllib3. I have taken some pains to make the build fail if the
|
|
right version of urllib3 is not present. Make sure that urllib3 is updated
|
|
first, and run `set_urllib3_version.sh` to update the definition in the spec
|
|
file.
|