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

milde--- via Docutils-checkins <[email protected]>
Newsgroups gmane.text.docutils.cvs
Message-ID <[email protected]>
Revision: 9764
          http://sourceforge.net/p/docutils/code/9764
Author:   milde
Date:     2024-06-14 16:19:42 +0000 (Fri, 14 Jun 2024)
Log Message:
-----------
Remove optional argument `pxunit` of `LaTeXTranslator.to_latex_length()`

Ignored since at least 2012.

Modified Paths:
--------------
    trunk/docutils/HISTORY.txt
    trunk/docutils/docutils/writers/latex2e/__init__.py

Modified: trunk/docutils/HISTORY.txt
===================================================================
--- trunk/docutils/HISTORY.txt	2024-06-14 16:19:29 UTC (rev 9763)
+++ trunk/docutils/HISTORY.txt	2024-06-14 16:19:42 UTC (rev 9764)
@@ -108,6 +108,11 @@
 
   - Removed. Obsolete in Python 3.
 
+* docutils/writers/latex2e/__init__.py
+
+  - Remove optional argument `pxunit` of `LaTeXTranslator.to_latex_length()`
+    (ignored since at least 2012).
+
 * docutils/writers/_html_base.py
 
   - Make MathML the default math_output_.

Modified: trunk/docutils/docutils/writers/latex2e/__init__.py
===================================================================
--- trunk/docutils/docutils/writers/latex2e/__init__.py	2024-06-14 16:19:29 UTC (rev 9763)
+++ trunk/docutils/docutils/writers/latex2e/__init__.py	2024-06-14 16:19:42 UTC (rev 9764)
@@ -2377,15 +2377,9 @@
         self.requirements['~header'] = ''.join(self.out)
         self.pop_output_collector()
 
-    def to_latex_length(self, length_str, pxunit=None):
+    def to_latex_length(self, length_str):
         """Convert `length_str` with rst length to LaTeX length
         """
-        if pxunit is not None:
-            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.



_______________________________________________
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.