From 681f47d7c07153fe3601816d59b5affa698da361 Mon Sep 17 00:00:00 2001 From: Brad Bell Date: Tue, 1 Oct 2024 22:30:36 -0700 Subject: [PATCH] master: run_xrst.py: Check for special urlling warning on MacOS. --- pyproject.toml | 2 +- setup.py | 2 +- test_rst/2024.rst | 11 ++++++++++- user/2024.xrst | 8 ++++++++ xrst/run_xrst.py | 22 ++++++++++++++++++++-- 5 files changed, 40 insertions(+), 5 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 72e3cd8..6d0a6de 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -11,7 +11,7 @@ build-backend = 'setuptools.build_meta' # ----------------------------------------------------------------------------- [project] name = 'xrst' -version = '2024.9.14' +version = '2024.10.1' description = 'Extract RST files from source code and run Sphinx' readme = 'readme.md' requires-python = '>=3.0' diff --git a/setup.py b/setup.py index 2555e74..50431f7 100644 --- a/setup.py +++ b/setup.py @@ -8,7 +8,7 @@ setup( name = 'xrst', - version = '2024.9.14', + version = '2024.10.1', description = 'Extract RST files from source code and run Sphinx', license = 'GPL-3.0-or-later', keywords = 'sphinx rst documentation source', diff --git a/test_rst/2024.rst b/test_rst/2024.rst index 039d446..b9ac7a9 100644 --- a/test_rst/2024.rst +++ b/test_rst/2024.rst @@ -5,7 +5,7 @@ !!!! .. meta:: - :keywords: 2024,xrst,release,notes,for,mm-dd,09-09,08-25,08-13,08-12,06-25,04-30,04-06,04-05,03-30,03-29,03-28,03-19,03-16,03-04,03-02,03-01,02-29,02-25,02-14,02-03,01-29,01-21,01-04,01-01 + :keywords: 2024,xrst,release,notes,for,mm-dd,10-01,09-09,08-25,08-13,08-12,06-25,04-30,04-06,04-05,03-30,03-29,03-28,03-19,03-16,03-04,03-02,03-01,02-29,02-25,02-14,02-03,01-29,01-21,01-04,01-01 .. index:: 2024, xrst, release, notes, 2024 @@ -24,6 +24,15 @@ xrst Release Notes for 2024 mm-dd ***** +.. _2024@mm-dd@10-01: + +10-01 +===== +MacOS python has an issue that was causing xrst to abort; see +`urllib3 issue 3020 `_ . +This has been changed so that xrst only prints a warning +when this is the only warning or error message. + .. _2024@mm-dd@09-09: 09-09 diff --git a/user/2024.xrst b/user/2024.xrst index 1367aac..a503b50 100644 --- a/user/2024.xrst +++ b/user/2024.xrst @@ -18,6 +18,7 @@ SPDX-FileContributor: 2020-24 Bradley M. Bell tox ubuntu workflow + urllib } xrst Release Notes for 2024 @@ -26,6 +27,13 @@ xrst Release Notes for 2024 mm-dd ***** +10-01 +===== +MacOS python has an issue that was causing xrst to abort; see +`urllib3 issue 3020 `_ . +This has been changed so that xrst only prints a warning +when this is the only warning or error message. + 09-09 ===== The development and install tools were extended to work well on diff --git a/xrst/run_xrst.py b/xrst/run_xrst.py index 7f4e600..7d46465 100644 --- a/xrst/run_xrst.py +++ b/xrst/run_xrst.py @@ -366,6 +366,7 @@ import filecmp import argparse import subprocess +import platform # --------------------------------------------------------------------------- # system_exit # Error messages in this file do not use xrst.system_exit because @@ -469,8 +470,25 @@ def system_command( # sphinx_error sphinx_error = result.returncode != 0 # - # alert + # alert_list alert_list = alert_data.split('\n') + while '' in alert_list : + alert_list.remove('') + if len(alert_list) > 0 : + if alert_list[-1].strip() == 'warnings.warn(' : + alert_list.pop(-1) + # + # MacOS has a security warning + if len(alert_list) == 1 : + issue_320 = 'https://github.com/urllib3/urllib3/issues/3020' + if alert_list[0].find(issue_320) != -1 : + uname = platform.uname().system + if uname == 'Darwin' : + message = 'MacOS python has an issue; see ' + message += issue_320 + '\n' + sys.stderr.write(message) + return + # for alert in alert_list : # # m_alert @@ -608,7 +626,7 @@ def fix_latex(latex_dir, project_name) : import xrst # # version -version = '2024.9.14' +version = '2024.10.1' # def run_xrst() : #