Skip to content

Commit

Permalink
master: run_xrst.py: Check for special urlling warning on MacOS.
Browse files Browse the repository at this point in the history
  • Loading branch information
bradbell committed Oct 2, 2024
1 parent 4596a91 commit 681f47d
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 5 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
11 changes: 10 additions & 1 deletion test_rst/2024.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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 <https://github.com/urllib3/urllib3/issues/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
Expand Down
8 changes: 8 additions & 0 deletions user/2024.xrst
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ SPDX-FileContributor: 2020-24 Bradley M. Bell
tox
ubuntu
workflow
urllib
}

xrst Release Notes for 2024
Expand All @@ -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 <https://github.com/urllib3/urllib3/issues/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
Expand Down
22 changes: 20 additions & 2 deletions xrst/run_xrst.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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() :
#
Expand Down

0 comments on commit 681f47d

Please sign in to comment.