From: Serhiy Storchaka Date: Sun, 24 Aug 2014 06:10:58 +0000 (+0300) Subject: Issue #22236: Tkinter tests now don't reuse default root window. New root X-Git-Tag: v3.5.0a1~1015 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=66106626edb739f7d5dd3d0a7a2dd634a0e5a0b8;p=thirdparty%2FPython%2Fcpython.git Issue #22236: Tkinter tests now don't reuse default root window. New root window is created for every test class. Fixed Tkinter images copying operations in NoDefaultRoot mode. Tcl command names generated for "after" callbacks now contains a name of original function. --- 66106626edb739f7d5dd3d0a7a2dd634a0e5a0b8 diff --cc Lib/tkinter/test/test_tkinter/test_misc.py index 46f517027a3b,d8de949e46a8..85ee2c70b1bf --- a/Lib/tkinter/test/test_tkinter/test_misc.py +++ b/Lib/tkinter/test/test_tkinter/test_misc.py @@@ -5,16 -5,8 +5,13 @@@ from tkinter.test.support import Abstra support.requires('gui') - class MiscTest(unittest.TestCase): - - def setUp(self): - self.root = ttk.setup_master() + class MiscTest(AbstractTkTest, unittest.TestCase): + def test_repr(self): + t = tkinter.Toplevel(self.root, name='top') + f = tkinter.Frame(t, name='child') + self.assertEqual(repr(f), '') + def test_tk_setPalette(self): root = self.root root.tk_setPalette('black') diff --cc Misc/NEWS index 727d52959e4c,7028cf161de8..fe74da653241 --- a/Misc/NEWS +++ b/Misc/NEWS @@@ -124,18 -27,9 +124,20 @@@ Core and Builtin Library ------- + - Issue #22236: Fixed Tkinter images copying operations in NoDefaultRoot mode. + -- Issue #22191: Fix warnings.__all__. +- Issue #2527: Add a *globals* argument to timeit functions, in order to + override the globals namespace in which the timed code is executed. + Patch by Ben Roberts. + +- Issue #22118: Switch urllib.parse to use RFC 3986 semantics for the + resolution of relative URLs, rather than RFCs 1808 and 2396. + Patch by Demian Brecht. + +- Issue #21549: Added the "members" parameter to TarFile.list(). + +- Issue #19628: Allow compileall recursion depth to be specified with a -r + option. - Issue #15696: Add a __sizeof__ implementation for mmap objects on Windows. @@@ -414,151 -216,287 +416,154 @@@ - Issue #21538: The plistlib module now supports loading of binary plist files when reference or offset size is not a power of two. -- Issue #21801: Validate that __signature__ is None or an instance of Signature. +- Issue #21455: Add a default backlog to socket.listen(). -- Issue #21923: Prevent AttributeError in distutils.sysconfig.customize_compiler - due to possible uninitialized _config_vars. +- Issue #21525: Most Tkinter methods which accepted tuples now accept lists too. -- Issue #21323: Fix http.server to again handle scripts in CGI subdirectories, - broken by the fix for security issue #19435. Patch by Zach Byrne. ++- Issue #22236: Tkinter tests now don't reuse default root window. New root ++ window is created for every test class. + -Extension Modules ------------------ +- Issue #10744: Fix PEP 3118 format strings on ctypes objects with a nontrivial + shape. -- Issue #22176: Update the ctypes module's libffi to v3.1. This release - adds support for the Linux AArch64 and POWERPC ELF ABIv2 little endian - architectures. +- Issue #20826: Optimize ipaddress.collapse_addresses(). -Build ------ +- Issue #21487: Optimize ipaddress.summarize_address_range() and + ipaddress.{IPv4Network,IPv6Network}.subnets(). -- Issue #21958: Define HAVE_ROUND when building with Visual Studio 2013 and - above. Patch by Zachary Turner. +- Issue #21486: Optimize parsing of netmasks in ipaddress.IPv4Network and + ipaddress.IPv6Network. -- Issue #15759: "make suspicious", "make linkcheck" and "make doctest" in Doc/ - now display special message when and only when there are failures. +- Issue #13916: Disallowed the surrogatepass error handler for non UTF-* + encodings. -- Issue #17095: Fix Modules/Setup *shared* support. +- Issue #20998: Fixed re.fullmatch() of repeated single character pattern + with ignore case. Original patch by Matthew Barnett. -- Issue #21811: Anticipated fixes to support OS X versions > 10.9. +- Issue #21075: fileinput.FileInput now reads bytes from standard stream if + binary mode is specified. Patch by Sam Kimbrel. -- Issue #21166: Prevent possible segfaults and other random failures of - python --generate-posix-vars in pybuilddir.txt build target. +- Issue #19775: Add a samefile() method to pathlib Path objects. Initial + patch by Vajrasky Kok. -IDLE ----- +- Issue #21226: Set up modules properly in PyImport_ExecCodeModuleObject + (and friends). -- Issue #17172: Add the ability to run turtledemo from Idle. - Currently, the entry is on the Help menu, but it may move to Run. - Patch by Ramchandra Apt and Lita Cho. +- Issue #21398: Fix an unicode error in the pydoc pager when the documentation + contains characters not encodable to the stdout encoding. -- Issue #21765: Add support for non-ascii identifiers to HyperParser. +- Issue #16531: ipaddress.IPv4Network and ipaddress.IPv6Network now accept + an (address, netmask) tuple argument, so as to easily construct network + objects from existing addresses. -- Issue #21940: Add unittest for WidgetRedirector. Initial patch by Saimadhav - Heblikar. +- Issue #21156: importlib.abc.InspectLoader.source_to_code() is now a + staticmethod. -- Issue #18592: Add unittest for SearchDialogBase. Patch by Phil Webster. +- Issue #21424: Simplified and optimized heaqp.nlargest() and nmsmallest() + to make fewer tuple comparisons. -- Issue #21694: Add unittest for ParenMatch. Patch by Saimadhav Heblikar. +- Issue #21396: Fix TextIOWrapper(..., write_through=True) to not force a + flush() on the underlying binary stream. Patch by akira. -- Issue #21686: add unittest for HyperParser. Original patch by Saimadhav - Heblikar. +- Issue #18314: Unlink now removes junctions on Windows. Patch by Kim Gräsman -- Issue #12387: Add missing upper(lower)case versions of default Windows key - bindings for Idle so Caps Lock does not disable them. Patch by Roger Serwy. +- Issue #21088: Bugfix for curses.window.addch() regression in 3.4.0. + In porting to Argument Clinic, the first two arguments were reversed. -- Issue #21695: Closing a Find-in-files output window while the search is - still in progress no longer closes Idle. +- Issue #21407: _decimal: The module now supports function signatures. -- Issue #18910: Add unittest for textView. Patch by Phil Webster. +- Issue #10650: Remove the non-standard 'watchexp' parameter from the + Decimal.quantize() method in the Python version. It had never been + present in the C version. -- Issue #18292: Add unittest for AutoExpand. Patch by Saihadhav Heblikar. +- Issue #21469: Reduced the risk of false positives in robotparser by + checking to make sure that robots.txt has been read or does not exist + prior to returning True in can_fetch(). -- Issue #18409: Add unittest for AutoComplete. Patch by Phil Webster. +- Issue #19414: Have the OrderedDict mark deleted links as unusable. + This gives an early failure if the link is deleted during iteration. -Tests ------ +- Issue #21421: Add __slots__ to the MappingViews ABC. + Patch by Josh Rosenberg. -- Issue #22236: Tkinter tests now don't reuse default root window. New root - window is created for every test class. +- Issue #21101: Eliminate double hashing in the C speed-up code for + collections.Counter(). -- Issue #20746: Fix test_pdb to run in refleak mode (-R). Patch by Xavier - de Gaye. +- Issue #21321: itertools.islice() now releases the reference to the source + iterator when the slice is exhausted. Patch by Anton Afanasyev. -- Issue #22060: test_ctypes has been somewhat cleaned up and simplified; it - now uses unittest test discovery to find its tests. +- Issue #21057: TextIOWrapper now allows the underlying binary stream's + read() or read1() method to return an arbitrary bytes-like object + (such as a memoryview). Patch by Nikolaus Rath. -- Issue #22104: regrtest.py no longer holds a reference to the suite of tests - loaded from test modules that don't define test_main(). +- Issue #20951: SSLSocket.send() now raises either SSLWantReadError or + SSLWantWriteError on a non-blocking socket if the operation would block. + Previously, it would return 0. Patch by Nikolaus Rath. -- Issue #22002: Added ``load_package_tests`` function to test.support and used - it to implement/augment test discovery in test_asyncio, test_email, - test_importlib, test_json, and test_tools. +- Issue #13248: removed previously deprecated asyncore.dispatcher __getattr__ + cheap inheritance hack. -- Issue #21976: Fix test_ssl to accept LibreSSL version strings. Thanks - to William Orr. +- Issue #9815: assertRaises now tries to clear references to local variables + in the exception's traceback. -- Issue #21918: Converted test_tools from a module to a package containing - separate test files for each tested script. +- Issue #19940: ssl.cert_time_to_seconds() now interprets the given time + string in the UTC timezone (as specified in RFC 5280), not the local + timezone. -- Issue #20155: Changed HTTP method names in failing tests in test_httpservers - so that packet filtering software (specifically Windows Base Filtering Engine) - does not interfere with the transaction semantics expected by the tests. +- Issue #13204: Calling sys.flags.__new__ would crash the interpreter, + now it raises a TypeError. -- Issue #19493: Refactored the ctypes test package to skip tests explicitly - rather than silently. +- Issue #19385: Make operations on a closed dbm.dumb database always raise the + same exception. -- Issue #18492: All resources are now allowed when tests are not run by - regrtest.py. +- Issue #21207: Detect when the os.urandom cached fd has been closed or + replaced, and open it anew. -- Issue #21634: Fix pystone micro-benchmark: use floor division instead of true - division to benchmark integers instead of floating point numbers. Set pystone - version to 1.2. Patch written by Lennart Regebro. +- Issue #21291: subprocess's Popen.wait() is now thread safe so that + multiple threads may be calling wait() or poll() on a Popen instance + at the same time without losing the Popen.returncode value. -- Issue #21605: Added tests for Tkinter images. +- Issue #21127: Path objects can now be instantiated from str subclass + instances (such as ``numpy.str_``). -- Issue #21493: Added test for ntpath.expanduser(). Original patch by - Claudiu Popa. +- Issue #15002: urllib.response object to use _TemporaryFileWrapper (and + _TemporaryFileCloser) facility. Provides a better way to handle file + descriptor close. Patch contributed by Christian Theune. -- Issue #19925: Added tests for the spwd module. Original patch by Vajrasky Kok. +- Issue #12220: mindom now raises a custom ValueError indicating it doesn't + support spaces in URIs instead of letting a 'split' ValueError bubble up. -- Issue #21522: Added Tkinter tests for Listbox.itemconfigure(), - PanedWindow.paneconfigure(), and Menu.entryconfigure(). +- Issue #21068: The ssl.PROTOCOL* constants are now enum members. -Documentation -------------- +- Issue #21276: posixmodule: Don't define USE_XATTRS on KFreeBSD and the Hurd. -- Issue #21777: The binary sequence methods on bytes and bytearray are now - documented explicitly, rather than assuming users will be able to derive - the expected behaviour from the behaviour of the corresponding str methods. +- Issue #21262: New method assert_not_called for Mock. + It raises AssertionError if the mock has been called. -Windows -------- +- Issue #21238: New keyword argument `unsafe` to Mock. It raises + `AttributeError` incase of an attribute startswith assert or assret. -- Issue #21671, #22160, CVE-2014-0224: The bundled version of OpenSSL has been - updated to 1.0.1i. +- Issue #20896: ssl.get_server_certificate() now uses PROTOCOL_SSLv23, not + PROTOCOL_SSLv3, for maximum compatibility. -- Issue #10747: Use versioned labels in the Windows start menu. - Patch by Olive Kilburn. +- Issue #21239: patch.stopall() didn't work deterministically when the same + name was patched more than once. -Tools/Demos ------------ +- Issue #21203: Updated fileConfig and dictConfig to remove inconsistencies. + Thanks to Jure Koren for the patch. -- Issue #22201: Command-line interface of the zipfile module now correctly - extracts ZIP files with directory entries. Patch by Ryan Wilson. +- Issue #21222: Passing name keyword argument to mock.create_autospec now + works. -- Issue #21906: Make Tools/scripts/md5sum.py work in Python 3. - Patch by Zachary Ware. +- Issue #21197: Add lib64 -> lib symlink in venvs on 64-bit non-OS X POSIX. -- Issue #21629: Fix Argument Clinic's "--converters" feature. +- Issue #17498: Some SMTP servers disconnect after certain errors, violating + strict RFC conformance. Instead of losing the error code when we issue the + subsequent RSET, smtplib now returns the error code and defers raising the + SMTPServerDisconnected error until the next command is issued. - -What's New in Python 3.4.1? -=========================== - -Release date: 2014-05-18 - -Core and Builtins ------------------ - -- Issue #21418: Fix a crash in the builtin function super() when called without - argument and without current frame (ex: embedded Python). - -- Issue #21425: Fix flushing of standard streams in the interactive - interpreter. - -- Issue #21435: In rare cases, when running finalizers on objects in cyclic - trash a bad pointer dereference could occur due to a subtle flaw in - internal iteration logic. - -Library -------- - -- Issue #10744: Fix PEP 3118 format strings on ctypes objects with a nontrivial - shape. - -- Issue #20998: Fixed re.fullmatch() of repeated single character pattern - with ignore case. Original patch by Matthew Barnett. - -- Issue #21075: fileinput.FileInput now reads bytes from standard stream if - binary mode is specified. Patch by Sam Kimbrel. - -- Issue #21396: Fix TextIOWrapper(..., write_through=True) to not force a - flush() on the underlying binary stream. Patch by akira. - -- Issue #21470: Do a better job seeding the random number generator by - using enough bytes to span the full state space of the Mersenne Twister. - -- Issue #21398: Fix an unicode error in the pydoc pager when the documentation - contains characters not encodable to the stdout encoding. - -Tests ------ - -- Issue #17756: Fix test_code test when run from the installed location. - -- Issue #17752: Fix distutils tests when run from the installed location. - -IDLE ----- - -- Issue #18104: Add idlelib/idle_test/htest.py with a few sample tests to begin - consolidating and improving human-validated tests of Idle. Change other files - as needed to work with htest. Running the module as __main__ runs all tests. - - -What's New in Python 3.4.1rc1? -============================== - -Release date: 2014-05-05 - -Core and Builtins ------------------ - -- Issue #21274: Define PATH_MAX for GNU/Hurd in Python/pythonrun.c. - -- Issue #21209: Fix sending tuples to custom generator objects with the yield - from syntax. - -- Issue #21134: Fix segfault when str is called on an uninitialized - UnicodeEncodeError, UnicodeDecodeError, or UnicodeTranslateError object. - -- Issue #19537: Fix PyUnicode_DATA() alignment under m68k. Patch by - Andreas Schwab. - -- Issue #20929: Add a type cast to avoid shifting a negative number. - -- Issue #20731: Properly position in source code files even if they - are opened in text mode. Patch by Serhiy Storchaka. - -- Issue #20637: Key-sharing now also works for instance dictionaries of - subclasses. Patch by Peter Ingebretson. - -- Issue #12546: Allow \x00 to be used as a fill character when using str, int, - float, and complex __format__ methods. - -- Issue #13598: Modify string.Formatter to support auto-numbering of - replacement fields. It now matches the behavior of str.format() in - this regard. Patches by Phil Elson and Ramchandra Apte. - -Library -------- - -- Issue #21088: Bugfix for curses.window.addch() regression in 3.4.0. - In porting to Argument Clinic, the first two arguments were reversed. - -- Issue #21469: Reduced the risk of false positives in robotparser by - checking to make sure that robots.txt has been read or does not exist - prior to returning True in can_fetch(). - -- Issue #21321: itertools.islice() now releases the reference to the source - iterator when the slice is exhausted. Patch by Anton Afanasyev. - -- Issue #9815: assertRaises now tries to clear references to local variables - in the exception's traceback. - -- Issue #13204: Calling sys.flags.__new__ would crash the interpreter, - now it raises a TypeError. - -- Issue #19385: Make operations on a closed dbm.dumb database always raise the - same exception. - -- Issue #21207: Detect when the os.urandom cached fd has been closed or - replaced, and open it anew. - -- Issue #21291: subprocess's Popen.wait() is now thread safe so that - multiple threads may be calling wait() or poll() on a Popen instance - at the same time without losing the Popen.returncode value. - -- Issue #21127: Path objects can now be instantiated from str subclass - instances (such as ``numpy.str_``). - -- Issue #15002: urllib.response object to use _TemporaryFileWrapper (and - _TemporaryFileCloser) facility. Provides a better way to handle file - descriptor close. Patch contributed by Christian Theune. - -- Issue #12220: mindom now raises a custom ValueError indicating it doesn't - support spaces in URIs instead of letting a 'split' ValueError bubble up. - -- Issue #21239: patch.stopall() didn't work deterministically when the same - name was patched more than once. - -- Issue #21222: Passing name keyword argument to mock.create_autospec now - works. - -- Issue #21197: Add lib64 -> lib symlink in venvs on 64-bit non-OS X POSIX. - -- Issue #17498: Some SMTP servers disconnect after certain errors, violating - strict RFC conformance. Instead of losing the error code when we issue the - subsequent RSET, smtplib now returns the error code and defers raising the - SMTPServerDisconnected error until the next command is issued. - -- Issue #17826: setting an iterable side_effect on a mock function created by - create_autospec now works. Patch by Kushal Das. +- Issue #17826: setting an iterable side_effect on a mock function created by + create_autospec now works. Patch by Kushal Das. - Issue #7776: Fix ``Host:`` header and reconnection when using http.client.HTTPConnection.set_tunnel(). Patch by Nikolaus Rath.