]> granicus.if.org Git - python/log
python
5 years agobpo-37748: Re-order the Run menu. (GH-15115)
Miss Islington (bot) [Sun, 4 Aug 2019 21:04:49 +0000 (14:04 -0700)]
bpo-37748: Re-order the Run menu. (GH-15115)

Put the most common choice, Run Module, at the top.
(cherry picked from commit 14070299cdc0faf36975f0cc2d51824a9abf3db0)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
5 years agoUpdate itertools docs (GH-15114) (GH-15118)
Miss Islington (bot) [Sun, 4 Aug 2019 20:52:59 +0000 (13:52 -0700)]
Update itertools docs (GH-15114) (GH-15118)

* Remove suggestion that is less relevant now that global lookups are much faster
* Add link for installing the recipes
(cherry picked from commit adf02b36b3f3745ad4ee380d88f2f6011f54fc22)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
5 years agobpo-28292: Mark calendar.py helper functions as private. (GH-15113) (GH-15116)
Miss Islington (bot) [Sun, 4 Aug 2019 20:34:56 +0000 (13:34 -0700)]
bpo-28292: Mark calendar.py helper functions as private. (GH-15113) (GH-15116)

(cherry picked from commit b1c8ec010fb4eb2654ca994e95144c8f2fea07fb)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
5 years agobpo-36324: Update comments to include the target hash sums (GH-15110) (GH-15112)
Miss Islington (bot) [Sun, 4 Aug 2019 19:16:19 +0000 (12:16 -0700)]
bpo-36324: Update comments to include the target hash sums (GH-15110) (GH-15112)

(cherry picked from commit 8183bb8150edcac6a7525bfb7708d08837ecb095)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
5 years agobpo-37706: IDLE - fix sidebar code bug and drag tests (GH-15103)
Miss Islington (bot) [Sun, 4 Aug 2019 16:43:56 +0000 (09:43 -0700)]
bpo-37706: IDLE - fix sidebar code bug and drag tests (GH-15103)

Convert mouse y to line number in the sidebar rather than the text.
(cherry picked from commit 86f1a18abfee5939452f468d80de998918e2afd2)

Co-authored-by: Tal Einat <taleinat+github@gmail.com>
5 years agobpo-37730: Fix usage of NotImplemented instead of NotImplementedError in docs. (GH...
Miss Islington (bot) [Sun, 4 Aug 2019 13:43:30 +0000 (06:43 -0700)]
bpo-37730: Fix usage of NotImplemented instead of NotImplementedError in docs. (GH-15062)

(cherry picked from commit ed5e8e06cbf766e89d6c58a882ee024abb5b2ed7)

Co-authored-by: David H <dheiberg@mozilla.com>
5 years agobpo-37685: Fixed comparisons of datetime.timedelta and datetime.timezone. (GH-14996)
Miss Islington (bot) [Sun, 4 Aug 2019 10:01:55 +0000 (03:01 -0700)]
bpo-37685: Fixed comparisons of datetime.timedelta and datetime.timezone. (GH-14996)

There was a discrepancy between the Python and C implementations.

Add singletons ALWAYS_EQ, LARGEST and SMALLEST in test.support
to test mixed type comparison.
(cherry picked from commit 17e52649c0e7e9389f1cc2444a53f059e24e6bca)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
5 years agoCorrect description of HTTP status code 308. (GH-15098)
Miss Islington (bot) [Sat, 3 Aug 2019 18:39:46 +0000 (11:39 -0700)]
Correct description of HTTP status code 308. (GH-15098)

Permanent redirect was explained as a temporary redirect.
(cherry picked from commit 5c72badd06a962fe0018ceb9916f3ae66314ea8e)

Co-authored-by: Florian Wendelborn <1133858+FlorianWendelborn@users.noreply.github.com>
5 years agobpo-30974: Change os.path.samefile docstring to match docs (GH-7337)
Miss Islington (bot) [Fri, 2 Aug 2019 23:04:53 +0000 (16:04 -0700)]
bpo-30974: Change os.path.samefile docstring to match docs (GH-7337)

(cherry picked from commit 8e568ef266a2805f9a6042003723d9c050830461)

Co-authored-by: Timo Furrer <tuxtimo@gmail.com>
5 years agobpo-20523: pdb searches for .pdbrc in ~ instead of $HOME (GH-11847)
Miss Islington (bot) [Fri, 2 Aug 2019 22:42:50 +0000 (15:42 -0700)]
bpo-20523: pdb searches for .pdbrc in ~ instead of $HOME (GH-11847)

Previously pdb checked the $HOME environmental variable
to find the user .pdbrc. If $HOME is not set, the user
.pdbrc would not be found.

Change pdb to use `os.path.expanduser('~')` to determine
the user's home directory. Thus, if $HOME is not set (as
in tox or on Windows), os.path.expanduser('~') falls
back on other techniques for locating the user's home
directory.

This follows pip's implementation for loading .piprc.

Co-authored-by: Dan Lidral-Porter <dlp@aperiodic.org>
(cherry picked from commit 7ea9a85f132b32347fcbd2cbe1b553a2e9890b56)

Co-authored-by: Timothy Hopper <tdhopper@users.noreply.github.com>
5 years agobpo-36487: Make C-API docs clear about what the main interpreter is. (gh-15080)
Miss Islington (bot) [Fri, 2 Aug 2019 17:49:38 +0000 (10:49 -0700)]
bpo-36487: Make C-API docs clear about what the main interpreter is. (gh-15080)

(cherry picked from commit 854d0a4b98b13629252e21edaf2b785b429e5135) (gh-12666)

Co-authored-by: Joannah Nanjekye <33177550+nanjekyejoannah@users.noreply.github.com>
5 years agobpo-16970: Adding error message for invalid args (GH-14844)
Miss Islington (bot) [Fri, 2 Aug 2019 05:16:44 +0000 (22:16 -0700)]
bpo-16970: Adding error message for invalid args (GH-14844)

BPO -16970: Adding error message for invalid args

Applied the patch argparse-v2 patch issue 16970, ran patch check and the test suite, test_argparse with 0 errors

https://bugs.python.org/issue16970
(cherry picked from commit 4b3e97592376d5f8a3b75192b399a2da1be642cb)

Co-authored-by: tmblweed <tmblweed@users.noreply.github.com>
5 years agobpo-18049: Sync thread stack size to main thread size on macOS (GH-14748)
Miss Islington (bot) [Thu, 1 Aug 2019 14:38:57 +0000 (07:38 -0700)]
bpo-18049: Sync thread stack size to main thread size on macOS (GH-14748)

