Commit Graph

105280 Commits

Author SHA1 Message Date
Miss Islington (bot) 535863e3f5
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 224b8aaa7e)

Co-authored-by: Brandt Bucher <brandtbucher@gmail.com>
2019-09-12 05:26:46 -07:00
Miss Islington (bot) 14afe203d6
bpo-35325: Doc: imp.find_module() return value documentation discrepancy (GH-11040)
(cherry picked from commit 967b84c913)

Co-authored-by: Windson yang <wiwindson@outlook.com>
2019-09-12 05:25:54 -07:00
Miss Islington (bot) 80e33655a2
bpo-38134: Remove PKBDF2_HMAC_fast from _hashopenssl (GH-16028)
Signed-off-by: Christian Heimes <christian@python.org>
(cherry picked from commit 64117e059b)

Co-authored-by: Christian Heimes <christian@python.org>
2019-09-12 05:18:38 -07:00
Miss Islington (bot) 648494b44a
bpo-35685: Add examples of unittest.mock.patch.dict usage (GH-11456)
(cherry picked from commit 31a82e25b6)

Co-authored-by: Emmanuel Arias <emmanuelarias30@gmail.com>
2019-09-12 04:37:05 -07:00
Miss Islington (bot) 94a684734f
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 2c910c1e73)

Co-authored-by: Julien Palard <julien@palard.fr>
2019-09-12 04:31:17 -07:00
Stéphane Wirtel 1fc84b64f9
[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 894d0f7d55)

Co-authored-by: Christian Heimes <christian@python.org>
2019-09-12 12:25:02 +01:00
Miss Islington (bot) 84eb42e3c9
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 e20134f889)

Co-authored-by: Jakub Kulík <Kulikjak@gmail.com>
2019-09-12 04:19:21 -07:00
Miss Islington (bot) db0d8a5b2c 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 72c359912d)

Co-authored-by: blhsing <github@ydooby.com>
2019-09-12 12:52:49 +02:00
Miss Islington (bot) f60fd95dcc 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 954900a3f9)

Co-authored-by: bggardner <brent@ebrent.net>
2019-09-12 11:34:28 +01:00
Miss Islington (bot) 52baf90a74
bpo-38008: Move builtin protocol whitelist to mapping instead of list (GH-15647)
Fixes https://bugs.python.org/issue38008
(cherry picked from commit 692a0dc915)

Co-authored-by: Divij Rajkumar <drajkuma1@gmail.com>
2019-09-12 03:32:36 -07:00
Miss Islington (bot) 1e17c4d414
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 2d32bf1ef2)

Co-authored-by: Harmandeep Singh <harmandeep.singh1@delhivery.com>
2019-09-12 03:31:43 -07:00
Miss Islington (bot) 79cbaf50ac
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 ea683deccc)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
2019-09-12 03:28:05 -07:00
Petr Viktorin 3562ae2540
[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 ff023ed36e)
Fixup: https://github.com/python/cpython/pull/16004.
(cherry picked from commit 5e9caeec76)

Co-authored-by: Eddie Elizondo <eduardo.elizondorueda@gmail.com>
2019-09-12 10:44:46 +01:00
Miss Islington (bot) eb19c45298 Doc: Update pickle.rst (GH-14128) (GH-16014)
* Edits for readability and grammar
(cherry picked from commit 362f5350eb)

Co-authored-by: Géry Ogam <gery.ogam@gmail.com>
2019-09-12 09:19:12 +01:00
Paul Ganssle 2bb6bf0c8c bpo-38096: Clean up the "struct sequence" / "named tuple" docs (GH-15895) (GH-15961) 2019-09-11 19:50:29 -07:00
Miss Islington (bot) a5a7102636
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 39de95b746)

Co-authored-by: Benjamin Peterson <benjamin@python.org>
2019-09-11 17:04:27 -07:00
Miss Islington (bot) 8af4e0c994 Correct typo in min version test (GH-16001)
Signed-off-by: Christian Heimes <christian@python.org>
(cherry picked from commit de606ea169)

Co-authored-by: Christian Heimes <christian@python.org>
2019-09-11 11:19:12 -07:00
Miss Islington (bot) f79a022d76
bpo-36270: Doc: add link to traceback object reference (GH-13119)
(cherry picked from commit 9936371af2)

