- Update to 3.12.5:

- Tests
    - gh-59022: Add tests for pkgutil.extend_path(). Patch by
      Andreas Stocker.
    - gh-99242: os.getloadavg() may throw OSError when
      running regression tests under certain conditions (e.g.
      chroot). This error is now caught and ignored, since
      reporting load average is optional.
    - gh-121084: Fix test_typing random leaks. Clear typing ABC
      caches when running tests for refleaks (-R option): call
      _abc_caches_clear() on typing abstract classes and their
      subclasses. Patch by Victor Stinner.
    - gh-121160: Add a test for
      readline.set_history_length(). Note that this test may fail
      on readline libraries.
    - gh-121200: Fix test_expanduser_pwd2() of
      test_posixpath. Call getpwnam() to get pw_dir, since it
      can be different than getpwall() pw_dir. Patch by Victor
      Stinner.
    - gh-121188: When creating the JUnit XML file, regrtest
      now escapes characters which are invalid in XML, such
      as the chr(27) control character used in ANSI escape
      sequences. Patch by Victor Stinner.
  - Security
    - gh-121957: Fixed missing audit events around interactive
      use of Python, now also properly firing for python -i, as
      well as for python -m asyncio. The event in question is
      cpython.run_stdin.
    - gh-122133: Authenticate the socket connection for the
      socket.socketpair() fallback on platforms where AF_UNIX is

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:Factory/python312?expand=0&rev=60
This commit is contained in:
2024-08-07 18:22:59 +00:00
committed by Git OBS Bridge
parent 822e5022b5
commit 31e91ac782
10 changed files with 256 additions and 520 deletions

View File

@@ -1,32 +1,32 @@
---
Doc/tools/extensions/c_annotations.py | 6 +++++-
Doc/tools/extensions/glossary_search.py | 12 ++++++++++--
Doc/tools/extensions/pyspecific.py | 13 ++++++++++---
3 files changed, 25 insertions(+), 6 deletions(-)
Doc/tools/extensions/pyspecific.py | 5 ++++-
3 files changed, 19 insertions(+), 4 deletions(-)
--- a/Doc/tools/extensions/c_annotations.py
+++ b/Doc/tools/extensions/c_annotations.py
@@ -84,7 +84,11 @@ class Annotations:
self.stable_abi_data[name] = record
def add_annotations(self, app, doctree):
- for node in doctree.findall(addnodes.desc_content):
+ try:
+ findall = doctree.findall
+ except AttributeError:
+ findall = doctree.traverse
+ for node in findall(addnodes.desc_content):
par = node.parent
if par['domain'] != 'c':
continue
@@ -118,7 +118,11 @@ def add_annotations(app: Sphinx, doctree
state = app.env.domaindata["c_annotations"]
refcount_data = state["refcount_data"]
stable_abi_data = state["stable_abi_data"]
- for node in doctree.findall(addnodes.desc_content):
+ try:
+ findall = doctree.findall
+ except AttributeError:
+ findall = doctree.traverse
+ for node in findall(addnodes.desc_content):
par = node.parent
if par["domain"] != "c":
continue
--- a/Doc/tools/extensions/glossary_search.py
+++ b/Doc/tools/extensions/glossary_search.py
@@ -25,8 +25,16 @@ def process_glossary_nodes(app, doctree,
terms = {}
@@ -30,8 +30,16 @@ def process_glossary_nodes(
else:
terms = app.env.glossary_terms = {}
- for node in doctree.findall(glossary):
- for glossary_item in node.findall(definition_list_item):
- for glossary_item in node.findall(nodes.definition_list_item):
+ try:
+ findall = doctree.findall
+ except AttributeError:
@@ -37,8 +37,8 @@
+ except AttributeError:
+ node_findall = node.traverse
+ for glossary_item in node_findall(definition_list_item):
term = glossary_item[0].astext().lower()
definition = glossary_item[1]
term = glossary_item[0].astext()
definition = glossary_item[-1]
--- a/Doc/tools/extensions/pyspecific.py
+++ b/Doc/tools/extensions/pyspecific.py
@@ -54,25 +54,3 @@
ISSUE_URI = 'https://bugs.python.org/issue?@action=redirect&bpo=%s'
@@ -604,7 +607,11 @@ def parse_monitoring_event(env, sig, sig
def process_audit_events(app, doctree, fromdocname):
- for node in doctree.findall(audit_event_list):
+ try:
+ findall = doctree.findall
+ except AttributeError:
+ findall = doctree.traverse
+ for node in findall(audit_event_list):
break
else:
return
@@ -663,7 +670,7 @@ def process_audit_events(app, doctree, f
body += row
- for node in doctree.findall(audit_event_list):
+ for node in findall(audit_event_list):
node.replace_self(table)