diff -Nru python3-stdlib-extensions-3.12.2/3.11/Lib/distutils/command/check.py python3-stdlib-extensions-3.12.3/3.11/Lib/distutils/command/check.py --- python3-stdlib-extensions-3.12.2/3.11/Lib/distutils/command/check.py 2024-02-06 21:21:21.000000000 +0000 +++ python3-stdlib-extensions-3.12.3/3.11/Lib/distutils/command/check.py 2024-04-02 08:25:04.000000000 +0000 @@ -125,7 +125,13 @@ # the include and csv_table directives need this to be a path source_path = self.distribution.script_name or 'setup.py' parser = Parser() - settings = frontend.OptionParser(components=(Parser,)).get_default_values() + try: + get_default_settings = frontend.get_default_settings + except AttributeError: + # Deprecated in Docutils 0.19, may be broken in Docutils 0.21. + settings = frontend.OptionParser(components=(Parser,)).get_default_values() + else: + settings = get_default_settings(Parser) settings.tab_width = 4 settings.pep_references = None settings.rfc_references = None diff -Nru python3-stdlib-extensions-3.12.2/3.11/Lib/distutils/tests/test_register.py python3-stdlib-extensions-3.12.3/3.11/Lib/distutils/tests/test_register.py --- python3-stdlib-extensions-3.12.2/3.11/Lib/distutils/tests/test_register.py 2024-02-06 21:21:21.000000000 +0000 +++ python3-stdlib-extensions-3.12.3/3.11/Lib/distutils/tests/test_register.py 2024-04-02 08:25:04.000000000 +0000 @@ -291,6 +291,8 @@ cmd = self._get_cmd() with check_warnings() as w: warnings.simplefilter("always") + warnings.filterwarnings("ignore", ".*OptionParser class will be replaced.*") + warnings.filterwarnings("ignore", ".*Option class will be removed.*") cmd.check_metadata() self.assertEqual(len(w.warnings), 1) diff -Nru python3-stdlib-extensions-3.12.2/3.11/Lib/tkinter/__init__.py python3-stdlib-extensions-3.12.3/3.11/Lib/tkinter/__init__.py --- python3-stdlib-extensions-3.12.2/3.11/Lib/tkinter/__init__.py 2024-02-06 21:21:21.000000000 +0000 +++ python3-stdlib-extensions-3.12.3/3.11/Lib/tkinter/__init__.py 2024-04-02 08:25:04.000000000 +0000 @@ -3073,11 +3073,16 @@ Widget.__init__(self, master, 'checkbutton', cnf, kw) def _setup(self, master, cnf): + # Because Checkbutton defaults to a variable with the same name as + # the widget, Checkbutton default names must be globally unique, + # not just unique within the parent widget. if not cnf.get('name'): global _checkbutton_count name = self.__class__.__name__.lower() _checkbutton_count += 1 - cnf['name'] = f'!{name}{_checkbutton_count}' + # To avoid collisions with ttk.Checkbutton, use the different + # name template. + cnf['name'] = f'!{name}-{_checkbutton_count}' super()._setup(master, cnf) def deselect(self): diff -Nru python3-stdlib-extensions-3.12.2/3.11/Lib/tkinter/test/test_ttk/test_widgets.py python3-stdlib-extensions-3.12.3/3.11/Lib/tkinter/test/test_ttk/test_widgets.py --- python3-stdlib-extensions-3.12.2/3.11/Lib/tkinter/test/test_ttk/test_widgets.py 2024-02-06 21:21:21.000000000 +0000 +++ python3-stdlib-extensions-3.12.3/3.11/Lib/tkinter/test/test_ttk/test_widgets.py 2024-04-02 08:25:04.000000000 +0000 @@ -287,9 +287,29 @@ b.pack() buttons.append(b) variables = [str(b['variable']) for b in buttons] - print(variables) self.assertEqual(len(set(variables)), 4, variables) + def test_unique_variables2(self): + buttons = [] + f = ttk.Frame(self.root) + f.pack() + f = ttk.Frame(self.root) + f.pack() + for j in 'AB': + b = tkinter.Checkbutton(f, text=j) + b.pack() + buttons.append(b) + # Should be larger than the number of all previously created + # tkinter.Checkbutton widgets: + for j in range(100): + b = ttk.Checkbutton(f, text=str(j)) + b.pack() + buttons.append(b) + names = [str(b) for b in buttons] + self.assertEqual(len(set(names)), len(buttons), names) + variables = [str(b['variable']) for b in buttons] + self.assertEqual(len(set(variables)), len(buttons), variables) + @add_standard_options(IntegerSizeTests, StandardTtkOptionsTests) class EntryTest(AbstractWidgetTest, unittest.TestCase): diff -Nru python3-stdlib-extensions-3.12.2/3.12/Lib/tkinter/__init__.py python3-stdlib-extensions-3.12.3/3.12/Lib/tkinter/__init__.py --- python3-stdlib-extensions-3.12.2/3.12/Lib/tkinter/__init__.py 2024-02-06 20:19:44.000000000 +0000 +++ python3-stdlib-extensions-3.12.3/3.12/Lib/tkinter/__init__.py 2024-04-09 08:09:14.000000000 +0000 @@ -3074,11 +3074,16 @@ Widget.__init__(self, master, 'checkbutton', cnf, kw) def _setup(self, master, cnf): + # Because Checkbutton defaults to a variable with the same name as + # the widget, Checkbutton default names must be globally unique, + # not just unique within the parent widget. if not cnf.get('name'): global _checkbutton_count name = self.__class__.__name__.lower() _checkbutton_count += 1 - cnf['name'] = f'!{name}{_checkbutton_count}' + # To avoid collisions with ttk.Checkbutton, use the different + # name template. + cnf['name'] = f'!{name}-{_checkbutton_count}' super()._setup(master, cnf) def deselect(self): diff -Nru python3-stdlib-extensions-3.12.2/3.12/Modules/pycore_instruments.h python3-stdlib-extensions-3.12.3/3.12/Modules/pycore_instruments.h --- python3-stdlib-extensions-3.12.2/3.12/Modules/pycore_instruments.h 2024-02-06 20:19:44.000000000 +0000 +++ python3-stdlib-extensions-3.12.3/3.12/Modules/pycore_instruments.h 2024-04-09 08:09:14.000000000 +0000 @@ -40,7 +40,7 @@ #define PY_MONITORING_EVENT_RERAISE 14 -/* Ancilliary events */ +/* Ancillary events */ #define PY_MONITORING_EVENT_C_RETURN 15 #define PY_MONITORING_EVENT_C_RAISE 16 diff -Nru python3-stdlib-extensions-3.12.2/3.12/Modules/pycore_symtable.h python3-stdlib-extensions-3.12.3/3.12/Modules/pycore_symtable.h --- python3-stdlib-extensions-3.12.2/3.12/Modules/pycore_symtable.h 2024-02-06 20:19:44.000000000 +0000 +++ python3-stdlib-extensions-3.12.3/3.12/Modules/pycore_symtable.h 2024-04-09 08:09:14.000000000 +0000 @@ -109,18 +109,18 @@ /* Flags for def-use information */ -#define DEF_GLOBAL 1 /* global stmt */ -#define DEF_LOCAL 2 /* assignment in code block */ -#define DEF_PARAM 2<<1 /* formal parameter */ -#define DEF_NONLOCAL 2<<2 /* nonlocal stmt */ -#define USE 2<<3 /* name is used */ -#define DEF_FREE 2<<4 /* name used but not defined in nested block */ -#define DEF_FREE_CLASS 2<<5 /* free variable from class's method */ -#define DEF_IMPORT 2<<6 /* assignment occurred via import */ -#define DEF_ANNOT 2<<7 /* this name is annotated */ -#define DEF_COMP_ITER 2<<8 /* this name is a comprehension iteration variable */ -#define DEF_TYPE_PARAM 2<<9 /* this name is a type parameter */ -#define DEF_COMP_CELL 2<<10 /* this name is a cell in an inlined comprehension */ +#define DEF_GLOBAL 1 /* global stmt */ +#define DEF_LOCAL 2 /* assignment in code block */ +#define DEF_PARAM (2<<1) /* formal parameter */ +#define DEF_NONLOCAL (2<<2) /* nonlocal stmt */ +#define USE (2<<3) /* name is used */ +#define DEF_FREE (2<<4) /* name used but not defined in nested block */ +#define DEF_FREE_CLASS (2<<5) /* free variable from class's method */ +#define DEF_IMPORT (2<<6) /* assignment occurred via import */ +#define DEF_ANNOT (2<<7) /* this name is annotated */ +#define DEF_COMP_ITER (2<<8) /* this name is a comprehension iteration variable */ +#define DEF_TYPE_PARAM (2<<9) /* this name is a type parameter */ +#define DEF_COMP_CELL (2<<10) /* this name is a cell in an inlined comprehension */ #define DEF_BOUND (DEF_LOCAL | DEF_PARAM | DEF_IMPORT) diff -Nru python3-stdlib-extensions-3.12.2/debian/changelog python3-stdlib-extensions-3.12.3/debian/changelog --- python3-stdlib-extensions-3.12.2/debian/changelog 2024-03-31 17:03:55.000000000 +0000 +++ python3-stdlib-extensions-3.12.3/debian/changelog 2024-04-12 13:14:55.000000000 +0000 @@ -1,3 +1,9 @@ +python3-stdlib-extensions (3.12.3-0ubuntu1) noble; urgency=medium + + * Update 3.12 extensions and modules to the 3.12.3 release. + + -- Matthias Klose Fri, 12 Apr 2024 15:14:55 +0200 + python3-stdlib-extensions (3.12.2-3ubuntu4) noble; urgency=medium * No-change rebuild for CVE-2024-3094