|
From: <go...@us...> - 2017-06-15 22:38:32
|
Revision: 8113
http://sourceforge.net/p/docutils/code/8113
Author: goodger
Date: 2017-06-15 22:38:30 +0000 (Thu, 15 Jun 2017)
Log Message:
-----------
Simplified docutils.__version_info__; documented dropping compatibility with Python 2.4 & 2.5 in release after 0.14.
Modified Paths:
--------------
trunk/docutils/RELEASE-NOTES.txt
trunk/docutils/docutils/__init__.py
Modified: trunk/docutils/RELEASE-NOTES.txt
===================================================================
--- trunk/docutils/RELEASE-NOTES.txt 2017-06-14 14:20:20 UTC (rev 8112)
+++ trunk/docutils/RELEASE-NOTES.txt 2017-06-15 22:38:30 UTC (rev 8113)
@@ -22,19 +22,11 @@
Future changes
==============
+* Drop support for Python 2.4 and 2.5 immediately after the 0.14 release.
+
* Remove the `handle_io_errors` option from io.FileInput/Output.
Used by Sphinx up to version 1.3.1, fixed in 1.3.2 (Nov 29, 2015).
-* Drop support for Python 2.4 and 2.5.
-
-* »Prune« the doctree (no change to the reST input syntax):
-
- - "doctest" element -> literal block with "pycon" (python-console)
- class argument and syntax highlight (like the "code" directive),
- - special admonitions (note, hint, warning, ...) -> generic "admonition"
- element with class attribute and auto-generated title.
-
-
* The default HTML writer "html" with frontend ``rst2html.py`` may change
from "html4css1" to "html5".
@@ -103,12 +95,12 @@
- New HTML writer generating `HTML 5`_.
+ .. _HTML 5: http://www.w3.org/TR/html5/
+
* tools/
- New front-end ``rst2html5.py``.
-.. _HTML 5: http://www.w3.org/TR/html5/
-
* languages: persian/farsi (fa) and latvian (la) mappings.
* change default base url for :rfc: to http://tools.ietf.org/html/
@@ -116,7 +108,7 @@
* tables accept widths, a list and align
* latex2e: Fix admonition width, remove deprecated options,
- better tablewidth auto, ...
+ better tablewidth auto, ...
* rst.el: The problem with ``electric-indent-mode`` has been fixed.
Modified: trunk/docutils/docutils/__init__.py
===================================================================
--- trunk/docutils/docutils/__init__.py 2017-06-14 14:20:20 UTC (rev 8112)
+++ trunk/docutils/docutils/__init__.py 2017-06-15 22:38:30 UTC (rev 8113)
@@ -52,46 +52,26 @@
import sys
-try:
- # Python 2.6 required:
- from collections import namedtuple
-except ImportError:
- namedtuple = None
-
__docformat__ = 'reStructuredText'
-# workaround for Python < 2.6:
-__version_info__ = (0, 14, 0, 'rc', 2, True)
-if namedtuple:
- __version_info__ = (
- namedtuple(
- 'version_info',
- ['major', 'minor', 'micro', 'releaselevel', 'serial', 'development'])
- (*__version_info__))
-
-__version__ = '%s.%s%s%s%s%s' % (
- __version_info__[0], # major
- __version_info__[1], # minor
- ('.%s' % __version_info__[2]) if __version_info__[2] else '', # micro
- __version_info__[3], # releaselevel
- __version_info__[4] if __version_info__[4] else '', # serial
- '.dev' if __version_info__[5] else '') # development
+__version__ = '0.14rc2.dev'
"""The Docutils version number (complies with PEP 440)::
- major.minor[.micro][{releaselevel}serial][.dev]
+ major.minor[.micro][releaselevel[serial]][.dev]
* The major number will be bumped when the project is feature-complete, and
later if there is a major change in the design or API.
* The minor number is bumped whenever there are new features.
-* The micro number is bumped for bug-fix releases. Omitted for micro=0.
-* The releaselevel string is used for pre-releases, one of 'a' (alpha),
- 'b' (beta), or 'rc' (release candidate). Omitted for final releases.
-* The serial number is used when
-* The '.dev' suffix indicates active development, unreleased, before the
+* The micro number is bumped for bug-fix releases. Omitted if micro=0.
+* The releaselevel abbreviation string is used for pre-releases, one of 'a'
+ (alpha), 'b' (beta), or 'rc' (release 'candidate'). Omitted for final
+ releases.
+* The serial release number identifies prereleases; omitted if 0.
+* The '.dev' suffix indicates active development, not a release, before the
version indicated.
-Rather than parsing the `__version__` text, use `__version_info__`.
+Rather than parsing the text of `__version__`, use `__version_info__`.
"""
__version_details__ = 'repository'
@@ -98,7 +78,25 @@
"""Extra version details (e.g. 'snapshot 2005-05-29, r3410', 'repository',
'prerelease', 'release'), modified automatically & manually."""
+# workaround for Python < 2.6:
+__version_info__ = (0, 14, 0, 'candidate', 2, False)
+# To add in Docutils 0.15, replacing the line above:
+"""
+from collections import namedtuple
+VersionInfo = namedtuple(
+ 'VersionInfo', 'major minor micro releaselevel serial release')
+__version_info__ = VersionInfo(
+ major=0,
+ minor=14,
+ micro=0,
+ # one of 'alpha', 'beta', 'candidate', 'final':
+ releaselevel='candidate',
+ # 0 for the in-development stage before a release is planned:
+ serial=2,
+ release=False)
+"""
+
class ApplicationError(StandardError):
# Workaround:
# In Python < 2.6, unicode(<exception instance>) calls `str` on the
@@ -108,6 +106,7 @@
def __unicode__(self):
return u', '.join(self.args)
+
class DataError(ApplicationError): pass
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|