Co-authored-by: Björn Meier <bjoern@opentrash.org>
2019-09-11 11:12:35 -07:00
Miss Islington (bot) d6ac67f48f bpo-34001: Fix test_ssl with LibreSSL (GH-13783) (#15997)
(cherry picked from commit c9bc49c5f6)

Co-authored-by: Christian Heimes <christian@python.org>
2019-09-11 19:59:13 +02:00
Miss Islington (bot) c0acc0e53e Improve clarity of try-return-finally-return (GH-15677) (GH-15981)
Clarify execution in try-return-finally-return case.
(cherry picked from commit 0cc27417f2)

Co-authored-by: toonarmycaptain <toonarmycaptain@hotmail.com>
2019-09-11 19:42:21 +02:00
Stéphane Wirtel 965e53a9de
[3.8] bpo-37698: Update doc of PyBuffer_ToContiguous (GH-14992) (GH-15999)
https://bugs.python.org/issue37698
(cherry picked from commit 15f5a7527b)

Co-authored-by: Hai Shi <shihai1992@gmail.com>
2019-09-11 19:36:00 +02:00
Miss Islington (bot) d47993664e
Doc: recursive glob ** follows symlinks to directories (GH-12918)
(cherry picked from commit e24594bfe7)

Co-authored-by: Marc <Marc.Herbert+github@gmail.com>
2019-09-11 10:32:26 -07:00
Miss Islington (bot) 4cab7eb9e1 bpo-37750: Add doc of PyBuffer_FromContiguous (GH-15988) (GH-15990)
https://bugs.python.org/issue37750

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

Co-authored-by: Hai Shi <shihai1992@gmail.com>
2019-09-11 19:09:57 +02:00
Miss Islington (bot) 0b7f3706e6
bpo-38117: Test with OpenSSL 1.1.1d (GH-15983)
Signed-off-by: Christian Heimes <christian@python.org>
(cherry picked from commit 58ab13479d)

Co-authored-by: Christian Heimes <christian@python.org>
2019-09-11 10:09:28 -07:00
Miss Islington (bot) f90cbcbfe3
bpo-36528: Remove duplicate re tests. (GH-2689)
Co-Authored-By: Makdon <makdon@makdon.me>
(cherry picked from commit e6557d3c62)

Co-authored-by: Xtreak <tir.karthi@gmail.com>
2019-09-11 09:46:29 -07:00
Miss Islington (bot) 05d692b08b
Doc: Fix missing negation. (GH-14640)
Reported by Hug Capella on docs@.

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

Co-authored-by: Julien Palard <julien@palard.fr>
2019-09-11 09:25:40 -07:00
Miss Islington (bot) c5a672315d 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 3ba51d587f)

Co-authored-by: JunWei Song <sungboss2004@gmail.com>
2019-09-11 17:03:18 +01:00
Miss Islington (bot) 436cd2c20b
bpo-38114: Do not include pip.ini in Nuget package (GH-15964)
(cherry picked from commit 19f6940cd7)

Co-authored-by: Steve Dower <steve.dower@python.org>
2019-09-11 08:57:54 -07:00
Miss Islington (bot) 43ee0e2ca3
bpo-33166: Change os.cpu_count to return active (real) processors (GH-15949)
(cherry picked from commit aa929273ca)

Co-authored-by: Steve Dower <steve.dower@python.org>
2019-09-11 08:56:13 -07:00
Miss Islington (bot) 63eefc3567 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 5209e586b7)

Co-authored-by: Daniel Abrahamsson <hamsson@gmail.com>
2019-09-11 08:55:57 -07:00
Miss Islington (bot) 893653357c bpo-36182: Update pathlib.Path.write_text() docs (GH-12161) (GH-15977)
with the case of an existing file
(cherry picked from commit af636f4f91)

Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
2019-09-11 17:55:31 +02:00
Miss Islington (bot) 20f80bfc83
bpo-36634: Fixes activate.bat when existing values contain double quotes (GH-15924)
(cherry picked from commit 574b324bdc)

