8000 [3.0.x] Fixed #31643 -- Changed virtualenv doc references to Python 3… · django/django@caf7c46 · GitHub
[go: up one dir, main page]

Skip to content

Commit caf7c46

Browse files
jdufresnecarltongibson
authored andcommitted
[3.0.x] Fixed #31643 -- Changed virtualenv doc references to Python 3 venv.
Backport of 9f4ceee from master
1 parent 9297a3e commit caf7c46

File tree

8 files changed

+33
-39
lines changed

8 files changed

+33
-39
lines changed

docs/howto/deployment/wsgi/modwsgi.txt

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,9 @@ your project package (``mysite`` in this example). This tells Apache to serve
4848
any request below the given URL using the WSGI application defined in that
4949
file.
5050

51-
If you install your project's Python dependencies inside a `virtualenv`_, add
52-
the path to the virtualenv using ``WSGIPythonHome``. See the `mod_wsgi
53-
virtualenv guide`_ for more details.
51+
If you install your project's Python dependencies inside a :mod:`virtual
52+
environment <venv>`, add the path using ``WSGIPythonHome``. See the `mod_wsgi
53+
virtual environment guide`_ for more details.
5454

5555
The ``WSGIPythonPath`` line ensures that your project package is available for
5656
import on the Python path; in other words, that ``import mysite`` works.
@@ -64,8 +64,7 @@ for you; otherwise, you'll need to create it. See the :doc:`WSGI overview
6464
documentation</howto/deployment/wsgi/index>` for the default contents you
6565
should put in this file, and what else you can add to it.
6666

67-
.. _virtualenv: https://virtualenv.pypa.io/
68-
.. _mod_wsgi virtualenv guide: https://modwsgi.readthedocs.io/en/develop/user-guides/virtual-environments.html
67+
.. _mod_wsgi virtual environment guide: https://modwsgi.readthedocs.io/en/develop/user-guides/virtual-environments.html
6968

7069
.. warning::
7170

docs/howto/deployment/wsgi/uwsgi.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ Here's an example command to start a uWSGI server::
6060
--harakiri=20 \ # respawn processes taking more than 20 seconds
6161
--max-requests=5000 \ # respawn processes after serving 5000 requests
6262
--vacuum \ # clear environment on exit
63-
--home=/path/to/virtual/env \ # optional path to a virtualenv
63+
--home=/path/to/virtual/env \ # optional path to a virtual environment
6464
--daemonize=/var/log/uwsgi/yourproject.log # background the process
6565

6666
This assumes you have a top-level project package named ``mysite``, and
@@ -78,7 +78,7 @@ The Django-specific options here are:
7878
* ``module``: The WSGI module to use -- probably the ``mysite.wsgi`` module
7979
that :djadmin:`startproject` creates.
8080
* ``env``: Should probably contain at least ``DJANGO_SETTINGS_MODULE``.
81-
* ``home``: Optional path to your project virtualenv.
81+
* ``home``: Optional path to your project virtual environment.
8282

8383
Example ini configuration file::
8484

docs/howto/upgrade-version.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,9 @@ Installation
8787
============
8888

8989
Once you're ready, it is time to :doc:`install the new Django version
90-
</topics/install>`. If you are using virtualenv_ and it is a major upgrade, you
91-
might want to set up a new environment with all the dependencies first.
90+
</topics/install>`. If you are using a :mod:`virtual environment <venv>` and it
91+
is a major upgrade, you might want to set up a new environment with all the
92+
dependencies first.
9293

9394
If you installed Django with pip_, you can use the ``--upgrade`` or ``-U`` flag:
9495

@@ -97,7 +98,6 @@ If you installed Django with pip_, you can use the ``--upgrade`` or ``-U`` flag:
9798
$ python -m pip install -U Django
9899

99100
.. _pip: https://pip.pypa.io/
100-
.. _virtualenv: https://virtualenv.pypa.io/
101101

102102
Testing
103103
=======

docs/internals/howto-release-django.txt

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -305,26 +305,27 @@ Now you're ready to actually put the release out there. To do this:
305305
$ scp Django-A.B.C.checksum.txt.asc djangoproject.com:/home/www/www/media/pgp/Django-A.B.C.checksum.txt
306306

307307
#. Test that the release packages install correctly using ``easy_install``
308-
and ``pip``. Here's one method (which requires `virtualenvwrapper`__)::
308+
and ``pip``. Here's one method::
309309

310310
$ RELEASE_VERSION='1.7.2'
311311
$ MAJOR_VERSION=`echo $RELEASE_VERSION| cut -c 1-3`
312312

313-
$ mktmpenv
313+
$ python -m venv django-easy-install
314+
$ . django-easy-install/bin/activate
314315
$ easy_install https://www.djangoproject.com/m/releases/$MAJOR_VERSION/Django-$RELEASE_VERSION.tar.gz
315316
$ deactivate
316-
$ mktmpenv
317+
$ python -m venv django-pip
318+
$ . django-pip/bin/activate
317319
$ python -m pip install https://www.djangoproject.com/m/releases/$MAJOR_VERSION/Django-$RELEASE_VERSION.tar.gz
318320
$ deactivate
319-
$ mktmpenv
321+
$ python -m venv django-pip-wheel
322+
$ . django-pip-wheel/bin/activate
320323
$ python -m pip install https://www.djangoproject.com/m/releases/$MAJOR_VERSION/Django-$RELEASE_VERSION-py3-none-any.whl
321324
$ deactivate
322325

