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

milde--- via Docutils-checkins <[email protected]>
Newsgroups gmane.text.docutils.cvs
Message-ID <[email protected]>
Revision: 9951
          http://sourceforge.net/p/docutils/code/9951
Author:   milde
Date:     2024-10-18 08:57:32 +0000 (Fri, 18 Oct 2024)
Log Message:
-----------
Document, that type hints use Python 3.10 syntax.

Modified Paths:
--------------
    trunk/docutils/HISTORY.rst
    trunk/docutils/README.rst

Modified: trunk/docutils/HISTORY.rst
===================================================================
--- trunk/docutils/HISTORY.rst	2024-10-15 11:24:32 UTC (rev 9950)
+++ trunk/docutils/HISTORY.rst	2024-10-18 08:57:32 UTC (rev 9951)
@@ -19,12 +19,16 @@
 
 * General
 
-  - We have started to add type hints to Docutils.
-    This will be a complex programme of work, and as such
-    for the time being these type hints are 'provisional',
-    and should not be relied upon by consumers of Docutils
-    (feature-request #87).
-  - Add tox.ini to pyproject.toml to be in sdist (bug #486).
+  - We have started to add type hints to Docutils (feature-request #87).
+
+    This will be a complex programme of work and as such,
+    for the time being, these type hints are "provisional"
+    and should not be relied upon.
+
+    By default, the Python interpreter treats type hints as annotations.
+    Python >= 3.10 is required with active type hints
+    (``typing.TYPE_CHECKING == True``).
+
   - Fix license issue (bug #487).
 
 * docs/ref/docutils.dtd
@@ -201,6 +205,10 @@
   - Fix conversion of image width in "%" if the height is specified.
   - Adjust fallback DPI value (currently not used) to match CSS units.
 
+* pyproject.toml
+
+  - Add tox.ini to the "include" list (fixes bug #486).
+
 * tools/rst2odt.py
 
   - Use `core.publish_file()` instead of `core.publish_file_to_binary()`.

Modified: trunk/docutils/README.rst
===================================================================
--- trunk/docutils/README.rst	2024-10-15 11:24:32 UTC (rev 9950)
+++ trunk/docutils/README.rst	2024-10-18 08:57:32 UTC (rev 9951)
@@ -78,6 +78,10 @@
 * Docutils versions 0.19 to 0.20.1 require Python 3.7 or later.
 * Docutils versions 0.16 to 0.18 require Python 2.7 or 3.5+.
 
+The **type hints** added in version 0.22 use Python 3.10 syntax.
+However, the Python interpreter treats them as annotations
+unless ``typing.TYPE_CHECKING`` is set to ``True``.
+
 .. _Python: https://www.python.org/.
 
 

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.