]> granicus.if.org Git - python/log
python
5 years agobpo-37283: Ensure command-line and unattend.xml setting override previously detected...
Miss Islington (bot) [Mon, 9 Sep 2019 13:02:42 +0000 (06:02 -0700)]
bpo-37283: Ensure command-line and unattend.xml setting override previously detected states in Windows installer (GH-15759)

(cherry picked from commit 3a0ddbcdfcbc0f4372905fabf81e093f1b043e99)

Co-authored-by: Steve Dower <steve.dower@python.org>
5 years agobpo-34652 again: Remove lchmod from the default AC_CHECK_FUNCS list. (GH-15758)
Miss Islington (bot) [Mon, 9 Sep 2019 13:01:41 +0000 (06:01 -0700)]
bpo-34652 again: Remove lchmod from the default AC_CHECK_FUNCS list. (GH-15758)

(cherry picked from commit bed04b664729e3e6fcee42daa108936360bac6ea)

Co-authored-by: Benjamin Peterson <benjamin@python.org>
5 years agobpo-37212: Preserve keyword argument order in unittest.mock.call and error messages...
Miss Islington (bot) [Mon, 9 Sep 2019 11:42:43 +0000 (04:42 -0700)]
bpo-37212: Preserve keyword argument order in unittest.mock.call and error messages (GH-14310)

(cherry picked from commit 9d607061c9c888913ae2c18543775cf360d55f27)

Co-authored-by: Xtreak <tir.karthi@gmail.com>
5 years ago[3.8] Doc: Fix PDF build (NoUri). (GH-15739) (GH-15754)
Miss Islington (bot) [Mon, 9 Sep 2019 11:29:10 +0000 (04:29 -0700)]
[3.8] Doc: Fix PDF build (NoUri). (GH-15739) (GH-15754)

(cherry picked from commit 63c98ed2d21d22b46f3517fd7dfd88f0c1521299)

Co-authored-by: Julien Palard <julien@palard.fr>
Automerge-Triggered-By: @JulienPalard
5 years agobpo-36250: ignore ValueError from signal in non-main thread (GH-12251)
Miss Islington (bot) [Mon, 9 Sep 2019 11:25:21 +0000 (04:25 -0700)]
bpo-36250: ignore ValueError from signal in non-main thread (GH-12251)

Authored-By: blueyed <github@thequod.de>
(cherry picked from commit 8d64bfafdffd9f866bb6ac2e5b4c4bdfcb16aea0)

Co-authored-by: Daniel Hahler <github@thequod.de>
5 years agobpo-37705: Improve the implementation of winerror_to_errno() (GH-15623)
Miss Islington (bot) [Mon, 9 Sep 2019 10:37:55 +0000 (03:37 -0700)]
bpo-37705: Improve the implementation of winerror_to_errno() (GH-15623)

winerror_to_errno() is no longer automatically generated.
Do not rely on the old _dosmapperr() function.
Add ERROR_NO_UNICODE_TRANSLATION (1113) -> EILSEQ.
(cherry picked from commit 19052a11314e7be7ba003fd6cdbb5400a5d77d96)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
5 years agobpo-11953: Extend table of Windows WSA* error codes (GH-15004)
Steve Dower [Mon, 9 Sep 2019 10:36:04 +0000 (03:36 -0700)]
bpo-11953: Extend table of Windows WSA* error codes (GH-15004)

5 years agobpo-37936: Avoid ignoring files that we actually do track. (GH-15451)
Miss Islington (bot) [Mon, 9 Sep 2019 10:25:04 +0000 (03:25 -0700)]
bpo-37936: Avoid ignoring files that we actually do track. (GH-15451)

There were about 14 files that are actually in the repo but that are
covered by the rules in .gitignore.

Git itself takes no notice of what .gitignore says about files that
it's already tracking... but the discrepancy can be confusing to a
human that adds a new file unexpectedly covered by these rules, as
well as to non-Git software that looks at .gitignore but doesn't
implement this wrinkle in its semantics.  (E.g., `rg`.)

Several of these are from rules that apply more broadly than
intended: for example, `Makefile` applies to `Doc/Makefile` and
`Tools/freeze/test/Makefile`, whereas `/Makefile` means only the
`Makefile` at the repo's root.

And the `Modules/Setup` rule simply wasn't updated after 961d54c5c.

https://bugs.python.org/issue37936
(cherry picked from commit 5e5e9515029f70836003a8cfb30433166fcc8db7)

Co-authored-by: Greg Price <gnprice@gmail.com>
5 years agobpo-32587: Make winreg.REG_MULTI_SZ support zero-length strings (GH-13239)
Miss Islington (bot) [Mon, 9 Sep 2019 10:11:00 +0000 (03:11 -0700)]
bpo-32587: Make winreg.REG_MULTI_SZ support zero-length strings (GH-13239)

* bpo-32587: Make winreg.REG_MULTI_SZ support PendingFileRenameOperations

