From 7ee162917b29c9a64e62e574caa90854c3797520 Mon Sep 17 00:00:00 2001 From: William Deegan Date: Sun, 16 Nov 2025 17:04:08 -0800 Subject: [PATCH 1/5] Updates to fix SCons/Docbook schema to work with lxml>5.0 and newer pythons (>=3.14). Fixes created by using Claude Ai --- SConstruct | 3 +- bin/SConsDoc.py | 7 ++ doc/xsd/dbhierx.xsd | 25 +++---- doc/xsd/dbpoolx.xsd | 176 +++++++++++++++++++------------------------- 4 files changed, 96 insertions(+), 115 deletions(-) diff --git a/SConstruct b/SConstruct index c226f0510e..ce2a5d4048 100644 --- a/SConstruct +++ b/SConstruct @@ -216,7 +216,8 @@ env.Alias("tar-gz", wheel[1]) zip_file = env.Command( target='$DISTDIR/SCons-${VERSION}.zip', source=['pyproject.toml', 'setup.py', 'SCons/__init__.py'] + man_pages, - action='$PYTHON setup.py sdist --format=zip', + action="echo NOT WORKING FOR NOW" + # action='$PYTHON setup.py sdist --format=zip', ) env.Alias("zip", zip_file) diff --git a/bin/SConsDoc.py b/bin/SConsDoc.py index 9c81b187b6..2148f60029 100644 --- a/bin/SConsDoc.py +++ b/bin/SConsDoc.py @@ -129,7 +129,9 @@ try: from lxml import etree + HAS_LXML = True except ImportError: + HAS_LXML = False try: import xml.etree.ElementTree as etree except ImportError: @@ -344,6 +346,11 @@ def newXmlTree(self, root): @staticmethod def validateXml(fpath, xmlschema_context): + if not HAS_LXML: + raise RuntimeError( + "lxml is required for XML validation but is not installed. " + "Install it with: pip install lxml" + ) if TreeFactory.xmlschema is None: TreeFactory.xmlschema = etree.XMLSchema(xmlschema_context) diff --git a/doc/xsd/dbhierx.xsd b/doc/xsd/dbhierx.xsd index af99df6b79..1c47c3274d 100644 --- a/doc/xsd/dbhierx.xsd +++ b/doc/xsd/dbhierx.xsd @@ -96,7 +96,6 @@ - @@ -279,19 +278,17 @@ - - - - - - - - - - - - - + + + + + + + + + + + diff --git a/doc/xsd/dbpoolx.xsd b/doc/xsd/dbpoolx.xsd index 0ce5cb7b3c..2627565397 100644 --- a/doc/xsd/dbpoolx.xsd +++ b/doc/xsd/dbpoolx.xsd @@ -303,10 +303,6 @@ - - - - @@ -318,17 +314,12 @@ - - - + - - - - + @@ -433,106 +424,92 @@ d. Just Acronym, Emphasis, and Trademark; no other word elements. --> - - - - - - - - - - - - - - - + + + + + + + + + + + + + - - - - - - - - - - - - - + + + + + + + + + + + - - - - - - - - - - - - - + + + + + + + + + + + - - - - - - - - - - - - + + + + + + + + + + - - - - - - - - - + + + + + + + - - - - - - - - - - - - - - + + + + + + + + + + + + - - - - - - - - - - - - + + + + + + + + + + @@ -2454,7 +2431,6 @@ - From f8d47ced22a12965645a7ea6aa5d7b97e4073a4f Mon Sep 17 00:00:00 2001 From: William Deegan Date: Sun, 16 Nov 2025 20:25:31 -0800 Subject: [PATCH 2/5] Use newer lxml for python >- 3.13 --- requirements-dev.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/requirements-dev.txt b/requirements-dev.txt index e97410e08d..9a34423e7a 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -6,6 +6,7 @@ # it's been a troublesome component in the past. # Skip lxml for win32 as no tests which require it currently pass on win32 lxml<5; python_version < '3.13' and sys_platform != 'win32' +lxml>=5.0.0; python_version >= '3.13' ninja From dcf82e6efa50a6e410168005a6bef6da11d11cb7 Mon Sep 17 00:00:00 2001 From: William Deegan Date: Sun, 16 Nov 2025 20:28:47 -0800 Subject: [PATCH 3/5] Try github package action using newer lxml and python 3.14 --- .github/workflows/scons-package.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/scons-package.yml b/.github/workflows/scons-package.yml index 66ac04f742..6180864fce 100644 --- a/.github/workflows/scons-package.yml +++ b/.github/workflows/scons-package.yml @@ -16,11 +16,10 @@ jobs: steps: - uses: actions/checkout@v4 - # We can't build with > 3.12 for now: no usable lxml wheel from 3.13 on - - name: Set up Python 3.12 + - name: Set up Python 3.14 uses: actions/setup-python@v5 with: - python-version: '3.12' + python-version: '3.14' cache: 'pip' - name: Install dependencies From f470a3a35926607223040a075d8a4c3feee0d669 Mon Sep 17 00:00:00 2001 From: William Deegan Date: Sun, 16 Nov 2025 20:33:58 -0800 Subject: [PATCH 4/5] [ci skip] Add to CHANGES.txt and RELEASE.txt --- CHANGES.txt | 5 ++++- RELEASE.txt | 3 +++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGES.txt b/CHANGES.txt index 0d4c4dad8f..d96714030a 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -12,10 +12,13 @@ NOTE: Since SCons 4.9.0, Python 3.7.0 or above is required. RELEASE VERSION/DATE TO BE FILLED IN LATER - From John Doe: + From John Doe: - Whatever John Doe did. + From William Deegan: + - Fix SCons Docbook schema to work with lxml > 5 + RELEASE 4.10.1 - Sun, 16 Nov 2025 10:51:57 -0700 diff --git a/RELEASE.txt b/RELEASE.txt index 9047a7a9a8..8141c8c572 100644 --- a/RELEASE.txt +++ b/RELEASE.txt @@ -53,6 +53,9 @@ DOCUMENTATION typo fixes, even if they're mentioned in src/CHANGES.txt to give the contributor credit) +- Fix SCons Docbook schema to work with lxml > 5 + + DEVELOPMENT ----------- From 14a7506bc75318cfeace502585ac8a9219f8ef0c Mon Sep 17 00:00:00 2001 From: William Deegan Date: Mon, 17 Nov 2025 11:47:40 -0800 Subject: [PATCH 5/5] Update editor config copies of scons xsd --- .../serna/scons/xsd/dbpoolx.xsd | 176 ++++++++---------- .../addon/config/scons/scons_xsd/dbpoolx.xsd | 176 ++++++++---------- .../addon/config/scons/scons_xsd/dbpoolx.xsd | 176 ++++++++---------- 3 files changed, 228 insertions(+), 300 deletions(-) diff --git a/doc/editor_configs/serna/scons/xsd/dbpoolx.xsd b/doc/editor_configs/serna/scons/xsd/dbpoolx.xsd index 0ce5cb7b3c..2627565397 100644 --- a/doc/editor_configs/serna/scons/xsd/dbpoolx.xsd +++ b/doc/editor_configs/serna/scons/xsd/dbpoolx.xsd @@ -303,10 +303,6 @@ - - - - @@ -318,17 +314,12 @@ - - - + - - - - + @@ -433,106 +424,92 @@ d. Just Acronym, Emphasis, and Trademark; no other word elements. --> - - - - - - - - - - - - - - - + + + + + + + + + + + + + - - - - - - - - - - - - - + + + + + + + + + + + - - - - - - - - - - - - - + + + + + + + + + + + - - - - - - - - - - - - + + + + + + + + + + - - - - - - - - - + + + + + + + - - - - - - - - - - - - - - + + + + + + + + + + + + - - - - - - - - - - - - + + + + + + + + + + @@ -2454,7 +2431,6 @@ - diff --git a/doc/editor_configs/xmlmind/addon/config/scons/scons_xsd/dbpoolx.xsd b/doc/editor_configs/xmlmind/addon/config/scons/scons_xsd/dbpoolx.xsd index 0ce5cb7b3c..2627565397 100644 --- a/doc/editor_configs/xmlmind/addon/config/scons/scons_xsd/dbpoolx.xsd +++ b/doc/editor_configs/xmlmind/addon/config/scons/scons_xsd/dbpoolx.xsd @@ -303,10 +303,6 @@ - - - - @@ -318,17 +314,12 @@ - - - + - - - - + @@ -433,106 +424,92 @@ d. Just Acronym, Emphasis, and Trademark; no other word elements. --> - - - - - - - - - - - - - - - + + + + + + + + + + + + + - - - - - - - - - - - - - + + + + + + + + + + + - - - - - - - - - - - - - + + + + + + + + + + + - - - - - - - - - - - - + + + + + + + + + + - - - - - - - - - + + + + + + + - - - - - - - - - - - - - - + + + + + + + + + + + + - - - - - - - - - - - - + + + + + + + + + + @@ -2454,7 +2431,6 @@ - diff --git a/doc/editor_configs/xmlmind5/addon/config/scons/scons_xsd/dbpoolx.xsd b/doc/editor_configs/xmlmind5/addon/config/scons/scons_xsd/dbpoolx.xsd index 0ce5cb7b3c..2627565397 100644 --- a/doc/editor_configs/xmlmind5/addon/config/scons/scons_xsd/dbpoolx.xsd +++ b/doc/editor_configs/xmlmind5/addon/config/scons/scons_xsd/dbpoolx.xsd @@ -303,10 +303,6 @@ - - - - @@ -318,17 +314,12 @@ - - - + - - - - + @@ -433,106 +424,92 @@ d. Just Acronym, Emphasis, and Trademark; no other word elements. --> - - - - - - - - - - - - - - - + + + + + + + + + + + + + - - - - - - - - - - - - - + + + + + + + + + + + - - - - - - - - - - - - - + + + + + + + + + + + - - - - - - - - - - - - + + + + + + + + + + - - - - - - - - - + + + + + + + - - - - - - - - - - - - - - + + + + + + + + + + + + - - - - - - - - - - - - + + + + + + + + + + @@ -2454,7 +2431,6 @@ -