Commit Graph

98282 Commits

Author SHA1 Message Date
Ned Deily 2f61f6417a Update pydoc topics and NEWS blurbs for 3.6.3rc1 2017-09-18 23:04:41 -04:00
Miss Islington (bot) 8afd7ab12d [3.6] bpo-31499, xml.etree: Fix xmlparser_gc_clear() crash (GH-3641) (#3645)
* bpo-31499, xml.etree: Fix xmlparser_gc_clear() crash

xml.etree: xmlparser_gc_clear() now sets self.parser to NULL to prevent a
crash in xmlparser_dealloc() if xmlparser_gc_clear() was called previously
by the garbage collector, because the parser was part of a reference cycle.

Co-Authored-By: Serhiy Storchaka <storchaka@gmail.com>
(cherry picked from commit e727d41ffc)
2017-09-18 05:48:23 -07:00
Miss Islington (bot) 84c89ef4e5 [3.6] bpo-30928: Update idlelib/NEWS.txt to 2017 Sep 17. (GH-3635) (#3637)
(cherry picked from commit 55679e0ec7)
2017-09-17 21:10:54 -04:00
Miss Islington (bot) 6b4d8ba097 [3.6] bpo-31502: IDLE Configdialog again deletes custom themes and keysets. (GH-3634) (#3636)
This reverses a never-released regression resulting from bpo-31287.
(cherry picked from commit 0efc7c67a2)
2017-09-17 20:39:24 -04:00
Miss Islington (bot) 4f6bae9677 bpo-31487: Update F-strings doc example (GH-3627) (GH-3628)
Shorten the comment to: "using integer format specifier"
(cherry picked from commit 63c591c0b0)
2017-09-17 07:57:08 -07:00
Miss Islington (bot) b417332bf4 [3.6] bpo-31493: Fix code context update and font update timers. (GH-3622) (#3623)
Canceling timers prevents a warning message when test_idle completes.
(This is the minimum fix needed before upcoming releases.)
(cherry picked from commit a6bb313c70)
2017-09-17 02:01:53 -04:00
Miss Islington (bot) 46c1052404 bpo-31487: Improve f-strings documentation (GH-3604) (GH-3619)
Provide additional examples of using format specifiers in f-strings
Added examples for using integer and date format specifiers.
(cherry picked from commit f361897069)
2017-09-16 12:01:32 -07:00
Miss Islington (bot) d3cba8175c bpo-31458: Clarify that Changelog is built from Misc/NEWS.d directory (GH-3617) (GH-3618)
(cherry picked from commit 0ec8c4bd10)
2017-09-16 11:44:27 -07:00
Michael Seifert 51ea80697b bpo-29916: Include PyGetSetDef in C API extension documentation. (#831) (#3607)
(cherry picked from commit da67e0d644)
2017-09-16 14:29:33 +03:00
Miss Islington (bot) 77b52e463a [3.6] bpo-31488: IDLE - update former extensions when options change. (GH-3612) (#3613)
When apply ConfigDialog changes, call .reload on each class with non-key options.
Change ParenMatch so that updates affect current instances.
(cherry picked from commit 5777ecc438)
2017-09-16 02:14:34 -04:00
Victor Stinner 2c1c2ca254 [3.6] bpo-31234: Join threads in tests (#3589)
* bpo-31234: Join threads in tests (#3572)

Call thread.join() on threads to prevent the "dangling threads"
warning.

(cherry picked from commit 18e95b4176)

* bpo-31234: Join threads in test_hashlib (#3573)

* bpo-31234: Join threads in test_hashlib

Use thread.join() to wait until the parallel hash tasks complete
rather than using events. Calling thread.join() prevent "dangling
thread" warnings.

* test_hashlib: minor PEP 8 coding style fixes

(cherry picked from commit 8dcf22f442)

* bpo-31234: Join threads in test_threading (#3579)

Call thread.join() to prevent the "dangling thread" warning.

(cherry picked from commit b8c7be2c52)

* bpo-31234: Join threads in test_queue (#3586)

Call thread.join() to prevent the "dangling thread" warning.

(cherry picked from commit 167cbde50a)

* bpo-31234: Join timers in test_threading (#3598)

Call the .join() method of threading.Timer timers to prevent the
"threading_cleanup() failed to cleanup 1 threads" warning.

(cherry picked from commit da3e5cf961)
2017-09-15 16:55:47 -07:00
Terry Jan Reedy 4d72945a28 [3.6] bpo-314777: IDLE - improve rstrip entry in doc (GH-3602) (#3605)
'Strip trailing whitespace' is not limited to spaces.  Wording caters to beginners who
do know know the meaning of 'whitespace'.  Multiline string literals are not skipped.
(cherry picked from commit ff70289)
2017-09-15 15:09:17 -04:00
Terry Jan Reedy 93d5f91fff [3.6] bpo-31462: IDLE - remove trailing whitespaces (GH-3564) (#3594)
Reproduction of Idlelib changes in Serhiy's 3.7 patch.
2017-09-14 22:52:16 -04:00
Miss Islington (bot) 7b62416d86 [3.6] bpo-31480: IDLE - fix tests to pass with zzdummy extension disabled. (GH-3590) (#3591)
Enabled by default was a temporary expedient.  The fix is to add a user override to enable.
(cherry picked from commit d384a81f55)
2017-09-14 20:34:42 -04:00
Miss Islington (bot) 49caab46f6 [3.6] bpo-31455: Fix an assertion failure in ElementTree.XMLParser(). (GH-3545) (#3585)
* Avoid calling "PyObject_GetAttrString()" (and potentially executing user code) with a live exception set.

* Ignore only AttributeError on attribute lookups in ElementTree.XMLParser() and propagate all other exceptions.
(cherry picked from commit c8d8e15bfc)
2017-09-15 02:13:21 +03:00
Miss Islington (bot) 1658ec0757 [3.6] bpo-28556: typing.get_type_hints: better globalns for classes and modules (GH-3582) (#3583)
This makes the default behavior (without specifying `globalns` manually) more
predictable for users, finds the right globalns automatically.

Implementation for classes assumes has a `__module__` attribute and that module
is present in `sys.modules`.  It does this recursively for all bases in the
MRO.  For modules, the implementation just uses their `__dict__` directly.

This is backwards compatible, will just raise fewer exceptions in naive user
code.

Originally implemented and reviewed at https://github.com/python/typing/pull/470.
(cherry picked from commit f350a268a7)
2017-09-14 16:52:05 -04:00
Miss Islington (bot) f135f62cfd [3.6] bpo-31471: Fix assertion failure in subprocess.Popen() on Windows, in case env has a bad keys() method. (GH-3580) (#3584)
(cherry picked from commit 0b3a87ef54)
2017-09-14 22:56:31 +03:00
Miss Islington (bot) 20fa05d022 [3.6] bpo-31457: Allow for nested LoggerAdapter objects (GH-3551) (#3576)
Some of the proxied methods use internal Logger state which isn't proxied,
causing failures if an adapter is applied to another adapter.

This commit fixes the issue, adds a new test for the use case.
(cherry picked from commit 1bbd482bcf)
2017-09-14 13:10:25 -04:00
Miss Islington (bot) c8b6506404 Improve code examples in hashlib cookie signing (GH-3562) (GH-3566)
The `blake2b` function does not take the `data` keyword argument.
The hex digest returned by sign was a string, whereas compare_digest expects bytes-like objects.
Typo fix: compare_digesty -> compare_digest
(cherry picked from commit 312ffead1e)
2017-09-14 06:45:31 -07:00
Christian Heimes 472cc9f366 [3.6] _ssl_: Fix compiler warning (GH-3559) (#3569)
Cast Py_buffer.len (Py_ssize_t, signed) to size_t (unsigned) to
prevent the following warning:

Modules/_ssl.c:3089:21: warning: comparison between signed and
unsigned integer expressions [-Wsign-compare].
(cherry picked from commit 5a61559fb0)
2017-09-14 11:15:07 +02:00
Miss Islington (bot) 5dbb28ecec [3.6] bpo-31418: Fix an assertion failure in PyErr_WriteUnraisable() in case of an exception with a bad __module__ attribute. (GH-3539) (#3556)
(cherry picked from commit f6e61df015)
2017-09-14 09:41:39 +03:00
Xiang Zhang fa82dda101 [3.6] bpo-30246: fix several error messages which only mention bytes in struct (#3561) 2017-09-14 11:22:23 +08:00
Mariatta 905e4ef86e [3.6] bpo-31458: Update Misc/NEWS link in What's New page (GH-3555) (GH-3560)
Update the link from Misc/NEWS to Misc/NEWS.d
(cherry picked from commit 1b8f612e18)
2017-09-13 19:40:32 -07:00
Miss Islington (bot) 9e3cd78ec1 [3.6] bpo-28556: Minor updates to typing module (GH-3550) (#3558)
* Copy changes to typing from upstream repo
* Add NEWS entry
(cherry picked from commit 65bc62052f)
2017-09-13 20:10:53 -04:00
Victor Stinner ef323e8d82 [3.6] bpo-31234: Fix dangling thread in test_ftp/poplib (#3554)
* bpo-31234: Fix dangling thread in test_ftp/poplib (#3540)

Explicitly clear the server attribute in test_ftplib and test_poplib
to prevent dangling thread.

(cherry picked from commit d403a29c00)

* bpo-31234: Fix dangling thread in test_ftplib (#3544)

Clear also self.server_thread attribute in TestTimeouts.tearDown().

(cherry picked from commit b157ce1e58)
2017-09-13 15:56:14 -07:00
Miss Islington (bot) d99e85b9f6 [3.6] bpo-31234, socket.create_connection(): Fix ref cycle (GH-3546) (#3552)
(cherry picked from commit acb9fa79fa)
2017-09-13 15:54:34 -07:00
Miss Islington (bot) 769ddb075a [3.6] bpo-31448, test_poplib: Fix ResourceWarning (GH-3542) (#3543)
Call POP3.close(), don't close close directly the sock attribute.
(cherry picked from commit d165e14e29)
2017-09-13 06:09:44 -07:00
Miss Islington (bot) 6c25b73194 [3.6] bpo-31234: test_httpservers joins the server thread (GH-3188) (#3536)
(cherry picked from commit 830d7d2936)
2017-09-13 03:27:54 -07:00
Miss Islington (bot) 89bfc9b0d9 [3.6] bpo-31234: test_threaded_import: fix test_side_effect_import() (GH-3189) (#3537)
* Don't leak the module into sys.modules
* Avoid dangling thread
(cherry picked from commit 41bbd82b6b)
2017-09-13 03:27:45 -07:00
Miss Islington (bot) 1b00bddd5c [3.6] bpo-31323: Fix reference leak in test_ssl (GH-3263) (#3538)
Store exceptions as string rather than object to prevent reference
cycles which cause leaking dangling threads.
(cherry picked from commit 8687101589)
2017-09-13 03:27:34 -07:00
Miss Islington (bot) 547f2a97ea [3.6] Mention enum as a potential use for metaclasses (GH-2982) (GH-3527)
(cherry picked from commit b8d1b9d7c6)
2017-09-12 21:55:23 -07:00
Mariatta 5513e888e9 [3.6] bpo-31394: Clarify documentation about token type attribute (GH-3469) (GH-3525)
Make it clear that Ellipsis tokens also have type attribute set to token.OP..
(cherry picked from commit 5f8fbf917e)
2017-09-12 20:43:04 -07:00
Miss Islington (bot) 94eb2d5b73 [3.6] bpo-31249: Fix test_concurrent_futures dangling thread (GH-3521) (#3522)
ProcessPoolShutdownTest.test_del_shutdown() now closes the call queue
and joins its thread, to prevent leaking a dangling thread.
(cherry picked from commit 3bcf157c11)
2017-09-12 17:43:44 -07:00
Miss Islington (bot) bcf042ff98 [3.6] bpo-31234: Enhance test_thread.test_forkinthread() (GH-3516) (#3519)
* test_thread.test_forkinthread() now waits until the thread completes.
* Check the status in the test method, not in the thread function
* Don't ignore RuntimeError anymore: since the commit
  346cbd351e (bpo-16500,
  os.register_at_fork(), os.fork() cannot fail anymore with
  RuntimeError.
* Replace 0.01 literal with a new POLL_SLEEP constant
* test_forkinthread(): test if os.fork() exists rather than testing
  the platform.
(cherry picked from commit a15d155aad)
2017-09-12 16:14:09 -07:00
Victor Stinner c0e77364ca [3.6] bpo-30923: Silence fall-through warnings included in -Wextra since gcc-7.0 (#3518)
* bpo-30923: Disable warning that has been part of -Wextra since gcc-7.0. (#3142)

(cherry picked from commit d73a960c57)

* bpo-30923: Silence fall-through warnings included in -Wextra since gcc-7.0. (#3157)

(cherry picked from commit f432a3234f)

* bpo-31275: Small refactoring to silence a fall-through warning. (#3206)

(cherry picked from commit 138753c1b9)
2017-09-12 16:09:44 -07:00
Victor Stinner 5013a5ebc9 [3.6] bpo-31250: test_asyncio: fix dangling threads (#3517)
* bpo-31250, test_asyncio: fix dangling threads (#3252)

* Explicitly call shutdown(wait=True) on executors to wait until all
  threads complete to prevent side effects between tests.
* Fix test_loop_self_reading_exception(): don't mock loop.close().
  Previously, the original close() method was called rather than the
  mock, because how set_event_loop() registered loop.close().

(cherry picked from commit 16432beadb)

* bpo-31250, test_asyncio: fix EventLoopTestsMixin.tearDown() (#3264)

Call doCleanups() to close the loop after calling
executor.shutdown(wait=True): see TestCase.set_event_loop() of
asyncio.test_utils.

Replace also gc.collect() with support.gc_collect().

(cherry picked from commit e8a533fbc7)
2017-09-12 14:18:23 -07:00
Miss Islington (bot) 4d7807ab9a [3.6] bpo-31421: Document how IDLE runs tkinter programs. (GH-3513) (#3514)
IDLE calls tcl/tk update in the background in order to make live
interaction and experimentatin with tkinter applications much easier.
(cherry picked from commit 98758bc67f)
2017-09-12 09:44:59 -04:00
Miss Islington (bot) 01dcaa5c99 [3.6] bpo-27099: Finish updating IDLE doc and help text. (GH-3510) (#3511)
As needed for the conversion of extensions to features.
(cherry picked from commit adb4cd2a2a)
2017-09-12 08:23:38 -04:00
Serhiy Storchaka 9adc87b0f8 [3.6] bpo-31416: Fix assertion failures in case of a bad warnings.filters or warnings.defaultaction. (GH-3496) (#3509)
Patch by Oren Milman..
(cherry picked from commit 9d984fd2b0)
2017-09-12 09:48:27 +03:00
Benjamin Peterson cb356c2ecc [3.6] bpo-31373: remove overly strict float range checks (GH-3486) (#3495)
This undoes a853a8ba78 except for the pytime.c
parts. We want to continue to allow IEEE 754 doubles larger than FLT_MAX to be
rounded into finite floats. Tests were added to very this behavior.
(cherry picked from commit 2bb69a5b4e)
2017-09-11 23:08:49 -07:00
Miss Islington (bot) 99b941b420 [3.6] bpo-30928: Update idlelib/NEWS.txt to 2017-09-11. (GH-3503) (#3504)
(cherry picked from commit 8239fd7046)
2017-09-11 17:50:40 -04:00
Miss Islington (bot) 31b242459c [3.6] bpo-31414: IDLE -- fix tk entry box tests by deleting first. (GH-3501) (#3502)
Adding to an int entry is not the same as deleting and inserting
because int('') will fail.
(cherry picked from commit 667522efa8)
2017-09-11 16:34:11 -04:00
Serhiy Storchaka 7972ed2111 [3.6] bpo-31411: Prevent raising a SystemError in case warnings.onceregistry is not a dictionary. (GH-3485). (#3494)
(cherry picked from commit 252033d50e)
2017-09-11 10:01:47 +03:00
Serhiy Storchaka c67838da2c [3.6] bpo-29526: Add reference to help('FORMATTING') in format() builtin (GH-166). (#3491)
(cherry picked from commit 2e6bb4484e)
2017-09-11 09:26:15 +03:00
Miss Islington (bot) 4a8b53a208 [3.6] bpo-30781: IDLE: Fix help button on configdialog (GH-3238) (#3489)
This fixes an omission in the ttk conversion patch for this issue, hence no new news.
Patch by Cheryl Sabella.
(cherry picked from commit 3866d9bbcf)
2017-09-10 23:19:35 -04:00
Henk-Jaap Wagenaar 2a0f7c34c3 Backport docstring improvements to OrderedDict. (GH-3470) 2017-09-10 18:11:18 -07:00
Terry Jan Reedy d6c397bf77 [3.6] bpo-27099: IDLE - Convert built-in extensions to regular features (GH-2494) (#3487)
About 10 IDLE features were implemented as supposedly optional
extensions.  Their different behavior could be confusing or worse for
users and not good for maintenance.  Hence the conversion.

The main difference for users is that user configurable key bindings
for builtin features are now handled uniformly.  Now, editing a binding
in a keyset only affects its value in the keyset.  All bindings are
defined together in the system-specific default keysets in config-
extensions.def.  All custom keysets are saved as a whole in config-
extension.cfg.  All take effect as soon as one clicks Apply or Ok.

The affected events are '<<force-open-completions>>', '<<expand-word>>',
'<<force-open-calltip>>', '<<flash-paren>>', '<<format-paragraph>>',
'<<run-module>>', '<<check-module>>', and '<<zoom-height>>'.  Any
(global) customizations made before 3.6.3 will not affect their keyset-
specific customization after 3.6.3. and vice versa.

Inital patch by Charles Wohlganger, revised by Terry Jan Reedy.
(cherry picked from commit 58fc71c)
2017-09-10 20:30:46 -04:00
Christian Heimes 28580316a5 bpo-29136: Fix versionchange for TLS 1.3 changes (#3483)
Thanks Arfrever!

Signed-off-by: Christian Heimes <christian@python.org>
2017-09-10 21:14:34 +02:00
Miss Islington (bot) f8909d0e4b [3.6] bpo-31406: Fix crash due to lack of type checking in subclassing. (GH-3477) (#3479)
(cherry picked from commit 3cedf46cdb)
2017-09-10 18:46:49 +02:00
Miss Islington (bot) 638601ec52 [3.6] Improve IncrementalEncoder documentation (GH-2746) (GH-3475)
getstate and setstate are instance methods, same as encode and reset.
(cherry picked from commit 30644dee0c)
2017-09-10 06:26:42 -07:00