Commit Graph

102838 Commits

Author SHA1 Message Date
Miss Islington (bot) f393e8eb46 bpo-29183: Fix double exceptions in wsgiref.handlers.BaseHandler (GH-12914)
(cherry picked from commit 7c59362a15)

Co-authored-by: Berker Peksag <berker.peksag@gmail.com>
2019-05-19 19:28:38 +03:00
Miss Islington (bot) 3645d29a1d
bpo-27141: Fix collections.UserList and UserDict shallow copy. (GH-4094)
(cherry picked from commit f4e1babf44)

Co-authored-by: Bar Harel <bzvi7919@gmail.com>
2019-05-19 07:26:35 -07:00
Miss Islington (bot) f81b33bada
Orthographical fix (GH-13418)
Add a missing comma.
(cherry picked from commit 1d5bdef550)

Co-authored-by: Boštjan Mejak <bostjan.xperia@gmail.com>
2019-05-19 02:13:28 -07:00
Miss Islington (bot) 951b161857
bpo-36783: Add new references for C API Documentation changes (GH-13204)
(cherry picked from commit d28772ab69)

Co-authored-by: Edison A <20975616+SimiCode@users.noreply.github.com>
2019-05-18 19:12:01 -07:00
Miss Islington (bot) 561c63cd70
Fixed typo (GH-11522)
Given example does not run, loop variable is missing.

Secondly, this is bad example how to handle shutdown signal, because it would cause `RuntimeError: Event loop stopped before Future completed.`

Perhaps it would be better to cancel all tasks instead of closing loop directly?

Did not create issue, because question is quite simple.
(cherry picked from commit ceb842e155)

Co-authored-by: Alexander Vasin <hi@alvass.in>
2019-05-18 02:48:47 -07:00
Miss Islington (bot) 740a7cde9c
bpo-36908: 'This module is always available' isn't helpful. (GH-13297)
Makes the documentation of math and cmath module
more helpful for the beginners.
(cherry picked from commit 6faad355db)

Co-authored-by: Ned Batchelder <ned@nedbatchelder.com>
2019-05-17 14:08:21 -07:00
Miss Islington (bot) 5386aaf078
bpo-33524: Fix the folding of email header when max_line_length is 0 or None (GH-13391)
and there are non-ascii characters in the header.
(cherry picked from commit feac6cd775)

Co-authored-by: Abhilash Raj <maxking@users.noreply.github.com>
2019-05-17 13:47:12 -07:00
Stéphane Wirtel 9050aaf6ee
[3.7] Fix typo in _PyMethodDef_RawFastCallKeywords error message (GH-13343) (GH-13385)
(cherry picked from commit a8b46944d7)

Co-authored-by: Jeroen Demeyer <J.Demeyer@UGent.be>
2019-05-17 13:34:47 +02:00
Miss Islington (bot) ced80d8ce2 Simplify SSLSocket / SSLObject doc string (GH-9972) (GH-13384)
Instead of maintaining the same docstring two times, let's copy common
docstrings from SSLObject methods and properties to SSLSocket.

(cherry picked from commit 80ed353329)

Co-authored-by: Christian Heimes <christian@python.org>
2019-05-17 13:29:35 +02:00
Miss Islington (bot) a22c42fea6
docs 36789: resolve incorrect note regarding UTF-8 (GH-13111)
(cherry picked from commit f98c3c59c0)

