Remove references to Python 2.7
We don't support it anymore. This is just noise now. Change-Id: I3640e7d8e520db69f83f95e9c7759279f7c15008 Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
This commit is contained in:
parent
cb6659d7cd
commit
0a7f2692c6
21
HACKING.rst
21
HACKING.rst
@ -7,6 +7,7 @@ OpenStack Style Commandments
|
|||||||
|
|
||||||
General
|
General
|
||||||
-------
|
-------
|
||||||
|
|
||||||
- thou shalt not violate causality in our time cone, or else
|
- thou shalt not violate causality in our time cone, or else
|
||||||
|
|
||||||
Docstrings
|
Docstrings
|
||||||
@ -85,23 +86,3 @@ commandline arguments, etc.) should be presumed to be encoded as utf-8.
|
|||||||
returntext = do_some_magic_with(mytext)
|
returntext = do_some_magic_with(mytext)
|
||||||
returnstring = returntext.encode('utf-8')
|
returnstring = returntext.encode('utf-8')
|
||||||
outfile.write(returnstring)
|
outfile.write(returnstring)
|
||||||
|
|
||||||
Python 3.x Compatibility
|
|
||||||
------------------------
|
|
||||||
|
|
||||||
OpenStackClient strives to be Python 3.3 compatible. Common guidelines:
|
|
||||||
|
|
||||||
* Convert print statements to functions: print statements should be converted
|
|
||||||
to an appropriate log or other output mechanism.
|
|
||||||
* Prefer to x.items() over six.iteritems(x).
|
|
||||||
|
|
||||||
Running Tests
|
|
||||||
-------------
|
|
||||||
|
|
||||||
Note: Oh boy, are we behind on writing tests. But they are coming!
|
|
||||||
|
|
||||||
The testing system is based on a combination of tox and testr. If you just
|
|
||||||
want to run the whole suite, run `tox` and all will be fine. However, if
|
|
||||||
you'd like to dig in a bit more, you might want to learn some things about
|
|
||||||
testr itself. A basic walkthrough for OpenStack can be found at
|
|
||||||
http://wiki.openstack.org/testr
|
|
||||||
|
@ -59,13 +59,13 @@ To run the full suite of tests maintained within OpenStackClient.
|
|||||||
virtualenvs. You can later use the ``-r`` option with ``tox`` to rebuild
|
virtualenvs. You can later use the ``-r`` option with ``tox`` to rebuild
|
||||||
your virtualenv in a similar manner.
|
your virtualenv in a similar manner.
|
||||||
|
|
||||||
|
To run tests for one or more specific test environments(for example, the most
|
||||||
To run tests for one or more specific test environments(for example, the most common configuration of
|
common configuration of the latest Python version and PEP-8), list the
|
||||||
Python 2.7 and PEP-8), list the environments with the ``-e`` option, separated by spaces:
|
environments with the ``-e`` option, separated by spaces:
|
||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
$ tox -e py27,pep8
|
$ tox -e py38,pep8
|
||||||
|
|
||||||
See ``tox.ini`` for the full list of available test environments.
|
See ``tox.ini`` for the full list of available test environments.
|
||||||
|
|
||||||
@ -96,9 +96,9 @@ Using PDB breakpoints with ``tox`` and ``testr`` normally does not work since
|
|||||||
the tests fail with a `BdbQuit` exception rather than stopping at the
|
the tests fail with a `BdbQuit` exception rather than stopping at the
|
||||||
breakpoint.
|
breakpoint.
|
||||||
|
|
||||||
To run with PDB breakpoints during testing, use the `debug` ``tox`` environment
|
To run with PDB breakpoints during testing, use the ``debug`` ``tox``
|
||||||
rather than ``py27``. For example, passing a test name since you will normally
|
environment. For example, passing a test name since you will normally only want
|
||||||
only want to run the test that hits your breakpoint:
|
to run the test that hits your breakpoint:
|
||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
@ -207,4 +207,3 @@ Example
|
|||||||
from openstackclient import shell
|
from openstackclient import shell
|
||||||
from openstackclient.tests import utils
|
from openstackclient.tests import utils
|
||||||
from unittest import mock
|
from unittest import mock
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user