]> granicus.if.org Git - python/log
python
5 years agobpo-37908: Add an example of ArgumentParser.exit() (GH-15455)
Miss Islington (bot) [Thu, 12 Sep 2019 15:43:14 +0000 (08:43 -0700)]
bpo-37908: Add an example of ArgumentParser.exit() (GH-15455)

Co-Authored-By: Brandt Bucher <brandtbucher@gmail.com>
(cherry picked from commit b1a2abdb06408ffc4f13d6ff50351ad49c99afc0)

Co-authored-by: Hai Shi <shihai1992@gmail.com>
5 years ago[3.8] bpo-38121: Sync importlib.metadata with 0.22 backport (GH-15993) (GH-16064)
Jason R. Coombs [Thu, 12 Sep 2019 15:41:31 +0000 (16:41 +0100)]
[3.8] bpo-38121: Sync importlib.metadata with 0.22 backport (GH-15993) (GH-16064)

* bpo-38121: Sync importlib.metadata with 0.22 backport

* 📜🤖 Added by blurb_it..
(cherry picked from commit 8ed6503eca4e3ea4949479d8d7fd9ffd54f81038)

Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
5 years agobpo-38096: Complete the "structseq" and "named tuple" cleanup (GH-16010) (GH-16062)
Miss Islington (bot) [Thu, 12 Sep 2019 15:20:31 +0000 (08:20 -0700)]
bpo-38096:  Complete the "structseq" and "named tuple" cleanup (GH-16010) (GH-16062)