323326
This just tests that the tarballs are available (i.e. redirects are up) and
324327
that they install correctly, but it'll catch silly mistakes.
325328

326-
__ https://pypi.org/project/virtualenvwrapper/
327-
328329
#. Ask a few people on IRC to verify the checksums by visiting the checksums
329330
file (e.g. https://www.djangoproject.com/m/pgp/Django-1.5b1.checksum.txt)
330331
and following the instructions in it. For bonus points, they can also unpack

docs/intro/contributing.txt

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -152,8 +152,7 @@ If the ``source`` command is not available, you can try using a dot instead:
152152
$ . ~/.virtualenvs/djangodev/bin/activate
153153

154154
You have to activate the virtual environment whenever you open a new
155-
terminal window. virtualenvwrapper__ is a useful tool for making this
156-
more convenient.
155+
terminal window.
157156

158157
.. admonition:: For Windows users
159158

@@ -163,8 +162,6 @@ more convenient.
163162

164163
...\> %HOMEPATH%\.virtualenvs\djangodev\Scripts\activate.bat
165164

166-
__ https://virtualenvwrapper.readthedocs.io/en/latest/
167-
168165
The name of the currently activated virtual environment is displayed on the
169166
command line to help you keep track of which one you are using. Anything you
170167
install through ``pip`` while this name is displayed will be installed in that

docs/intro/reusable-apps.txt

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -277,8 +277,8 @@ working. We'll now fix this by installing our new ``django-polls`` package.
277277
users of the machine.
278278

279279
Note that per-user installations can still affect the behavior of system
280-
tools that run as that user, so ``virtualenv`` is a more robust solution
281-
(see below).
280+
tools that run as that user, so using a virtual environment is a more robust
281+
solution (see below).
282282

283283
#. To install the package, use pip (you already :ref:`installed it
284284
<installing-reusable-apps-prerequisites>`, right?)::
@@ -307,8 +307,8 @@ the world! If this wasn't just an example, you could now:
307307
tutorial <https://packaging.python.org/tutorials/packaging-projects/#uploading-the-distribution-archives>`_
308308
for doing this.
309309

310-
Installing Python packages with virtualenv
311-
==========================================
310+
Installing Python packages with a virtual environment
311+
=====================================================
312312

313313
Earlier, we installed the polls app as a user library. This has some
314314
disadvantages:
@@ -319,7 +319,7 @@ disadvantages:
319319
the same name).
320320

321321
Typically, these situations only arise once you're maintaining several Django
322-
projects. When they do, the best solution is to use `virtualenv
323-
<https://virtualenv.pypa.io/>`_. This tool allows you to maintain multiple
324-
isolated Python environments, each with its own copy of the libraries and
325-
package namespace.
322+
projects. When they do, the best solution is to use :doc:`venv
323+
<python:tutorial/venv>`. This tool allows you to maintain multiple isolated
324+
Python environments, each with its own copy of the libraries and package
325+
namespace.

docs/spelling_wordlist

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -776,8 +776,6 @@ versioned
776776
versioning
777777
vertices
778778
viewable
779-
virtualenv
780-
virtualenvs
781779
virtualized
782780
Weblog
783781
whitelist

docs/topics/install.txt

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -137,11 +137,11 @@ This is the recommended way to install Django.
137137
it's outdated. If it's outdated, you'll know because installation won't
138138
work.
139139

140-
#. Take a look at virtualenv_ and virtualenvwrapper_. These tools provide
140+
#. Take a look at :doc:`venv <python:tutorial/venv>`. This tool provides
141141
isolated Python environments, which are more practical than installing
142-
packages systemwide. They also allow installing packages without
142+
packages systemwide. It also allows installing packages without
143143
administrator privileges. The :doc:`contributing tutorial
144-
</intro/contributing>` walks through how to create a virtualenv.
144+
</intro/contributing>` walks through how to create a virtual environment.
145145

146146
#. After you've created and activated a virtual environment, enter the command:
147147

@@ -150,8 +150,6 @@ This is the recommended way to install Django.
150150
$ python -m pip install Django
151151

152152
.. _pip: https://pip.pypa.io/
153-
.. _virtualenv: https://virtualenv.pypa.io/
154-
.. _virtualenvwrapper: https://virtualenvwrapper.readthedocs.io/en/latest/
155153
.. _standalone pip installer: https://pip.pypa.io/en/latest/installing/#installing-with-get-pip-py
156154

157155
.. _installing-distribution-package:
@@ -198,11 +196,12 @@ latest bug fixes and improvements, follow these instructions:
198196
This will create a directory ``django`` in your current directory.
199197

200198
#. Make sure that the Python interpreter can load Django's code. The most
201-
convenient way to do this is to use virtualenv_, virtualenvwrapper_, and
202-
pip_. The :doc:`contributing tutorial </intro/contributing>` walks through
203-
how to create a virtualenv.
199+
convenient way to do this is to use a virtual environment and pip_. The
200+
:doc:`contributing tutorial </intro/contributing>` walks through how to
201+
create a virtual environment.
204202

205-
#. After setting up and activating the virtualenv, run the following command:
203+
#. After setting up and activating the virtual environment, run the following
204+
command:
206205

207206
.. console::
208207

0 commit comments

Comments
 (0)
0