summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen Finucane <stephen@that.guru>2021-02-20 15:21:50 +0000
committerStephen Finucane <stephen@that.guru>2021-02-20 15:21:50 +0000
commit649fe9a241333c7836911251085270275f31e3b2 (patch)
tree5756093868e1b7fdd43bcdfc6239190f0faef296
parent576647e9e084d60b3c67dd56c47f1510a671f297 (diff)
downloadpatchwork-649fe9a241333c7836911251085270275f31e3b2.tar
patchwork-649fe9a241333c7836911251085270275f31e3b2.tar.gz
docs: Random Python 3 updates
Correct some documentation examples and other things to reflect the new, Python 3-only world. Signed-off-by: Stephen Finucane <stephen@that.guru>
-rw-r--r--docs/api/xmlrpc.rst12
-rw-r--r--docs/development/installation.rst7
2 files changed, 8 insertions, 11 deletions
diff --git a/docs/api/xmlrpc.rst b/docs/api/xmlrpc.rst
index 5412cce..73d6b91 100644
--- a/docs/api/xmlrpc.rst
+++ b/docs/api/xmlrpc.rst
@@ -17,7 +17,7 @@ and modify information about patches, projects and more.
.. deprecated:: 2.0
The XML-RPC API is a legacy API and has been deprecated in favour of the
- :doc:`REST API <rest/index>`. It will be removed in Patchwork 3.0.
+ :doc:`REST API <rest/index>`. It may be removed in a future release.
Getting Started
---------------
@@ -26,18 +26,18 @@ The Patchwork XML-RPC API provides a number of "methods". Some methods require
authentication (via HTTP Basic Auth) while others do not. Authentication uses
your Patchwork account and the on-server documentation will indicate where it
is necessary. We will only cover the unauthenticated method here for brevity -
-consult the `xmlrpclib`_ documentation for more detailed examples:
+consult the `xmlrpc`_ documentation for more detailed examples:
To interact with the Patchwork XML-RPC API, a XML-RPC library should be used.
-Python provides such a library - `xmlrpclib`_ - in its standard library. For
+Python provides such a library - `xmlrpc`_ - in its standard library. For
example, to get the version of the XML-RPC API for a Patchwork instance hosted
at `patchwork.example.com`, run:
.. code-block:: pycon
$ python
- >>> import xmlrpclib # or 'xmlrpc.client' for Python 3
- >>> rpc = xmlrpclib.ServerProxy('http://patchwork.example.com/xmlrpc/')
+ >>> import xmlrpc.client
+ >>> rpc = xmlrpc.client.ServerProxy('http://patchwork.example.com/xmlrpc/')
>>> rpc.pw_rpc_version()
1.1
@@ -61,4 +61,4 @@ where `patchwork.example.com` refers to the URL of your Patchwork instance.
Automatic documentation generation for the Patchwork API was introduced in
Patchwork v1.1. Prior versions of Patchwork do not offer this functionality.
-.. _xmlrpclib: https://docs.python.org/2/library/xmlrpclib.html
+.. _xmlrpc: https://docs.python.org/3/library/xmlrpc.html
diff --git a/docs/development/installation.rst b/docs/development/installation.rst
index 244aabe..ff81229 100644
--- a/docs/development/installation.rst
+++ b/docs/development/installation.rst
@@ -231,9 +231,6 @@ packages using ``pip``:
$ sudo pip install virtualenv tox
-If you wish to use Python 3 then simply replace ``python`` with ``python3`` in
-the above command.
-
Configure Virtual Environment
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -254,8 +251,8 @@ virtual environment. This can be done like so:
.. note::
- If you installed a Python 3.x-based virtual environment package, adjust the
- executable indicated above as necessary, e.g. ``virtualenv-3.7``.
+ If you wish to use a specific Python version, you can provide the
+ ``--python`` argument to use this, e.g. ``--python=python3.7``.
Now install the packages. Patchwork provides three requirements files.