(cherry picked from commit 4210ad5ebd5769f585035e022876e161cd0e9a3e)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
5 years agobpo-37935: Added tests for os.walk(), glob.iglob() and Path.glob() (GH-15956) (GH...
Miss Islington (bot) [Thu, 12 Sep 2019 15:07:47 +0000 (08:07 -0700)]
bpo-37935: Added tests for os.walk(), glob.iglob() and Path.glob() (GH-15956) (GH-16043)

Test that they do not keep too many file descriptors open for the host OS in a reasonable test scenario.

See [bpo-37935](https://bugs.python.org/issue37935).
(cherry picked from commit f9dc2ad89032201427ed5f08061c703794627ad9)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
5 years ago[3.8] bpo-38137: Re-add OpenSSL 1.0.2 compat (GH-16051) (GH-16057)
Stéphane Wirtel [Thu, 12 Sep 2019 14:57:03 +0000 (15:57 +0100)]
[3.8] bpo-38137: Re-add OpenSSL 1.0.2 compat (GH-16051) (GH-16057)

The defines are required for OpenSSL 1.0.2 and LibreSSL.

https://bugs.python.org/issue38134

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

Co-authored-by: Christian Heimes <christian@python.org>
https://bugs.python.org/issue38137

Automerge-Triggered-By: @matrixise
5 years agobpo-37488 : Document a warning for datetime.utcnow() and utcfromtimestamp() (GH-15773)
Miss Islington (bot) [Thu, 12 Sep 2019 14:55:48 +0000 (07:55 -0700)]
bpo-37488 : Document a warning for datetime.utcnow() and utcfromtimestamp() (GH-15773)

https://bugs.python.org/issue37488

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

Co-authored-by: Joannah Nanjekye <33177550+nanjekyejoannah@users.noreply.github.com>
5 years agobpo-21872: fix lzma library decompresses data incompletely (GH-14048)
Miss Islington (bot) [Thu, 12 Sep 2019 14:41:11 +0000 (07:41 -0700)]
bpo-21872: fix lzma library decompresses data incompletely (GH-14048)

* 1. add test case with wrong behavior
* 2. fix bug when max_length == -1
* 3. allow b"" as valid input data for decompress_buf()
* 4. when max_length >= 0, let needs_input mechanism works
* add more asserts to test case
(cherry picked from commit 4ffd05d7ec47cfd0d7fc95dce851633be9663255)

Co-authored-by: animalize <animalize@users.noreply.github.com>
5 years agoOverhaul datetime documentation (GH-13410)
Miss Islington (bot) [Thu, 12 Sep 2019 14:37:36 +0000 (07:37 -0700)]
Overhaul datetime documentation (GH-13410)

This is a restructuring of the datetime documentation to hopefully make
them more user-friendly and approachable to new users without losing any
of the detail.

Changes include:
 - Creating dedicated subsections for some concepts such as:
    - "Constants"
    - "Naive vs Aware"
    - "Determining if an Object is Aware"
 - Give 'naive vs aware' its own subsection
 - Give 'constants' their own subsection
 - Overhauling the strftime-strptime section by:
    - Breaking it into logical, linkable, and digestable parts
    - Adding a high-level comparison table
    - Moving the technical detail to bottom: readers come to this
      section primarily to remind themselves to things:
      - How do I write the format code for X?
      - strptime/strftime: which one is which again?
 - Touching up fromisoformat + isoformat sections by:
    - Revising fromisoformat + isoformat for date, time, and
      datetime
    - Adding basic examples
    - Enforcing consistency about putting formats (i.e. ``HH:MM``)
      in double backticks.  This was previously done in some places
      but not all
    - Putting long 'supported formats', on their own line to improve
      readability
 - Moving the 'seealso' section to the top and add a link to dateutil
    Rationale: This doesn't really belong nested under the
    'constants' section.  Let readers know right away that
    datetime is one of several related tools.
 - Moving common features of several types into one place:
    Previously, each type went out of its way to note separately
    that it was hashable and picklable.  These can be brought
    into one single place that is more prominent.
 - Reducing some verbose explanations to improve readability
 - Breaking up long paragraphs into digestable chunks
 - Displaying longer "equivalent to" examples, as short code blocks
 - Using the dot notation for datetime/time classes:
    Use :class:`.time` and :class:`.datetime` rather than :class:`time` and
    :class:`datetime`; otherwise, the generated links will route to the
    respective modules, not classes.
 - Rewording the tzinfo class description
    The top paragraph should get straight to the point of telling the reader
    what subclasses of tzinfo _do_.  Previously, that was hidden in a later
    paragraph.
 - Adding a note on .today() versus .now()
 - Rearranging and expanding example blocks, including:
    - Moved long, multiline inline examples to standalone examples
    - Simplified the example block for timedelta arithmetic:
        - Broke the example into two logical sections:
          1. normalization/parameter 'merging'
          2. timedelta arithmetic
        - Reduced the complexity of the some of the examples.  Show
          reasonable, real-world uses cases that are easy to follow
          along with and progres in difficult slightly.
    - Broke up the example sections for date and datetime sections by putting
      the easy examples first, progressing to more esoteric situations and
      breaking it up into logical sections based on what the methods are
      doing at a high level.
    - Simplified the KabulTz example:
        - Put the class definition itself into a non-REPL block since there is
          no interactive output involved there
        - Briefly explained what's happening before launching into the code
        - Broke the example section into visually separate chunks
 - Various whitespace, formatting, style and grammar fixes including:
    - Consistently using backctics for 'date_string' formats
    - Consistently using one space after periods.
    - Consistently using bold for vocab terms
    - Consistently using italics when referring to params:
      See https://devguide.python.org/documenting/GH-id4
    - Using '::' to lead into code blocks
        Per https://devguide.python.org/documenting/GH-source-code, this will
        let the reader use the 'expand/collapse' top-right button for REPL
        blocks to hide or show the prompt.
    - Using consistent captialization schemes
    - Removing use of the default role
    - Put 'example' blocks in Markdown subsections

This is a combination of 66 commits.

See bpo-36960: https://bugs.python.org/issue36960
(cherry picked from commit 3fb1363fe87a24cdb2ee1dd9746f1c49046af958)

Co-authored-by: Brad <brad.solomon.1124@gmail.com>
5 years agobpo-36991: Fix incorrect exception escaping ZipFile.extract() (GH-13632)
Miss Islington (bot) [Thu, 12 Sep 2019 14:33:53 +0000 (07:33 -0700)]
bpo-36991: Fix incorrect exception escaping ZipFile.extract() (GH-13632)

(cherry picked from commit 2f1b857562b0f1601c9019db74c29b7d7e21ac9f)

Co-authored-by: Berker Peksag <berker.peksag@gmail.com>
5 years agobpo-38132: Check EVP_DigestUpdate for error (GH-16041)
Miss Islington (bot) [Thu, 12 Sep 2019 13:50:46 +0000 (06:50 -0700)]
bpo-38132: Check EVP_DigestUpdate for error (GH-16041)

(cherry picked from commit 8c74574e0aaf1a00719fbc9acbdc27a3923520aa)

Co-authored-by: Christian Heimes <christian@python.org>
5 years agobpo-37363: Document internal audit events (GH-14663)
Miss Islington (bot) [Thu, 12 Sep 2019 13:20:26 +0000 (06:20 -0700)]
bpo-37363: Document internal audit events (GH-14663)

Three internal cpython events were not documented, yet.

Signed-off-by: Christian Heimes <christian@python.org>
https://bugs.python.org/issue37363
(cherry picked from commit ed4b3216e59df4806e5ef63b3357fc577a9443d7)

Co-authored-by: Christian Heimes <christian@python.org>
5 years agobpo-38132: Simplify _hashopenssl code (GH-16023) (#16040)
Miss Islington (bot) [Thu, 12 Sep 2019 13:03:50 +0000 (06:03 -0700)]
bpo-38132: Simplify _hashopenssl code (GH-16023) (#16040)

Signed-off-by: Christian Heimes <christian@python.org>
(cherry picked from commit 5a4f82f457049b5b07b6fba4ca42bc1ecf597976)

Co-authored-by: Christian Heimes <christian@python.org>
5 years agobpo-36373: Deprecate explicit loop in task and subprocess API (GH-16033)
Miss Islington (bot) [Thu, 12 Sep 2019 12:59:50 +0000 (05:59 -0700)]
bpo-36373: Deprecate explicit loop in task and subprocess API (GH-16033)

(cherry picked from commit a488879cbaf4b8b52699cadccf73bb4c271bcb29)

Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
5 years agobpo-26868: Fix example usage of PyModule_AddObject. (GH-15725)
Miss Islington (bot) [Thu, 12 Sep 2019 12:26:46 +0000 (05:26 -0700)]
bpo-26868: Fix example usage of PyModule_AddObject. (GH-15725)

* Add a note to the PyModule_AddObject docs.

* Correct example usages of PyModule_AddObject.

* Whitespace.

* Clean up wording.

* 📜🤖 Added by blurb_it.

* First code review.

* Add < 0 in the tests with PyModule_AddObject
(cherry picked from commit 224b8aaa7e8f67f748e8b7b6a4a77a25f6554651)

Co-authored-by: Brandt Bucher <brandtbucher@gmail.com>
5 years agobpo-35325: Doc: imp.find_module() return value documentation discrepancy (GH-11040)
Miss Islington (bot) [Thu, 12 Sep 2019 12:25:54 +0000 (05:25 -0700)]
bpo-35325: Doc: imp.find_module() return value documentation discrepancy (GH-11040)

(cherry picked from commit 967b84c913c7b09ae2fc86272cb9373415e2beaf)

Co-authored-by: Windson yang <wiwindson@outlook.com>
5 years agobpo-38134: Remove PKBDF2_HMAC_fast from _hashopenssl (GH-16028)
Miss Islington (bot) [Thu, 12 Sep 2019 12:18:38 +0000 (05:18 -0700)]
bpo-38134: Remove PKBDF2_HMAC_fast from _hashopenssl (GH-16028)

Signed-off-by: Christian Heimes <christian@python.org>
(cherry picked from commit 64117e059b79236c7345bc9afc1cc707162411de)

Co-authored-by: Christian Heimes <christian@python.org>
5 years agobpo-35685: Add examples of unittest.mock.patch.dict usage (GH-11456)
Miss Islington (bot) [Thu, 12 Sep 2019 11:37:05 +0000 (04:37 -0700)]
bpo-35685: Add examples of unittest.mock.patch.dict usage (GH-11456)

(cherry picked from commit 31a82e25b6044a5b5ee25246bad3eb7b873cf5ec)

Co-authored-by: Emmanuel Arias <emmanuelarias30@gmail.com>
5 years agobpo-36675: Remove obsolete code. (GH-16024)
Miss Islington (bot) [Thu, 12 Sep 2019 11:31:17 +0000 (04:31 -0700)]
bpo-36675: Remove obsolete code. (GH-16024)

Does no longer work since Sphinx moved the trim_doctest_flag option in
the configuration.
(cherry picked from commit 2c910c1e732c9a3ec4c67a7c43d789d6c729304a)

Co-authored-by: Julien Palard <julien@palard.fr>
5 years ago[3.8] bpo-32008: Prefer client or TLSv1_2 in examples (GH-5797) (GH-16027)
Stéphane Wirtel [Thu, 12 Sep 2019 11:25:02 +0000 (12:25 +0100)]
[3.8] bpo-32008: Prefer client or TLSv1_2 in examples (GH-5797) (GH-16027)

Prefer client or TLSv1_2 in examples

Signed-off-by: Christian Heimes <christian@python.org>
(cherry picked from commit 894d0f7d5542ee04556ec1bee8c58506f7c916d4)

Co-authored-by: Christian Heimes <christian@python.org>
5 years agobpo-38110: Use fdwalk for os.closerange() when available. (GH-15224)
Miss Islington (bot) [Thu, 12 Sep 2019 11:19:21 +0000 (04:19 -0700)]
bpo-38110: Use fdwalk for os.closerange() when available. (GH-15224)

Use fdwalk() on platforms that support it to implement os.closerange().
(cherry picked from commit e20134f889a0cfcc37a46979f31a1c98b800de07)

Co-authored-by: Jakub Kulík <Kulikjak@gmail.com>
5 years agobpo-37972: unittest.mock._Call now passes on __getitem__ to the __getattr__ chaining...
Miss Islington (bot) [Thu, 12 Sep 2019 10:52:49 +0000 (03:52 -0700)]
bpo-37972: unittest.mock._Call now passes on __getitem__ to the __getattr__ chaining so that call() can be subscriptable (GH-15565) (GH-15965)

* bpo-37972: unittest.mock._Call now passes on __getitem__ to the __getattr__ chaining so that call() can be subscriptable

* 📜🤖 Added by blurb_it.

* Update 2019-08-28-21-40-12.bpo-37972.kP-n4L.rst

added name of the contributor

* bpo-37972: made all dunder methods chainable for _Call

* bpo-37972: delegate only attributes of tuple instead to __getattr__
(cherry picked from commit 72c359912d36705a94fca8b63d80451905a14ae4)

Co-authored-by: blhsing <github@ydooby.com>
5 years agocloses bpo-37405: Make socket.getsockname() always return a tuple for AF_CAN. (GH...
Miss Islington (bot) [Thu, 12 Sep 2019 10:34:28 +0000 (03:34 -0700)]
closes bpo-37405: Make socket.getsockname() always return a tuple for AF_CAN. (GH-14392) (GH-16018)

This fixes a regression from 3.5. In recent releases, `getsockname()` in the AF_CAN case has returned a string.
(cherry picked from commit 954900a3f98a8c0dea14dd575490237f3f8626b3)

Co-authored-by: bggardner <brent@ebrent.net>
5 years agobpo-38008: Move builtin protocol whitelist to mapping instead of list (GH-15647)
Miss Islington (bot) [Thu, 12 Sep 2019 10:32:36 +0000 (03:32 -0700)]
bpo-38008: Move builtin protocol whitelist to mapping instead of list (GH-15647)

Fixes https://bugs.python.org/issue38008
(cherry picked from commit 692a0dc91597b7fb350383b633dc4d044cbd360e)

Co-authored-by: Divij Rajkumar <drajkuma1@gmail.com>
5 years agobpo-13927: time.ctime and time.asctime return string explantion (GH-11303)
Miss Islington (bot) [Thu, 12 Sep 2019 10:31:43 +0000 (03:31 -0700)]
bpo-13927: time.ctime and time.asctime return string explantion (GH-11303)

* bpo-13927: time.ctime and time.asctime return string explantion

* Add note explaining that time.ctime and time.asctime returns a space padded date value in case it contains a single digit date

* Reformat linebreaks
(cherry picked from commit 2d32bf1ef23c9e468b2e8afab3c24e7a2047ac36)

Co-authored-by: Harmandeep Singh <harmandeep.singh1@delhivery.com>
5 years agocloses bpo-38127: _ctypes: PyObject_IsSubclass() should be checked for failure. ...
Miss Islington (bot) [Thu, 12 Sep 2019 10:28:05 +0000 (03:28 -0700)]
closes bpo-38127: _ctypes: PyObject_IsSubclass() should be checked for failure. (GH-16011)

An exception may occur during a PyObject_IsSubclass() call.
(cherry picked from commit ea683deccc505a78bbbb1eb8c6a88b0835ad5151)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
5 years ago[3.8] bpo-37879: Suppress subtype_dealloc decref when base type is a C heap type...
Petr Viktorin [Thu, 12 Sep 2019 09:44:46 +0000 (10:44 +0100)]
[3.8] bpo-37879: Suppress subtype_dealloc decref when base type is a C heap type (GH-15323, GH-16004) (GH-15966)

The instance destructor for a type is responsible for preparing
an instance for deallocation by decrementing the reference counts
of its referents.

If an instance belongs to a heap type, the type object of an instance
has its reference count decremented while for static types, which
are permanently allocated, the type object is unaffected by the
instance destructor.

Previously, the default instance destructor searched the class
hierarchy for an inherited instance destructor and, if present,
would invoke it.

Then, if the instance type is a heap type, it would decrement the
reference count of that heap type.  However, this could result in the
premature destruction of a type because the inherited instance
destructor should have already decremented the reference count
of the type object.

This change avoids the premature destruction of the type object
by suppressing the decrement of its reference count when an
inherited, non-default instance destructor has been invoked.

Finally, an assertion on the Py_SIZE of a type was deleted.  Heap
types have a non zero size, making this into an incorrect assertion.

https://github.com/python/cpython/pull/15323.
(cherry picked from commit ff023ed36ea260ab64be5895f1f1f087c798987a)
Fixup: https://github.com/python/cpython/pull/16004.
(cherry picked from commit 5e9caeec76119a0d61c25f1466c27b7dbd5115bd)

Co-authored-by: Eddie Elizondo <eduardo.elizondorueda@gmail.com>
5 years agoDoc: Update pickle.rst (GH-14128) (GH-16014)
Miss Islington (bot) [Thu, 12 Sep 2019 08:19:12 +0000 (01:19 -0700)]
Doc: Update pickle.rst (GH-14128) (GH-16014)

* Edits for readability and grammar
(cherry picked from commit 362f5350eb5e2c7bfb0b0a8c306a2e128c3aee93)

Co-authored-by: Géry Ogam <gery.ogam@gmail.com>
5 years agobpo-38096: Clean up the "struct sequence" / "named tuple" docs (GH-15895) (GH-15961)
Paul Ganssle [Thu, 12 Sep 2019 02:50:29 +0000 (03:50 +0100)]
bpo-38096: Clean up the "struct sequence" / "named tuple" docs (GH-15895) (GH-15961)

5 years agocloses bpo-38124: Fix bounds check in PyState_AddModule. (GH-16007)
Miss Islington (bot) [Thu, 12 Sep 2019 00:04:27 +0000 (17:04 -0700)]
closes bpo-38124: Fix bounds check in PyState_AddModule. (GH-16007)

The >=, checking whether a module index was in already in the module-by-index list, needed to be strict.

Also, fold nested ifs into one and fix some bad spacing.
(cherry picked from commit 39de95b746c990e6a2fe9af5fad01747f58b2e5f)

Co-authored-by: Benjamin Peterson <benjamin@python.org>
5 years agoCorrect typo in min version test (GH-16001)
Miss Islington (bot) [Wed, 11 Sep 2019 18:19:12 +0000 (11:19 -0700)]
Correct typo in min version test (GH-16001)

Signed-off-by: Christian Heimes <christian@python.org>
(cherry picked from commit de606ea169435fe4dd40dc3e3b2b591e11396a14)

Co-authored-by: Christian Heimes <christian@python.org>
5 years agobpo-36270: Doc: add link to traceback object reference (GH-13119)
Miss Islington (bot) [Wed, 11 Sep 2019 18:12:35 +0000 (11:12 -0700)]
bpo-36270: Doc: add link to traceback object reference (GH-13119)

(cherry picked from commit 9936371af298d465095ae70bc9c2943b4b16eac4)

Co-authored-by: Björn Meier <bjoern@opentrash.org>
5 years agobpo-34001: Fix test_ssl with LibreSSL (GH-13783) (#15997)
Miss Islington (bot) [Wed, 11 Sep 2019 17:59:13 +0000 (10:59 -0700)]
bpo-34001: Fix test_ssl with LibreSSL (GH-13783) (#15997)

(cherry picked from commit c9bc49c5f6e26a7c958307c2ac338951a7534d9a)

Co-authored-by: Christian Heimes <christian@python.org>
5 years agoImprove clarity of try-return-finally-return (GH-15677) (GH-15981)
Miss Islington (bot) [Wed, 11 Sep 2019 17:42:21 +0000 (10:42 -0700)]
Improve clarity of try-return-finally-return (GH-15677) (GH-15981)

Clarify execution in try-return-finally-return case.
(cherry picked from commit 0cc27417f2cd399c432d7dda9aeca1d81af76936)

Co-authored-by: toonarmycaptain <toonarmycaptain@hotmail.com>
5 years ago[3.8] bpo-37698: Update doc of PyBuffer_ToContiguous (GH-14992) (GH-15999)
Stéphane Wirtel [Wed, 11 Sep 2019 17:36:00 +0000 (19:36 +0200)]
[3.8] bpo-37698: Update doc of PyBuffer_ToContiguous (GH-14992) (GH-15999)

https://bugs.python.org/issue37698
(cherry picked from commit 15f5a7527b87e11fcf23069c147fd4cb7d42cfb0)

Co-authored-by: Hai Shi <shihai1992@gmail.com>
5 years agoDoc: recursive glob ** follows symlinks to directories (GH-12918)
Miss Islington (bot) [Wed, 11 Sep 2019 17:32:26 +0000 (10:32 -0700)]
Doc: recursive glob ** follows symlinks to directories (GH-12918)

(cherry picked from commit e24594bfe75aff3e654665cb940ddc4d4acffd2f)

Co-authored-by: Marc <Marc.Herbert+github@gmail.com>
5 years agobpo-37750: Add doc of PyBuffer_FromContiguous (GH-15988) (GH-15990)
Miss Islington (bot) [Wed, 11 Sep 2019 17:09:57 +0000 (10:09 -0700)]
bpo-37750: Add doc of PyBuffer_FromContiguous (GH-15988) (GH-15990)

https://bugs.python.org/issue37750

Automerge-Triggered-By: @matrixise
(cherry picked from commit 5a56ce4a0e820fefcd598b94715a7ff7e199858d)

Co-authored-by: Hai Shi <shihai1992@gmail.com>
5 years agobpo-38117: Test with OpenSSL 1.1.1d (GH-15983)
Miss Islington (bot) [Wed, 11 Sep 2019 17:09:28 +0000 (10:09 -0700)]
bpo-38117: Test with OpenSSL 1.1.1d (GH-15983)

Signed-off-by: Christian Heimes <christian@python.org>
(cherry picked from commit 58ab13479d854491ac9207bacfae25e8b18b044a)

Co-authored-by: Christian Heimes <christian@python.org>
5 years agobpo-36528: Remove duplicate re tests. (GH-2689)
Miss Islington (bot) [Wed, 11 Sep 2019 16:46:29 +0000 (09:46 -0700)]
bpo-36528: Remove duplicate re tests. (GH-2689)

Co-Authored-By: Makdon <makdon@makdon.me>
(cherry picked from commit e6557d3c62800f51ee6530c94a10b93d725504fa)

Co-authored-by: Xtreak <tir.karthi@gmail.com>
5 years agoDoc: Fix missing negation. (GH-14640)
Miss Islington (bot) [Wed, 11 Sep 2019 16:25:40 +0000 (09:25 -0700)]
Doc: Fix missing negation. (GH-14640)

Reported by Hug Capella on docs@.

Automerge-Triggered-By: @matrixise
(cherry picked from commit 1fae844451b120b93880d9360f288c70e125520c)

Co-authored-by: Julien Palard <julien@palard.fr>
5 years agobpo-36260: Add pitfalls to zipfile module documentation (GH-13378) (GH-15976)
Miss Islington (bot) [Wed, 11 Sep 2019 16:03:18 +0000 (09:03 -0700)]
bpo-36260: Add pitfalls to zipfile module documentation (GH-13378) (GH-15976)

* bpo-36260: Add pitfalls to zipfile module documentation

We saw vulnerability warning description (including zip bomb) in Doc/library/xml.rst file.
This gave us the idea of documentation improvement.

So, we moved a little bit forward :P
And the doc patch can be found (pr).

* fix trailing whitespace

* 📜🤖 Added by blurb_it.

* Reformat text for consistency.
(cherry picked from commit 3ba51d587f6897a45301ce9126300c14fcd4eba2)

Co-authored-by: JunWei Song <sungboss2004@gmail.com>
5 years agobpo-38114: Do not include pip.ini in Nuget package (GH-15964)
Miss Islington (bot) [Wed, 11 Sep 2019 15:57:54 +0000 (08:57 -0700)]
bpo-38114: Do not include pip.ini in Nuget package (GH-15964)

(cherry picked from commit 19f6940cd7fb91246b88e1fbdbce97a02e7f3fa1)

Co-authored-by: Steve Dower <steve.dower@python.org>
5 years agobpo-33166: Change os.cpu_count to return active (real) processors (GH-15949)
Miss Islington (bot) [Wed, 11 Sep 2019 15:56:13 +0000 (08:56 -0700)]
bpo-33166: Change os.cpu_count to return active (real) processors (GH-15949)

(cherry picked from commit aa929273caca2f4e24e3aa9e790272fd4458ad35)

Co-authored-by: Steve Dower <steve.dower@python.org>
5 years agobpo-37885: venv: Don't produce unbound variable warning on deactivate (GH-15973)
Miss Islington (bot) [Wed, 11 Sep 2019 15:55:57 +0000 (08:55 -0700)]
bpo-37885: venv: Don't produce unbound variable warning on deactivate (GH-15973)

Before, running deactivate from a bash shell configured to treat undefined variables as errors (`set -u`) would produce a warning:

```
$ python3 -m venv test
$ source test/bin/activate
(test) $ deactivate
-bash: $1: unbound variable
```
(cherry picked from commit 5209e586b7cac9a43b2c44349a26b1b0af06ead3)

Co-authored-by: Daniel Abrahamsson <hamsson@gmail.com>
5 years agobpo-36182: Update pathlib.Path.write_text() docs (GH-12161) (GH-15977)
Miss Islington (bot) [Wed, 11 Sep 2019 15:55:31 +0000 (08:55 -0700)]
bpo-36182: Update pathlib.Path.write_text() docs (GH-12161) (GH-15977)

with the case of an existing file
(cherry picked from commit af636f4f91b8289b6dad95cb84123f6e22fd7f4f)

Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
5 years agobpo-36634: Fixes activate.bat when existing values contain double quotes (GH-15924)
Miss Islington (bot) [Wed, 11 Sep 2019 15:21:58 +0000 (08:21 -0700)]
bpo-36634: Fixes activate.bat when existing values contain double quotes (GH-15924)

(cherry picked from commit 574b324bdc9a126b5a4488c3613f11ad2555415e)

Co-authored-by: Steve Dower <steve.dower@python.org>
5 years agobpo-35224: Additional documentation for Assignment Expressions (GH-15935) (GH-15967)
Miss Islington (bot) [Wed, 11 Sep 2019 15:12:09 +0000 (08:12 -0700)]
bpo-35224: Additional documentation for Assignment Expressions (GH-15935) (GH-15967)

Add or update assignment expression documentation for:
- FAQ - Design
- Reference - Expressions
- Reference - Lexical Analysis

https://bugs.python.org/issue35224

Automerge-Triggered-By: @matrixise
(cherry picked from commit 6357c95716d89ac1f80587fbc4133df8d2e8396c)

Co-authored-by: Emily Morehouse <emily@cuttlesoft.com>
5 years agobpo-37651: Document CancelledError is now a subclass of BaseException (GH-15950)
Miss Islington (bot) [Wed, 11 Sep 2019 15:08:47 +0000 (08:08 -0700)]
bpo-37651: Document CancelledError is now a subclass of BaseException (GH-15950)

https://bugs.python.org/issue37651

Automerge-Triggered-By: @1st1
(cherry picked from commit 7b69069e9aa0047a0dbe8af1a67aa2b355dc68d8)

Co-authored-by: Xtreak <tir.karthi@gmail.com>
5 years agoDoc: Indicate locations of parse_qs, parse_qsl, escape (GH-14828)
Miss Islington (bot) [Wed, 11 Sep 2019 15:04:02 +0000 (08:04 -0700)]
Doc: Indicate locations of parse_qs, parse_qsl, escape (GH-14828)

Since they have been removed from cgi it's useful to remind people where they
can be found instead.
(cherry picked from commit 1abf54336fd2cb545c453d22dd5501392b3350b2)

Co-authored-by: Simon Willison <swillison@gmail.com>
5 years agoUpdate ftplib.all_errors documentation to match code (GH-15026)
Miss Islington (bot) [Wed, 11 Sep 2019 14:54:44 +0000 (07:54 -0700)]
Update ftplib.all_errors documentation to match code (GH-15026)

The documentation doesn't mention the `EOFError` that https://github.com/python/cpython/blob/master/Lib/ftplib.pyGH-L66 includes
(cherry picked from commit 51adfc6ed2c6c466dda84edc11d9b2b8ae2903e8)

Co-authored-by: Andrew Scheller <github@loowis.durge.org>
5 years agobpo-33187: Document ElementInclude (XInclude) support in ElementTree (GH-8861) (GH...
Miss Islington (bot) [Wed, 11 Sep 2019 14:48:33 +0000 (07:48 -0700)]
bpo-33187: Document ElementInclude (XInclude) support in ElementTree (GH-8861) (GH-15958)

(cherry picked from commit 97b817eae34b77be1ced382e15098a112f547848)

Co-authored-by: Anjali Bansal <anjali.mca17.du@gmail.com>
5 years ago[3.8] Turn off AppVeyor CI (GH-15929) (GH-15941)
Zachary Ware [Wed, 11 Sep 2019 14:39:32 +0000 (15:39 +0100)]
[3.8] Turn off AppVeyor CI (GH-15929) (GH-15941)

(cherry picked from commit 6f55b0394bce8e64a59c61f465fec8079a00e55c)

5 years agobpo-23460: Fix documentation for decimal string :g formatting (GH-11850) (GH-15954)
Miss Islington (bot) [Wed, 11 Sep 2019 14:38:25 +0000 (07:38 -0700)]
bpo-23460: Fix documentation for decimal string :g formatting (GH-11850) (GH-15954)

(cherry picked from commit 1660a61a105bcd62e2dfa77885959a8992e9f14e)

Co-authored-by: Brennan D Baraban <34765317+bdbaraban@users.noreply.github.com>
5 years agocloses bpo-37252: Fix devpoll tests. (GH-14017) (GH-15948)
Miss Islington (bot) [Wed, 11 Sep 2019 14:37:38 +0000 (07:37 -0700)]
closes bpo-37252: Fix devpoll tests. (GH-14017) (GH-15948)

(cherry picked from commit 95da826db9ed4acbc81f32296f14429c06bd2124)

Co-authored-by: Jakub Kulík <Kulikjak@gmail.com>
5 years agobpo-36919: make test_source_encoding.test_issue2301 implementation-independent (GH...
Miss Islington (bot) [Wed, 11 Sep 2019 14:37:18 +0000 (07:37 -0700)]
bpo-36919: make test_source_encoding.test_issue2301 implementation-independent (GH-13639) (GH-15952)

* bpo-36919: make test_issue2301 implementation-independent
(cherry picked from commit b6643dcfc26859f935e4b3a6a2a203e8ef5320e2)

Co-authored-by: Pavel Koneski <pavel.koneski@gmail.com>
5 years agobpo-38107: Replace direct future and task contructor calls with factories in asyncio...
Miss Islington (bot) [Wed, 11 Sep 2019 14:21:53 +0000 (07:21 -0700)]
bpo-38107: Replace direct future and task contructor calls with factories in asyncio tests (GH-15928)

(cherry picked from commit 9aee90018a5213e3529768e0b873955d23f5e50b)

Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
5 years agobpo-34519: Add additional aliases for HP Roman 8 (GH-8956) (GH-15945)
Miss Islington (bot) [Wed, 11 Sep 2019 14:13:54 +0000 (07:13 -0700)]
bpo-34519: Add additional aliases for HP Roman 8 (GH-8956) (GH-15945)

* bpo-34519: Add additional aliases for HP Roman 8

HP Roman 8 is known under mode aliases than listed in aliases.py.

Patch by Michael Osipov.
(cherry picked from commit a828514cc3715ebbc700fefa41c0ef044cbd6741)

Co-authored-by: Michael Osipov <michael.osipov@siemens.com>
5 years agobpo-37305: add MIME type for Web App Manifest (GH-14199) (#15946)
Miss Islington (bot) [Wed, 11 Sep 2019 14:13:31 +0000 (07:13 -0700)]
bpo-37305: add MIME type for Web App Manifest (GH-14199) (#15946)

* bpo-37305: add MIME type for Web App Manifest

Co-authored-by: Filip Š <filip.stamcar@hotmail.com>
5 years agobpo-31163: Added return values to pathlib.Path instance's rename and replace methods...
Miss Islington (bot) [Wed, 11 Sep 2019 14:12:54 +0000 (07:12 -0700)]
bpo-31163: Added return values to pathlib.Path instance's rename and replace methods. (GH-13582) (GH-15944)

* bpo-31163: Added return values to pathlib.Path instance's rename and replace methods.
(cherry picked from commit 088a09af4bdeff52b9dedeb7acd1e82069f37d98)

Co-authored-by: hui shang <shangdahao@gmail.com>
5 years agobpo-33459: Fix "tuple displays" term in Expressions.rst (GH-6760) (GH-15940)
Miss Islington (bot) [Wed, 11 Sep 2019 13:38:17 +0000 (06:38 -0700)]
bpo-33459: Fix "tuple displays" term in Expressions.rst (GH-6760) (GH-15940)

https://bugs.python.org/issue33459

Automerge-Triggered-By: @matrixise
(cherry picked from commit dc269971091710563a0d730a0d4b084901826c15)

Co-authored-by: Andre Delfino <adelfino@gmail.com>
5 years agobpo-33944: note about the intended use of code in .pth files (GH-10131) (GH-15942)
Miss Islington (bot) [Wed, 11 Sep 2019 13:36:50 +0000 (06:36 -0700)]
bpo-33944: note about the intended use of code in .pth files (GH-10131) (GH-15942)

https://bugs.python.org/issue33944
(cherry picked from commit f9b5840fb4497a9e2ba2c1f01ad0dafba04c8496)

Co-authored-by: native-api <ivan_pozdeev@mail.ru>
5 years agobpo-37326: Include libffi license when available (GH-15921)
Miss Islington (bot) [Wed, 11 Sep 2019 13:31:27 +0000 (06:31 -0700)]
bpo-37326: Include libffi license when available (GH-15921)

(cherry picked from commit 8fcaffb048d2359a4c06ed5d8fbbf46d3ae1a472)

Co-authored-by: Steve Dower <steve.dower@python.org>
5 years ago[3.8] Doc: Use walrus operator in example. (GH-15934) (GH-15936)
Stéphane Wirtel [Wed, 11 Sep 2019 13:17:48 +0000 (15:17 +0200)]
[3.8] Doc: Use walrus operator in example. (GH-15934) (GH-15936)

(cherry picked from commit e1d455f3a3b82c2e08d5e133bcbab5a181b66cfb)

Co-authored-by: Julien Palard <julien@palard.fr>
5 years agoDoc: Fix typo in fastsearch comments (GH-14608) (GH-15933)
Miss Islington (bot) [Wed, 11 Sep 2019 13:05:49 +0000 (06:05 -0700)]
Doc: Fix typo in fastsearch comments (GH-14608) (GH-15933)

(cherry picked from commit 60bba83b5d9947fb3106325293e3a4e9c9cdea7e)

Co-authored-by: Valentin Haenel <esc@users.noreply.github.com>
5 years agobpo-35649: update http client example (GH-11441) (GH-15930)
Miss Islington (bot) [Wed, 11 Sep 2019 13:02:25 +0000 (06:02 -0700)]
bpo-35649: update http client example (GH-11441) (GH-15930)

(cherry picked from commit 62cf6981425c6a6b136c5e2abef853364f535e9d)

Co-authored-by: Ashwin Ramaswami <aramaswamis@gmail.com>
5 years ago[3.8] bpo-35168: Make shlex.punctuation_chars read-only (GH-11631) (GH-15927)
Vinay Sajip [Wed, 11 Sep 2019 12:39:52 +0000 (13:39 +0100)]
[3.8] bpo-35168: Make shlex.punctuation_chars read-only (GH-11631) (GH-15927)

(cherry picked from commit 972cf5c06a5ba16ad243a442dbb9c15307fbed95)

Co-authored-by: Alex <a.v.shkop@gmail.com>
5 years agoMinor ReST formatting fixes in subprocess docs (GH-14876)
Miss Islington (bot) [Wed, 11 Sep 2019 12:32:16 +0000 (05:32 -0700)]
Minor ReST formatting fixes in subprocess docs (GH-14876)

(cherry picked from commit 1a13efb7e05b545def26f29c954751fdb6b22fa3)

Co-authored-by: Tim Hoffmann <2836374+timhoffm@users.noreply.github.com>
5 years agobpo-38103: fix conflicting labels in the docs. (GH-15906)
Miss Islington (bot) [Wed, 11 Sep 2019 12:28:06 +0000 (05:28 -0700)]
bpo-38103: fix conflicting labels in the docs. (GH-15906)

(cherry picked from commit 2d8d597bb8f882a7677db5a2739df0e617098634)

Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
5 years agobpo-35603: Add a note on difflib table header interpreted as HTML (GH-11439)
Miss Islington (bot) [Wed, 11 Sep 2019 12:24:55 +0000 (05:24 -0700)]
bpo-35603: Add a note on difflib table header interpreted as HTML (GH-11439)

(cherry picked from commit c78dae8d2b890d487e428dce00c7f600612cce7b)

Co-authored-by: Xtreak <tir.karthi@gmail.com>
5 years agobpo-20504 : in cgi.py, fix bug when a multipart/form-data request has… (GH-10638)
Miss Islington (bot) [Wed, 11 Sep 2019 12:09:23 +0000 (05:09 -0700)]
bpo-20504 : in cgi.py, fix bug when a multipart/form-data request has… (GH-10638)

* bpo-20504 : in cgi.py, fix bug when a multipart/form-data request has no content-length header

* Add Misc/NEWS.d/next file.

* Add rst formatting for NEWS.d/next file

* Reaplce assert by self.assertEqual
(cherry picked from commit 2d7cacacc310b65b43e7e2de89e7722291dea6a4)

Co-authored-by: Pierre Quentel <pierre.quentel@gmail.com>
5 years agobpo-35066: Make trailing percent test more portable. (GH-15907)
Miss Islington (bot) [Wed, 11 Sep 2019 11:47:16 +0000 (04:47 -0700)]
bpo-35066: Make trailing percent test more portable. (GH-15907)

Different libc implementations have different behavior when presented with trailing % in strftime strings. To make test_strftime_trailing_percent more portable, compare the output of datetime.strftime directly to that of time.strftime rather than hardcoding.
(cherry picked from commit f2173ae38fa49235c3cdc28ae2ca2e19a375a596)

Co-authored-by: Benjamin Peterson <benjamin@python.org>
5 years ago[3.8] bpo-37409: fix relative import with no parent (GH-14956) (GH-15913)
Brett Cannon [Wed, 11 Sep 2019 11:38:22 +0000 (12:38 +0100)]
[3.8] bpo-37409: fix relative import with no parent (GH-14956) (GH-15913)

Relative imports use resolve_name to get the absolute target name,
which first seeks the current module's absolute package name from the globals:
If __package__ (and __spec__.parent) are missing then
import uses __name__, truncating the last segment if
the module is a submodule rather than a package __init__.py
(which it guesses from whether __path__ is defined).

The __name__ attempt should fail if there is no parent package (top level modules),
if __name__ is '__main__' (-m entry points), or both (scripts).
That is, if both __name__ has no subcomponents and the module does not seem
to be a package __init__ module then import should fail..
(cherry picked from commit 92420b3e679959a7d0ce875875601a4cee45231e)

Co-authored-by: Ben Lewis <benjimin@users.noreply.github.com>
5 years agobpo-32972: Document IsolatedAsyncioTestCase of unittest module (GH-15878) (GH-15918)
Miss Islington (bot) [Wed, 11 Sep 2019 11:17:14 +0000 (04:17 -0700)]
bpo-32972: Document IsolatedAsyncioTestCase of unittest module (GH-15878) (GH-15918)

* Document `unittest.IsolatedAsyncioTestCase` API
* Add a simple example with respect to order of evaluation of setup and teardown calls.

https://bugs.python.org/issue32972

Automerge-Triggered-By: @asvetlov
(cherry picked from commit 6a9fd66f6e4445a418c43c92585b9e06d76df4b1)

Co-authored-by: Xtreak <tir.karthi@gmail.com>
5 years agobpo-28494: install ziptestdata to fix install bot (GH-15902)
Miss Islington (bot) [Wed, 11 Sep 2019 11:09:53 +0000 (04:09 -0700)]
bpo-28494: install ziptestdata to fix install bot (GH-15902)

(cherry picked from commit c37447481ec8f6d0e49d0587ec0de3f9e7d56b28)

Co-authored-by: Gregory P. Smith <greg@krypto.org>
5 years agobpo-25810: Clarify eval() docs, it does not keywords (GH-15173)
Miss Islington (bot) [Wed, 11 Sep 2019 10:53:16 +0000 (03:53 -0700)]
bpo-25810: Clarify eval() docs, it does not keywords (GH-15173)

(cherry picked from commit 7a0023e8d17566eb32c836b65c33663303a2224f)

Co-authored-by: smokephil <smokephil@gmail.com>
5 years agobpo-37585: Add clarification regarding comparing dict.values() (GH-14954)
Miss Islington (bot) [Wed, 11 Sep 2019 10:46:53 +0000 (03:46 -0700)]
bpo-37585: Add clarification regarding comparing dict.values() (GH-14954)

(cherry picked from commit 6472ece5a0fe82809d3aa0ffb281796fcd252d76)

Co-authored-by: Kyle Stanley <aeros167@gmail.com>
5 years agobpo-38081: Fixes ntpath.realpath('NUL') (GH-15899)
Miss Islington (bot) [Wed, 11 Sep 2019 10:43:30 +0000 (03:43 -0700)]
bpo-38081: Fixes ntpath.realpath('NUL') (GH-15899)

(cherry picked from commit 92521fea5d0d4aeb9b6a3c3fdd4654af700ad5c8)

Co-authored-by: Steve Dower <steve.dower@python.org>
5 years ago[3.8] bpo-36373: Fix deprecation warnings (GH-15889) (GH-15901)
Andrew Svetlov [Wed, 11 Sep 2019 10:40:36 +0000 (13:40 +0300)]
[3.8] bpo-36373: Fix deprecation warnings (GH-15889) (GH-15901)

https://bugs.python.org/issue36373
(cherry picked from commit 7264e92b718d307cc499b2f10eab7644b00f0499)

Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
5 years agobpo-16438: Doc: confusing text regarding numeric precedence corrected (GH-10521)
Miss Islington (bot) [Wed, 11 Sep 2019 10:39:36 +0000 (03:39 -0700)]
bpo-16438: Doc: confusing text regarding numeric precedence corrected (GH-10521)

(cherry picked from commit 4576b5431bd597df7581fe3c852b315e47e4b230)

Co-authored-by: Anjali <anjali30malik@gmail.com>
5 years ago[3.8] bpo-37936: Systematically distinguish rooted vs. unrooted in .gitignore (GH...
Zachary Ware [Wed, 11 Sep 2019 10:31:12 +0000 (11:31 +0100)]
[3.8] bpo-37936: Systematically distinguish rooted vs. unrooted in .gitignore (GH-15823) (GH-15900)

A root cause of bpo-37936 is that it's easy to write a .gitignore
rule that's intended to apply to a specific file (e.g., the
`pyconfig.h` generated by `./configure`) but actually applies to all
similarly-named files in the tree (e.g., `PC/pyconfig.h`.)

Specifically, any rule with no non-trailing slashes is applied in an
"unrooted" way, to files anywhere in the tree.  This means that if we
write the rules in the most obvious-looking way, then

 * for specific files we want to ignore that happen to be in
   subdirectories (like `Modules/config.c`), the rule will work
   as intended, staying "rooted" to the top of the tree; but

 * when a specific file we want to ignore happens to be at the root of
   the repo (like `platform`), then the obvious rule (`platform`) will
   apply much more broadly than intended: if someone tries to add a
   file or directory named `platform` somewhere else in the tree, it
   will unexpectedly get ignored.

That's surprising behavior that can make the .gitignore file's
behavior feel finicky and unpredictable.

To avoid it, we can simply always give a rule "rooted" behavior when
that's what's intended, by systematically using leading slashes.

Further, to help make the pattern obvious when looking at the file and
minimize any need for thinking about the syntax when adding new rules:
separate the rules into one group for each type, with brief comments
identifying them.

For most of these rules it's clear whether they're meant to be rooted
or unrooted, but in a handful of cases I've only guessed.  In that
case the safer default (the choice that won't hide information) is the
narrower, rooted meaning, with a leading slash.  If for some of these
the unrooted meaning is desired after all, it'll be easy to move them
to the unrooted section at the top.

(cherry picked from commit 455122a0094c8cfdf7e062eccc5e5b5885c75e8b)

Co-authored-by: Greg Price <gnprice@gmail.com>
5 years agobpo-37424: Avoid a hang in subprocess.run timeout output capture (GH-14490)
Miss Islington (bot) [Wed, 11 Sep 2019 10:05:14 +0000 (03:05 -0700)]
bpo-37424: Avoid a hang in subprocess.run timeout output capture (GH-14490)

Fixes a possible hang when using a timeout on subprocess.run() while
capturing output. If the child process spawned its own children or otherwise
connected its stdout or stderr handles with another process, we could hang
after the timeout was reached and our child was killed when attempting to read
final output from the pipes.
(cherry picked from commit 580d2782f70f8e0bed7ec20abb03d740cb83b5da)

Co-authored-by: Gregory P. Smith <greg@krypto.org>
5 years agobpo-38034: Fix typo in logging.handlers.rst (GH-15708) (GH-15893)
Miss Islington (bot) [Wed, 11 Sep 2019 06:56:10 +0000 (23:56 -0700)]
bpo-38034: Fix typo in logging.handlers.rst (GH-15708) (GH-15893)

(cherry picked from commit efd5741ae953e50a6654e04cf731da86a1307296)

Co-authored-by: wwuck <301402+wwuck@users.noreply.github.com>
5 years agobpo-28494: Test existing zipfile working behavior. (GH-15853)
Miss Islington (bot) [Tue, 10 Sep 2019 22:57:54 +0000 (15:57 -0700)]
bpo-28494: Test existing zipfile working behavior. (GH-15853)

Add unittests for executables with a zipfile appended to test_zipfile, as zipfile.is_zipfile and zipfile.ZipFile work properly on these today.
(cherry picked from commit 3f4db4a0bab073b768fae958e93288bd5d24eadd)

Co-authored-by: Gregory P. Smith <greg@krypto.org>
5 years agoRemove unneeded assignment in PyBytes_Concat() (GH-15274)
Miss Islington (bot) [Tue, 10 Sep 2019 17:46:52 +0000 (10:46 -0700)]
Remove unneeded assignment in PyBytes_Concat() (GH-15274)

The `wb.len = -1` assignment is unneeded since its introduction in 161d695fb0455ce52530d4f43a9eac4c738f64bb as `PyObject_GetBuffer` always fills it in.
(cherry picked from commit afdeb189e97033b54cef44a7490d89d2013cb4e5)

Co-authored-by: Sergey Fedoseev <fedoseev.sergey@gmail.com>
5 years agobpo-37574: Mention helper functions for find_spec documentation (GH-14739)
Miss Islington (bot) [Tue, 10 Sep 2019 17:13:55 +0000 (10:13 -0700)]
bpo-37574: Mention helper functions for find_spec documentation (GH-14739)

(cherry picked from commit 9cbb97b29eac4b23e916a3233f26b60ac69e335b)

Co-authored-by: jdkandersson <51036209+jdkandersson@users.noreply.github.com>
5 years agoDocs: Small tweaks to c-api/introGH-Include_Files (GH-14698)
Miss Islington (bot) [Tue, 10 Sep 2019 16:38:07 +0000 (09:38 -0700)]
Docs: Small tweaks to c-api/introGH-Include_Files (GH-14698)

(cherry picked from commit b6dafe51399f5c6313a00529118a6052b466942f)

Co-authored-by: Kyle Stanley <aeros167@gmail.com>
5 years agoCorrect minor grammatical mistake in open docs (GH-15865)
Miss Islington (bot) [Tue, 10 Sep 2019 16:24:06 +0000 (09:24 -0700)]
Correct minor grammatical mistake in open docs (GH-15865)

(cherry picked from commit 05184515f924c3880067aad87940dd466f751585)

Co-authored-by: Andre Delfino <adelfino@gmail.com>
5 years agobpo-38089: Move Azure Pipelines to latest VM versions and make macOS tests optional...
Miss Islington (bot) [Tue, 10 Sep 2019 16:20:16 +0000 (09:20 -0700)]
bpo-38089: Move Azure Pipelines to latest VM versions and make macOS tests optional (GH-15851)

(cherry picked from commit 801f925998cc393260f36f5ac77369fef2373ad1)

Co-authored-by: Steve Dower <steve.dower@python.org>
5 years agoCorrect info about "f.read(size)". (GH13852)
Miss Islington (bot) [Tue, 10 Sep 2019 16:00:09 +0000 (09:00 -0700)]
Correct info about "f.read(size)". (GH13852)

In text mode, the "size" parameter indicates the number of characters, not bytes.
(cherry picked from commit faff81c05f838b0b7a64bbc8c53c02a9b04bb79d)

Co-authored-by: William Andrea <william.j.andrea@gmail.com>
5 years agobpo-37531: Enhance regrtest multiprocess timeout (GH-15345) (GH-15871)
Victor Stinner [Tue, 10 Sep 2019 15:54:51 +0000 (17:54 +0200)]
bpo-37531: Enhance regrtest multiprocess timeout (GH-15345) (GH-15871)

* Write a message when killing a worker process
* Put a timeout on the second popen.communicate() call
  (after killing the process)
* Put a timeout on popen.wait() call
* Catch popen.kill() and popen.wait() exceptions

(cherry picked from commit de2d9eed8bc628533e1628b843cc4c7a5010f6e5)

5 years agobpo-33602: Doc: Remove set and queue references from Data Types (GH-7055) (GH-15875)
Miss Islington (bot) [Tue, 10 Sep 2019 15:42:56 +0000 (08:42 -0700)]
bpo-33602: Doc: Remove set and queue references from Data Types (GH-7055) (GH-15875)

(cherry picked from commit 912108891db52c2067889be1f4ce5713839807cd)

Co-authored-by: Andre Delfino <adelfino@gmail.com>
5 years agoNote regarding + mode truncation applies to both text and binary mode (GH-11314)...
Miss Islington (bot) [Tue, 10 Sep 2019 15:04:56 +0000 (08:04 -0700)]
Note regarding + mode truncation applies to both text and binary mode (GH-11314) (GH-15869)

* Improve doc on open's mode +

* Improve wording

* Address comment from Rémi
(cherry picked from commit c1d8c1cb8e90a54a3daaa7fcdb8d6ca7f08d6a73)

Co-authored-by: Andre Delfino <adelfino@gmail.com>
5 years ago[3.8] bpo-38086: Sync importlib.metadata with importlib_metadata 0.21. (GH-15840...
Jason R. Coombs [Tue, 10 Sep 2019 14:58:29 +0000 (15:58 +0100)]
[3.8] bpo-38086: Sync importlib.metadata with importlib_metadata 0.21. (GH-15840) (#15861)

https://gitlab.com/python-devs/importlib_metadata/-/tags/0.21.
(cherry picked from commit 17499d82702432955d8e442a1871ff276ca64bc5)

Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
5 years agobpo-37504: Fix documentation build with texinfo builder (GH-14606)
Miss Islington (bot) [Tue, 10 Sep 2019 14:51:43 +0000 (07:51 -0700)]
bpo-37504: Fix documentation build with texinfo builder (GH-14606)

In the table model used by docutils, the `cols` attribute of `tgroup`
nodes is mandatory, see [1]. It is used in texinfo builder in [2].

[1]: https://www.oasis-open.org/specs/tm9901.htmGH-AEN348
[2]: https://github.com/sphinx-doc/sphinx/blob/v2.1.2/sphinx/writers/texinfo.pyGH-L1129

* Doc: Add texinfo support to the Makefile
(cherry picked from commit c3d679fd398f42a2e489fbe3dab17fac1fb2439c)

Co-authored-by: Dmitry Shachnev <mitya57@users.noreply.github.com>
5 years agoFix subprocess docstring typo (GH-15812)
Miss Islington (bot) [Tue, 10 Sep 2019 14:51:29 +0000 (07:51 -0700)]
Fix subprocess docstring typo (GH-15812)

(cherry picked from commit 182e1d1f849757439f2031504f142fa4e1251611)

Co-authored-by: Matthias <xmatthias@outlook.com>
5 years agobpo-38088: Fixes distutils not finding vcruntime140.dll with only v142 toolset instal...
Miss Islington (bot) [Tue, 10 Sep 2019 14:42:26 +0000 (07:42 -0700)]
bpo-38088: Fixes distutils not finding vcruntime140.dll with only v142 toolset installed (GH-15849)

(cherry picked from commit cd8221152dd235ec5d06e3d9d0d8787645bbac8e)

Co-authored-by: Steve Dower <steve.dower@python.org>
5 years agoFix calling order of PyEval_InitThreads. (GH-15836)
Miss Islington (bot) [Tue, 10 Sep 2019 14:37:56 +0000 (07:37 -0700)]
Fix calling order of PyEval_InitThreads. (GH-15836)

As described in Doc/c-api/init.rst, PyEval_InitThreads() cannot be called
before Py_Initialize() function.
(cherry picked from commit 9e61066355b4b55c873d56f5f106a22463b56862)

Co-authored-by: Kenta Murata <mrkn@users.noreply.github.com>
5 years agobpo-37913: document that __length_hint__ can return NotImplemented (GH-15383)
Steve Dower [Tue, 10 Sep 2019 14:31:26 +0000 (15:31 +0100)]
bpo-37913: document that __length_hint__ can return NotImplemented (GH-15383)

5 years agobpo-38090: Fix reference leak in ceval.c (GH-15848)
Miss Islington (bot) [Tue, 10 Sep 2019 14:31:07 +0000 (07:31 -0700)]
bpo-38090: Fix reference leak in ceval.c (GH-15848)

(cherry picked from commit a511c7a4961a684db1f8d0ed438822d87d7d3dcf)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
5 years agobpo-38087: Fix case sensitivity in test_pathlib and test_ntpath (GH-15850)
Steve Dower [Tue, 10 Sep 2019 14:29:28 +0000 (15:29 +0100)]
bpo-38087: Fix case sensitivity in test_pathlib and test_ntpath (GH-15850)

5 years agobpo-38066: Hide internal Stream methods (GH-15762)
Miss Islington (bot) [Tue, 10 Sep 2019 13:44:32 +0000 (06:44 -0700)]
bpo-38066: Hide internal Stream methods (GH-15762)

feed_eof(), feed_data(), set_exception(), and set_transport() are prefixed with underscore now.

https://bugs.python.org/issue38066
(cherry picked from commit 12c122ae958a55c9874ed4c7d7805ceb084411d7)

Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>