[issue21034] Python docs reference the Distribute package which has been deprecated in favor of Setuptools
New submission from Jurko Gospodnetić: In the Python documentation note: http://docs.python.org/3.4/library/venv.html#venv-def the paragraph:
Common installation tools such as Distribute and pip work as expected with venvs - i.e. when a venv is active, they install Python packages into the venv without needing to be told to do so explicitly. Of course, you need to install them into the venv first: this could be done by running distribute_setup.py with the venv activated, followed by running easy_install pip. Alternatively, you could download the source tarballs and run python setup.py install after unpacking, with the venv activated.
refers to the Distribute package and its specifics (how it should be installed) but that package has been deprecated in favor of the setuptools package. I suggest to change it to something like:
Common installation tools such as setuptools and pip work as expected with venvs - i.e. when a venv is active, they install Python packages into the venv without needing to be told to do so explicitly. Of course, you need to install them into the venv first: this could be done by running setuptools project's ez_setup.py with the venv activated, followed by running easy_install pip. Alternatively, you could download the source tarballs and run python setup.py install after unpacking, with the venv activated.
I'm attaching a patch based on the current tip in CPython's development repository. Hope this helps. Best regards, Jurko Gospodnetić ---------- assignee: docs@python components: Documentation files: fix_Distribute_reference_in_venv_docs.patch keywords: patch messages: 214554 nosy: Jurko.Gospodnetić, docs@python priority: normal severity: normal status: open title: Python docs reference the Distribute package which has been deprecated in favor of Setuptools versions: Python 3.4, Python 3.5 Added file: http://bugs.python.org/file34582/fix_Distribute_reference_in_venv_docs.patch _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue21034> _______________________________________
Changes by Tshepang Lekhonkhobe <tshepang@gmail.com>: ---------- nosy: +tshepang _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue21034> _______________________________________
Benjamin Peterson added the comment: Good point. Perhaps we should reccomend https://raw.github.com/pypa/pip/master/contrib/get-pip.py instead, though? ---------- nosy: +benjamin.peterson _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue21034> _______________________________________
Jurko Gospodnetić added the comment: Or, if you do not want to get into the specifics of how to manually install setuptools/pip, it would probably be better to just refer the user to the 'ensurepip' module for the initial installation and tell him to upgrade whatever is needed from there without going in to any further details here. 'ensurepip' module itself is documented elsewhere (https://docs.python.org/3.4/library/ensurepip.html), and that documentation should perhaps be updated to include enough information (or references to external documentation containing that information) for the user to be able to perform the upgrades. Best regards, Jurko Gospodnetić ---------- _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue21034> _______________________________________
Changes by Ned Deily <nad@acm.org>: ---------- nosy: +ncoghlan _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue21034> _______________________________________
Changes by Ezio Melotti <ezio.melotti@gmail.com>: ---------- nosy: +eric.araujo stage: -> patch review type: -> enhancement _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue21034> _______________________________________
Berker Peksag added the comment: I think it would be better to just remove the following part from the documentation: "Of course, you need to install them into the venv first: this could be done by running ez_setup.py with the venv activated, followed by running easy_install pip. Alternatively, you could download the source tarballs and run python setup.py install after unpacking, with the venv activated." Here is a patch. ---------- nosy: +berker.peksag, vinay.sajip versions: +Python 3.6 -Python 3.4 Added file: http://bugs.python.org/file42078/issue21034.diff _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue21034> _______________________________________
Nick Coghlan added the comment: +1 from me for just removing the bootstrapping instructions from this note. (The original reference to Distribute has already been replaced with a reference to Setuptools at some point since Jurko filed this issue) ---------- _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue21034> _______________________________________
Roundup Robot added the comment: New changeset 50f593ed1469 by Berker Peksag in branch '3.5': Issue #21034: Remove outdated paragraph from venv documentation https://hg.python.org/cpython/rev/50f593ed1469 New changeset ac95719f1803 by Berker Peksag in branch 'default': Issue #21034: Remove outdated paragraph from venv documentation https://hg.python.org/cpython/rev/ac95719f1803 ---------- nosy: +python-dev _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue21034> _______________________________________
Berker Peksag added the comment: Thanks for the report, Jurko.
+1 from me for just removing the bootstrapping instructions from this note.
Thanks, Nick. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue21034> _______________________________________
participants (8)
-
Benjamin Peterson
-
Berker Peksag
-
Ezio Melotti
-
Jurko Gospodnetić
-
Ned Deily
-
Nick Coghlan
-
Roundup Robot
-
Tshepang Lekhonkhobe