diff --git a/invalid-json.patch b/invalid-json.patch new file mode 100644 index 0000000..d3a25ba --- /dev/null +++ b/invalid-json.patch @@ -0,0 +1,44 @@ +--- + Doc/howto/logging-cookbook.rst | 24 ++++++++++++++---------- + 1 file changed, 14 insertions(+), 10 deletions(-) + +--- a/Doc/howto/logging-cookbook.rst ++++ b/Doc/howto/logging-cookbook.rst +@@ -340,10 +340,12 @@ adding a ``filters`` section parallel to + + .. code-block:: json + +- "filters": { +- "warnings_and_below": { +- "()" : "__main__.filter_maker", +- "level": "WARNING" ++ { ++ "filters": { ++ "warnings_and_below": { ++ "()" : "__main__.filter_maker", ++ "level": "WARNING" ++ } + } + } + +@@ -351,12 +353,14 @@ and changing the section on the ``stdout + + .. code-block:: json + +- "stdout": { +- "class": "logging.StreamHandler", +- "level": "INFO", +- "formatter": "simple", +- "stream": "ext://sys.stdout", +- "filters": ["warnings_and_below"] ++ { ++ "stdout": { ++ "class": "logging.StreamHandler", ++ "level": "INFO", ++ "formatter": "simple", ++ "stream": "ext://sys.stdout", ++ "filters": ["warnings_and_below"] ++ } + } + + A filter is just a function, so we can define the ``filter_maker`` (a factory diff --git a/python310.changes b/python310.changes index d1b3655..21c207e 100644 --- a/python310.changes +++ b/python310.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Mon Mar 13 08:39:53 UTC 2023 - Matej Cepl + +- Add invalid-json.patch fixing invalid JSON in + Doc/howto/logging-cookbook.rst (somehow similar to + gh#python/cpython#102582). + ------------------------------------------------------------------- Wed Mar 1 20:59:04 UTC 2023 - Matej Cepl diff --git a/python310.spec b/python310.spec index 6cbd5be..6b565a6 100644 --- a/python310.spec +++ b/python310.spec @@ -170,6 +170,9 @@ Patch36: support-expat-CVE-2022-25236-patched.patch # blocklist bypass via the urllib.parse component when supplying # a URL that starts with blank characters Patch37: CVE-2023-24329-blank-URL-bypass.patch +# PATCH-FIX-UPSTREAM invalid-json.patch gh#python/cpython#102582 mcepl@suse.com +# We require valid JSON in documentation +Patch38: invalid-json.patch BuildRequires: autoconf-archive BuildRequires: automake BuildRequires: fdupes @@ -443,6 +446,7 @@ other applications. %patch35 -p1 %patch36 -p1 %patch37 -p1 +%patch38 -p1 # drop Autoconf version requirement sed -i 's/^AC_PREREQ/dnl AC_PREREQ/' configure.ac