Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python312 for openSUSE:Factory checked in at 2025-11-21 16:54:19 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python312 (Old) and /work/SRC/openSUSE:Factory/.python312.new.2061 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python312" Fri Nov 21 16:54:19 2025 rev:41 rq:1318749 version:3.12.12 Changes: -------- --- /work/SRC/openSUSE:Factory/python312/python312.changes 2025-11-18 15:28:34.822939162 +0100 +++ /work/SRC/openSUSE:Factory/.python312.new.2061/python312.changes 2025-11-21 16:54:54.177871480 +0100 @@ -1,0 +2,21 @@ +Wed Nov 19 19:21:41 UTC 2025 - Matej Cepl <[email protected]> + +- Add pass-test_write_read_limited_history.patch: + + Fix readline history truncation when length is reduced + + The `readline.set_history_length()` function did not previously + truncate the in-memory history when the new length was set to + a value smaller than the current number of history items. This + could lead to unexpected behavior where `get_history_length()` + would still report the old length and writing the history to a + file would write more entries than the new limit. + + This patch modifies `set_history_length()` to explicitly + remove the oldest history entries using `remove_history()` + when the length is decreased, ensuring the in-memory history + is correctly truncated to the new limit. This brings the + function's behavior in line with expectations and fixes + failures in `test_write_read_limited_history`. + +------------------------------------------------------------------- New: ---- pass-test_write_read_limited_history.patch ----------(New B)---------- New: - Add pass-test_write_read_limited_history.patch: ----------(New E)---------- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python312.spec ++++++ --- /var/tmp/diff_new_pack.8e9xSn/_old 2025-11-21 16:54:55.469925926 +0100 +++ /var/tmp/diff_new_pack.8e9xSn/_new 2025-11-21 16:54:55.469925926 +0100 @@ -192,6 +192,9 @@ # PATCH-FIX-UPSTREAM CVE-2025-6075-expandvars-perf-degrad.patch bsc#1252974 [email protected] # Avoid potential quadratic complexity vulnerabilities in path modules Patch47: CVE-2025-6075-expandvars-perf-degrad.patch +# PATCH-FIX-UPSTREAM pass-test_write_read_limited_history.patch bsc#[0-9]+ [email protected] +# Fix readline history truncation when length is reduced +Patch48: pass-test_write_read_limited_history.patch BuildRequires: autoconf-archive BuildRequires: automake BuildRequires: fdupes ++++++ _scmsync.obsinfo ++++++ --- /var/tmp/diff_new_pack.8e9xSn/_old 2025-11-21 16:54:55.581930646 +0100 +++ /var/tmp/diff_new_pack.8e9xSn/_new 2025-11-21 16:54:55.585930814 +0100 @@ -1,6 +1,6 @@ -mtime: 1763243567 -commit: b56484d65b0afcf20d582b6a727b63f2b33a9e9540077648657b47bdeb66bdc3 +mtime: 1763584779 +commit: ffa140fab36e2ef2ce8885da2679b50bdcd45ade3d9627f8c66c161b2339665b url: https://src.opensuse.org/python-interpreters/python312.git -revision: b56484d65b0afcf20d582b6a727b63f2b33a9e9540077648657b47bdeb66bdc3 +revision: ffa140fab36e2ef2ce8885da2679b50bdcd45ade3d9627f8c66c161b2339665b projectscmsync: https://src.opensuse.org/python-interpreters/_ObsPrj ++++++ build.specials.obscpio ++++++ --- old/.gitignore 2025-11-15 22:53:05.000000000 +0100 +++ new/.gitignore 2025-11-19 22:07:35.000000000 +0100 @@ -1 +1,5 @@ .osc +*.obscpio +_build.* +.pbuild +python312-3.12.*-build ++++++ build.specials.obscpio ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/.gitignore new/.gitignore --- old/.gitignore 1970-01-01 01:00:00.000000000 +0100 +++ new/.gitignore 2025-11-19 22:07:35.000000000 +0100 @@ -0,0 +1,5 @@ +.osc +*.obscpio +_build.* +.pbuild +python312-3.12.*-build ++++++ doc-py38-to-py36.patch ++++++ --- /var/tmp/diff_new_pack.8e9xSn/_old 2025-11-21 16:54:55.857942277 +0100 +++ /var/tmp/diff_new_pack.8e9xSn/_new 2025-11-21 16:54:55.869942782 +0100 @@ -1,5 +1,5 @@ --- - Doc/Makefile | 2 + Doc/Makefile | 8 +-- Doc/conf.py | 16 ++++++- Doc/tools/check-warnings.py | 5 +- Doc/tools/extensions/audit_events.py | 54 +++++++++++++------------- @@ -12,13 +12,13 @@ Doc/tools/extensions/misc_news.py | 14 ++---- Doc/tools/extensions/patchlevel.py | 9 ++-- Doc/tools/extensions/pydoc_topics.py | 22 +++++----- - 13 files changed, 123 insertions(+), 115 deletions(-) + 13 files changed, 126 insertions(+), 118 deletions(-) Index: Python-3.12.12/Doc/Makefile =================================================================== --- Python-3.12.12.orig/Doc/Makefile 2025-10-09 13:07:00.000000000 +0200 -+++ Python-3.12.12/Doc/Makefile 2025-11-15 22:52:25.246059746 +0100 -@@ -14,7 +14,7 @@ ++++ Python-3.12.12/Doc/Makefile 2025-11-16 00:10:17.204996992 +0100 +@@ -14,15 +14,15 @@ SOURCES = DISTVERSION = $(shell $(PYTHON) tools/extensions/patchlevel.py) REQUIREMENTS = requirements.txt @@ -27,10 +27,21 @@ # Internal variables. PAPEROPT_a4 = --define latex_elements.papersize=a4paper + PAPEROPT_letter = --define latex_elements.papersize=letterpaper + +-ALLSPHINXOPTS = --builder $(BUILDER) \ +- --doctree-dir build/doctrees \ +- --jobs $(JOBS) \ ++ALLSPHINXOPTS = -b $(BUILDER) \ ++ -d build/doctrees \ ++ -j $(JOBS) \ + $(PAPEROPT_$(PAPER)) \ + $(SPHINXOPTS) $(SPHINXERRORHANDLING) \ + . build/$(BUILDER) $(SOURCES) Index: Python-3.12.12/Doc/conf.py =================================================================== ---- Python-3.12.12.orig/Doc/conf.py 2025-11-15 22:51:43.509094886 +0100 -+++ Python-3.12.12/Doc/conf.py 2025-11-15 22:52:02.325079044 +0100 +--- Python-3.12.12.orig/Doc/conf.py 2025-11-16 00:09:22.481046078 +0100 ++++ Python-3.12.12/Doc/conf.py 2025-11-16 00:09:33.435219937 +0100 @@ -11,6 +11,8 @@ from importlib import import_module from importlib.util import find_spec @@ -78,7 +89,7 @@ Index: Python-3.12.12/Doc/tools/check-warnings.py =================================================================== --- Python-3.12.12.orig/Doc/tools/check-warnings.py 2025-10-09 13:07:00.000000000 +0200 -+++ Python-3.12.12/Doc/tools/check-warnings.py 2025-11-15 22:52:02.337079034 +0100 ++++ Python-3.12.12/Doc/tools/check-warnings.py 2025-11-16 00:09:33.435482474 +0100 @@ -228,7 +228,8 @@ print(filename) for warning in warnings: @@ -101,7 +112,7 @@ Index: Python-3.12.12/Doc/tools/extensions/audit_events.py =================================================================== --- Python-3.12.12.orig/Doc/tools/extensions/audit_events.py 2025-10-09 13:07:00.000000000 +0200 -+++ Python-3.12.12/Doc/tools/extensions/audit_events.py 2025-11-15 22:52:07.273074878 +0100 ++++ Python-3.12.12/Doc/tools/extensions/audit_events.py 2025-11-16 00:09:38.867031380 +0100 @@ -1,9 +1,6 @@ """Support for documenting audit events.""" @@ -245,7 +256,7 @@ Index: Python-3.12.12/Doc/tools/extensions/availability.py =================================================================== --- Python-3.12.12.orig/Doc/tools/extensions/availability.py 2025-10-09 13:07:00.000000000 +0200 -+++ Python-3.12.12/Doc/tools/extensions/availability.py 2025-11-15 22:52:02.356079018 +0100 ++++ Python-3.12.12/Doc/tools/extensions/availability.py 2025-11-16 00:09:33.436104069 +0100 @@ -1,8 +1,6 @@ """Support for documenting platform availability""" @@ -301,8 +312,8 @@ return { Index: Python-3.12.12/Doc/tools/extensions/c_annotations.py =================================================================== ---- Python-3.12.12.orig/Doc/tools/extensions/c_annotations.py 2025-11-15 22:52:02.198824017 +0100 -+++ Python-3.12.12/Doc/tools/extensions/c_annotations.py 2025-11-15 22:52:02.364079011 +0100 +--- Python-3.12.12.orig/Doc/tools/extensions/c_annotations.py 2025-11-16 00:09:33.421429756 +0100 ++++ Python-3.12.12/Doc/tools/extensions/c_annotations.py 2025-11-16 00:09:33.436337970 +0100 @@ -9,22 +9,18 @@ * Set ``stable_abi_file`` to the path to stable ABI list. """ @@ -435,7 +446,7 @@ Index: Python-3.12.12/Doc/tools/extensions/changes.py =================================================================== --- Python-3.12.12.orig/Doc/tools/extensions/changes.py 2025-10-09 13:07:00.000000000 +0200 -+++ Python-3.12.12/Doc/tools/extensions/changes.py 2025-11-15 22:52:02.371079005 +0100 ++++ Python-3.12.12/Doc/tools/extensions/changes.py 2025-11-16 00:09:33.436590030 +0100 @@ -1,7 +1,5 @@ """Support for documenting version of changes, additions, deprecations.""" @@ -473,8 +484,8 @@ app.add_directive("versionchanged", PyVersionChange, override=True) Index: Python-3.12.12/Doc/tools/extensions/glossary_search.py =================================================================== ---- Python-3.12.12.orig/Doc/tools/extensions/glossary_search.py 2025-11-15 22:52:02.199190269 +0100 -+++ Python-3.12.12/Doc/tools/extensions/glossary_search.py 2025-11-15 22:52:02.378079000 +0100 +--- Python-3.12.12.orig/Doc/tools/extensions/glossary_search.py 2025-11-16 00:09:33.421856281 +0100 ++++ Python-3.12.12/Doc/tools/extensions/glossary_search.py 2025-11-16 00:09:33.436945736 +0100 @@ -1,18 +1,14 @@ """Feature search results for glossary items prominently.""" @@ -508,7 +519,7 @@ Index: Python-3.12.12/Doc/tools/extensions/implementation_detail.py =================================================================== --- Python-3.12.12.orig/Doc/tools/extensions/implementation_detail.py 2025-10-09 13:07:00.000000000 +0200 -+++ Python-3.12.12/Doc/tools/extensions/implementation_detail.py 2025-11-15 22:52:02.386078993 +0100 ++++ Python-3.12.12/Doc/tools/extensions/implementation_detail.py 2025-11-16 00:09:33.437321346 +0100 @@ -1,17 +1,10 @@ """Support for marking up implementation details.""" @@ -562,7 +573,7 @@ Index: Python-3.12.12/Doc/tools/extensions/issue_role.py =================================================================== --- Python-3.12.12.orig/Doc/tools/extensions/issue_role.py 2025-10-09 13:07:00.000000000 +0200 -+++ Python-3.12.12/Doc/tools/extensions/issue_role.py 2025-11-15 22:52:02.393078987 +0100 ++++ Python-3.12.12/Doc/tools/extensions/issue_role.py 2025-11-16 00:09:33.437543863 +0100 @@ -1,22 +1,18 @@ """Support for referencing issues in the tracker.""" @@ -611,7 +622,7 @@ Index: Python-3.12.12/Doc/tools/extensions/misc_news.py =================================================================== --- Python-3.12.12.orig/Doc/tools/extensions/misc_news.py 2025-10-09 13:07:00.000000000 +0200 -+++ Python-3.12.12/Doc/tools/extensions/misc_news.py 2025-11-15 22:52:02.401078980 +0100 ++++ Python-3.12.12/Doc/tools/extensions/misc_news.py 2025-11-16 00:09:33.437781606 +0100 @@ -1,7 +1,5 @@ """Support for including Misc/NEWS.""" @@ -667,7 +678,7 @@ Index: Python-3.12.12/Doc/tools/extensions/patchlevel.py =================================================================== --- Python-3.12.12.orig/Doc/tools/extensions/patchlevel.py 2025-10-09 13:07:00.000000000 +0200 -+++ Python-3.12.12/Doc/tools/extensions/patchlevel.py 2025-11-15 22:52:02.408078974 +0100 ++++ Python-3.12.12/Doc/tools/extensions/patchlevel.py 2025-11-16 00:09:33.437983170 +0100 @@ -3,7 +3,7 @@ import re import sys @@ -708,7 +719,7 @@ Index: Python-3.12.12/Doc/tools/extensions/pydoc_topics.py =================================================================== --- Python-3.12.12.orig/Doc/tools/extensions/pydoc_topics.py 2025-10-09 13:07:00.000000000 +0200 -+++ Python-3.12.12/Doc/tools/extensions/pydoc_topics.py 2025-11-15 22:52:02.415078968 +0100 ++++ Python-3.12.12/Doc/tools/extensions/pydoc_topics.py 2025-11-16 00:09:33.438175026 +0100 @@ -1,21 +1,23 @@ """Support for building "topic help" for pydoc.""" ++++++ pass-test_write_read_limited_history.patch ++++++ Index: Python-3.12.12/Modules/readline.c =================================================================== --- Python-3.12.12.orig/Modules/readline.c 2025-11-19 20:17:29.982940492 +0100 +++ Python-3.12.12/Modules/readline.c 2025-11-19 20:36:46.627307300 +0100 @@ -145,6 +145,8 @@ #define readlinestate_global ((readlinestate *)PyModule_GetState(PyState_FindModule(&readlinemodule))) +static int _py_get_history_length(void); +static void _py_free_history_entry(HIST_ENTRY *entry); /* Convert to/from multibyte C strings */ @@ -384,6 +386,27 @@ /*[clinic end generated code: output=e161a53e45987dc7 input=b8901bf16488b760]*/ { _history_length = length; + + if (length < 0) { + stifle_history(-1); + } + else { + int current_length = _py_get_history_length(); + if (length < current_length) { +#if defined(RL_READLINE_VERSION) && RL_READLINE_VERSION >= 0x0500 + HISTORY_STATE *state = history_get_history_state(); + if (state) { + int i; + for (i = 0; i < current_length - length; i++) { + _py_free_history_entry(remove_history(0)); + } + state->length = length; + free(state); + } +#endif + } + stifle_history(length); + } Py_RETURN_NONE; }
