diff options
| author | milde <milde@929543f6-e4f2-0310-98a6-ba3bd3dd1d04> | 2022-01-14 11:32:45 +0000 |
|---|---|---|
| committer | milde <milde@929543f6-e4f2-0310-98a6-ba3bd3dd1d04> | 2022-01-14 11:32:45 +0000 |
| commit | 10dace74c8d26d603c90aab8ea71faf51daf4580 (patch) | |
| tree | 336ed524ccc9b226225321c3a5830b85c6ac870b /docutils/nodes.py | |
| parent | c6b283d0983e8863d121befc276a8c06c410be0c (diff) | |
| download | docutils-10dace74c8d26d603c90aab8ea71faf51daf4580.tar.gz | |
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.
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk/docutils@8949 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
Diffstat (limited to 'docutils/nodes.py')
| -rw-r--r-- | docutils/nodes.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/docutils/nodes.py b/docutils/nodes.py index fae719c38..a4c05d454 100644 --- a/docutils/nodes.py +++ b/docutils/nodes.py @@ -343,7 +343,7 @@ class reprunicode(str): """ 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 @@ def ensure_str(s): 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 @@ class Element(Node): 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()) |
