|
From: <mi...@us...> - 2022-01-14 11:32:48
|
Revision: 8949
http://sourceforge.net/p/docutils/code/8949
Author: milde
Date: 2022-01-14 11:32:45 +0000 (Fri, 14 Jan 2022)
Log Message:
-----------
Change removal warnings to "minor + 2" where appropriate.
The version number of the next release(s) may be
"1.0, 1.1, ...", "0.19, 1.0, ...", or "0.19, 0.20, ...".
Lower announced removal version to "0.21 or later" for
DeprecationWarnings that did not include a removal version in
the last release and for DeprecationWarnings that
were added after the last release.
Modified Paths:
--------------
trunk/docutils/RELEASE-NOTES.txt
trunk/docutils/docutils/frontend.py
trunk/docutils/docutils/nodes.py
trunk/docutils/docutils/parsers/rst/directives/tables.py
trunk/docutils/docutils/parsers/rst/roles.py
trunk/docutils/docutils/transforms/writer_aux.py
trunk/docutils/docutils/utils/__init__.py
trunk/docutils/docutils/utils/error_reporting.py
trunk/docutils/docutils/writers/latex2e/__init__.py
Modified: trunk/docutils/RELEASE-NOTES.txt
===================================================================
--- trunk/docutils/RELEASE-NOTES.txt 2022-01-14 11:32:27 UTC (rev 8948)
+++ trunk/docutils/RELEASE-NOTES.txt 2022-01-14 11:32:45 UTC (rev 8949)
@@ -56,7 +56,7 @@
(deprecated and ignored since Docutils 0.18) in Docutils 1.3.
* Remove the compatibility hacks `nodes.reprunicode` and `nodes.ensure_str()`
- in Docutils 1.2. They are not required with Python 3.x.
+ in Docutils 0.21 or later. They are not required with Python 3.x.
* Move math format conversion from docutils/utils/math (called from
docutils/writers/_html_base.py) to a transform__.
Modified: trunk/docutils/docutils/frontend.py
===================================================================
--- trunk/docutils/docutils/frontend.py 2022-01-14 11:32:27 UTC (rev 8948)
+++ trunk/docutils/docutils/frontend.py 2022-01-14 11:32:45 UTC (rev 8949)
@@ -747,7 +747,7 @@
old_warning = """
The "[option]" section is deprecated. Support for old-format configuration
-files will be removed in Docutils release 1.2. Please revise your
+files will be removed in Docutils 0.21 or later. Please revise your
configuration files. See <http://docutils.sf.net/docs/user/config.html>,
section "Old-Format Configuration Files".
"""
Modified: trunk/docutils/docutils/nodes.py
===================================================================
--- trunk/docutils/docutils/nodes.py 2022-01-14 11:32:27 UTC (rev 8948)
+++ trunk/docutils/docutils/nodes.py 2022-01-14 11:32:45 UTC (rev 8949)
@@ -343,7 +343,7 @@
"""
def __init__(self, s):
warnings.warn('nodes.reprunicode() is not required with Python 3'
- ' and will be removed in Docutils 1.2.',
+ ' and will be removed in Docutils 0.21 or later.',
DeprecationWarning, stacklevel=2)
super().__init__()
@@ -353,7 +353,7 @@
Deprecated backwards compatibility stub returning `s`.
"""
warnings.warn('nodes.ensure_str() is not required with Python 3'
- ' and will be removed in Docutils 1.2.',
+ ' and will be removed in Docutils 0.21 or later.',
DeprecationWarning, stacklevel=2)
return s
@@ -1071,7 +1071,8 @@
def set_class(self, name):
"""Add a new class to the "classes" attribute."""
warnings.warn('docutils.nodes.Element.set_class() is deprecated; '
- "append to Element['classes'] list attribute directly",
+ ' and will be removed in Docutils 0.21 or later.',
+ "Append to Element['classes'] list attribute directly",
DeprecationWarning, stacklevel=2)
assert ' ' not in name
self['classes'].append(name.lower())
Modified: trunk/docutils/docutils/parsers/rst/directives/tables.py
===================================================================
--- trunk/docutils/docutils/parsers/rst/directives/tables.py 2022-01-14 11:32:27 UTC (rev 8948)
+++ trunk/docutils/docutils/parsers/rst/directives/tables.py 2022-01-14 11:32:45 UTC (rev 8949)
@@ -361,13 +361,13 @@
def decode_from_csv(s):
warnings.warn('CSVTable.decode_from_csv()'
' is not required with Python 3'
- ' and will be removed in Docutils 1.2.',
+ ' and will be removed in Docutils 0.21 or later.',
DeprecationWarning, stacklevel=2)
return s
def encode_for_csv(s):
warnings.warn('CSVTable.encode_from_csv()'
' is not required with Python 3'
- ' and will be removed in Docutils 1.2.',
+ ' and will be removed in Docutils 0.21 or later.',
DeprecationWarning, stacklevel=2)
return s
decode_from_csv = staticmethod(decode_from_csv)
Modified: trunk/docutils/docutils/parsers/rst/roles.py
===================================================================
--- trunk/docutils/docutils/parsers/rst/roles.py 2022-01-14 11:32:27 UTC (rev 8948)
+++ trunk/docutils/docutils/parsers/rst/roles.py 2022-01-14 11:32:45 UTC (rev 8949)
@@ -76,6 +76,8 @@
__docformat__ = 'reStructuredText'
+import warnings
+
from docutils import nodes, utils
from docutils.parsers.rst import directives
from docutils.parsers.rst.languages import en as _fallback_language_module
@@ -392,9 +394,9 @@
def set_classes(options):
"""Deprecated. Obsoleted by ``normalized_role_options()``."""
# TODO: Change use in directives.py and uncomment.
- # raise PendingDeprecationWarning(
- # 'The auxiliary function roles.set_classes() is obsoleted by '
- # 'roles.normalized_role_options() and will be removed in Docutils 2.0.')
+ # warnings.warn('The auxiliary function roles.set_classes() is obsoleted'
+ # ' by roles.normalized_role_options() and will be removed'
+ # ' in Docutils 0.21 or later', PendingDeprecationWarning, stacklevel=2)
if options and 'class' in options:
assert 'classes' not in options
options['classes'] = options['class']
Modified: trunk/docutils/docutils/transforms/writer_aux.py
===================================================================
--- trunk/docutils/docutils/transforms/writer_aux.py 2022-01-14 11:32:27 UTC (rev 8948)
+++ trunk/docutils/docutils/transforms/writer_aux.py 2022-01-14 11:32:45 UTC (rev 8949)
@@ -24,7 +24,7 @@
"""
.. warning:: This transform is not used by Docutils since Dec 2010
- and will be removed in Docutils 1.2 (or later).
+ and will be removed in Docutils 0.21 or later.
Flatten all compound paragraphs. For example, transform ::
@@ -44,7 +44,7 @@
def __init__(self, document, startnode=None):
warnings.warn('docutils.transforms.writer_aux.Compound is deprecated'
- ' and will be removed in Docutils 1.2 or later.',
+ ' and will be removed in Docutils 0.21 or later.',
DeprecationWarning, stacklevel=2)
super(Compound, self).__init__(document, startnode)
Modified: trunk/docutils/docutils/utils/__init__.py
===================================================================
--- trunk/docutils/docutils/utils/__init__.py 2022-01-14 11:32:27 UTC (rev 8948)
+++ trunk/docutils/docutils/utils/__init__.py 2022-01-14 11:32:45 UTC (rev 8949)
@@ -125,7 +125,8 @@
def set_conditions(self, category, report_level, halt_level,
stream=None, debug=False):
warnings.warn('docutils.utils.Reporter.set_conditions() deprecated; '
- 'set attributes via configuration settings or directly.',
+ 'Will be removed in Docutils 0.21 or later. '
+ 'Set attributes via configuration settings or directly.',
DeprecationWarning, stacklevel=2)
self.report_level = report_level
self.halt_level = halt_level
Modified: trunk/docutils/docutils/utils/error_reporting.py
===================================================================
--- trunk/docutils/docutils/utils/error_reporting.py 2022-01-14 11:32:27 UTC (rev 8948)
+++ trunk/docutils/docutils/utils/error_reporting.py 2022-01-14 11:32:45 UTC (rev 8949)
@@ -15,7 +15,7 @@
.. warning::
This module is deprecated with the end of support for Python 2.7
- and will be removed in Docutils 1.2 or later.
+ and will be removed in Docutils 0.21 or later.
Replacements:
| SafeString -> str
@@ -50,7 +50,7 @@
import warnings
warnings.warn('The `docutils.utils.error_reporting` module is deprecated '
- 'and will be removed in Docutils 1.2.\n'
+ 'and will be removed in Docutils 0.21 or later.\n'
'Details with help("docutils.utils.error_reporting").',
DeprecationWarning, stacklevel=2)
Modified: trunk/docutils/docutils/writers/latex2e/__init__.py
===================================================================
--- trunk/docutils/docutils/writers/latex2e/__init__.py 2022-01-14 11:32:27 UTC (rev 8948)
+++ trunk/docutils/docutils/writers/latex2e/__init__.py 2022-01-14 11:32:45 UTC (rev 8949)
@@ -2354,9 +2354,10 @@
"""Convert `length_str` with rst length to LaTeX length
"""
if pxunit is not None:
- warnings.warn('LaTeXTranslator.to_latex_length(): The optional '
- 'argument `pxunit` is ignored and will be removed '
- 'in Docutils 1.1', DeprecationWarning, stacklevel=2)
+ warnings.warn('The optional argument `pxunit` '
+ 'of LaTeXTranslator.to_latex_length() is ignored '
+ 'and will be removed in Docutils 0.21 or later',
+ DeprecationWarning, stacklevel=2)
match = re.match(r'(\d*\.?\d*)\s*(\S*)', length_str)
if not match:
return length_str
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|