summaryrefslogtreecommitdiff
path: root/docutils
diff options
context:
space:
mode:
Diffstat (limited to 'docutils')
-rw-r--r--docutils/README.txt33
-rw-r--r--docutils/RELEASE-NOTES.txt9
-rw-r--r--docutils/docs/dev/testing.txt13
-rw-r--r--docutils/docs/dev/todo.txt9
-rwxr-xr-xdocutils/setup.py38
-rw-r--r--docutils/tox.ini8
6 files changed, 16 insertions, 94 deletions
diff --git a/docutils/README.txt b/docutils/README.txt
index 41c8c6ba9..6db9520bb 100644
--- a/docutils/README.txt
+++ b/docutils/README.txt
@@ -123,23 +123,9 @@ installed:
Python 3 compatibility
----------------------
-The Docutils codebase is written for Python 2 and uses "on-demand"
-translation for `porting to Python 3`_.
-
-* The `setup.py` script generates Python 3 compatible sources in
- ``build/`` and tests in ``tests3/`` sub-directories during
- installation_ with Python 3.
-
-* The scripts in the ``tools/`` sub-directory work with all supported
- Python versions without conversion.
-
-* To convert the sources without installing (e.g. for testing), run
- ``python3 setup.py build``.
-
-* When editing the source, do changes on the Python 2 versions of the
- files and re-run the build command.
-
-.. _porting to Python 3: http://docs.python.org/py3k/howto/pyporting.html
+Up to version 0.15, the Docutils codebase was translated "on-demand" using
+the 2to3 tool. Starting with Docutils 0.16, the code base supports both
+Python 2.7 and 3.4+ natively.
Project Files & Directories
@@ -194,12 +180,6 @@ Project Files & Directories
if you're planning to modify it. See `Running the Test Suite`_
below.
-Generated directories when installing under Python 3:
-
-* build: Converted sources.
-
-* test3: Converted tests.
-
Installation
============
@@ -232,7 +212,7 @@ GNU/Linux, BSDs, Unix, Mac OS X, etc.
To install for a specific Python version, use this version in the
setup call, e.g. ::
- python3.1 setup.py install
+ python3.7 setup.py install
To install for different Python versions, repeat step 3 for every
required version. The last installed version will be used in the
@@ -332,11 +312,6 @@ Under Windows, type::
cd <archive_directory_path>\test
python alltests.py
-For testing with Python 3 use the converted test suite::
-
- cd <archive_directory_path>/test3
- python3 alltests.py
-
You should see a long line of periods, one for each test, and then a
summary like this::
diff --git a/docutils/RELEASE-NOTES.txt b/docutils/RELEASE-NOTES.txt
index 36872eef7..940c5238d 100644
--- a/docutils/RELEASE-NOTES.txt
+++ b/docutils/RELEASE-NOTES.txt
@@ -61,7 +61,14 @@ Release 0.16
Docutils 0.16 is compatible with Python versions 2.7 and 3.5 to 3.7.
(cf. `Python 3 compatibility`_).
-* Keep `backslash escapes`__ in the document tree.
+* General:
+
+ - Docutils now supports Python 2.7 and Python 3.5+ natively,
+ without the use of the ``2to3`` tool.
+
+* reStructuredText:
+
+ - Keep `backslash escapes`__ in the document tree.
__ http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#escaping-mechanism
diff --git a/docutils/docs/dev/testing.txt b/docutils/docs/dev/testing.txt
index 65b8a8cc6..dbf50dcee 100644
--- a/docutils/docs/dev/testing.txt
+++ b/docutils/docs/dev/testing.txt
@@ -29,11 +29,6 @@ be sure that you haven't broken anything. From a shell::
cd docutils/test
./alltests.py
-For Python 3, the tests must be converted with 2to3. To run the tests with
-Python 3, ``cd`` to the package's root directory and do::
-
- python3 setup.py build
- python3 test3/alltests.py
Python Versions
===============
@@ -41,11 +36,12 @@ Python Versions
A docutils release has a commitment to support a minimum version and beyond.
Before a release is cut, tests must pass in all supported Python versions.
-The Docutils 0.15 release supports Python 2.7 and Python 3.5 or later.
+Docutils 0.16 supports Python 2.7 and Python 3.5 or later.
Therefore, you should install Python 2.7 as well as 3.5 up to the latest Python
(3.7 at the time of this writing) and always run the tests on all of
-them. In a pinch, the edge cases (2.7, and 3.7) should cover most of it.
+them (see `Testing across multiple python versions`_).
+In a pinch, the edge cases (2.7, and 3.7) should cover most of it.
Good resources covering the differences between Python versions:
@@ -64,8 +60,7 @@ __ http://www.python.org/peps/pep-0290.html
.. _Python Check-in Policies: http://www.python.org/dev/tools.html
.. _sandbox directory:
http://docutils.svn.sourceforge.net/svnroot/docutils/trunk/sandbox/
-.. _nightly repository tarball:
- http://svn.berlios.de/svndumps/docutils-repos.gz
+
Testing across multiple python versions
---------------------------------------
diff --git a/docutils/docs/dev/todo.txt b/docutils/docs/dev/todo.txt
index 16bb33dfc..70fa4060d 100644
--- a/docutils/docs/dev/todo.txt
+++ b/docutils/docs/dev/todo.txt
@@ -71,15 +71,6 @@ Many of these are now handled by Sphinx_
General
=======
-* Move to single source for Python 2 and Python 3.
- (Cf. `Porting Python 2 Code to Python 3`_ and
- `clean single-source support for Python 2/3`_.)
-
- .. _Porting Python 2 Code to Python 3:
- https://docs.python.org/3/howto/pyporting.html
- .. _clean single-source support for Python 2/3:
- http://python-future.org
-
* Encoding of command line arguments can only be guessed:
* try UTF-8/strict first, then try the locale's encoding with
diff --git a/docutils/setup.py b/docutils/setup.py
index 6f3e89c30..b952cdb40 100755
--- a/docutils/setup.py
+++ b/docutils/setup.py
@@ -13,9 +13,6 @@ try:
from distutils.core import setup, Command
from distutils.command.build import build
from distutils.command.build_py import build_py
- if sys.version_info >= (3, 0):
- from distutils.command.build_py import build_py_2to3
- from distutils.util import copydir_run_2to3
from distutils.command.install_data import install_data
from distutils.util import convert_path
from distutils import log
@@ -27,36 +24,6 @@ except ImportError:
sys.exit(1)
-if sys.version_info >= (3, 0):
- # copy-convert auxiliary python sources
- class copy_build_py_2to3(build_py_2to3):
- """Copy/convert Python source files in given directories recursively.
-
- Build py3k versions of the modules and packages.
- Also copy 'test/' suite and run 2to3 on *.py files.
- """
- manifest_in = """\
- exclude *.pyc *~ .DS_Store
- recursive-exclude * *.pyc *~ .DS_Store
- recursive-exclude functional/output *
- include functional/output/README.txt
- prune .svn
- prune */.svn
- prune */*/.svn
- prune */*/*/.svn
- prune */*/*/*/.svn
- prune */*/*/*/*/.svn
- """
- def run(self):
- # fix
- print("build_py_2to3")
- build_py_2to3.run(self)
- print("copy/convert test suite")
- loglevel = log.set_threshold(log.ERROR)
- copydir_run_2to3('test', 'test3', template=self.manifest_in)
- log.set_threshold(loglevel)
-
-
class smart_install_data(install_data):
# From <http://wiki.python.org/moin/DistutilsInstallDataScattered>,
# by Pete Shinners.
@@ -96,11 +63,6 @@ def do_setup():
# Install data files properly.
kwargs['cmdclass'] = {'build_data': build_data,
'install_data': smart_install_data}
- # Auto-convert source code for Python 3
- if sys.version_info >= (3, 0):
- kwargs['cmdclass']['build_py'] = copy_build_py_2to3
- else:
- kwargs['cmdclass']['build_py'] = build_py
dist = setup(**kwargs)
return dist
diff --git a/docutils/tox.ini b/docutils/tox.ini
index e575cb7dd..08c194495 100644
--- a/docutils/tox.ini
+++ b/docutils/tox.ini
@@ -13,14 +13,6 @@ whitelist_externals =
rm
commands =
find . -type f -name "*.pyc" -delete
- rm -rf build test3
- python setup.py build
- python setup.py install
- python test3/alltests.py
-
-[testenv:py27]
-commands =
- find . -type f -name "*.pyc" -delete
rm -rf build
python setup.py build
python setup.py install