From 360d3b6e2d6317e21f936c28e318ccac97484783 Mon Sep 17 00:00:00 2001 From: Jelle Zijlstra Date: Sun, 10 May 2026 07:21:57 -0700 Subject: [PATCH 1/2] gh-139489: Add is_valid_text to xml.__all__ --- Lib/xml/__init__.py | 2 +- .../next/Library/2026-05-10-07-21-51.gh-issue-139489.rS7LTA.rst | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 Misc/NEWS.d/next/Library/2026-05-10-07-21-51.gh-issue-139489.rS7LTA.rst diff --git a/Lib/xml/__init__.py b/Lib/xml/__init__.py index 002d6d3e0e8267..ecfce1c6ae52cf 100644 --- a/Lib/xml/__init__.py +++ b/Lib/xml/__init__.py @@ -18,4 +18,4 @@ from .utils import * -__all__ = ["dom", "parsers", "sax", "etree", "is_valid_name"] +__all__ = ["dom", "parsers", "sax", "etree", "is_valid_name", "is_valid_text"] diff --git a/Misc/NEWS.d/next/Library/2026-05-10-07-21-51.gh-issue-139489.rS7LTA.rst b/Misc/NEWS.d/next/Library/2026-05-10-07-21-51.gh-issue-139489.rS7LTA.rst new file mode 100644 index 00000000000000..9ddfb95ca1d3cc --- /dev/null +++ b/Misc/NEWS.d/next/Library/2026-05-10-07-21-51.gh-issue-139489.rS7LTA.rst @@ -0,0 +1 @@ +Add :func:`xml.utils.is_valid_text` to ``xml.__all__``. From 42daf70cc02f582b060d6bd5bfa81cbce78616b8 Mon Sep 17 00:00:00 2001 From: Jelle Zijlstra Date: Sun, 10 May 2026 07:45:19 -0700 Subject: [PATCH 2/2] Apply suggestion from @JelleZijlstra --- .../next/Library/2026-05-10-07-21-51.gh-issue-139489.rS7LTA.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Misc/NEWS.d/next/Library/2026-05-10-07-21-51.gh-issue-139489.rS7LTA.rst b/Misc/NEWS.d/next/Library/2026-05-10-07-21-51.gh-issue-139489.rS7LTA.rst index 9ddfb95ca1d3cc..40fe7e9fd6a008 100644 --- a/Misc/NEWS.d/next/Library/2026-05-10-07-21-51.gh-issue-139489.rS7LTA.rst +++ b/Misc/NEWS.d/next/Library/2026-05-10-07-21-51.gh-issue-139489.rS7LTA.rst @@ -1 +1 @@ -Add :func:`xml.utils.is_valid_text` to ``xml.__all__``. +Add :func:`xml.is_valid_text` to ``xml.__all__``.