* Address review comments.
(cherry picked from commit e223ba13d8d871ee58570dfca4e82a591189cc2f)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
5 years ago[3.8] bpo-15817: gdbinit: Document commands after defining them (GH-15021) (#15744)
Zachary Ware [Mon, 9 Sep 2019 09:56:38 +0000 (04:56 -0500)]
[3.8] bpo-15817: gdbinit: Document commands after defining them (GH-15021) (#15744)

The gdb manual[1] says the following for "document":

  The command commandname must already be defined.

[1] https://sourceware.org/gdb/current/onlinedocs/gdb/Define.html

And indeed when trying to use the gdbinit file with gdb 8.3, I get:

  .../cpython/Misc/gdbinit:17: Error in sourced command file:
  Undefined command: "pyo".  Try "help".

Fix this by moving all documentation blocks after the define blocks.

This was introduced in GH-6384.
(cherry picked from commit 1f86fdcfc57270ee569cc58269a4e08afe7608ec)

Authored-by: Florian Bruhin <me@the-compiler.org>
5 years agobpo-37445: Include FORMAT_MESSAGE_IGNORE_INSERTS in FormatMessageW() calls (GH-14462)
Miss Islington (bot) [Mon, 9 Sep 2019 09:50:30 +0000 (02:50 -0700)]
bpo-37445: Include FORMAT_MESSAGE_IGNORE_INSERTS in FormatMessageW() calls (GH-14462)

If FormatMessageW() is passed the FORMAT_MESSAGE_FROM_SYSTEM flag without FORMAT_MESSAGE_IGNORE_INSERTS, it will fail if there are insert sequences in the message definition.
(cherry picked from commit a6563650c835d50f7302971a5b145e94f9d0dc68)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
5 years agobpo-34410: Fix a crash in the tee iterator when re-enter it. (GH-15625)
Miss Islington (bot) [Mon, 9 Sep 2019 09:07:51 +0000 (02:07 -0700)]
bpo-34410: Fix a crash in the tee iterator when re-enter it. (GH-15625)

RuntimeError is now raised in this case.
(cherry picked from commit 526a01467b3277f9fcf7f91e66c23321caa1245d)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
5 years ago[3.8] bpo-36018: Address more reviewer feedback (GH-15733) (GH-15734)
Raymond Hettinger [Mon, 9 Sep 2019 01:40:06 +0000 (18:40 -0700)]
[3.8] bpo-36018: Address more reviewer feedback (GH-15733) (GH-15734)

5 years ago[3.8] Correct Roman-numeral example in Unicode HOWTO. (GH-15541). (GH-15728)
Serhiy Storchaka [Sun, 8 Sep 2019 10:17:24 +0000 (13:17 +0300)]
[3.8] Correct Roman-numeral example in Unicode HOWTO. (GH-15541). (GH-15728)

(cherry picked from commit 32a960f8e1015b64b4b955b3d62920c5903d4c6f)

Co-authored-by: Greg Price <gnprice@gmail.com>
5 years agobpo-20806: Reference both times(2) and times(3) and link to MSDN. (GH-15479)
Miss Islington (bot) [Sat, 7 Sep 2019 07:12:34 +0000 (00:12 -0700)]
bpo-20806: Reference both times(2) and times(3) and link to MSDN. (GH-15479)

(cherry picked from commit 3ccdbc33385a849c60a268def578cb06b8d41be6)

Co-authored-by: Joannah Nanjekye <33177550+nanjekyejoannah@users.noreply.github.com>
5 years agobpo-38041: Refine IDLE Shell restart lines. (GH-15709)
Miss Islington (bot) [Fri, 6 Sep 2019 18:14:49 +0000 (11:14 -0700)]
bpo-38041: Refine IDLE Shell restart lines.  (GH-15709)

 Restart lines now always start with '=' and never end with ' ' and fill the width of the window unless that would require ending with ' ', which could be wrapped by itself and possible confusing the user.
(cherry picked from commit 38da805d563422cf1bb9cd9be24c73806840fe30)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
5 years agobpo-37380: subprocess: don't use _active on win (GH-14360) (GH-15707)
Miss Islington (bot) [Fri, 6 Sep 2019 09:14:31 +0000 (02:14 -0700)]
bpo-37380: subprocess: don't use _active on win (GH-14360) (GH-15707)

As noted by @eryksun in [1] and [2], using _cleanup and _active(in
__del__) is not necessary on Windows, since:

> Unlike Unix, a process in Windows doesn't have to be waited on by
> its parent to avoid a zombie. Keeping the handle open will actually
> create a zombie until the next _cleanup() call, which may be never
> if Popen() isn't called again.

This patch simply defines `subprocess._active` as `None`, for which we already
have the proper logic in place in `subprocess.Popen.__del__`, that prevents it
from trying to append the process to the `_active`. This patch also defines
`subprocess._cleanup` as a noop for Windows.

[1] https://bugs.python.org/issue37380GH-msg346333
[2] https://bugs.python.org/issue36067GH-msg336262

Signed-off-by: Ruslan Kuprieiev <ruslan@iterative.ai>
(cherry picked from commit 042821ae3cf537e01963c9ec85d1a454d921e826)

Co-authored-by: Ruslan Kuprieiev <kupruser@gmail.com>
5 years agoMore refinements to the statistics docs (GH-15713) (GH-15715)
Miss Islington (bot) [Fri, 6 Sep 2019 06:19:13 +0000 (23:19 -0700)]
More refinements to the statistics docs (GH-15713) (GH-15715)

(cherry picked from commit d8c93aa5d29d3cab537357018d5806a57452a8fe)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
5 years agoCorrect minor gramatical mistake in sys.settrace doc (GH-15637)
Miss Islington (bot) [Thu, 5 Sep 2019 11:17:41 +0000 (04:17 -0700)]
Correct minor gramatical mistake in sys.settrace doc (GH-15637)

(cherry picked from commit 3038e87ba848023470f571242a8bb5a206c24430)

Co-authored-by: Andre Delfino <adelfino@gmail.com>
5 years agobpo-36324: Apply review comment from Jake Vanderplas (GH-15695) (GH-15696)
Miss Islington (bot) [Thu, 5 Sep 2019 08:10:40 +0000 (01:10 -0700)]
bpo-36324:  Apply review comment from Jake Vanderplas (GH-15695) (GH-15696)

(cherry picked from commit 9b51570ffd0494c07dafe10c7d2afe865754694c)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
5 years agobpo-36324: Apply review comments from Allen Downey (GH-15693) (GH-15694)
Miss Islington (bot) [Thu, 5 Sep 2019 07:42:22 +0000 (00:42 -0700)]
bpo-36324:  Apply review comments from Allen Downey (GH-15693) (GH-15694)

(cherry picked from commit e4810b2a6c1d0db1a27ad046831b8fa3b57967a4)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
5 years agobpo-38026: fix inspect.getattr_static (GH-15676)
Miss Islington (bot) [Thu, 5 Sep 2019 04:25:59 +0000 (21:25 -0700)]
bpo-38026: fix inspect.getattr_static (GH-15676)

It should avoid dynamic lookup including `isinstance`.

This is a regression caused by GH-5351.
(cherry picked from commit 8f9cc8771ffb8d0e21be287eaed42ae06087acca)

Co-authored-by: Inada Naoki <songofacandy@gmail.com>
5 years agobpo-37902: IDLE: Add scrolling for IDLE browsers. (GH-15368)
Miss Islington (bot) [Thu, 5 Sep 2019 01:53:47 +0000 (18:53 -0700)]
bpo-37902: IDLE: Add scrolling for IDLE browsers. (GH-15368)

Modify the wheel event handler so it can also be used for module, path, and stack browsers.
Patch by George Zhang.
(cherry picked from commit 2cd902585815582eb059e3b40e014ebe4e7fdee7)

Co-authored-by: GeeTransit <geetransit@gmail.com>
5 years ago[3.8] bpo-37764: Fix infinite loop when parsing unstructured email headers. (GH-15239...
Abhilash Raj [Thu, 5 Sep 2019 01:20:40 +0000 (18:20 -0700)]
[3.8] bpo-37764: Fix infinite loop when parsing unstructured email headers. (GH-15239) (GH-15686)

Fixes a case in which email._header_value_parser.get_unstructured hangs the system for some invalid headers. This covers the cases in which the header contains either:
- a case without trailing whitespace
- an invalid encoded word

https://bugs.python.org/issue37764

This fix should also be backported to 3.7 and 3.8

https://bugs.python.org/issue37764
(cherry picked from commit c5b242f87f31286ad38991bc3868cf4cfbf2b681)

Co-authored-by: Ashwin Ramaswami <aramaswamis@gmail.com>
5 years agobpo-22347: Update mimetypes.guess_type to allow proper parsing of URLs (GH-15522)
Miss Islington (bot) [Thu, 5 Sep 2019 00:54:59 +0000 (17:54 -0700)]
bpo-22347: Update mimetypes.guess_type to allow proper parsing of URLs (GH-15522)

https://bugs.python.org/issue22347
(cherry picked from commit 87bd2071c756188b6cd577889fb1682831142ceb)

Co-authored-by: Dong-hee Na <donghee.na92@gmail.com>
5 years agoFix idlelib.help comments (GH-15669)
Miss Islington (bot) [Thu, 5 Sep 2019 00:39:34 +0000 (17:39 -0700)]
Fix idlelib.help comments (GH-15669)

(cherry picked from commit 6cd9666ce93658ae91f07b396aa6932b362a61d3)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
5 years agobpo-38030: Fix os.stat failures on block devices on Windows (GH-15681)
Miss Islington (bot) [Wed, 4 Sep 2019 22:18:05 +0000 (15:18 -0700)]
bpo-38030: Fix os.stat failures on block devices on Windows (GH-15681)

(cherry picked from commit 772ec0fad57412daa53d16d7019b6b2fe6e94942)

Co-authored-by: Steve Dower <steve.dower@python.org>
5 years agoFix grammar in asyncio-dev.rst (GH-15672)
Miss Islington (bot) [Wed, 4 Sep 2019 06:10:45 +0000 (23:10 -0700)]
Fix grammar in asyncio-dev.rst (GH-15672)

Automerge-Triggered-By: @ned-deily
(cherry picked from commit 675d17cec49ed7f7eb01d1bc3ae6999c728e070d)

Co-authored-by: Roger Iyengar <ri@rogeriyengar.com>
5 years agocloses bpo-37966: Fully implement the UAX GH-15 quick-check algorithm. (GH-15558)
Miss Islington (bot) [Wed, 4 Sep 2019 03:03:37 +0000 (20:03 -0700)]
closes bpo-37966: Fully implement the UAX GH-15 quick-check algorithm. (GH-15558)

The purpose of the `unicodedata.is_normalized` function is to answer
the question `str == unicodedata.normalized(form, str)` more
efficiently than writing just that, by using the "quick check"
optimization described in the Unicode standard in UAX GH-15.

However, it turns out the code doesn't implement the full algorithm
from the standard, and as a result we often miss the optimization and
end up having to compute the whole normalized string after all.

Implement the standard's algorithm.  This greatly speeds up
`unicodedata.is_normalized` in many cases where our partial variant
of quick-check had been returning MAYBE and the standard algorithm
returns NO.

At a quick test on my desktop, the existing code takes about 4.4 ms/MB
(so 4.4 ns per byte) when the partial quick-check returns MAYBE and it
has to do the slow normalize-and-compare:

  $ build.base/python -m timeit -s 'import unicodedata; s = "\uf900"*500000' \
      -- 'unicodedata.is_normalized("NFD", s)'
  50 loops, best of 5: 4.39 msec per loop

With this patch, it gets the answer instantly (58 ns) on the same 1 MB
string:

  $ build.dev/python -m timeit -s 'import unicodedata; s = "\uf900"*500000' \
      -- 'unicodedata.is_normalized("NFD", s)'
  5000000 loops, best of 5: 58.2 nsec per loop

This restores a small optimization that the original version of this
code had for the `unicodedata.normalize` use case.

With this, that case is actually faster than in master!

$ build.base/python -m timeit -s 'import unicodedata; s = "\u0338"*500000' \
    -- 'unicodedata.normalize("NFD", s)'
500 loops, best of 5: 561 usec per loop

$ build.dev/python -m timeit -s 'import unicodedata; s = "\u0338"*500000' \
    -- 'unicodedata.normalize("NFD", s)'
500 loops, best of 5: 512 usec per loop
(cherry picked from commit 2f09413947d1ce0043de62ed2346f9a2b4e5880b)

Co-authored-by: Greg Price <gnprice@gmail.com>
5 years agobpo-38022: IDLE: upgrade help.html to sphinx 2.x HTML5 output (GH-15664)
Miss Islington (bot) [Tue, 3 Sep 2019 21:18:45 +0000 (14:18 -0700)]
bpo-38022: IDLE: upgrade help.html to sphinx 2.x HTML5 output (GH-15664)

The HTML5 output from Sphinx 2.x adds  '<p>' tags within list elements.  Using a new prevtag attribute, ignore these instead of emitting unwanted '\n\n'.

Also stop looking for 'first' classes on tags (no longer present) and fix the bug of double-spacing instead of single spacing after <pre> blocks.
(cherry picked from commit 580bdb0ece681537eadb360f0c796123ead7a559)

Co-authored-by: Tal Einat <taleinat+github@gmail.com>
5 years agobpo-38020: Fixes crash in os.readlink() on Windows (GH-15663)
Miss Islington (bot) [Tue, 3 Sep 2019 20:13:41 +0000 (13:13 -0700)]
bpo-38020: Fixes crash in os.readlink() on Windows (GH-15663)

(cherry picked from commit 993ac92418839427d4068d6ae8e618b06b5d9294)

Co-authored-by: Steve Dower <steve.dower@python.org>
5 years ago[3.8] bpo-21315: Fix parsing of encoded words with missing leading ws (GH-13425)...
Ashwin Ramaswami [Tue, 3 Sep 2019 17:08:39 +0000 (10:08 -0700)]
[3.8] bpo-21315: Fix parsing of encoded words with missing leading ws (GH-13425) (GH-15655)

* [bpo-21315](https://bugs.python.org/issue21315): Fix parsing of encoded words with missing leading ws.

Because of missing leading whitespace, encoded word would get parsed as
unstructured token. This patch fixes that by looking for encoded words when
splitting tokens with whitespace.

Missing trailing whitespace around encoded word now register a defect
instead.

Original patch suggestion by David R. Murray on [bpo-21315](https://bugs.python.org/issue21315).
(cherry picked from commit 66c4f3f38b867d8329b28c032bb907fd1a2f22d2)

Co-authored-by: Abhilash Raj <maxking@users.noreply.github.com>
(cherry picked from commit dc20fc4311dece19488299a7cd11317ffbe4d3c3)

Co-authored-by: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
https://bugs.python.org/issue21315

5 years agobpo-37798: Fix _statistics module doc (GH-15546)
Miss Islington (bot) [Tue, 3 Sep 2019 10:21:59 +0000 (03:21 -0700)]
bpo-37798: Fix _statistics module doc (GH-15546)

(cherry picked from commit 0cf832a9ef84be6e18aad02464814530d80b82b2)

Co-authored-by: Dong-hee Na <donghee.na92@gmail.com>
5 years agobpo-35771: IDLE: Fix flaky tool-tip hover delay tests (GH-15634)
Miss Islington (bot) [Tue, 3 Sep 2019 05:39:08 +0000 (22:39 -0700)]
bpo-35771: IDLE: Fix flaky tool-tip hover delay tests (GH-15634)

Extending the hover delay in test_tooltip should avoid spurious test_idle failures.
One longer delay instead of two shorter delays results in a net speedup.
(cherry picked from commit 132acaba5a7f01373ca624b1a5975b190fe866f5)

Co-authored-by: Tal Einat <taleinat+github@gmail.com>
5 years agobpo-36853: Fix suspicious.py to actually print the unused rules (GH-13579) (GH-15649)
Miss Islington (bot) [Mon, 2 Sep 2019 16:12:19 +0000 (09:12 -0700)]
bpo-36853: Fix suspicious.py to actually print the unused rules (GH-13579) (GH-15649)

* Fix suspicious.py to actually print the unused rules

* Fix the other `self.warn` calls
(cherry picked from commit e1786b54162e2bfb01ca5aafa19d596c4af5a803)

Co-authored-by: Anthony Sottile <asottile@umich.edu>
5 years agobpo-38010 Sync importlib.metadata with importlib_metadata 0.20. (GH-15646) (GH-15648)
Miss Islington (bot) [Mon, 2 Sep 2019 16:11:01 +0000 (09:11 -0700)]
bpo-38010 Sync importlib.metadata with importlib_metadata 0.20. (GH-15646) (GH-15648)

Sync importlib.metadata with importlib_metadata 0.20.
(cherry picked from commit 102e9b40ff6ee45086a5f0d34d9c60c581a1e5e5)

Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
5 years ago[3.8] bpo-37994: Fix silencing all errors if an attribute lookup fails. (GH-15630...
Serhiy Storchaka [Sun, 1 Sep 2019 11:01:05 +0000 (14:01 +0300)]
[3.8] bpo-37994: Fix silencing all errors if an attribute lookup fails. (GH-15630) (GH-15635)

Only AttributeError should be silenced.
(cherry picked from commit 41c57b335330ff48af098d47e379e0f9ba09d233)

5 years agobpo-37977: Warn more strongly and clearly about pickle security (GH-15595) (GH-15629)
Miss Islington (bot) [Sat, 31 Aug 2019 06:02:15 +0000 (23:02 -0700)]
bpo-37977: Warn more strongly and clearly about pickle security (GH-15595) (GH-15629)

(cherry picked from commit daa82d019c52e95c3c57275307918078c1c0ac81)

Co-authored-by: Daniel Pope <lordmauve@users.noreply.github.com>
5 years ago[3.8] bpo-37990: fix gc stats (GH-15626)
Inada Naoki [Sat, 31 Aug 2019 01:50:27 +0000 (10:50 +0900)]
[3.8] bpo-37990: fix gc stats (GH-15626)

(cherry picked from commit 013e52f)

5 years ago[3.8] bpo-29553: Fix ArgumentParser.format_usage() for mutually exclusive groups...
Raymond Hettinger [Fri, 30 Aug 2019 22:25:38 +0000 (15:25 -0700)]
[3.8] bpo-29553: Fix ArgumentParser.format_usage() for mutually exclusive groups (GH-14976) (GH-15494) (GH-15624)

5 years agoFix typos mostly in comments, docs and test names (GH-15209)
Miss Islington (bot) [Fri, 30 Aug 2019 20:42:54 +0000 (13:42 -0700)]
Fix typos mostly in comments, docs and test names (GH-15209)

(cherry picked from commit 39d87b54715197ca9dcb6902bb43461c0ed701a2)

Co-authored-by: Min ho Kim <minho42@gmail.com>
5 years agoIDLE: Fix 2 typos found by Min ho Kim. (GH-15617)
Miss Islington (bot) [Fri, 30 Aug 2019 20:36:06 +0000 (13:36 -0700)]
IDLE: Fix 2 typos found by Min ho Kim. (GH-15617)

(cherry picked from commit 15119bc2a7e902ae1c6988556c3bef3de87fa789)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
5 years agobpo-37140: Fix StructUnionType_paramfunc() (GH-15612)
Miss Islington (bot) [Fri, 30 Aug 2019 12:50:44 +0000 (05:50 -0700)]
bpo-37140: Fix StructUnionType_paramfunc() (GH-15612)

Fix a ctypes regression of Python 3.8. When a ctypes.Structure is
passed by copy to a function, ctypes internals created a temporary
object which had the side effect of calling the structure finalizer
(__del__) twice. The Python semantics requires a finalizer to be
called exactly once. Fix ctypes internals to no longer call the
finalizer twice.

Create a new internal StructParam_Type which is only used by
_ctypes_callproc() to call PyMem_Free(ptr) on Py_DECREF(argument).
StructUnionType_paramfunc() creates such object.
(cherry picked from commit 96b4087ce784ee7434dffdf69c475f5b40543982)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
5 years agoPost v3.8.0b4
Łukasz Langa [Fri, 30 Aug 2019 09:01:34 +0000 (11:01 +0200)]
Post v3.8.0b4

5 years agoMerge tag 'v3.8.0b4' into 3.8
Łukasz Langa [Fri, 30 Aug 2019 09:01:00 +0000 (11:01 +0200)]
Merge tag 'v3.8.0b4' into 3.8

Python 3.8.0b4

5 years agobpo-37976: Prevent shadowing of TypeError in zip() (GH-15592) (GH-15608)
Miss Islington (bot) [Fri, 30 Aug 2019 06:23:17 +0000 (23:23 -0700)]
bpo-37976: Prevent shadowing of TypeError in zip() (GH-15592) (GH-15608)

(cherry picked from commit 6a650aaf7735e30636db2721247f317064c2cfd4)

Co-authored-by: Sergey Fedoseev <fedoseev.sergey@gmail.com>
5 years agoSteven Bethard designated a new maintainer for argparse (GH-15605) (GH-15606)
Miss Islington (bot) [Fri, 30 Aug 2019 04:27:33 +0000 (21:27 -0700)]
Steven Bethard designated a new maintainer for argparse (GH-15605) (GH-15606)

(cherry picked from commit 496058f59937da478eb172c864502b5dcf67705b)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
5 years agoPython 3.8.0b4 v3.8.0b4
Łukasz Langa [Thu, 29 Aug 2019 21:59:20 +0000 (23:59 +0200)]
Python 3.8.0b4

5 years ago[3.8] bpo-37834: Prevent shutil.rmtree exception (GH-15602) (#15603)
Łukasz Langa [Thu, 29 Aug 2019 21:51:19 +0000 (23:51 +0200)]
[3.8] bpo-37834: Prevent shutil.rmtree exception (GH-15602) (#15603)

when built on non-Windows system without fd system call support,
like older versions of macOS.
(cherry picked from commit 7fcc2088a50a4ecb80e5644cd195bee209c9f979)

Co-authored-by: Ned Deily <nad@python.org>
5 years ago[3.8] bpo-37034: Display argument name on errors with keyword arguments with Argument...
Serhiy Storchaka [Thu, 29 Aug 2019 15:29:59 +0000 (18:29 +0300)]
[3.8] bpo-37034: Display argument name on errors with keyword arguments with Argument Clinic. (GH-13593). (GH-15599)

(cherry picked from commit 4901fe274bc82b95dc89bcb3de8802a3dfedab32)

Co-authored-by: Rémi Lapeyre <remi.lapeyre@henki.fr>
5 years agobpo-37979: Add alternative to fromisoformat in documentation (GH-15596)
Miss Islington (bot) [Thu, 29 Aug 2019 14:54:37 +0000 (07:54 -0700)]
bpo-37979: Add alternative to fromisoformat in documentation (GH-15596)

Adds a link to `dateutil.parser.isoparse` in the documentation.

It would be nice to set up intersphinx for things like this, but I think we can leave that for a separate PR.

CC: @pitrou
[bpo-37979](https://bugs.python.org/issue37979)

https://bugs.python.org/issue37979

Automerge-Triggered-By: @pitrou
(cherry picked from commit 59725f3badb3028636c8906ecac4ceb0a37f3982)

Co-authored-by: Paul Ganssle <paul@ganssle.io>
5 years agobpo-37947: Avoid double-decrement in symtable recursion counting (GH-15593)
Miss Islington (bot) [Thu, 29 Aug 2019 13:46:20 +0000 (06:46 -0700)]
bpo-37947: Avoid double-decrement in symtable recursion counting (GH-15593)

With `symtable_visit_expr` now correctly adjusting the recursion depth for named
expressions, `symtable_handle_namedexpr` should be leaving it alone.

Also adds a new check to `PySymtable_BuildObject` that raises `SystemError`
if a successful first symbol analysis pass fails to keep the stack depth
accounting clean.
(cherry picked from commit 06145230c833c3db5dab8858e11bcd550a37c57f)

Co-authored-by: Nick Coghlan <ncoghlan@gmail.com>
5 years agobpo-36743: __get__ is sometimes called without the owner argument (GH-12992) (GH...
Miss Islington (bot) [Thu, 29 Aug 2019 09:02:51 +0000 (02:02 -0700)]
bpo-36743: __get__ is sometimes called without the owner argument (GH-12992) (GH-15589)

(cherry picked from commit 0dac68f1e593c11612ed54af9edb865d398f3b05)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
5 years agobpo-16468: Clarify which objects can be passed to "choices" in argparse (GH-15566...
Miss Islington (bot) [Thu, 29 Aug 2019 08:15:18 +0000 (01:15 -0700)]
bpo-16468: Clarify which objects can be passed to "choices" in argparse (GH-15566) (GH-15587)

(cherry picked from commit 84125fed2a45a9e454d7e870d8bbaf6ece3d41e8)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
5 years agobpo-37960: Silence only necessary errors in repr() of buffered and text streams....
Miss Islington (bot) [Thu, 29 Aug 2019 08:13:29 +0000 (01:13 -0700)]
bpo-37960: Silence only necessary errors in repr() of buffered and text streams. (GH-15543)

(cherry picked from commit b235a1b47394eedc5f8ea4cf214f56c4c6932e59)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
5 years agobpo-23674: Clarify ambiguities in super() docs (GH-15564) (GH-15586)
Miss Islington (bot) [Thu, 29 Aug 2019 08:02:58 +0000 (01:02 -0700)]
bpo-23674:  Clarify ambiguities in super() docs (GH-15564) (GH-15586)

(cherry picked from commit cd81f0500fe98c7f4cddb06530fffabd14f036b8)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
5 years agobpo-37372: Fix error unpickling datetime.time objects from Python 2 with seconds...
Miss Islington (bot) [Thu, 29 Aug 2019 07:56:04 +0000 (00:56 -0700)]
bpo-37372: Fix error unpickling datetime.time objects from Python 2 with seconds>=24. (GH-14307)

(cherry picked from commit 122376df550b71dd3bec0513c7483cc1714212fa)

Co-authored-by: Justin Blanchard <UncombedCoconut@gmail.com>
5 years ago[3.8] bpo-37950: Fix ast.dump() when call with incompletely initialized node. (GH...
Serhiy Storchaka [Thu, 29 Aug 2019 07:50:28 +0000 (10:50 +0300)]
[3.8] bpo-37950: Fix ast.dump() when call with incompletely initialized node. (GH-15510) (GH-15582)

(cherry picked from commit e64f948e762a6b9fd02e2902ccf42438df6fcb61)

5 years agobpo-36871: Ensure method signature is used when asserting mock calls to a method...
Miss Islington (bot) [Thu, 29 Aug 2019 06:58:27 +0000 (23:58 -0700)]
bpo-36871: Ensure method signature is used when asserting mock calls to a method (GH15578)

* Fix call_matcher for mock when using methods

* Add NEWS entry

* Use None check and convert doctest to unittest

* Use better name for mock in tests. Handle _SpecState when the attribute was not accessed and add tests.

* Use reset_mock instead of reinitialization. Change inner class constructor signature for check

* Reword comment regarding call object lookup logic
(cherry picked from commit c96127821ebda50760e788b1213975a0d5bea37f)

Co-authored-by: Xtreak <tir.karthi@gmail.com>
5 years agobpo-35946: Improve assert_called_with documentation (GH-11796)
Miss Islington (bot) [Thu, 29 Aug 2019 06:39:47 +0000 (23:39 -0700)]
bpo-35946: Improve assert_called_with documentation (GH-11796)

(cherry picked from commit f5896a05edf5df91fb1b55bd481ba5b2a3682f4e)

Co-authored-by: Rémi Lapeyre <remi.lapeyre@henki.fr>
5 years agobpo-25777: Wording describes a lookup, not a call (GH-15573) (GH-15576)
Miss Islington (bot) [Thu, 29 Aug 2019 06:12:13 +0000 (23:12 -0700)]
bpo-25777: Wording describes a lookup, not a call (GH-15573) (GH-15576)

(cherry picked from commit 03acba6f1a851064ba1fa78965ece4354d499c04)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
5 years agobpo-36167: fix an incorrect capitalization (GH-14482)
Miss Islington (bot) [Thu, 29 Aug 2019 05:47:42 +0000 (22:47 -0700)]
bpo-36167: fix an incorrect capitalization (GH-14482)

(cherry picked from commit 3aa48b88c7485aca1fdfa54b3d8e53931ff067fd)

Co-authored-by: avinassh <avinassh@users.noreply.github.com>
5 years agobpo-18049: Define THREAD_STACK_SIZE for AIX to pass default recursion limit test...
Miss Islington (bot) [Thu, 29 Aug 2019 05:35:41 +0000 (22:35 -0700)]
bpo-18049: Define THREAD_STACK_SIZE for AIX to pass default recursion limit test (GH-15081)

* Define THREAD_STACK_SIZE for AIX to pass default recursion limit test
(cherry picked from commit 9670ce76b83bde950020f8d89c4d27168aaaf912)

Co-authored-by: Michael Felt <aixtools@users.noreply.github.com>
5 years agobpo-36511: Fix failures in Windows ARM32 buildbot (GH-15181)
Miss Islington (bot) [Thu, 29 Aug 2019 05:18:15 +0000 (22:18 -0700)]
bpo-36511: Fix failures in Windows ARM32 buildbot (GH-15181)

(cherry picked from commit ed70a344b5fbddea85726ebc1964ee0cfdef9c40)

Co-authored-by: Paul Monson <paulmon@users.noreply.github.com>
5 years agobpo-34775: Return NotImplemented in PurePath division. (GH-9509) (GH-15172)
Miss Islington (bot) [Thu, 29 Aug 2019 05:05:59 +0000 (22:05 -0700)]
bpo-34775: Return NotImplemented in PurePath division. (GH-9509) (GH-15172)

(cherry picked from commit 4c69be22df3852f17873a74d015528d9a8ae92d6)

Co-authored-by: aiudirog <aiudirog@gmail.com>
5 years agobpo-18378: Recognize "UTF-8" as a valid name in locale._parse_localename (GH-14736)
Miss Islington (bot) [Thu, 29 Aug 2019 04:56:00 +0000 (21:56 -0700)]
bpo-18378: Recognize "UTF-8" as a valid name in locale._parse_localename (GH-14736)

(cherry picked from commit b0caf329815120acf50287e29858093d328b0e3c)

Co-authored-by: Ronald Oussoren <ronaldoussoren@mac.com>
5 years ago[3.8] bpo-37482: Fix email address name with encoded words and special chars (GH...
bsiem [Thu, 29 Aug 2019 04:47:15 +0000 (06:47 +0200)]
[3.8] bpo-37482: Fix email address name with encoded words and special chars (GH-14561) (GH-15380)

Special characters in email address header display names are normally
put within double quotes. However, encoded words (=?charset?x?...?=) are
not allowed withing double quotes. When the header contains a word with
special characters and another word that must be encoded, the first one
must also be encoded.

In the next example, the display name in the From header is quoted and
therefore the comma is allowed; in the To header, the comma is not
within quotes and not encoded, which is not allowed and therefore
rejected by some mail servers.

From: "Foo Bar, France" <foo@example.com>
To: Foo Bar, =?utf-8?q?Espa=C3=B1a?= <foo@example.com>

https://bugs.python.org/issue37482
(cherry picked from commit df0c21ff46c5c37b6913828ef8c7651f523432f8)

Co-authored-by: bsiem <52461103+bsiem@users.noreply.github.com>
5 years agocloses bpo-37965: Fix compiler warning of distutils CCompiler.test_function. (GH...
Miss Islington (bot) [Wed, 28 Aug 2019 17:32:34 +0000 (10:32 -0700)]
closes bpo-37965: Fix compiler warning of distutils CCompiler.test_function. (GH-15561)

https://bugs.python.org/issue37965

https://bugs.python.org/issue37965

Automerge-Triggered-By: @benjaminp
(cherry picked from commit 55aabee07501e1468082b3237620e4ecd75c5da6)

Co-authored-by: Anonymous Maarten <madebr@users.noreply.github.com>
5 years agobpo-36582: Make collections.UserString.encode() return bytes, not str (GH-13138)...
Miss Islington (bot) [Wed, 28 Aug 2019 04:59:54 +0000 (21:59 -0700)]
bpo-36582: Make collections.UserString.encode() return bytes, not str (GH-13138) (GH-15557)

(cherry picked from commit 2a16eea71f56c2d8f38c295c8ce71a9a9a140aff)

Co-authored-by: Daniel Fortunov <asqui@users.noreply.github.com>
5 years agobpo-37951: Lift subprocess's fork() restriction (GH-15544)
Miss Islington (bot) [Tue, 27 Aug 2019 21:56:27 +0000 (14:56 -0700)]
bpo-37951: Lift subprocess's fork() restriction (GH-15544)

(cherry picked from commit 98d90f745d35d5d07bffcb46788b50e05eea56c6)

Co-authored-by: Christian Heimes <christian@python.org>
5 years agobpo-37936: Remove some .gitignore rules that were intended locally. (GH-15542)
Miss Islington (bot) [Tue, 27 Aug 2019 18:35:11 +0000 (11:35 -0700)]
bpo-37936: Remove some .gitignore rules that were intended locally. (GH-15542)

These appeared in commit c5ae169e1.  The comment on them, as well as
the presence among them of a rule for the .gitignore file itself,
indicate that the author intended these lines to remain only in their
own local working tree -- not to get committed even to their own repo,
let alone merged upstream.

They did nevertheless get committed, because it turns out that Git
takes no notice of what .gitignore says about files that it's already
tracking... for example, this .gitignore file itself.

Give effect to these lines' original intention, by deleting them. :-)

Git tip, for reference: the `.git/info/exclude` file is a handy way
to do exactly what these lines were originally intended to do.  A
related handy file is `~/.config/git/ignore`.  See gitignore(5),
aka `git help ignore`, for details.

https://bugs.python.org/issue37936

Automerge-Triggered-By: @zware
(cherry picked from commit 8c9e9b0cd5b24dfbf1424d1f253d02de80e8f5ef)

Co-authored-by: Greg Price <gnprice@gmail.com>
5 years agoFix unused variable and signed/unsigned warnings (GH-15537) (GH-15551)
Miss Islington (bot) [Tue, 27 Aug 2019 17:13:52 +0000 (10:13 -0700)]
Fix unused variable and signed/unsigned warnings (GH-15537) (GH-15551)

(cherry picked from commit 0138c4ceab1e10d42d0aa962d2ae079b46da7671)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
5 years agobpo-36205: Fix the rusage implementation of time.process_time() (GH-15538)
Miss Islington (bot) [Tue, 27 Aug 2019 04:34:32 +0000 (21:34 -0700)]
bpo-36205: Fix the rusage implementation of time.process_time() (GH-15538)

(cherry picked from commit 8bf5fef8737fdd12724b9340d76a4ed391c4ad8a)

Co-authored-by: vrajivk <3413293+vrajivk@users.noreply.github.com>
5 years agobpo-36763: Make Py_BytesMain() public (GH-15532)
Miss Islington (bot) [Mon, 26 Aug 2019 23:17:56 +0000 (16:17 -0700)]
bpo-36763: Make Py_BytesMain() public (GH-15532)

Declare Py_BytesMain() in Include/pylifecycle.h, rather in
Include/internal/pycore_pylifecycle.h.
(cherry picked from commit 9a943b4ce13fac26873b8100e89c818c5c47ac4b)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
5 years agoFix an invalid assertEqual() call in test_descr.py (GH-15318)
Miss Islington (bot) [Mon, 26 Aug 2019 23:02:21 +0000 (16:02 -0700)]
Fix an invalid assertEqual() call in test_descr.py (GH-15318)

(cherry picked from commit 6b2e3256b6752055498f41f343fb22100845bc9d)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
5 years agobpo-37925: Mention --embed in python-config usage (GH-15458)
Miss Islington (bot) [Mon, 26 Aug 2019 21:55:31 +0000 (14:55 -0700)]
bpo-37925: Mention --embed in python-config usage (GH-15458)

(cherry picked from commit d3cc189b17c86f670198aca109b5ffa2d526d87a)

Co-authored-by: Batuhan Taşkaya <47358913+isidentical@users.noreply.github.com>
5 years agobpo-37664: Update ensurepip bundled wheels, again (GH-15483)
Steve Dower [Mon, 26 Aug 2019 19:57:57 +0000 (12:57 -0700)]
bpo-37664: Update ensurepip bundled wheels, again (GH-15483)

5 years agobpo-37798: Minor code formatting and comment clean-ups. (GH-15526) (GH-15527)
Miss Islington (bot) [Mon, 26 Aug 2019 19:10:00 +0000 (12:10 -0700)]
bpo-37798: Minor code formatting and comment clean-ups. (GH-15526) (GH-15527)

(cherry picked from commit 6fee0f8ea72fa68155a32b33b6c0ed9e5a740e45)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
5 years agobpo-37055: fix warnings in _blake2 module (GH-14646)
Miss Islington (bot) [Mon, 26 Aug 2019 18:23:55 +0000 (11:23 -0700)]
bpo-37055: fix warnings in _blake2 module (GH-14646)

https://bugs.python.org/issue37055

Automerge-Triggered-By: @tiran
(cherry picked from commit b27cbec801e17a13d7fef49116a8fc279930d2b1)

Co-authored-by: Inada Naoki <songofacandy@gmail.com>
5 years agoFix typo: Pyssize_t => Py_ssize_t (GH-15411)
Miss Islington (bot) [Mon, 26 Aug 2019 15:54:26 +0000 (08:54 -0700)]
Fix typo: Pyssize_t => Py_ssize_t (GH-15411)

(cherry picked from commit b3b9619f5e1e7ebe3fbb73eae4ec878312056a90)

Co-authored-by: Sergey Fedoseev <fedoseev.sergey@gmail.com>
5 years agobpo-37954: Fix reference leak in the symtable (GH-15514)
Miss Islington (bot) [Mon, 26 Aug 2019 15:49:44 +0000 (08:49 -0700)]
bpo-37954: Fix reference leak in the symtable (GH-15514)

(cherry picked from commit 4901dc46da5ecb131f8d902a0fbd704934f209e1)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
5 years agoRemove leftovers from the times when long long wasn't required (GH-15501)
Miss Islington (bot) [Mon, 26 Aug 2019 15:33:49 +0000 (08:33 -0700)]
Remove leftovers from the times when long long wasn't required (GH-15501)

In a38e9d139929a227e3899fbb638bc46c6cc6d8ba pyconfig.h.in was
manually edited and that edit was overwritten when running autoreconf.
(cherry picked from commit 52c1a6a15a471f75b775309ed1120d05f69010ca)

Co-authored-by: Sergey Fedoseev <fedoseev.sergey@gmail.com>
5 years ago[3.8] bpo-37947: Adjust correctly the recursion level in symtable for named expressio...
Pablo Galindo [Mon, 26 Aug 2019 15:27:31 +0000 (16:27 +0100)]
[3.8] bpo-37947: Adjust correctly the recursion level in symtable for named expressions (GH-15499) (GH-15515)

(cherry picked from commit 0e4ea16336685cf3fa353d8c54af59b45b2d5c33)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
5 years agobpo-34679: Restore instantiation Windows IOCP event loop from non-main thread (GH...
Miss Islington (bot) [Mon, 26 Aug 2019 10:14:54 +0000 (03:14 -0700)]
bpo-34679: Restore instantiation Windows IOCP event loop from non-main thread (GH-15492)

* Restore running proactor event loop from non-main thread

Co-Authored-By: Kyle Stanley <aeros167@gmail.com>
(cherry picked from commit 1c0600998681295735a18690fae184b0c9a4ca51)

Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
5 years ago[3.8] bpo-36917: Add default implementation of ast.NodeVisitor.visit_Constant()....
Miss Islington (bot) [Mon, 26 Aug 2019 07:43:33 +0000 (00:43 -0700)]
[3.8] bpo-36917: Add default implementation of ast.NodeVisitor.visit_Constant(). (GH-15490) (GH-15509)

It emits a deprecation warning and calls corresponding method
visit_Num(), visit_Str(), etc.
(cherry picked from commit c3ea41e9bf100a5396b851488c3efe208e5e2179)

5 years agobpo-37805: Add tests for json.dump(..., skipkeys=True) (GH-15489)
Miss Islington (bot) [Mon, 26 Aug 2019 07:27:31 +0000 (00:27 -0700)]
bpo-37805: Add tests for json.dump(..., skipkeys=True) (GH-15489)

https://bugs.python.org/issue37805

Automerge-Triggered-By: @methane
(cherry picked from commit 44cd86bbdddb1f7b05deba2c1986a1e98f992429)

Co-authored-by: Dong-hee Na <donghee.na92@gmail.com>
5 years agobpo-15542: Documentation incorrectly suggests __init__ called after direct __new__...
Miss Islington (bot) [Mon, 26 Aug 2019 07:19:17 +0000 (00:19 -0700)]
bpo-15542: Documentation incorrectly suggests __init__ called after direct  __new__ call (GH-15478) (GH-15506)

(cherry picked from commit 6b16d938d6d1ccb443815e20e8812deed274dc09)

Co-authored-by: Joannah Nanjekye <33177550+nanjekyejoannah@users.noreply.github.com>
5 years agobpo-37824: Properly handle user input warnings in IDLE shell. (GH-15500)
Miss Islington (bot) [Mon, 26 Aug 2019 06:52:45 +0000 (23:52 -0700)]
bpo-37824: Properly handle user input warnings in IDLE shell. (GH-15500)

Cease turning SyntaxWarnings into SyntaxErrors.
(cherry picked from commit 1039f39c9c6edb4c185856c19316d3a4eb561c38)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
5 years agoDoc: Keep the venv/* exclude pattern. (GH-15229)
Miss Islington (bot) [Mon, 26 Aug 2019 06:19:45 +0000 (23:19 -0700)]
Doc: Keep the venv/* exclude pattern. (GH-15229)

In case it has been previously created.
(cherry picked from commit 73e054970193fc421c533564a4189be522f9c331)

Co-authored-by: Julien Palard <julien@palard.fr>
5 years ago[3.8] bpo-37757: Disallow PEP 572 cases that expose implementation details (GH-15491)
Nick Coghlan [Sun, 25 Aug 2019 14:41:47 +0000 (00:41 +1000)]
[3.8] bpo-37757: Disallow PEP 572 cases that expose implementation details (GH-15491)

- drop TargetScopeError in favour of raising SyntaxError directly
  as per the updated PEP 572
- comprehension iteration variables are explicitly local, but
  named expression targets in comprehensions are nonlocal or
  global. Raise SyntaxError as specified in PEP 572
- named expression targets in the outermost iterable of a
  comprehension have an ambiguous target scope. Avoid resolving
  that question now by raising SyntaxError. PEP 572
  originally required this only for cases where the bound name
  conflicts with the iteration variable in the comprehension,
  but CPython can't easily restrict the exception to that case
  (as it doesn't know the target variable names when visiting
  the outermost iterator expression)

(cherry picked from commit 5dbe0f59b7a4f39c7c606b48056bc29e406ebf78)

5 years agobpo-37905: Improve docs for NormalDist (GH-15486) (GH-15487)
Miss Islington (bot) [Sun, 25 Aug 2019 08:04:24 +0000 (01:04 -0700)]
bpo-37905: Improve docs for NormalDist (GH-15486) (GH-15487)

(cherry picked from commit 8371799e300475c8f9f967e900816218d3500e5d)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
5 years agobpo-37929: IDLE: avoid Squeezer-related config dialog crashes (GH-15452)
Miss Islington (bot) [Sun, 25 Aug 2019 06:18:01 +0000 (23:18 -0700)]
bpo-37929: IDLE: avoid Squeezer-related config dialog crashes (GH-15452)

These were caused by keeping around a reference to the Squeezer
instance and calling it's load_font() upon config changes, which
sometimes happened even if the shell window no longer existed.

This change completely removes that mechanism, instead having the
editor window properly update its width attribute, which can then
be used by Squeezer.
(cherry picked from commit d4b4c00b57d24f6ee2cf3a96213406bb09953df3)

Co-authored-by: Tal Einat <taleinat+github@gmail.com>
5 years ago[3.8] bpo-37942: Improve argument clinic float converter (GH-15470) (GH-15480)
Raymond Hettinger [Sun, 25 Aug 2019 02:45:12 +0000 (19:45 -0700)]
[3.8] bpo-37942: Improve argument clinic float converter (GH-15470) (GH-15480)

(cherry picked from commit aef9ad82f7f667cd001a7112d3bc636e918626f7)

5 years agoFix typo and rearrange words in IDLE news item (GH-15471)
Miss Islington (bot) [Sat, 24 Aug 2019 21:42:16 +0000 (14:42 -0700)]
Fix typo and rearrange words in IDLE news item (GH-15471)

Redo of GH-15402 by GeeTransit and Kyle Stanley.
(cherry picked from commit 0dfc025cccc5adf4f209e2421c7686b1e637eeae)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
5 years ago[3.8] Clarify argument types in datetime docs. (GH-15459) (GH-15472)
Miss Islington (bot) [Sat, 24 Aug 2019 19:57:50 +0000 (12:57 -0700)]
[3.8] Clarify argument types in datetime docs. (GH-15459) (GH-15472)

"Arguments may be integers... " could be misunderstand as they also
could be strings.

New wording makes it clear that arguments have to be integers.

modified:   Doc/library/datetime.rst

Automerge-Triggered-By: @pganssle
(cherry picked from commit c5218fce02d6bd7bb343db20c8f14e8d9640783a)

Co-authored-by: Jürgen Gmach <juergen.gmach@googlemail.com>
Automerge-Triggered-By: @pganssle
5 years agobpo-14112: Allow beginners to explore shallowness in greater depth ;-) (GH-15465...
Miss Islington (bot) [Sat, 24 Aug 2019 18:33:18 +0000 (11:33 -0700)]
bpo-14112: Allow beginners to explore shallowness in greater depth ;-) (GH-15465) (GH-15469)

(cherry picked from commit 69ee87e99cfe0b79389cffa92d126af868baf353)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
5 years agobpo-37798: Test both Python and C versions in test_statistics.py (GH-15453) (GH-15467)
Miss Islington (bot) [Sat, 24 Aug 2019 18:14:20 +0000 (11:14 -0700)]
bpo-37798: Test both Python and C versions in test_statistics.py (GH-15453) (GH-15467)

(cherry picked from commit 8ad22a42267d4ecb1c080d420933680cc126363e)

Co-authored-by: Dong-hee Na <donghee.na92@gmail.com>
5 years agobpo-32118: Simplify docs for sequence comparison (GH-15450) (#15466)
Miss Islington (bot) [Sat, 24 Aug 2019 17:53:09 +0000 (10:53 -0700)]
bpo-32118:  Simplify docs for sequence comparison (GH-15450) (#15466)

(cherry picked from commit edd21129dd304e178ca8be82ba689488dfb58276)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
5 years agobpo-37772: fix zipfile.Path.iterdir() outputs (GH-15170) (#15461)
Miss Islington (bot) [Sat, 24 Aug 2019 16:03:52 +0000 (09:03 -0700)]
bpo-37772: fix zipfile.Path.iterdir() outputs (GH-15170) (#15461)

* fix Path._add_implied_dirs to include all implied directories

* fix Path._add_implied_dirs to include all implied directories

* Optimize code by using sets instead of lists

* 📜🤖 Added by blurb_it.

* fix Path._add_implied_dirs to include all implied directories

* Optimize code by using sets instead of lists

* 📜🤖 Added by blurb_it.

* Add tests to zipfile.Path.iterdir() fix

* Update test for zipfile.Path.iterdir()

* remove whitespace from test file

* Rewrite NEWS blurb to describe the user-facing impact and avoid implementation details.

* remove redundant [] within set comprehension

* Update to use unique_everseen to maintain order and other suggestions in review

* remove whitespace and add back add_dirs in tests

* Add new standalone function parents using posixpath to get parents of a directory

* removing whitespace (sorry)

* Remove import pathlib from zipfile.py

* Rewrite _parents as a slice on a generator of the ancestry of a path.

* Remove check for '.' and '/', now that parents no longer returns those.

* Separate calculation of implied dirs from adding those

* Re-use _implied_dirs in tests for generating zipfile with dir entries.

* Replace three fixtures (abcde, abcdef, abde) with one representative example alpharep.

* Simplify implementation of _implied_dirs by collapsing the generation of parent directories for each name.
(cherry picked from commit a4e2991bdc993b60b6457c8a38d6e4a1fc845781)

Co-authored-by: shireenrao <shireenrao@gmail.com>
5 years ago[3.8] bpo-37830: Fix compilation of break and continue in finally. (GH-15320) (GH...
Serhiy Storchaka [Sat, 24 Aug 2019 10:41:53 +0000 (13:41 +0300)]
[3.8] bpo-37830: Fix compilation of break and continue in finally. (GH-15320) (GH-15456)

Fix compilation of "break" and "continue" in the
"finally" block when the corresponding "try" block
contains "return" with a non-constant value.
(cherry picked from commit ef61c524ddeeb56da3858b86e349e7288d68178e)