Co-authored-by: redshiftzero <jen@freedom.press>
2019-05-17 04:01:47 -07:00
Miss Islington (bot) 85ed1712e4
bpo-1875: Raise SyntaxError in invalid blocks that will be optimised away (GH-13332)
Move the check for dead conditionals (if 0) to the peephole optimizer
and make sure that the code block is still compiled to report any
existing syntax errors within.
(cherry picked from commit af8646c805)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
2019-05-17 03:59:48 -07:00
Miss Islington (bot) 94704048e2
bpo-35545: Fix asyncio discarding IPv6 scopes (GH-11271)
This PR proposes a solution to [bpo-35545](https://bugs.python.org/issue35545) by adding an optional `flowinfo` and `scopeid` to `asyncio.base_events._ipaddr_info` to carry the full address information into `_ipaddr_info` and avoid discarding IPv6 specific information.

Changelog entry & regression tests to come.

https://bugs.python.org/issue35545
(cherry picked from commit ac8eb8f36b)

Co-authored-by: Erwan Le Pape <lepaperwan@users.noreply.github.com>
2019-05-17 02:05:19 -07:00
Miss Islington (bot) 4be0720beb
Doc: Add link threading.settrace to sys.settrace (GH-13345)
(cherry picked from commit 245f528a92)

Co-authored-by: Stefan Hoelzl <stefan.hoelzl@posteo.de>
2019-05-17 02:02:51 -07:00
Miss Islington (bot) f02d1a43c6
bpo-36946: Fix possible signed integer overflow when handling slices. (GH-13375)
The final addition (cur += step) may overflow, so use size_t for "cur".
"cur" is always positive (even for negative steps), so it is safe to use
size_t here.

Co-Authored-By: Martin Panter <vadmium+py@gmail.com>
(cherry picked from commit 14514d9084)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
2019-05-17 00:33:10 -07:00
Steve Dower aa73841a8f
bpo-35926: Add support for OpenSSL 1.1.1b on Windows (GH-11779) 2019-05-16 09:41:36 -07:00
Miss Islington (bot) 876756e4a1
Fix typos in documentation. Patch by tirkarthi. (GH-13354)
(cherry picked from commit 8a533ffb49)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2019-05-15 22:38:31 -07:00
Miss Islington (bot) 78dd781ef4 bpo-36015: Handle StreamHandler representaton of stream with an integer name (GH-11908) (GH-13183)
(cherry picked from commit ca87eebb22)

Co-authored-by: Riccardo Magliocchetti <riccardo.magliocchetti@gmail.com>
2019-05-15 19:06:29 +01:00
Stéphane Wirtel 4fd7f56ee7
[3.7] bpo-36799: Fix typo in ctypes.rst (GH-13104) (GH-13341)
(cherry picked from commit 133fc89ca)

Co-authored-by: Yavor Konstantinov <7553015+sehnsucht13@users.noreply.github.com>
2019-05-15 17:53:25 +02:00
Victor Stinner c647ad9b51
Revert "bpo-36801: Fix waiting in StreamWriter.drain for closing SSL transport (GH-13098)" (GH-13328)
This reverts commit 93aa57ac65.
2019-05-14 22:29:54 +02:00
Miss Islington (bot) 2fef5b01e3 bpo-33529, email: Fix infinite loop in email header encoding (GH-12020) (GH-13321)
(cherry picked from commit c1f5667be1)

Co-authored-by: Krzysztof Wojcik <wojcikk2903@users.noreply.github.com>
2019-05-14 22:12:46 +02:00
Miss Islington (bot) 822683238c
bpo-36760: Clarify subprocess capture_output docs. (GH-13322)
Clarify how to capture stdout and stderr combined into one stream.
(cherry picked from commit e883091abf)

Co-authored-by: Gregory P. Smith <greg@krypto.org>
2019-05-14 12:39:17 -07:00
Miss Islington (bot) ecd668d6d9
bpo-36915: regrtest always remove tempdir of worker processes (GH-13312)
When using multiprocessing (-jN option), worker processes now create
their temporary directory inside the temporary directory of the
main process. So the main process is able to remove temporary
directories of worker processes even if they crash or when they are
killed by regrtest on KeyboardInterrupt (CTRL+c).

Rework also how multiprocessing arguments are parsed in main.py.
(cherry picked from commit 3c93153f7d)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
2019-05-14 08:25:06 -07:00
Miss Islington (bot) 8b3823ae16
bpo-32995 - Added context variable in glossary (GH-9741)
(cherry picked from commit c0a1a07c7e)

Co-authored-by: Vinodhini Balusamy <me.vinob@gmail.com>
2019-05-14 05:24:42 -07:00
Miss Islington (bot) d8e123a48f bpo-36719: Fix regrtest MultiprocessThread (GH-13301) (GH-13303)
MultiprocessThread.kill() now closes stdout and stderr to prevent
popen.communicate() to hang.
(cherry picked from commit c923c3449f)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
2019-05-14 14:12:49 +02:00
Miss Islington (bot) 30cccf084d bpo-36845: validate integer network prefix when constructing IP networks (GH-13298)
(cherry picked from commit 5e48e3db6f)

Co-authored-by: Nicolai Moore <niconorsk@gmail.com>
2019-05-14 20:00:16 +09:00
Miss Islington (bot) 0a5b88e7f2 bpo-24538: Fix bug in shutil involving the copying of xattrs to read-only files. (PR-13212) (#13234)
Extended attributes can only be set on user-writeable files, but shutil previously
first chmod()ed the destination file to the source's permissions and then tried to
copy xattrs. This will cause failures if attempting to copy read-only files with
xattrs, as occurs with Git clones on Lustre FS.
(cherry picked from commit 79efbb7193)

Co-authored-by: Olexa Bilaniuk <obilaniu@users.noreply.github.com>
2019-05-14 13:30:22 +08:00
Miss Islington (bot) da86bf7396
Changes to the documentation of normcase (GH-4725)
(cherry picked from commit 32d1458b2e)

Co-authored-by: Kexuan Sun <me@kianasun.com>
2019-05-13 19:21:25 -07:00
Miss Islington (bot) c0abd0c8e9
bpo-34424: Handle different policy.linesep lengths correctly. (GH-8803)
(cherry picked from commit 45b2f8893c)

Co-authored-by: Jens Troeger <jenstroeger@users.noreply.github.com>
2019-05-13 19:02:46 -07:00
Miss Islington (bot) 7f485ea4fc
bpo-35138: Added an example for timeit.timeit with callable arguments (GH-9787)
* Update timeit.rst
(cherry picked from commit 8da5ebe11e)

Co-authored-by: Anders Hovmöller <boxed@killingar.net>
2019-05-13 12:41:31 -07:00
Miss Islington (bot) ee9b5ce390
Docs: Add bz2 usage examples (GH-13258)
* Docs: Add bz2 usage examples

- Adds an "Examples of usage" section inspired by the one
  found in the gzip docs
- Corrects the descriptions for ``compresslevel`` and ``data``:
    - ``compresslevel`` must be an `int`, not any number.  For
      instance, passing a float will raise ``TypeError``
    - Notes that `data` must be bytes-like
(cherry picked from commit be6939fb02)

Co-authored-by: Brad <brad.solomon.1124@gmail.com>
2019-05-13 11:50:16 -07:00
Miss Islington (bot) 19464bcd97
bpo-36719: regrtest -jN no longer stops on crash (GH-13231)
"python3 -m test -jN ..." now continues the execution of next tests
when a worker process crash (CHILD_ERROR state). Previously, the test
suite stopped immediately. Use --failfast to stop at the first error.

Moreover, --forever now also implies --failfast.
(cherry picked from commit b0917df329)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
2019-05-13 10:55:07 -07:00
Miss Islington (bot) 68a11b6e6a [3.7] bpo-36807: When saving a file in IDLE, call flush and fsync (GH-13102) (#13288)
Includes blurb fix in 85c69d5
(cherry picked from commit 4f098b35f5)
2019-05-13 12:58:42 -04:00
Matthias Bussonnier 24482bd0ae [3.7] bpo-36895: document time.clock() has been removed in 3.8 (GH-13287) 2019-05-13 18:08:48 +02:00
Miss Islington (bot) 744129db5d bpo-36903: Fix ResourceWarning in test_logging (GH-13283) (GH-13285)
(cherry picked from commit 2c10538d11)

Co-authored-by: Xtreak <tir.karthi@gmail.com>
2019-05-13 17:39:50 +02:00
Stéphane Wirtel 074d7c44a4 [3.7] bpo-34682: Wording and grammatical changes to the doc(https://docs.python.org/3) (GH-13120) (GH-13281)
https://bugs.python.org/issue34682
(cherry picked from commit 778a910758)

Co-authored-by: divyag9 <divyam9@gmail.com>
2019-05-13 15:48:49 +02:00
Miss Islington (bot) af5ef3e107 bpo-33882: mention breakpoint() in debugger-related FAQ (GH-7759) (GH-13077)
(cherry picked from commit cf48e55f7f)

Co-authored-by: Andre Delfino <adelfino@gmail.com>
2019-05-13 15:03:10 +02:00
Miss Islington (bot) b7e483b6d0
bpo-36791: Safer detection of integer overflow in sum(). (GH-13080)
(cherry picked from commit 29500737d4)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2019-05-12 02:37:15 -07:00
Sanyam Khurana 4f5febdf95 [3.7] bpo-36822: Fix minor grammatical error in glossary.rst (GH-13145). (GH-13260)
(cherry picked from commit 90fb04c1e2)

Co-authored-by: Sanyam Khurana <8039608+CuriousLearner@users.noreply.github.com>
2019-05-12 04:53:02 +01:00
Pablo Galindo 34ed40f2e5
[3.7] bpo-34408: Prevent a null pointer dereference and resource leakage in `PyInterpreterState_New()` (GH-8767) (GH-13237)
* A pointer in `PyInterpreterState_New()` could have been `NULL` when being dereferenced.

* Memory was leaked in `PyInterpreterState_New()` when taking some error-handling code path.
(cherry picked from commit 95d630e)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
2019-05-10 21:16:19 +01:00
Miss Islington (bot) 069a5b4833
bpo-33071: remove outdated PyPI docs (GH-13087)
Patch by Kojo Idrissa.
(cherry picked from commit 1b4abcf302)

Co-authored-by: Kojo Idrissa <kojoidrissa@users.noreply.github.com>
2019-05-10 01:50:54 -07:00
Miss Islington (bot) 98b360e27b
[3.7] bpo-10536: Enhancements to gettext docs (GH-10324) (GH-13224)
(cherry picked from commit 55f3317e98)


Co-authored-by: Stéphane Wirtel <stephane@wirtel.be>


https://bugs.python.org/issue10536
2019-05-09 13:26:09 -07:00
Gregory P. Smith 6daaf3f7de [3.7] bpo-36816: Update the self-signed.pythontest.net cert (GH-13192) (GH-13197)
We updated the server, our testsuite must match.

https://bugs.python.org/issue36816

✈️ CLE -> DEN ✈️ #pycon2019 #beyonce
(cherry picked from commit 6bd81734de)

Authored-by: Gregory P. Smith <greg@krypto.org>


https://bugs.python.org/issue36816
2019-05-08 14:13:08 -07:00
Miss Islington (bot) ed8860c5af
bpo-31873: Update unicode.rst - 'unicode' capitalization (GH-4125)
Update 'unicode' capitalization. 'Unicode' is a proper noun, and as such should be capitalized.
Changed multiple instances.
(cherry picked from commit 85225b6a58)

Co-authored-by: toonarmycaptain <toonarmycaptain@hotmail.com>
2019-05-08 09:34:12 -07:00
Miss Islington (bot) 5e08fe18a7
Doc: Be explicit that Pathlib resolve was strict before 3.6. (GH-11316)
(cherry picked from commit 1d4b16051f)

Co-authored-by: Julien Palard <julien@palard.fr>
2019-05-08 08:26:23 -07:00
Miss Islington (bot) 3afbe69988
[3.7] Doc: Fix missing bracket (GH-13163) (GH-13189)
(cherry picked from commit 70b80541bb)


Co-authored-by: Zhaorong Ma <mazhaorong@gmail.com>
2019-05-08 07:07:02 -07:00
Miss Islington (bot) 93aa57ac65
bpo-36801: Fix waiting in StreamWriter.drain for closing SSL transport (GH-13098)
https://bugs.python.org/issue36801
(cherry picked from commit 1cc0ee7d9f)

Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
2019-05-07 14:48:35 -07:00
Miss Islington (bot) 5edd82c806 Add a footnote about Cheese Shop in Doc/tutorial (GH-13103) (GH-13174)
(cherry picked from commit e19a91e45f)

Co-authored-by: Adorilson Bezerra <adorilson@gmail.com>
2019-05-07 21:59:20 +01:00
Gregory P. Smith 3b4b28efbd
[3.7] bpo-36533: Reinit logging.Handler locks on fork(). (GH-12704) (GH-13170)
Instead of attempting to acquire and release them all across fork
which was leading to deadlocks in some applications that had chained
their own handlers while holding multiple locks.
(cherry picked from commit 64aa6d2000)

Co-authored-by: Gregory P. Smith <greg@krypto.org>  [Google LLC]
2019-05-07 16:29:41 -04:00
Miss Islington (bot) 299f69c24c
bpo-35125: remove inner callback on outer cancellation in asyncio shield (GH-10340)
When the future returned by shield is cancelled, its completion callback of the
inner future is not removed. This makes the callback list of inner inner future
grow each time a shield is created and cancelled.

This change unregisters the callback from the inner future when the outer
future is cancelled.

https://bugs.python.org/issue35125
(cherry picked from commit b35acc5b3a)

Co-authored-by: Romain Picard <romain.picard@oakbits.com>
2019-05-07 12:38:00 -07:00
Miss Islington (bot) 19ca5b500a
bpo-31922: Do not connect UDP sockets when broadcast is allowed (GH-423)
*Moved from python/asyncioGH-493.*

This PR fixes issue python/asyncioGH-480, as explained in [this comment](https://github.com/python/asyncio/issues/480GH-issuecomment-278703828).

The `_SelectorDatagramTransport.sendto` method has to be modified ~~so `_sock.sendto` is used in all cases (because it is tricky to reliably tell if the socket is connected or not). Could that be an issue for connected sockets?~~ *EDIT* ... so `_sock.send` is used only if `_sock` is connected.

It also protects `socket.getsockname` against `OSError` in `_SelectorTransport`. This might happen on Windows if the socket is not connected (e.g. for UDP broadcasting).

https://bugs.python.org/issue31922
(cherry picked from commit 63deaa5b70)

Co-authored-by: Vincent Michel <vxgmichel@gmail.com>
2019-05-07 10:45:53 -07:00