|
From: <mi...@us...> - 2024-06-14 15:03:58
|
Revision: 9759
http://sourceforge.net/p/docutils/code/9759
Author: milde
Date: 2024-06-14 15:03:55 +0000 (Fri, 14 Jun 2024)
Log Message:
-----------
Remove `docutils.utils.Reporter.set_conditions()`.
Obsolete. Set attributes via configuration settings or directly.
Modified Paths:
--------------
trunk/docutils/HISTORY.txt
trunk/docutils/RELEASE-NOTES.txt
trunk/docutils/docutils/utils/__init__.py
trunk/docutils/test/test_settings.py
Modified: trunk/docutils/HISTORY.txt
===================================================================
--- trunk/docutils/HISTORY.txt 2024-06-14 15:03:42 UTC (rev 9758)
+++ trunk/docutils/HISTORY.txt 2024-06-14 15:03:55 UTC (rev 9759)
@@ -81,6 +81,11 @@
- `Messages` also handles "loose" system messages generated by the parser.
+* docutils/utils/__init__.py
+
+ - Removed `Reporter.set_conditions()`.
+ Set attributes via configuration settings or directly.
+
* docutils/utils/error_reporting.py
- Removed. Obsolete in Python 3.
Modified: trunk/docutils/RELEASE-NOTES.txt
===================================================================
--- trunk/docutils/RELEASE-NOTES.txt 2024-06-14 15:03:42 UTC (rev 9758)
+++ trunk/docutils/RELEASE-NOTES.txt 2024-06-14 15:03:55 UTC (rev 9759)
@@ -228,6 +228,8 @@
Obsolete. Append to Element['classes'] directly.
`docutils.utils.error_reporting`
Obsolete in Python 3
+ `docutils.utils.Reporter.set_conditions()`
+ Obsolete. Set attributes via configuration settings or directly.
* Removed files:
Modified: trunk/docutils/docutils/utils/__init__.py
===================================================================
--- trunk/docutils/docutils/utils/__init__.py 2024-06-14 15:03:42 UTC (rev 9758)
+++ trunk/docutils/docutils/utils/__init__.py 2024-06-14 15:03:55 UTC (rev 9759)
@@ -126,19 +126,6 @@
self.max_level = -1
"""The highest level system message generated so far."""
- def set_conditions(self, category, report_level, halt_level,
- stream=None, debug=False):
- warnings.warn('docutils.utils.Reporter.set_conditions() deprecated; '
- '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
- if not isinstance(stream, io.ErrorOutput):
- stream = io.ErrorOutput(stream, self.encoding, self.error_handler)
- self.stream = stream
- self.debug_flag = debug
-
def attach_observer(self, observer):
"""
The `observer` parameter is a function or bound method which takes one
Modified: trunk/docutils/test/test_settings.py
===================================================================
--- trunk/docutils/test/test_settings.py 2024-06-14 15:03:42 UTC (rev 9758)
+++ trunk/docutils/test/test_settings.py 2024-06-14 15:03:55 UTC (rev 9759)
@@ -373,12 +373,6 @@
for v, result in tests:
self.assertEqual(frontend.validate_smartquotes_locales(v), result)
- def test_set_conditions_deprecation_warning(self):
- reporter = utils.Reporter('test', 1, 4)
- with self.assertWarnsRegex(DeprecationWarning,
- 'Set attributes via configuration '):
- reporter.set_conditions('foo', 1, 4) # trigger warning
-
if __name__ == '__main__':
unittest.main()
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|