** Description changed:
+ [Impact]
+
+ * Ubuntu's pip doesn't read /etc/pip.conf, the upstream documented
+ configuration file location, instead it reads the alternate path:
+ /etc/xdg/pip.conf
+ * While the alternate path is documented, too, this will probably confuse
+ users.
+
+ [Test Plan]
+
+ # apt install python3-pip
+ # python3 -c "from pip._internal.configuration import
get_configuration_files; print('/etc/pip.conf' in
get_configuration_files()['global'])"
+
+ False = bug
+ True = expected behaviour
+
+ [Where problems could occur]
+
+ * It's possible that somebody is relying on this behaviour to target one
+ config file at Ubuntu's pip and another at upstream pip, but that does
+ seem far-fetched.
+ * The patch is from upstream, so we're not stepping into uncharted
+ territory.
+
+ [Other Info]
+
+ * Upstream PR: https://github.com/pypa/pip/pull/7786
+
+ [Original Bug Report]
+
The pip3-20.0.2 from python3-pip package, and also installed with
"python3 -m venv" (ensurepip module), ignores /etc/pip.conf.
Based on https://pip.pypa.io/en/stable/user_guide/#config-file the
/etc/pip.conf should work. Also it does work properly if original
pip-20.0.2 is reinstalled to a venv from PyPI.
Steps to reproduce:
1. Add special package index URL to /etc/pip.conf, for example
[global]
index-url = https://download.zope.org/ppix
2. Try to install a package from your special index
Expected result:
* Packages from your index are available.
Current result:
* Only PyPI packaged are available.
----
We are trying to use this functionality to provide a local cache of PyPI
using Artifactory - to speed-up creating virtual environments inside
short-lived Docker and lessen PyPI bandwidth.
We are working around this by copying the file to
~/.config/pip/pip.conf, but we'd like to make it work system-wide.
----
vagrant@ubuntu-focal:~$ lsb_release -rd
Description: Ubuntu 20.04.2 LTS
Release: 20.04
vagrant@ubuntu-focal:~$ apt-cache policy python3-pip
python3-pip:
- Installed: 20.0.2-5ubuntu1.1
- Candidate: 20.0.2-5ubuntu1.1
- Version table:
- *** 20.0.2-5ubuntu1.1 500
- 500 http://archive.ubuntu.com/ubuntu focal-updates/universe amd64
Packages
- 500 http://security.ubuntu.com/ubuntu focal-security/universe amd64
Packages
- 100 /var/lib/dpkg/status
- 20.0.2-5ubuntu1 500
- 500 http://archive.ubuntu.com/ubuntu focal/universe amd64 Packages
+ Installed: 20.0.2-5ubuntu1.1
+ Candidate: 20.0.2-5ubuntu1.1
+ Version table:
+ *** 20.0.2-5ubuntu1.1 500
+ 500 http://archive.ubuntu.com/ubuntu focal-updates/universe amd64
Packages
+ 500 http://security.ubuntu.com/ubuntu focal-security/universe amd64
Packages
+ 100 /var/lib/dpkg/status
+ 20.0.2-5ubuntu1 500
+ 500 http://archive.ubuntu.com/ubuntu focal/universe amd64 Packages
ProblemType: Bug
DistroRelease: Ubuntu 20.04
Package: python3-pip 20.0.2-5ubuntu1.1
ProcVersionSignature: Ubuntu 5.4.0-65.73-generic 5.4.78
Uname: Linux 5.4.0-65-generic x86_64
ApportVersion: 2.20.11-0ubuntu27.14
Architecture: amd64
CasperMD5CheckResult: skip
Date: Tue Feb 2 12:32:07 2021
PackageArchitecture: all
SourcePackage: python-pip
UpgradeStatus: No upgrade log present (probably fresh install)
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1914239
Title:
ubuntu-20.04 pip3 ignores /etc/pip.conf
To manage notifications about this bug go to:
https://bugs.launchpad.net/pip/+bug/1914239/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs