SF.net SVN: docutils:[10002 ] trunk/docutils

milde--- via Docutils-checkins <[email protected]>
Newsgroups gmane.text.docutils.cvs
Message-ID <[email protected]>
Revision: 10002
          http://sourceforge.net/p/docutils/code/10002
Author:   milde
Date:     2024-12-16 22:33:32 +0000 (Mon, 16 Dec 2024)
Log Message:
-----------
Announce removal of two deprecated functions.

Modified Paths:
--------------
    trunk/docutils/RELEASE-NOTES.rst
    trunk/docutils/docutils/utils/__init__.py

Modified: trunk/docutils/RELEASE-NOTES.rst
===================================================================
--- trunk/docutils/RELEASE-NOTES.rst	2024-12-16 22:33:24 UTC (rev 10001)
+++ trunk/docutils/RELEASE-NOTES.rst	2024-12-16 22:33:32 UTC (rev 10002)
@@ -145,6 +145,9 @@
 * Remove `parsers.rst.directives.CSVTable.HeaderDialect`
   in Docutils 1.0.
 
+* Remove `utils.decode_path()` and `utils.get_stylesheet_reference()`
+  in Docutils 1.0.
+
 * Remove support for the `recommonmark parser`_ in Docutils 1.0.
   Recommonmark is unmaintained since 2021 and deprecated in favour
   of the `MyST parser`_.

Modified: trunk/docutils/docutils/utils/__init__.py
===================================================================
--- trunk/docutils/docutils/utils/__init__.py	2024-12-16 22:33:24 UTC (rev 10001)
+++ trunk/docutils/docutils/utils/__init__.py	2024-12-16 22:33:32 UTC (rev 10002)
@@ -380,9 +380,8 @@
 
     Decode file/path string in a failsafe manner if not already done.
 
-    Deprecated.
+    Deprecated. Will be removed in Docutils 1.0.
     """
-    # TODO: is this still required with Python 3?
     if isinstance(path, str):
         return path
     if path is None:
@@ -469,7 +468,7 @@
     Return a new empty document object.
 
     :Parameters:
-        `source_path` : string
+        `source_path` : str or pathlib.Path
             The path to or description of the source text of the document.
         `settings` : optparse.Values object
             Runtime settings.  If none are provided, a default core set will
@@ -494,7 +493,6 @@
     from docutils import frontend
     if settings is None:
         settings = frontend.get_default_settings()
-    source_path = decode_path(source_path)
     reporter = new_reporter(source_path, settings)
     document = nodes.document(settings, reporter, source=source_path)
     document.note_source(source_path, -1)
@@ -575,9 +573,9 @@
     """
     Retrieve a stylesheet reference from the settings object.
 
-    Deprecated. Use get_stylesheet_list() instead to
-    enable specification of multiple stylesheets as a comma-separated
-    list.
+    Deprecated. Will be removed in Docutils 1.0.
+    Use get_stylesheet_list() instead to enable specification of multiple
+    stylesheets as a comma-separated list.
     """
     warnings.warn('utils.get_stylesheet_reference()'
                   ' is obsoleted by utils.get_stylesheet_list()'

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.



_______________________________________________
Docutils-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/docutils-checkins
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.