diff -Nru python3-stdlib-extensions-3.10.7/3.10/Lib/tkinter/dialog.py python3-stdlib-extensions-3.10.8/3.10/Lib/tkinter/dialog.py --- python3-stdlib-extensions-3.10.7/3.10/Lib/tkinter/dialog.py 2022-09-05 13:00:02.000000000 +0000 +++ python3-stdlib-extensions-3.10.8/3.10/Lib/tkinter/dialog.py 2022-10-11 11:21:44.000000000 +0000 @@ -11,7 +11,7 @@ def __init__(self, master=None, cnf={}, **kw): cnf = _cnfmerge((cnf, kw)) self.widgetName = '__dialog__' - Widget._setup(self, master, cnf) + self._setup(master, cnf) self.num = self.tk.getint( self.tk.call( 'tk_dialog', self._w, diff -Nru python3-stdlib-extensions-3.10.7/3.10/Lib/tkinter/__init__.py python3-stdlib-extensions-3.10.8/3.10/Lib/tkinter/__init__.py --- python3-stdlib-extensions-3.10.7/3.10/Lib/tkinter/__init__.py 2022-09-05 13:00:02.000000000 +0000 +++ python3-stdlib-extensions-3.10.8/3.10/Lib/tkinter/__init__.py 2022-10-11 11:21:44.000000000 +0000 @@ -2592,7 +2592,7 @@ if kw: cnf = _cnfmerge((cnf, kw)) self.widgetName = widgetName - BaseWidget._setup(self, master, cnf) + self._setup(master, cnf) if self._tclCommands is None: self._tclCommands = [] classes = [(k, v) for k, v in cnf.items() if isinstance(k, type)] @@ -3011,6 +3011,8 @@ return self.tk.call(self._w, 'type', tagOrId) or None +_checkbutton_count = 0 + class Checkbutton(Widget): """Checkbutton widget which is either in on- or off-state.""" @@ -3026,6 +3028,14 @@ underline, variable, width, wraplength.""" Widget.__init__(self, master, 'checkbutton', cnf, kw) + def _setup(self, master, cnf): + if not cnf.get('name'): + global _checkbutton_count + name = self.__class__.__name__.lower() + _checkbutton_count += 1 + cnf['name'] = f'!{name}{_checkbutton_count}' + super()._setup(master, cnf) + def deselect(self): """Put the button in off-state.""" self.tk.call(self._w, 'deselect') diff -Nru python3-stdlib-extensions-3.10.7/3.10/Lib/tkinter/test/test_tkinter/test_widgets.py python3-stdlib-extensions-3.10.8/3.10/Lib/tkinter/test/test_tkinter/test_widgets.py --- python3-stdlib-extensions-3.10.7/3.10/Lib/tkinter/test/test_tkinter/test_widgets.py 2022-09-05 13:00:02.000000000 +0000 +++ python3-stdlib-extensions-3.10.8/3.10/Lib/tkinter/test/test_tkinter/test_widgets.py 2022-10-11 11:21:44.000000000 +0000 @@ -212,6 +212,32 @@ widget = self.create() self.checkParams(widget, 'onvalue', 1, 2.3, '', 'any string') + def test_unique_variables(self): + frames = [] + buttons = [] + for i in range(2): + f = tkinter.Frame(self.root) + f.pack() + frames.append(f) + for j in 'AB': + b = tkinter.Checkbutton(f, text=j) + b.pack() + buttons.append(b) + variables = [str(b['variable']) for b in buttons] + self.assertEqual(len(set(variables)), 4, variables) + + def test_same_name(self): + f1 = tkinter.Frame(self.root) + f2 = tkinter.Frame(self.root) + b1 = tkinter.Checkbutton(f1, name='test', text='Test1') + b2 = tkinter.Checkbutton(f2, name='test', text='Test2') + + v = tkinter.IntVar(self.root, name='test') + b1.select() + self.assertEqual(v.get(), 1) + b2.deselect() + self.assertEqual(v.get(), 0) + @add_standard_options(StandardOptionsTests) class RadiobuttonTest(AbstractLabelTest, unittest.TestCase): diff -Nru python3-stdlib-extensions-3.10.7/3.10/Lib/tkinter/test/test_ttk/test_widgets.py python3-stdlib-extensions-3.10.8/3.10/Lib/tkinter/test/test_ttk/test_widgets.py --- python3-stdlib-extensions-3.10.7/3.10/Lib/tkinter/test/test_ttk/test_widgets.py 2022-09-05 13:00:02.000000000 +0000 +++ python3-stdlib-extensions-3.10.8/3.10/Lib/tkinter/test/test_ttk/test_widgets.py 2022-10-11 11:21:44.000000000 +0000 @@ -275,6 +275,21 @@ self.assertEqual(cbtn['offvalue'], cbtn.tk.globalgetvar(cbtn['variable'])) + def test_unique_variables(self): + frames = [] + buttons = [] + for i in range(2): + f = ttk.Frame(self.root) + f.pack() + frames.append(f) + for j in 'AB': + b = ttk.Checkbutton(f, text=j) + b.pack() + buttons.append(b) + variables = [str(b['variable']) for b in buttons] + print(variables) + self.assertEqual(len(set(variables)), 4, variables) + @add_standard_options(IntegerSizeTests, StandardTtkOptionsTests) class EntryTest(AbstractWidgetTest, unittest.TestCase): diff -Nru python3-stdlib-extensions-3.10.7/3.10/Lib/tkinter/tix.py python3-stdlib-extensions-3.10.8/3.10/Lib/tkinter/tix.py --- python3-stdlib-extensions-3.10.7/3.10/Lib/tkinter/tix.py 2022-09-05 13:00:02.000000000 +0000 +++ python3-stdlib-extensions-3.10.8/3.10/Lib/tkinter/tix.py 2022-10-11 11:21:44.000000000 +0000 @@ -310,7 +310,7 @@ del cnf[k] self.widgetName = widgetName - Widget._setup(self, master, cnf) + self._setup(master, cnf) # If widgetName is None, this is a dummy creation call where the # corresponding Tk widget has already been created by Tix diff -Nru python3-stdlib-extensions-3.10.7/debian/changelog python3-stdlib-extensions-3.10.8/debian/changelog --- python3-stdlib-extensions-3.10.7/debian/changelog 2022-09-12 16:49:43.000000000 +0000 +++ python3-stdlib-extensions-3.10.8/debian/changelog 2022-11-02 15:40:58.000000000 +0000 @@ -1,3 +1,18 @@ +python3-stdlib-extensions (3.10.8-1~22.10) kinetic-proposed; urgency=medium + + * SRU: LP: #1995504: Backport the 3.10.8 release to 22.10. + + -- Matthias Klose Wed, 02 Nov 2022 16:40:58 +0100 + +python3-stdlib-extensions (3.10.8-1) unstable; urgency=medium + + * Update 3.10 extensions and modules to the 3.10.8 release. + * Update 3.11 extensions and modules to 3.11.0 release. + * Remove bytecode files for old 3.9 version. Closes: #1017445. + * Bump standards version. + + -- Matthias Klose Sun, 30 Oct 2022 09:24:07 +0100 + python3-stdlib-extensions (3.10.7-1) unstable; urgency=medium * Update 3.10 extensions and modules to the 3.10.7 release. diff -Nru python3-stdlib-extensions-3.10.7/debian/control python3-stdlib-extensions-3.10.8/debian/control --- python3-stdlib-extensions-3.10.7/debian/control 2022-07-18 10:10:10.000000000 +0000 +++ python3-stdlib-extensions-3.10.8/debian/control 2022-10-30 08:24:07.000000000 +0000 @@ -28,7 +28,7 @@ # libgdbm-dev, libgdbm-compat-dev, libgdbm-dev, libdb-dev, Build-Conflicts: tcl8.4-dev, tk8.4-dev, tcl8.5-dev, tk8.5-dev -Standards-Version: 4.6.0 +Standards-Version: 4.6.1 Vcs-Git: https://salsa.debian.org/cpython-team/python3-stdlib.git Vcs-Browser: https://salsa.debian.org/cpython-team/python3-stdlib diff -Nru python3-stdlib-extensions-3.10.7/debian/python3-distutils.postinst.in python3-stdlib-extensions-3.10.8/debian/python3-distutils.postinst.in --- python3-stdlib-extensions-3.10.7/debian/python3-distutils.postinst.in 2021-01-03 11:07:09.000000000 +0000 +++ python3-stdlib-extensions-3.10.8/debian/python3-distutils.postinst.in 2022-10-30 08:24:07.000000000 +0000 @@ -19,21 +19,21 @@ echo >&2 "$python: can't get files for byte-compilation" fi done - if [ -n "$2" ] && dpkg --compare-versions $2 lt 3.7.2-3~; then - find /usr/lib/python3.6/distutils -name __pycache__ | xargs -r rm -rf - find /usr/lib/python3.6/distutils -empty -type d -delete || true - find /usr/lib/python3.6 -maxdepth 0 -empty -type d -delete || true - fi if [ -n "$2" ] && dpkg --compare-versions $2 lt 3.8.3-2~; then find /usr/lib/python3.7/distutils -name __pycache__ | xargs -r rm -rf find /usr/lib/python3.7/distutils -empty -type d -delete || true find /usr/lib/python3.7 -maxdepth 0 -empty -type d -delete || true fi if [ -n "$2" ] && dpkg --compare-versions $2 lt 3.9.1-2~; then - find /usr/lib/python3.8/tkinter -name __pycache__ 2>/dev/null | xargs -r rm -rf - find /usr/lib/python3.8/tkinter -empty -type d -delete 2>/dev/null || true + find /usr/lib/python3.8/distutils -name __pycache__ 2>/dev/null | xargs -r rm -rf + find /usr/lib/python3.8/distutils -empty -type d -delete 2>/dev/null || true find /usr/lib/python3.8 -maxdepth 0 -empty -type d -delete 2>/dev/null || true fi + if [ -n "$2" ] && dpkg --compare-versions $2 lt 3.10.8-1~; then + find /usr/lib/python3.9/distutils -name __pycache__ 2>/dev/null | xargs -r rm -rf + find /usr/lib/python3.9/distutils -empty -type d -delete 2>/dev/null || true + find /usr/lib/python3.9 -maxdepth 0 -empty -type d -delete 2>/dev/null || true + fi esac #DEBHELPER# diff -Nru python3-stdlib-extensions-3.10.7/debian/python3-lib2to3.postinst.in python3-stdlib-extensions-3.10.8/debian/python3-lib2to3.postinst.in --- python3-stdlib-extensions-3.10.7/debian/python3-lib2to3.postinst.in 2021-01-03 11:06:59.000000000 +0000 +++ python3-stdlib-extensions-3.10.8/debian/python3-lib2to3.postinst.in 2022-10-30 08:24:07.000000000 +0000 @@ -30,10 +30,15 @@ find /usr/lib/python3.7 -maxdepth 0 -empty -type d -delete || true fi if [ -n "$2" ] && dpkg --compare-versions $2 lt 3.9.1-2~; then - find /usr/lib/python3.8/tkinter -name __pycache__ 2>/dev/null | xargs -r rm -rf - find /usr/lib/python3.8/tkinter -empty -type d -delete 2>/dev/null || true + find /usr/lib/python3.8/lib2to3 -name __pycache__ 2>/dev/null | xargs -r rm -rf + find /usr/lib/python3.8/lib2to3 -empty -type d -delete 2>/dev/null || true find /usr/lib/python3.8 -maxdepth 0 -empty -type d -delete 2>/dev/null || true fi + if [ -n "$2" ] && dpkg --compare-versions $2 lt 3.10.8-1~; then + find /usr/lib/python3.9/lib2to3 -name __pycache__ 2>/dev/null | xargs -r rm -rf + find /usr/lib/python3.9/lib2to3 -empty -type d -delete 2>/dev/null || true + find /usr/lib/python3.9 -maxdepth 0 -empty -type d -delete 2>/dev/null || true + fi esac #DEBHELPER# diff -Nru python3-stdlib-extensions-3.10.7/debian/python3-tk.postinst.in python3-stdlib-extensions-3.10.8/debian/python3-tk.postinst.in --- python3-stdlib-extensions-3.10.7/debian/python3-tk.postinst.in 2021-01-03 11:06:32.000000000 +0000 +++ python3-stdlib-extensions-3.10.8/debian/python3-tk.postinst.in 2022-10-30 08:24:07.000000000 +0000 @@ -29,6 +29,11 @@ find /usr/lib/python3.8/tkinter -empty -type d -delete 2>/dev/null || true find /usr/lib/python3.8 -maxdepth 0 -empty -type d -delete 2>/dev/null || true fi + if [ -n "$2" ] && dpkg --compare-versions $2 lt 3.10.8-1~; then + find /usr/lib/python3.9/tkinter -name __pycache__ 2>/dev/null | xargs -r rm -rf + find /usr/lib/python3.9/tkinter -empty -type d -delete 2>/dev/null || true + find /usr/lib/python3.9 -maxdepth 0 -empty -type d -delete 2>/dev/null || true + fi esac #DEBHELPER#