This changeset increases the default size of the stack
for threads on macOS to the size of the stack
of the main thread and reenables the relevant
recursion test.
(cherry picked from commit 1a057bab0f18d6ad843ce321d1d77a4819497ae4)

Co-authored-by: Ronald Oussoren <ronaldoussoren@mac.com>
5 years agobpo-37726: Prefer argparse over getopt in stdlib tutorial (GH-15052) (#15070)
Miss Islington (bot) [Thu, 1 Aug 2019 14:34:57 +0000 (07:34 -0700)]
bpo-37726: Prefer argparse over getopt in stdlib tutorial (GH-15052) (#15070)

(cherry picked from commit 2491134029b195d3159a489e1803ee22a7839b41)

Co-authored-by: mental <m3nta1@yahoo.com>
5 years agobpo-37695: Correct unget_wch error message. (GH-14986)
Miss Islington (bot) [Wed, 31 Jul 2019 20:44:59 +0000 (13:44 -0700)]
bpo-37695: Correct unget_wch error message. (GH-14986)

(cherry picked from commit c9345e382c630ddcc2b148b30954640e0e435c8a)

Co-authored-by: Anthony Sottile <asottile@umich.edu>
5 years agobpo-37723: Fix performance regression on regular expression parsing. (GH-15030)
Miss Islington (bot) [Wed, 31 Jul 2019 20:22:09 +0000 (13:22 -0700)]
bpo-37723: Fix performance regression on regular expression parsing. (GH-15030)

Improve performance of sre_parse._uniq function.
(cherry picked from commit 9f55551f3df238e58315e724e50cb0d574d75b94)

Co-authored-by: yannvgn <hi@yannvgn.io>
5 years agobpo-34101: Add doc of PyBuffer_GetPointer (GH-14994)
Miss Islington (bot) [Wed, 31 Jul 2019 15:04:31 +0000 (08:04 -0700)]
bpo-34101: Add doc of PyBuffer_GetPointer (GH-14994)

(cherry picked from commit 1b29af83bc17e773b0c0d117f5fe1018fde46b0d)

Co-authored-by: Hai Shi <shihai1992@gmail.com>
5 years agobpo-37085: Expose SocketCAN bcm_msg_head flags (GH-13646)
Miss Islington (bot) [Wed, 31 Jul 2019 09:10:38 +0000 (02:10 -0700)]
bpo-37085: Expose SocketCAN bcm_msg_head flags (GH-13646)

Expose the CAN_BCM SocketCAN constants used in the bcm_msg_head struct
flags (provided by <linux/can/bcm.h>) under the socket library.

This adds the following constants with a CAN_BCM prefix:

  * SETTIMER
  * STARTTIMER
  * TX_COUNTEVT
  * TX_ANNOUNCE
  * TX_CP_CAN_ID
  * RX_FILTER_ID
  * RX_CHECK_DLC
  * RX_NO_AUTOTIMER
  * RX_ANNOUNCE_RESUME
  * TX_RESET_MULTI_IDX
  * RX_RTR_FRAME
  * CAN_FD_FRAME

The CAN_FD_FRAME flag was introduced in the 4.8 kernel, while the other
ones were present since SocketCAN drivers were mainlined in 2.6.25. As
such, it is probably unnecessary to guard against these constants being
missing.
(cherry picked from commit 31c4fd2a10d90beaa37d630e5f74a471e14e089d)

Co-authored-by: karl ding <karlding@users.noreply.github.com>
5 years agoRefined Qt GUI example in the logging cookbook. (GH-15045) (GH-15046)
Miss Islington (bot) [Wed, 31 Jul 2019 06:58:46 +0000 (23:58 -0700)]
Refined Qt GUI example in the logging cookbook. (GH-15045) (GH-15046)

(cherry picked from commit 472eced6770c2fabab3031e4e16cd32e32b8a0cc)

5 years agoIDLE: changelog correction and addition (GH-15042)
Miss Islington (bot) [Wed, 31 Jul 2019 05:42:17 +0000 (22:42 -0700)]
IDLE: changelog correction and addition (GH-15042)

(cherry picked from commit d04f8907baaa6620be7347ba14dd84bc4ef33814)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
5 years agobpo-33821: Update IDLE section of What's New 3.7 (GH-15036)
Miss Islington (bot) [Wed, 31 Jul 2019 05:23:05 +0000 (22:23 -0700)]
bpo-33821: Update IDLE section of What's New 3.7 (GH-15036)

* bpo-33821: Update IDLE section of What's New 3.7

* Fix roles.
(cherry picked from commit 5982b7201b84bfd24a1c2b2836401afee1cad8a7)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
5 years agobpo-34162: Add missing items to idlelib/NEWS.txt. (GH-15034)
Miss Islington (bot) [Wed, 31 Jul 2019 05:19:28 +0000 (22:19 -0700)]
bpo-34162: Add missing items to idlelib/NEWS.txt. (GH-15034)

(cherry picked from commit fff5cb21ae270d8572741e18030765580c7ae361)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
5 years agobpo-33822: Add IDLE section of What's New 3.8 (GH-15035)
Miss Islington (bot) [Wed, 31 Jul 2019 05:16:45 +0000 (22:16 -0700)]
bpo-33822: Add IDLE section of What's New 3.8 (GH-15035)

* bpo-33822: Add IDLE section of What's New 3.8

* Fix role.
(cherry picked from commit a72ca90eb9f13ee2abc7e19b669974d2d0b3d63e)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
5 years agoFix idlelib typos discovered by min ho, pr 15018. (GH-15029)
Miss Islington (bot) [Tue, 30 Jul 2019 22:34:20 +0000 (15:34 -0700)]
Fix idlelib typos discovered by min ho, pr 15018. (GH-15029)

(cherry picked from commit 0acb646b8e405864224bfd6d7d5089980dea63ac)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
5 years agobpo-36084: Add threading Native ID information to What's New documentation (GH-14845)
Miss Islington (bot) [Tue, 30 Jul 2019 21:49:23 +0000 (14:49 -0700)]
bpo-36084: Add threading Native ID information to What's New documentation (GH-14845)

(cherry picked from commit 84846b0187919551b1b08dca447658bbbbb710b1)

Co-authored-by: Jake Tesler <jake.tesler@gmail.com>
5 years agoDon't skip pickle check_frame_opcodes() (GH-15027)
Miss Islington (bot) [Tue, 30 Jul 2019 20:10:15 +0000 (13:10 -0700)]
Don't skip pickle check_frame_opcodes() (GH-15027)

This looks like the only place that proto 4 framing gets exercised
so leave it as part of the PGO task.
(cherry picked from commit eca7ffc61cf925eae5def8c64b05d47f24e60e1f)

Co-authored-by: Neil Schemenauer <nas-github@arctrix.com>
5 years agobpo-37707: Exclude expensive unit tests from PGO task (GH-15009) (#15024)
Miss Islington (bot) [Tue, 30 Jul 2019 18:34:33 +0000 (11:34 -0700)]
bpo-37707: Exclude expensive unit tests from PGO task (GH-15009) (#15024)

Mark some individual tests to skip when --pgo is used.  The tests
marked increase the PGO task time significantly and likely don't
help improve optimization of the final executable.
(cherry picked from commit 52a48e62c6a94577152f9301bbe5f3bc806cfcf1)

Co-authored-by: Neil Schemenauer <nas-github@arctrix.com>
5 years agobpo-37587: Make json.loads faster for long strings (GH-14752)
Miss Islington (bot) [Tue, 30 Jul 2019 14:37:28 +0000 (07:37 -0700)]
bpo-37587: Make json.loads faster for long strings (GH-14752)

When scanning the string, most characters are valid, so
checking for invalid characters first means never needing
to check the value of strict on valid strings, and only
needing to check it on invalid characters when doing
non-strict parsing of invalid strings.

This provides a measurable reduction in per-character
processing time (~11% in the pre-merge patch testing).
(cherry picked from commit 8a758f5b99c5fc3fd32edeac049d7d4a4b7cc163)

Co-authored-by: Marco Paolini <mpaolini@users.noreply.github.com>
5 years agobpo-34162: Update idlelib/news.txt. (GH-15011)
Miss Islington (bot) [Mon, 29 Jul 2019 22:39:49 +0000 (15:39 -0700)]
bpo-34162: Update idlelib/news.txt. (GH-15011)

(cherry picked from commit f35c51d2eadd297bcf06d4f7c536bd1d8682b724)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
5 years agobpo-37706: Disable 3 IDLE scrollbar tests on Mac. (GH-15010)
Miss Islington (bot) [Mon, 29 Jul 2019 22:15:50 +0000 (15:15 -0700)]
bpo-37706: Disable 3 IDLE scrollbar tests on Mac. (GH-15010)

They pass with tk 8.5.9 (Azure) but fail with the 8.6.x we install.
(cherry picked from commit e8874b85b4e3bbb735467b0beaa933dcef362004)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
5 years agoPost v3.8.0b3
Łukasz Langa [Mon, 29 Jul 2019 20:54:13 +0000 (22:54 +0200)]
Post v3.8.0b3

5 years agoMerge tag 'v3.8.0b3' into 3.8
Łukasz Langa [Mon, 29 Jul 2019 20:53:25 +0000 (22:53 +0200)]
Merge tag 'v3.8.0b3' into 3.8

Python 3.8.0b3

5 years agoFix publishing of Windows release (GH-15006)
Miss Islington (bot) [Mon, 29 Jul 2019 18:41:37 +0000 (11:41 -0700)]
Fix publishing of Windows release (GH-15006)

(cherry picked from commit fe330fc4ad3b8218a84216a824af7d7007dcb85b)

Co-authored-by: Steve Dower <steve.dower@python.org>
5 years agoAdd additional test for multi-line SyntaxError (GH-15003)
Miss Islington (bot) [Mon, 29 Jul 2019 15:26:29 +0000 (08:26 -0700)]
Add additional test for multi-line SyntaxError (GH-15003)

(cherry picked from commit 44212ec8111febfe5fc6c6ed231d4ef2d98bd7e2)

Co-authored-by: Anthony Sottile <asottile@umich.edu>
5 years agobpo-37500: Make sure dead code does not generate bytecode but also detect syntax...
Miss Islington (bot) [Mon, 29 Jul 2019 14:47:30 +0000 (07:47 -0700)]
bpo-37500: Make sure dead code does not generate bytecode but also detect syntax errors (GH-14612)

https://bugs.python.org/issue37500

Add a new field to the compiler structure that allows to be configured
so no bytecode is emitted. In this way is possible to detect errors by
walking the nodes while preserving optimizations.

https://bugs.python.org/issue37500
(cherry picked from commit 18c5f9d44dde37c0fae5585a604c6027825252d2)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
5 years agoFix `SyntaxError` indicator printing too many spaces for multi-line strings (GH-14433)
Miss Islington (bot) [Mon, 29 Jul 2019 14:18:47 +0000 (07:18 -0700)]
Fix `SyntaxError` indicator printing too many spaces for multi-line strings (GH-14433)

(cherry picked from commit 5b94f3578c662d5f1ee90c0e6b81481d9ec82d89)

Co-authored-by: Anthony Sottile <asottile@umich.edu>
5 years agoPython 3.8.0b3 v3.8.0b3
Łukasz Langa [Mon, 29 Jul 2019 13:26:01 +0000 (15:26 +0200)]
Python 3.8.0b3

5 years agobpo-36044: Avoid warnings in Windows PGO build and add lzma, bz2 and sqlite coverage...
Miss Islington (bot) [Mon, 29 Jul 2019 01:20:02 +0000 (18:20 -0700)]
bpo-36044: Avoid warnings in Windows PGO build and add lzma, bz2 and sqlite coverage (GH-14985)

https://bugs.python.org/issue36044

Automerge-Triggered-By: @zooba
(cherry picked from commit e1b900247227dad49d8231f1d028872412230ab4)

Co-authored-by: Steve Dower <steve.dower@python.org>
5 years agobpo-37697: Sync with importlib_metadata 0.19 (GH-14993) (GH-14995)
Miss Islington (bot) [Sun, 28 Jul 2019 19:45:46 +0000 (12:45 -0700)]
bpo-37697: Sync with importlib_metadata 0.19 (GH-14993) (GH-14995)

* bpo-37697: Sync with importlib_metadata 0.19

* Run make regen-importlib

* 📜🤖 Added by blurb_it.
(cherry picked from commit 049460da9c7b5f51732e2966195c44713af9dc4c)

Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
5 years agobpo-37692: Improve highlight config sample (GH-14983)
Miss Islington (bot) [Sun, 28 Jul 2019 16:39:03 +0000 (09:39 -0700)]
bpo-37692: Improve highlight config sample (GH-14983)

Use an example shell interaction in the sample and better labels for shell elements.
(cherry picked from commit b222955355c8077a3ceca79195731663d7c3dd5f)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
5 years agoRemove trailing .0 from version changed note (GH-14987)
Miss Islington (bot) [Sun, 28 Jul 2019 11:48:26 +0000 (04:48 -0700)]
Remove trailing .0 from version changed note (GH-14987)

(cherry picked from commit 17a058ed6ffa7f56c0920d15d214ad080e7eef86)

Co-authored-by: Nick Coghlan <ncoghlan@gmail.com>
5 years agobpo-37691: Let math.dist() accept sequences and iterables for coordinates (GH-14975...
Miss Islington (bot) [Sat, 27 Jul 2019 21:26:58 +0000 (14:26 -0700)]
bpo-37691: Let math.dist() accept sequences and iterables for coordinates (GH-14975) (GH-14984)

(cherry picked from commit 6b5f1b496f0b20144592b640b9c975df43a29eb0)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
5 years agobpo-37628: Fix IDLE config sample sizes (GH-14958)
Miss Islington (bot) [Sat, 27 Jul 2019 17:19:12 +0000 (10:19 -0700)]
bpo-37628: Fix IDLE config sample sizes (GH-14958)

The boxes for the font and highlight samples are now constrained by the overall config dialog size.  They gain scrollbars when the when a large font size makes the samples too large for the box.
(cherry picked from commit 3221a63c69268a9362802371a616f49d522a5c4f)

Co-authored-by: Tal Einat <taleinat+github@gmail.com>
5 years agoAdd Qt GUI example to the logging cookbook. (GH-14978) (GH-14979)
Miss Islington (bot) [Sat, 27 Jul 2019 13:04:13 +0000 (06:04 -0700)]
Add Qt GUI example to the logging cookbook. (GH-14978) (GH-14979)

(cherry picked from commit 1ed915e8ae3cc59ad8f7a8eaccb94f27f19b10a6)

5 years agobpo-17535: Increase line number horizontal padding by 2 pixels (GH-14959)
Miss Islington (bot) [Sat, 27 Jul 2019 03:46:52 +0000 (20:46 -0700)]
bpo-17535: Increase line number horizontal padding by 2 pixels (GH-14959)

(cherry picked from commit 46ebd4a6a22431ce9676546d2bbe5a6dcd1cc1c1)

Co-authored-by: Tal Einat <taleinat@gmail.com>
5 years agobpo-32910: Remove implementation detail in venv documentation. (GH-14968)
Miss Islington (bot) [Fri, 26 Jul 2019 22:04:28 +0000 (15:04 -0700)]
bpo-32910: Remove implementation detail in venv documentation. (GH-14968)

(cherry picked from commit 91e49575095ca16d1b67dd8822deeb7885e421da)

Co-authored-by: Derek Keeler <d3r3kk@users.noreply.github.com>
5 years agobpo-35524: Update Windows installer image in docs (GH-14966)
Steve Dower [Fri, 26 Jul 2019 20:39:51 +0000 (13:39 -0700)]
bpo-35524: Update Windows installer image in docs (GH-14966)

5 years agobpo-37664: Update regex for ignoring cache warning on some buildbots (GH-14960)
Miss Islington (bot) [Fri, 26 Jul 2019 16:24:43 +0000 (09:24 -0700)]
bpo-37664: Update regex for ignoring cache warning on some buildbots (GH-14960)

(cherry picked from commit b1eb20e68e30c8ab128f9d63d622f0a8b49dcf34)

Co-authored-by: Steve Dower <steve.dower@python.org>
5 years agobpo-37641 preserve relative file location in embeddable zip (GH-14884)
Miss Islington (bot) [Thu, 25 Jul 2019 21:55:43 +0000 (14:55 -0700)]
bpo-37641 preserve relative file location in embeddable zip (GH-14884)

Previously, pyc files in the embeddable distribution reported their
location as <build path>/<file stem>.py. This causes a little confusion
when interpreting stack traces as the file is in a (almost certainly)
incorrect location, and lacks the full relative path to Lib (e.g.
email/mime/image.py will only show image.py).

This change preserves the Lib relative location of the source file as a
path so that stack traces are (hopefully) less misleading and more
informative.

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

Co-authored-by: Bill Collins <bilbocollins@gmail.com>
5 years agoSwap 'if' branches so content matches to condition in importlib example (GH-14947)
Miss Islington (bot) [Thu, 25 Jul 2019 17:27:59 +0000 (10:27 -0700)]
Swap 'if' branches so content matches to condition in importlib example (GH-14947)

Prior to this change the guard on an 'elif' used an assignment expression whose value was used in a later 'else' block, causing some confusion for people.

(Discussion on Twitter: https://twitter.com/brettsky/status/1153861041068994566.)

Automerge-Triggered-By: @brettcannon
(cherry picked from commit 544fa15ea1b7b73068319bdb217b684e2fd7bacc)

Co-authored-by: Tzu-ping Chung <uranusjr@gmail.com>
5 years agobpo-37502: handle default parameter for buffers argument of pickle.loads correctly...
Miss Islington (bot) [Thu, 25 Jul 2019 16:18:20 +0000 (09:18 -0700)]
bpo-37502: handle default parameter for buffers argument of pickle.loads correctly (GH-14593)

(cherry picked from commit 898318b53d921298d1f1fcfa0f415844afbeb318)

Co-authored-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
5 years agocloses bpo-37675: Use pkgutil.iter_modules to find fixers in a package rather than...
Miss Islington (bot) [Thu, 25 Jul 2019 00:00:39 +0000 (17:00 -0700)]
closes bpo-37675: Use pkgutil.iter_modules to find fixers in a package rather than listdir. (14942)

(cherry picked from commit 93e8aa62cfd0a61efed4a61a2ffc2283ae986ef2)

Co-authored-by: Benjamin Peterson <benjamin@python.org>
5 years agobpo-37672: Switch Windows Store package to use pip.ini for user mode (GH-14939)
Miss Islington (bot) [Wed, 24 Jul 2019 22:31:48 +0000 (15:31 -0700)]
bpo-37672: Switch Windows Store package to use pip.ini for user mode (GH-14939)

(cherry picked from commit 123536fdab7b8def15c859aa70232bc55ec73096)

Co-authored-by: Steve Dower <steve.dower@python.org>
5 years agobpo-37664: Update bundled pip to 19.2.1 and setuptools to 41.0.1 (GH-14934)
Miss Islington (bot) [Wed, 24 Jul 2019 19:28:12 +0000 (12:28 -0700)]
bpo-37664: Update bundled pip to 19.2.1 and setuptools to 41.0.1 (GH-14934)

(cherry picked from commit 5380def8269b24a8a3bc46396373a1dc91b1dd1a)

Co-authored-by: Pradyun Gedam <pradyunsg@gmail.com>
5 years ago[3.8] bpo-37399: Correctly attach tail text to the last element/comment/pi (GH-14856...
Stefan Behnel [Wed, 24 Jul 2019 18:46:01 +0000 (20:46 +0200)]
[3.8] bpo-37399: Correctly attach tail text to the last element/comment/pi (GH-14856) (GH-14936)

* bpo-37399: Correctly attach tail text to the last element/comment/pi, even when comments or pis are discarded.
Also fixes the insertion of PIs when "insert_pis=True" is configured for a TreeBuilder.

5 years ago[3.8] bpo-34160: explain how to deal with attribute order in ElementTree (GH-14867...
Miss Islington (bot) [Wed, 24 Jul 2019 18:32:56 +0000 (11:32 -0700)]
[3.8] bpo-34160: explain how to deal with attribute order in ElementTree (GH-14867) (GH-14935)

* Fix the formatting in the documentation of the tostring() functions.

* bpo-34160: Document that the tostring() and tostringlist() functions also preserve the attribute order now.

* bpo-34160: Add an explanation of how users should deal with the attribute order.
(cherry picked from commit a3697db0102b9b6747fe36009e42f9b08f0c1ea8)

Co-authored-by: Stefan Behnel <stefan_ml@behnel.de>
5 years ago[3.8] Touch up venv docs (GH-14922) (GH-14923)
Miss Islington (bot) [Wed, 24 Jul 2019 17:14:53 +0000 (10:14 -0700)]
[3.8] Touch up venv docs (GH-14922) (GH-14923)

(cherry picked from commit 2f224a077a83ac9de8a12bb7dcc516642b8176d8)

Co-authored-by: Brett Cannon <54418+brettcannon@users.noreply.github.com>
Automerge-Triggered-By: @brettcannon
5 years agobpo-37667: Add regression test for regrtest. (GH-14929)
Miss Islington (bot) [Wed, 24 Jul 2019 06:30:27 +0000 (23:30 -0700)]
bpo-37667: Add regression test for regrtest. (GH-14929)

Verify that it appears to find roughly the right number of tests in the stdlib's testsuite.
(cherry picked from commit e95ac20103437d8099fb91cd4468ab030852f3b7)

Co-authored-by: Gregory P. Smith <greg@krypto.org>
5 years agoOnly setup PGO tests when --pgo is enabled. (GH-14927)
Miss Islington (bot) [Wed, 24 Jul 2019 04:53:34 +0000 (21:53 -0700)]
Only setup PGO tests when --pgo is enabled. (GH-14927)

(cherry picked from commit f0807ab24cbd13163bff7e0de3a97fe83584b80d)

Co-authored-by: Gregory P. Smith <greg@krypto.org>
5 years agobpo-29446: IDLE -- add explicit imports (GH-14919) (GH-14920)
Miss Islington (bot) [Tue, 23 Jul 2019 20:23:43 +0000 (13:23 -0700)]
bpo-29446: IDLE -- add explicit imports (GH-14919) (GH-14920)

Stop depending on tkinter import *.
(cherry picked from commit c6fd6c83b70df76421d05a7628367e64a2f83589)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
5 years agobpo-17535: IDLE editor line numbers (GH-14030)
Miss Islington (bot) [Tue, 23 Jul 2019 13:04:13 +0000 (06:04 -0700)]
bpo-17535: IDLE editor line numbers (GH-14030)

(cherry picked from commit 7123ea009b0b004062d91f69859bddf422c34ab4)

Co-authored-by: Tal Einat <taleinat@gmail.com>
5 years ago[3.8] bpo-36974: separate vectorcall functions for each calling convention (GH-13781...
Jeroen Demeyer [Tue, 23 Jul 2019 10:39:51 +0000 (12:39 +0200)]
[3.8] bpo-36974: separate vectorcall functions for each calling convention (GH-13781) (#14782)

5 years agobpo-33610: validate non-negative integer inputs in IDLE's config (GH-14822)
Miss Islington (bot) [Tue, 23 Jul 2019 10:18:41 +0000 (03:18 -0700)]
bpo-33610: validate non-negative integer inputs in IDLE's config (GH-14822)

(cherry picked from commit 1ebee37dde5c2aabc8e2d2c7bbe2a69b293133bb)

Co-authored-by: Tal Einat <taleinat@gmail.com>
5 years agobpo-36044: Reduce number of unit tests run for PGO build (GH-14702)
Miss Islington (bot) [Mon, 22 Jul 2019 20:17:23 +0000 (13:17 -0700)]
bpo-36044: Reduce number of unit tests run for PGO build (GH-14702)

Reduce the number of unit tests run for the PGO generation task.  This
speeds up the task by a factor of about 15x.  Running the full unit test
suite is slow.  This change may result in a slightly less optimized build
since not as many code branches will be executed.  If you are willing to
wait for the much slower build, the old behavior can be restored using
'./configure [..] PROFILE_TASK="-m test --pgo-extended"'.  We make no
guarantees as to which PGO task set produces a faster build.  Users who
care should run their own relevant benchmarks as results can depend on
the environment, workload, and compiler tool chain.
(cherry picked from commit 4e16a4a3112161a5c6981c0588142d4a4673a934)

Co-authored-by: Neil Schemenauer <nas-github@arctrix.com>
5 years agoUpdate logging cookbook to show multiple worker processes using the concurrent.future...
Miss Islington (bot) [Mon, 22 Jul 2019 12:25:46 +0000 (05:25 -0700)]
Update logging cookbook to show multiple worker processes using the concurrent.futures module. (GH-14905) (GH-14906)

(cherry picked from commit d309352c6fd93a51f2b3011ca8c2125d3a5d394b)

5 years agobpo-21478: Record calls to parent when autospecced objects are used as child with...
Miss Islington (bot) [Mon, 22 Jul 2019 07:59:00 +0000 (00:59 -0700)]
bpo-21478: Record calls to parent when autospecced objects are used as child with attach_mock (GH 14688) (GH-14902)

* Clear name and parent of mock in autospecced objects used with attach_mock

* Add NEWS entry

* Fix reversed order of comparison

* Test child and standalone function calls

* Use a helper function extracting mock to avoid code duplication and refactor tests.
(cherry picked from commit 7397cda99795a4a8d96193d710105e77a07b7411)

Co-authored-by: Xtreak <tir.karthi@gmail.com>
5 years ago[3.8] Fix typos in docs, comments and test assert messages (GH-14872). (#14900)
Kyle Stanley [Mon, 22 Jul 2019 02:48:45 +0000 (22:48 -0400)]
[3.8] Fix typos in docs, comments and test assert messages (GH-14872). (#14900)

(cherry picked from commit 96e12d5f4f3c5a20986566038ee763dff3c228a1)

Co-authored-by: Min ho Kim <minho42@gmail.com>
5 years agoAdd examples to elucidate the formulas (GH-14898) (GH-14899)
Miss Islington (bot) [Sun, 21 Jul 2019 23:39:08 +0000 (16:39 -0700)]
Add examples to elucidate the formulas (GH-14898) (GH-14899)

(cherry picked from commit b530a4460b7a6ea96f1fa81a7c5bb529ead574ef)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
5 years agobpo-37627: Add acknowledgment (GH-14883)
Miss Islington (bot) [Sun, 21 Jul 2019 20:38:09 +0000 (13:38 -0700)]
bpo-37627: Add acknowledgment (GH-14883)

(cherry picked from commit 4214f1ec3b3c73badd639229eff81eb5e57b82ec)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
5 years agobpo-37627: Initialize IDLE Custom Run dialog with previous entries (GH-14870)
Miss Islington (bot) [Sun, 21 Jul 2019 20:25:43 +0000 (13:25 -0700)]
bpo-37627: Initialize IDLE Custom Run dialog with previous entries (GH-14870)

Repeat the command line arguments most recently entered before so the user can edit them.
(cherry picked from commit 35b87e6001bd991f625abe305951c77ddeb9a9c5)

Co-authored-by: Ngalim Siregar <ngalim.siregar@gmail.com>
5 years agoFix typo found by Min ho Kim (GH-14879)
Miss Islington (bot) [Sun, 21 Jul 2019 19:44:28 +0000 (12:44 -0700)]
Fix typo found by Min ho Kim (GH-14879)

(cherry picked from commit 8e3a7380ecb310b50e48f47d1f26190cc9c45eb6)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
5 years agoMinor whitespace, indentation, and quoting changes to improve internal consistency...
Miss Islington (bot) [Sun, 21 Jul 2019 19:38:58 +0000 (12:38 -0700)]
Minor whitespace, indentation, and quoting changes to improve internal consistency and appease linters (GH-14888) (GH-14889)

(cherry picked from commit 1c0e9bb94b8cfb5970532a9f3499563360ea5532)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
5 years agoBpo-37644: update suspicious.csv for distutils/examples (GH-14885)
Miss Islington (bot) [Sun, 21 Jul 2019 18:08:57 +0000 (11:08 -0700)]
Bpo-37644: update suspicious.csv for distutils/examples (GH-14885)

(cherry picked from commit 22f0483d44b13140f6ea9927f0cf088c493e875a)

Co-authored-by: Ned Deily <nad@python.org>
5 years agobpo-36324: Make internal attributes for statistics.NormalDist() private. (GH-14871...
Miss Islington (bot) [Sun, 21 Jul 2019 07:55:13 +0000 (00:55 -0700)]
bpo-36324: Make internal attributes for statistics.NormalDist() private. (GH-14871) (GH-14875)

5 years agoAdjust builtins.zip() docstring to better communicate its signature (GH-14833)
Miss Islington (bot) [Fri, 19 Jul 2019 18:29:58 +0000 (11:29 -0700)]
Adjust builtins.zip() docstring to better communicate its signature (GH-14833)

(cherry picked from commit af2f5b1723b95e45e1f15b5bd52102b7de560f7c)

Co-authored-by: Sergey Fedoseev <fedoseev.sergey@gmail.com>
5 years agobpo-36546: Clean-up comments (GH-14857) (#14859)
Miss Islington (bot) [Fri, 19 Jul 2019 09:17:53 +0000 (02:17 -0700)]
bpo-36546:  Clean-up comments (GH-14857) (#14859)

(cherry picked from commit eed5e9a9562d4dcd137e9f0fc7157bc3373c98cc)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
5 years agobpo-37624: Document weight assumptions for random.choices() (GH-14855) (GH-14858)
Miss Islington (bot) [Fri, 19 Jul 2019 09:17:21 +0000 (02:17 -0700)]
bpo-37624: Document weight assumptions for random.choices() (GH-14855) (GH-14858)

(cherry picked from commit 8dbe563aa6bd18b8c581951537dfb406d36e8063)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
5 years agobpo-37610: improve Using Python doc wrt Editors & IDE (GH-14850)
Miss Islington (bot) [Fri, 19 Jul 2019 01:31:41 +0000 (18:31 -0700)]
bpo-37610: improve Using Python doc wrt Editors & IDE (GH-14850)

Move the Editors and IDE section out of the Unix section, to its own section.

https://bugs.python.org/issue37610
(cherry picked from commit 8f040b7a9f442e7c2605ef1cad9c6b5eb7dd7af7)

Co-authored-by: aldwinaldwin <aldwinaldwin@users.noreply.github.com>
5 years agobpo-33610: IDLE's code-context always shows current context immediately (GH-14821...
Miss Islington (bot) [Thu, 18 Jul 2019 20:47:26 +0000 (13:47 -0700)]
bpo-33610: IDLE's code-context always shows current context immediately (GH-14821) (#14846)

Eliminate delay of up to 100ms and accompanying visual artifact.
Fix bug of never showing context when hide and show.
(cherry picked from commit e0a1f8fb5c60886dbddf1a3ccb5d47576bdd43e2)

Co-authored-by: Tal Einat <taleinat@gmail.com>
5 years agobpo-37552: Skip failing tests in strptime/strftime with UCRT version 17763.615 (GH...
Miss Islington (bot) [Thu, 18 Jul 2019 14:17:58 +0000 (07:17 -0700)]
bpo-37552: Skip failing tests in strptime/strftime with UCRT version 17763.615 (GH-14460)

A bug in MSVC UCRT version 17763.615 (which has been fixed in newer versions) is causing test failures in some strptime/strftime tests when the default code page is c65001. This change selectively skips the tests affected by this.
(cherry picked from commit 9cd39b16e2655f748f7aa8d20bca4812da00ba70)

Co-authored-by: Paul Monson <paulmon@users.noreply.github.com>
5 years agobpo-36390: Gather IDLE Format menu functions into format.py (GH-14827) (GH-14829)
Miss Islington (bot) [Thu, 18 Jul 2019 01:21:08 +0000 (18:21 -0700)]
bpo-36390: Gather IDLE Format menu functions into format.py (GH-14827) (GH-14829)

Add two indent spec methods from editor and Rstrip to existing file.
Tests are not added for indent methods because they need change
in lights of 3.x's prohibition on mixing tabs and spaces.
(cherry picked from commit 1b3892243433da7eae7f5f3a4f98f13d309c8926)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
5 years agoFix IndexError when parsing unexpectedly ending quoted-string. (GH-14813)
Miss Islington (bot) [Wed, 17 Jul 2019 17:29:18 +0000 (10:29 -0700)]
Fix IndexError when parsing unexpectedly ending quoted-string. (GH-14813)

This exception was caused because the input ended unexpectedly with only one
single quote instead of a pair with some value inside it.
(cherry picked from commit 719a062bcb7b08a56e6576dcd75f4244e6053209)

Co-authored-by: Abhilash Raj <maxking@users.noreply.github.com>
5 years agobpo-37461: Fix infinite loop in parsing of specially crafted email headers (GH-14794)
Miss Islington (bot) [Wed, 17 Jul 2019 17:13:54 +0000 (10:13 -0700)]
bpo-37461: Fix infinite loop in parsing of specially crafted email headers (GH-14794)

* bpo-37461: Fix infinite loop in parsing of specially crafted email headers.

Some crafted email header would cause the get_parameter method to run in an
infinite loop causing a DoS attack surface when parsing those headers. This
patch fixes that by making sure the DQUOTE character is handled to prevent
going into an infinite loop.
(cherry picked from commit a4a994bd3e619cbaff97610a1cee8ffa87c672f5)

Co-authored-by: Abhilash Raj <maxking@users.noreply.github.com>
5 years agobpo-36390: IDLE: Combine region formatting methods. (GH-12481) (GH-14811)
Miss Islington (bot) [Wed, 17 Jul 2019 14:45:20 +0000 (07:45 -0700)]
bpo-36390: IDLE: Combine region formatting methods. (GH-12481) (GH-14811)

Rename paragraph.py to format.py and add region formatting methods
from editor.py.  Add tests for the latter.
(cherry picked from commit 82494aa6d947c4a320c09c58fe0f100cdcf7af0b)

Co-authored-by: Cheryl Sabella <cheryl.sabella@gmail.com>
5 years agobpo-37530: simplify, optimize and clean up IDLE code context (GH-14675)
Miss Islington (bot) [Wed, 17 Jul 2019 08:44:55 +0000 (01:44 -0700)]
bpo-37530: simplify, optimize and clean up IDLE code context (GH-14675)

* Only create CodeContext instances for "real" editors windows, but
  not e.g. shell or output windows.
* Remove configuration update Tk event fired every second, by having
  the editor window ask its code context widget to update when
  necessary, i.e. upon font or highlighting updates.
* When code context isn't being shown, avoid having a Tk event fired
  every 100ms to check whether the code context needs to be updated.
* Use the editor window's getlineno() method where applicable.
* Update font of the code context widget before the main text widget
(cherry picked from commit 7036e1de3a87d36c7ef41b8a2b44ed6fc4d34be2)

Co-authored-by: Tal Einat <taleinat@gmail.com>
5 years agoDocs: Correct formatting of a multiline code block (GH-13806)
Miss Islington (bot) [Wed, 17 Jul 2019 08:32:53 +0000 (01:32 -0700)]
Docs: Correct formatting of a multiline code block (GH-13806)

(cherry picked from commit bd26a4466b507e196fc9a5e4a6cb7cd6d39f85aa)

Co-authored-by: Joseph Fox-Rabinovitz <madphysicist@users.noreply.github.com>
5 years agobpo-27452: IDLE: Cleanup config.py code (GH-14577) (GH-14802)
Miss Islington (bot) [Tue, 16 Jul 2019 21:19:10 +0000 (14:19 -0700)]
bpo-27452: IDLE: Cleanup config.py code (GH-14577) (GH-14802)

(cherry picked from commit f8d4cc7dbbf54b9c5435c3080582a4aa421a067d)

Co-authored-by: Cheryl Sabella <cheryl.sabella@gmail.com>
5 years agoFix infinite loop in email folding logic (GH-12732)
Miss Islington (bot) [Tue, 16 Jul 2019 18:08:36 +0000 (11:08 -0700)]
Fix infinite loop in email folding logic (GH-12732)

As far as I can tell, this infinite loop would be triggered if:

1. The value being folded contains a single word (no spaces) longer than
   max_line_length
2. The max_line_length is shorter than the encoding's name + 9
   characters.

bpo-36564: https://bugs.python.org/issue36564
(cherry picked from commit f69d5c61981ea97d251db515c7ff280fcc17182d)

Co-authored-by: Paul Ganssle <pganssle@users.noreply.github.com>
5 years agoReplace backquote with command substitution in subprocess doc example (GH-13941)
Miss Islington (bot) [Tue, 16 Jul 2019 15:05:39 +0000 (08:05 -0700)]
Replace backquote with command substitution in subprocess doc example (GH-13941)

Replace backquotes with POSIXy command substitution in example.
(cherry picked from commit 6a61714cde7037cd9a1bcc11ecccb17fe3081295)

Co-authored-by: David Jones <drj@pobox.com>
5 years agobpo-37284: Add note to sys.implementation doc (GH-14328)
Miss Islington (bot) [Mon, 15 Jul 2019 14:45:12 +0000 (07:45 -0700)]
bpo-37284: Add note to sys.implementation doc (GH-14328)

Add a brief note to indicate that any new required attributes must go through the PEP process.

https://bugs.python.org/issue37284
(cherry picked from commit 52693c10e82622d883433b779a45d0bd792f17ed)

Co-authored-by: Giovanni Cappellotto <gcappellotto@fb.com>
5 years agobpo-37593: Swap the positions of posonlyargs and args in the constructor of ast.param...
Miss Islington (bot) [Sun, 14 Jul 2019 23:49:52 +0000 (16:49 -0700)]
bpo-37593: Swap the positions of posonlyargs and args in the constructor of ast.parameters nodes (GH-14778)

https://bugs.python.org/issue37593
(cherry picked from commit cd6e83b4810549c308ab2d7315dbab526e35ccf6)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
5 years agoClarify that plistlib's load and dump functions take a binary file object (GH-9825)
Miss Islington (bot) [Sun, 14 Jul 2019 09:25:43 +0000 (02:25 -0700)]
Clarify that plistlib's load and dump functions take a binary file object (GH-9825)

The documentation says that the fp parameter to plistlib.load "should be a
readable and binary file object" but the docstring only mentions that it
should be readable. Similarly, plistlib.dump's docstring only mentions
"writable". This commit clarifies that fp should also be binary.

https://docs.python.org/3/library/plistlib.htmlGH-plistlib.load
https://docs.python.org/3/library/plistlib.htmlGH-plistlib.dump
(cherry picked from commit 0d4f4352efecf1b044c88e234e71774fe04b7d6c)

Co-authored-by: Collin Styles <collingstyles@gmail.com>
5 years agobpo-37590: Remove redundant docs of PyEval_EvalFrameEx (GH-14765)
Miss Islington (bot) [Sun, 14 Jul 2019 08:53:18 +0000 (01:53 -0700)]
bpo-37590: Remove redundant docs of PyEval_EvalFrameEx (GH-14765)

(cherry picked from commit 40d2226a69aed6252023d365731bd4ed39dc1a4f)

Co-authored-by: Hai Shi <shihai1992@gmail.com>
5 years agobpo-37571: Remove extra space in ctypes docs (GH14764)
Miss Islington (bot) [Sun, 14 Jul 2019 08:22:57 +0000 (01:22 -0700)]
bpo-37571: Remove extra space in ctypes docs (GH14764)

(cherry picked from commit 68c74d05c1fdaf59d8711431884af975ac2ac5f8)

Co-authored-by: Steve Dower <steve.dower@python.org>
5 years agobpo-37571: Add 'b' to prevent the TypeError exception. (GH-14721)
Miss Islington (bot) [Sun, 14 Jul 2019 08:07:06 +0000 (01:07 -0700)]
bpo-37571: Add 'b' to prevent the TypeError exception. (GH-14721)

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

Co-authored-by: Michele Angrisano <michele.angrisano@gmail.com>
5 years agobpo-36261: Improve example of the preamble field in email docs (GH-14751)
Miss Islington (bot) [Sun, 14 Jul 2019 07:53:15 +0000 (00:53 -0700)]
bpo-36261: Improve example of the preamble field in email docs (GH-14751)

(cherry picked from commit 8efade91b12a13102a09a3856179021e579da5e9)

Co-authored-by: Carl Bordum Hansen <carl@bordum.dk>
5 years agobpo-26967: fix flag grouping with allow_abbrev=False (GH-14316) (GH-14759)
Miss Islington (bot) [Sun, 14 Jul 2019 05:59:56 +0000 (22:59 -0700)]
bpo-26967: fix flag grouping with allow_abbrev=False (GH-14316) (GH-14759)

The `allow_abbrev` option for ArgumentParser is documented and intended to disable support for unique prefixes of --options, which may sometimes be ambiguous due to deferred parsing.

However, the initial implementation also broke parsing of grouped short flags, such as `-ab` meaning `-a -b` (or `-a=b`).  Checking the argument for a leading `--` before rejecting it fixes this.

This was prompted by pytest-dev/pytestGH-5469, so a backport to at least 3.8 would be great :smile:
And this is my first PR to CPython, so please let me know if I've missed anything!

https://bugs.python.org/issue26967
(cherry picked from commit dffca9e925ee5c3072663cbe8d4d4768406d5307)

Co-authored-by: Zac Hatfield-Dodds <Zac-HD@users.noreply.github.com>
5 years agobpo-30088: Document that existing dir structure isn't verified by mailbox.Maildir...
Miss Islington (bot) [Sat, 13 Jul 2019 14:59:48 +0000 (07:59 -0700)]
bpo-30088: Document that existing dir structure isn't verified by mailbox.Maildir (GH-1163)

Hi,

I've faced an issue w/ `mailbox.Maildir()`. The case is following:
1. I create a folder with `tempfile.TemporaryDirectory()`, so it's empty
2. I pass that folder path as an argument when instantiating `mailbox.Maildir()`
3. Then I receive an exception happening because "there's no such file or directory" (namely `cur`, `tmp` or `new`) during interaction with Maildir

**Expected result:** subdirs are created during `Maildir()` instance creation.

**Actual result:** subdirs are assumed as existing which leads to exceptions during use.

**Workaround:** remove the actual dir before passing the path to `Maildir()`. It will be created automatically with all subdirs needed.

**Fix:** This PR. Basically it adds creation of subdirs regardless of whether the base dir existed before.

https://bugs.python.org/issue30088
(cherry picked from commit e44184749c2fd0921867ea5cd20b8e226c2146c2)

Co-authored-by: Sviatoslav Sydorenko <wk@sydorenko.org.ua>
5 years agobpo-37579: Improve equality behavior for pure Python datetime and time (GH-14726)
Miss Islington (bot) [Sat, 13 Jul 2019 13:59:37 +0000 (06:59 -0700)]
bpo-37579: Improve equality behavior for pure Python datetime and time (GH-14726)

Returns NotImplemented for timedelta and time in __eq__ for different types in Python implementation, which matches the C implementation.

This also adds tests to enforce that these objects will fall back to the right hand side's __eq__ and/or __ne__ implementation.

bpo-37579
(cherry picked from commit e6b46aafad3427463d6264a68824df4797e682f1)

Co-authored-by: Xtreak <tir.karthi@gmail.com>
5 years agobpo-37580: Fix typo in http.cookiejar documentation (GH-14731)
Miss Islington (bot) [Sat, 13 Jul 2019 10:24:48 +0000 (03:24 -0700)]
bpo-37580: Fix typo in http.cookiejar documentation (GH-14731)

[bpo-37580](https://bugs.python.org/issue37580): Markup typo in http.cookiejar doc

https://bugs.python.org/issue37580
(cherry picked from commit b5bbb8a740eaf46c78d122185de8b072e9deea2a)

Co-authored-by: Milan Oberkirch <milan.oberkirch@geops.de>