Co-authored-by: Steve Dower <steve.dower@python.org>
2019-09-11 08:21:58 -07:00
Miss Islington (bot) be2aa58fdc 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 6357c95716)

Co-authored-by: Emily Morehouse <emily@cuttlesoft.com>
2019-09-11 17:12:09 +02:00
Miss Islington (bot) e784bb7c6b
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 7b69069e9a)

Co-authored-by: Xtreak <tir.karthi@gmail.com>
2019-09-11 08:08:47 -07:00
Miss Islington (bot) aa527174f0
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 1abf54336f)

Co-authored-by: Simon Willison <swillison@gmail.com>
2019-09-11 08:04:02 -07:00
Miss Islington (bot) 2f2a867fe3
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 51adfc6ed2)

Co-authored-by: Andrew Scheller <github@loowis.durge.org>
2019-09-11 07:54:44 -07:00
Miss Islington (bot) 6cf0ba8a63 bpo-33187: Document ElementInclude (XInclude) support in ElementTree (GH-8861) (GH-15958)
(cherry picked from commit 97b817eae3)

Co-authored-by: Anjali Bansal <anjali.mca17.du@gmail.com>
2019-09-11 15:48:33 +01:00
Zachary Ware 8ee8ad22d7
[3.8] Turn off AppVeyor CI (GH-15929) (GH-15941)
(cherry picked from commit 6f55b0394b)
2019-09-11 15:39:32 +01:00
Miss Islington (bot) 629f1f87e9 bpo-23460: Fix documentation for decimal string :g formatting (GH-11850) (GH-15954)
(cherry picked from commit 1660a61a10)

Co-authored-by: Brennan D Baraban <34765317+bdbaraban@users.noreply.github.com>
2019-09-11 16:38:25 +02:00
Miss Islington (bot) b4808c1265 closes bpo-37252: Fix devpoll tests. (GH-14017) (GH-15948)
(cherry picked from commit 95da826db9)

Co-authored-by: Jakub Kulík <Kulikjak@gmail.com>
2019-09-11 16:37:38 +02:00
Miss Islington (bot) 42edfcfd12 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 b6643dcfc2)

Co-authored-by: Pavel Koneski <pavel.koneski@gmail.com>
2019-09-11 15:37:18 +01:00
Miss Islington (bot) b18b19809d
bpo-38107: Replace direct future and task contructor calls with factories in asyncio tests (GH-15928)
(cherry picked from commit 9aee90018a)

Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
2019-09-11 07:21:53 -07:00
Miss Islington (bot) fef5bdc645 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 a828514cc3)

Co-authored-by: Michael Osipov <michael.osipov@siemens.com>
2019-09-11 15:13:54 +01:00
Miss Islington (bot) 35d0934040 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>
2019-09-11 15:13:31 +01:00
Miss Islington (bot) cbd7b2a399 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 088a09af4b)

Co-authored-by: hui shang <shangdahao@gmail.com>
2019-09-11 15:12:54 +01:00
Miss Islington (bot) 4d2babd990 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 dc26997109)

Co-authored-by: Andre Delfino <adelfino@gmail.com>
2019-09-11 15:38:17 +02:00
Miss Islington (bot) d1d968d45d 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 f9b5840fb4)

Co-authored-by: native-api <ivan_pozdeev@mail.ru>
2019-09-11 15:36:50 +02:00
Miss Islington (bot) da38ec1d48
bpo-37326: Include libffi license when available (GH-15921)
(cherry picked from commit 8fcaffb048)

Co-authored-by: Steve Dower <steve.dower@python.org>
2019-09-11 06:31:27 -07:00
Stéphane Wirtel c97ee1d3d8
[3.8] Doc: Use walrus operator in example. (GH-15934) (GH-15936)
(cherry picked from commit e1d455f3a3)

Co-authored-by: Julien Palard <julien@palard.fr>
2019-09-11 15:17:48 +02:00
Miss Islington (bot) 6a17751589 Doc: Fix typo in fastsearch comments (GH-14608) (GH-15933)
(cherry picked from commit 60bba83b5d)

Co-authored-by: Valentin Haenel <esc@users.noreply.github.com>
2019-09-11 15:05:49 +02:00