Commit Graph

102919 Commits

Author SHA1 Message Date
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
Miss Islington (bot) 1fe722cf14
[3.7] bpo-11001: updated cookie docs (GH-13086) (GH-13161)
Used **spookylukey**'s patch from 2011-01-24



https://bugs.python.org/issue11001
(cherry picked from commit 91cc01f40e)


Co-authored-by: Julia Iliuk <julia.iluyk@gmail.com>


https://bugs.python.org/issue11001
2019-05-07 10:32:45 -07:00
Miss Islington (bot) 721729fca4
bpo-28795: Signal documentation: Fix misleading statement. (GH-13121)
(cherry picked from commit e85ef7a7ea)

Co-authored-by: Julien Palard <julien@palard.fr>
2019-05-07 08:55:39 -07:00
Miro Hrončok 7e200e0763 bpo-30458: Disallow control chars in http URLs. (GH-12755) (GH-13154)
Disallow control chars in http URLs in urllib.urlopen.  This addresses a potential security problem for applications that do not sanity check their URLs where http request headers could be injected.

Disable https related urllib tests on a build without ssl (GH-13032)
These tests require an SSL enabled build. Skip these tests when python is built without SSL to fix test failures.

Use http.client.InvalidURL instead of ValueError as the new error case's exception. (GH-13044)

Backport Co-Authored-By: Miro Hrončok <miro@hroncok.cz>
2019-05-07 11:28:47 -04:00
Miss Islington (bot) 146010ea42
bpo-36783: Added C API Documentation for Time_FromTimeAndFold and PyDateTime_FromDateAndTimeAndFold (GH-13147)
(cherry picked from commit 5765ecf79f)

Co-authored-by: Edison A <20975616+SimiCode@users.noreply.github.com>
2019-05-07 08:17:50 -07:00
Miss Islington (bot) a6516f89aa bpo-31855: unittest.mock.mock_open() results now respects the argument of read([size]) (GH-11521) (#13152)
unittest.mock.mock_open() results now respects the argument of read([size])

Co-Authored-By: remilapeyre <remi.lapeyre@henki.fr>
(cherry picked from commit 11a8832c98)

Co-authored-by: Rémi Lapeyre <remi.lapeyre@henki.fr>
2019-05-07 13:34:48 +01:00
Miss Islington (bot) ffa29b5aca
bpo-35925: Skip SSL tests that fail due to weak external certs. (GH-13124)
Modern Linux distros such as Debian Buster have default OpenSSL system
configurations that reject connections to servers with weak certificates
by default.  This causes our test suite run with external networking
resources enabled to skip these tests when they encounter such a failure.

Fixing the network servers is a separate issue.
(cherry picked from commit 2cc0223f43)

Co-authored-by: Gregory P. Smith <greg@krypto.org>
2019-05-06 20:51:25 -07:00
penguindustin b2d29bfa5b [3.7] bpo-36766: Typos in docs and code comments (GH-13116). (GH-13136)
(cherry picked from commit 9646630895)

Co-authored-by: penguindustin <penguindustin@gmail.com>





https://bugs.python.org/issue36766
2019-05-06 13:55:19 -07:00
Miss Islington (bot) 88a2074e3b
[3.7] Clarify the download unit in the download section (GH-13122) (GH-13130)
(cherry picked from commit e9b49d1b4e)


Co-authored-by: Stéphane Wirtel <stephane@wirtel.be>
2019-05-06 12:32:52 -07:00
Miss Islington (bot) 9a03c77328
bpo-36275: enhance documentation for venv.create() (GH-13114)
(cherry picked from commit 3921b1cc34)

Co-authored-by: Sebastian Koslowski <sebastian.koslowski@gmail.com>
2019-05-06 12:25:59 -07:00
Miss Islington (bot) 8777915ade
bpo-30668: add missing word in license.rst (GH-13115)
(cherry picked from commit 4920c093da)

Co-authored-by: Patrick Mühlbauer <tmuxbiene@googlemail.com>
2019-05-06 12:08:10 -07:00
Miss Islington (bot) 905ce9eeb1
simplify StartupImportTests (GH-13096)
_osx_support and copyreg are not imported from site on macOS for now.
(cherry picked from commit c4d92c8ada)

Co-authored-by: Inada Naoki <songofacandy@gmail.com>
2019-05-05 02:25:16 -07:00
Miss Islington (bot) 2b5ffc02c0 bpo-36189: Fixing typo in tutorial introduction (GH-13093)
(cherry picked from commit 98a1e06c47)

Co-authored-by: Jonatan <jonyucra@gmail.com>
2019-05-04 23:22:34 -04:00
Miss Islington (bot) 37125ff6e2 bpo-36166: Change to rst datamodel file. (GH-13089) (#13094)
(cherry picked from commit 5e98f05e55)

Co-authored-by: Catherine Alvarado <catherine@qventus.com>
2019-05-04 23:21:28 -04:00
Miss Islington (bot) 769ac7e7b8
bpo-36613: call remove_done_callback if exception (GH-12800)
Call remove_done_callback() in finally block.

https://bugs.python.org/issue36613
(cherry picked from commit c1964e9e21)

Co-authored-by: gescheit <gescheit12@gmail.com>
2019-05-03 08:35:52 -07:00
Miss Islington (bot) 128e2262a8
bpo:34848 : Correct an incorrect docstring for range().index method (GH-9877)
(cherry picked from commit 22c526394b)

Co-authored-by: Srinivas Reddy Thatiparthy (శ్రీనివాస్  రెడ్డి తాటిపర్తి) <thatiparthysreenivas@gmail.com>
2019-05-03 05:39:17 -07:00
Terry Jan Reedy 304ca211c4
[3.7] bpo-34162: Fix idlelib/NEWS.text for 3.7.4 (#13067) 2019-05-02 15:34:01 -04:00
Miss Islington (bot) e85ba1e692 [3.7] bpo-14546: Fix the argument handling in Tools/scripts/lll.py (GH-13026) (GH-13060)
(cherry picked from commit c4e78b116f)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
2019-05-02 15:29:06 -04:00
Miss Islington (bot) 3f8f64ebf3 bpo-35726: Add test for QueueHandler with multiple handlers (GH-11659) (GH-13061)
(cherry picked from commit 2dad96013c)

Co-authored-by: Xtreak <tir.karthi@gmail.com>
2019-05-02 13:24:01 -04:00
Xtreak 386b6f07a9 [3.7] bpo-35726: Prevented QueueHandler formatting from affecting other handlers (GH-11537) (GH-12716)
QueueHandler.prepare() now makes a copy of the record before modifying and enqueueing it, to avoid affecting other handlers in the chain.
(cherry picked from commit da6424e96a)

Co-authored-by: Manjusaka <lizheao940510@gmail.com>
2019-05-02 13:02:42 -04:00