Commit Graph

103314 Commits

Author SHA1 Message Date
Miss Islington (bot) d6a92b5594
bpo-36670: Multiple regrtest bugfixes (GH-16511)
* Windows: Fix counter name in WindowsLoadTracker. Counter names are
  localized: use the registry to get the counter name. Original
  change written by Lorenz Mende.
* Regrtest.main() now ensures that the Windows load tracker is also
  killed if an exception is raised
* TestWorkerProcess now ensures that worker processes are no longer
  running before exiting: kill also worker processes when an
  exception is raised.
* Enhance regrtest messages and warnings: include test name,
  duration, add a worker identifier, etc.
* Rename MultiprocessRunner to TestWorkerProcess
* Use print_warning() to display warnings.

Co-Authored-By: Lorenz Mende <Lorenz.mende@gmail.com>
(cherry picked from commit 982bfa4da0)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
2019-10-01 03:58:53 -07:00
Miss Islington (bot) 2eb1dac46e Fix and improve `asyncio.run()` docs (GH-16403) (GH-16505)
(cherry picked from commit e407013089)

Co-authored-by: Kyle Stanley <aeros167@gmail.com>
2019-09-30 18:47:13 -07:00
Miss Islington (bot) 1c3e4691bb
bpo-38019: correctly handle pause/resume reading of closed asyncio unix pipe (GH-16472)
(cherry picked from commit 58498bc717)

Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
2019-09-29 05:19:11 -07:00
Jason R. Coombs 80dd66ac27
[3.7] bpo-38216, bpo-36274: Allow subclasses to separately override validation and encoding behavior (GH-16448) (GH-16461)
* bpo-38216: Allow bypassing input validation

* bpo-36274: Also allow the URL encoding to be overridden.

* bpo-38216, bpo-36274: Add tests demonstrating a hook for overriding validation, test demonstrating override encoding, and a test to capture expectation of the interface for the URL.

* Call with skip_host to avoid tripping on the host checking in the URL.

* Remove obsolete comment.

* Make _prepare_path_encoding its own attr.

This makes overriding just that simpler.

Also, don't use the := operator to make backporting easier.

* Add a news entry.

* _prepare_path_encoding -> _encode_prepared_path()

* Once again separate the path validation and request encoding, drastically simplifying the behavior. Drop the guarantee that all processing happens in _prepare_path..
(cherry picked from commit 7774d7831e)

Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
2019-09-28 09:15:05 -04:00
Miss Islington (bot) 6112b91bb8 bpo-38301: In Solaris family, we must be sure to use '-D_REENTRANT' (GH-16446) (#16450)
(cherry picked from commit 52d1b86bde)

Co-authored-by: Jesús Cea <jcea@jcea.es>
2019-09-28 04:21:24 +02:00
Miss Islington (bot) 39a0c75555
bpo-38243, xmlrpc.server: Escape the server_title (GH-16373)
Escape the server title of xmlrpc.server.DocXMLRPCServer
when rendering the document page as HTML.
(cherry picked from commit e8650a4f8c)

Co-authored-by: Dong-hee Na <donghee.na92@gmail.com>
2019-09-27 13:18:14 -07:00
Christian Heimes 2c24f2cae0
[3.7] bpo-38275: Skip ssl tests for disabled versions (GH-16427)
test_ssl now handles disabled TLS/SSL versions better. OpenSSL's crypto
policy and run-time settings are recognized and tests for disabled versions
are skipped.

Signed-off-by: Christian Heimes <christian@python.org>

https://bugs.python.org/issue38275
(cherry picked from commit df6ac7e2b8)
2019-09-26 22:54:33 +02:00
Victor Stinner e6b5ed1fbd
bpo-38239: Fix test_gdb for Link Time Optimization (LTO) (GH-16422) (GH-16426)
(cherry picked from commit 64b4a3a2de)
2019-09-26 17:30:14 +02:00
Miss Islington (bot) 5017a645b0 bpo-38130: Fix error in explaining when an exception is re-raised (GH-16016) (GH-16416)
Co-Authored-By: Ashwin Ramaswami <aramaswamis@gmail.com>
(cherry picked from commit 1ad7be2f16)

Co-authored-by: Mohammad Dehghan <md.unicorn@gmail.com>
2019-09-26 11:15:21 +02:00
Miss Islington (bot) 80bde15736 Doc: Use the `with` statement in the first example of the ftplib doc. (GH-16271) (GH-16413)
(cherry picked from commit 5d326abf2c)

Co-authored-by: Stéphane Wirtel <stephane@wirtel.be>
2019-09-26 09:12:26 +02:00
Benjamin Peterson 8e4622ea89
[3.7] closes bpo-38174: Update vendored expat library to 2.2.8. (GH-16407)
Fixes CVE-2019-15903. See full changelog at https://github.com/libexpat/libexpat/blob/R_2_2_8/expat/Changes..
(cherry picked from commit 52b9408038)

Co-authored-by: Benjamin Peterson <benjamin@python.org>
2019-09-25 21:54:59 -07:00
Vinay Sajip d015714f89
[3.7] bpo-22273: Changed conditions for ctypes array-in-struct handling. (GH-16381) (GH-16400)
(cherry picked from commit c64af8fad3)
2019-09-25 21:37:24 +01:00
Miss Islington (bot) 585798fb0e
bpo-38271: encrypt private key test files with AES256 (GH-16385)
The private keys for test_ssl were encrypted with 3DES in traditional
PKCSGH-5 format. 3DES and the digest algorithm of PKCSGH-5 are blocked by
some strict crypto policies. Use PKCSGH-8 format with AES256 encryption
instead.

Signed-off-by: Christian Heimes <christian@python.org>

https://bugs.python.org/issue38271

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

Co-authored-by: Christian Heimes <christian@python.org>
2019-09-25 09:12:59 -07:00
Miss Islington (bot) 3b5e924114 bpo-38255: super() can search attributes as well as methods (GH-16368) (GH-16392)
Improvement suggested by Géry Ogam.
(cherry picked from commit 15ccc4fac0)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
2019-09-25 08:24:24 -07:00
Miss Islington (bot) d3666945d7
bpo-38260: Add Docs on asyncio.run (GH-16337)
Add docs about return and raise exception on asyncio.run

https://bugs.python.org/issue38260

Automerge-Triggered-By: @asvetlov
(cherry picked from commit 17deb16883)

Co-authored-by: Emmanuel Arias <emmanuelarias30@gmail.com>
2019-09-25 02:13:00 -07:00
Gregory P. Smith 4042e1afd2
[3.7] bpo-36871: Handle spec errors in assert_has_calls (GH-16364) (GH-16374)
Handle spec errors in assert_has_calls (GH-16005) (GH-16364)

The fix in PR 13261 handled the underlying issue about the spec for specific methods not being applied correctly, but it didn't fix the issue that was causing the misleading error message.

The code currently grabs a list of responses from _call_matcher (which may include exceptions). But it doesn't reach inside the list when checking if the result is an exception. This results in a misleading error message when one of the provided calls does not match the spec.

https://bugs.python.org/issue36871

Co-authored-by: Samuel Freilich <sfreilich@google.com>

(cherry picked from commit 1a17a054f6)
2019-09-24 22:29:17 -07:00
Miss Islington (bot) 16c0f6df62 bpo-22273: Update ctypes to correctly handle arrays in small structur… (GH-15839) (GH-16369)
(cherry picked from commit 12f209eccb)
2019-09-25 05:10:43 +01:00
Miss Islington (bot) 46f6c566a8
bpo-37123: multiprocessing test_mymanager() accepts SIGTERM (GH-16349)
Multiprocessing test test_mymanager() now also expects -SIGTERM, not
only exitcode 0.

bpo-30356: BaseManager._finalize_manager() sends SIGTERM to the
manager process if it takes longer than 1 second to stop, which
happens on slow buildbots.
(cherry picked from commit b0e1ae5f54)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
2019-09-24 05:38:38 -07:00
Miss Islington (bot) c13a4d6a94
bpo-38212: Increase MP test_queue_feeder_donot_stop_onexc() timeout (GH-16348)
Multiprocessing tests: increase test_queue_feeder_donot_stop_onexc()
timeout from 1 to 60 seconds.
(cherry picked from commit 99799c7220)

Co-authored-by: Victor Stinner <vstinner@python.org>
2019-09-24 04:06:05 -07:00
Miss Islington (bot) 912b5a986c
closes bpo-38253: Fix typo of Py_SET_ERANGE_IF_OVERFLOW in pyport.h. (GH-16230)
(cherry picked from commit 4346bad332)

Co-authored-by: Hai Shi <shihai1992@gmail.com>
2019-09-23 19:39:36 -07:00
Miss Islington (bot) 6641a109fb Updated incorrect level-setting code to use setLevel(). (GH-16325) (GH-16326)
(cherry picked from commit 1d094af716)
2019-09-22 04:27:00 +01:00
Miss Islington (bot) 8d4c52ffb4
Doc: Fix spelling errors of 'initial' in enum.py (GH-16314)
(cherry picked from commit bb16fb2cb8)

Co-authored-by: HongWeipeng <hongweichen8888@sina.com>
2019-09-20 22:40:42 -07:00
Miss Islington (bot) fd4f28d894
bpo-37937: Mention frame.f_trace in sys.settrace docs (GH-15439)
Mention frame.f_trace in sys.settrace docs, as well as the fact you still
need to call `sys.settrace` to enable the tracing machinery before setting
`frame.f_trace` will have any effect.
(cherry picked from commit 9c2682efc6)

Co-authored-by: Ram Rachum <ram@rachum.com>
2019-09-20 08:25:12 -07:00
Miss Islington (bot) 2552e27b75
bpo-37353: Updated parser note about source code compatibility(GH-14277)
(cherry picked from commit 062cfe3b11)

Co-authored-by: Prateek Nayak <45075669+Kriyszig@users.noreply.github.com>
2019-09-20 07:02:00 -07:00
Victor Stinner 5e1400a6bc
bpo-37531: sync regrtest with master branch (GH-16285) (GH-16289)
(cherry picked from commit fb7746d5d1)
2019-09-19 18:40:46 +02:00
Miss Islington (bot) 50ecedc103
Doc: Clarify dict equality irrespective of ordering. (GH-16266)
(cherry picked from commit 3171d67a6a)

Co-authored-by: toonarmycaptain <toonarmycaptain@hotmail.com>
2019-09-18 22:57:32 -07:00
Miss Islington (bot) 20d3bce3ef [3.7] bpo-38218: Doc: Corrected syntax for return annotation (GH-16265) (GH-16275)
Signed-off-by: Jason Plurad <pluradj@us.ibm.com>
(cherry picked from commit 9ab6038fe8)

Co-authored-by: Jason Plurad <pluradj@us.ibm.com>
2019-09-19 07:37:38 +02:00
Miss Islington (bot) 1a3a48ddaf
bpo-38203: faulthandler.dump_traceback_later() is always available (GH-16260)
dump_traceback_later() and cancel_dump_traceback_later() functions of
the faulthandler module are always available since Python 3.7.
(cherry picked from commit 064e1e3841)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
2019-09-18 05:43:17 -07:00
Miss Islington (bot) 8b907a8875 bpo-37904: Edition on python tutorial - section 4 (GH-16169) (GH-16235)
A little change on first paragraph of python tutorial to be more clearly

https://bugs.python.org/issue37904

Automerge-Triggered-By: @ericvsmith
(cherry picked from commit b57481318e)

Co-authored-by: Diego Alberto Barriga Martínez <diegobarriga@protonmail.com>
2019-09-18 06:36:35 -04:00
Serhiy Storchaka 69b3718b18
[3.7] bpo-38191: Accept arbitrary keyword names in NamedTuple(). (GH-16222) (GH-16239)
This includes such names as "cls", "self", "typename" and "fields".
(cherry picked from commit 2bf31ccab3)
2019-09-17 22:09:09 +03:00
Miss Islington (bot) fc022f04b4
bpo-38013: make async_generator_athrow object tolerant to throwing exceptions (GH-16070)
Even when the helper is not started yet.

This behavior follows conventional generator one.
There is no reason for `async_generator_athrow` to handle `gen.throw()` differently.

https://bugs.python.org/issue38013
(cherry picked from commit c275312a62)

Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
2019-09-17 06:19:25 -07:00
Miss Islington (bot) 6591b4bbb1 bpo-37531: regrtest main process uses shorter timeout (GH-16220) (GH-16223)
When using multiprocesss (-jN), the main process now uses a timeout
of 60 seconds instead of the double of the --timeout value. The
buildbot server stops a job which does not produce any output in 1200
seconds.
(cherry picked from commit 46b0b81220)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
2019-09-17 14:34:03 +02:00
Miss Islington (bot) 6422392f34
Doc: Fix grammar/spelling in ssl.VERIFY_CRL_CHECK_LEAF docs (GH-16221)
(cherry picked from commit 219fb9d65e)

Co-authored-by: Jörn Heissler <joernheissler@users.noreply.github.com>
2019-09-17 03:49:08 -07:00
Miss Islington (bot) facbd316b4
bpo-38192: Fix remaining passing of "loop" in the protocol examples (GH-16202)
See https://bugs.python.org/issue38192 .

https://bugs.python.org/issue38192
(cherry picked from commit 5d359cc62e)

Co-authored-by: Hrvoje Nikšić <hniksic@gmail.com>
2019-09-17 00:22:48 -07:00
Miss Islington (bot) 80cb055aa4
bpo-38185: Fixed case-insensitive string comparison in sqlite3.Row indexing. (GH-16190)
(cherry picked from commit f669581a95)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2019-09-16 23:39:49 -07:00
Miss Islington (bot) 3d916a7b1e
bpo-35379: When exiting IDLE, catch any AttributeError. (GH-16212)
One happens when EditorWindow.close is called twice.
Printing a traceback, when IDLE is run from a terminal,
is useless and annoying.
(cherry picked from commit dfd34a9cd5)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2019-09-16 23:24:02 -07:00
Miss Islington (bot) 4ac1be2828
bpo-38175: Fix a memory leak in comparison of sqlite3.Row objects. (GH-16155)
(cherry picked from commit 8debfa5040)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2019-09-16 23:14:30 -07:00
Miss Islington (bot) 89f132a328 Doc: Add list(dict) in stdtypes library (GH-16209) (GH-16211)
(cherry picked from commit 63dedef48b)

Co-authored-by: Adorilson Bezerra <adorilson@gmail.com>
2019-09-17 07:04:19 +02:00
Miss Islington (bot) 523497cbdc
bpo-38183: Test_idle ignores user config directory GH-16198)
It no longer tries to create or access .idlerc or any files within.
Users must run IDLE to discover problems with saving settings.
(cherry picked from commit 0048afc16a)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2019-09-16 20:33:06 -07:00
Miss Islington (bot) 733193d050
bpo-28556: Update the opening note in typing docs (GH-16204)
This PR replaces the old note mentioning that `typing` is a provisional module with a new one mentioning types are not enforced at runtime. I am not sure if there was any official announcement about making `typing` non-provisional, but _de-facto_ no new features were added during Python 3.7, and no backwards incompatible changes were made except for few small things that were considered bugs.
(cherry picked from commit 81528ba2e8)

Co-authored-by: Ivan Levkivskyi <levkivskyi@gmail.com>
2019-09-16 15:10:11 -07:00
Miss Islington (bot) c55f69552c
[3.7] bpo-33936: Don't call obsolete init methods with OpenSSL 1.1.0+ (GH-16140) (GH-16200)
``OPENSSL_VERSION_1_1`` was never defined in ``_hashopenssl.c``. 


https://bugs.python.org/issue33936
(cherry picked from commit 724f1a5723)


Co-authored-by: Christian Heimes <christian@python.org>


https://bugs.python.org/issue33936



Automerge-Triggered-By: @tiran
2019-09-16 12:49:07 -07:00
Miss Islington (bot) 4651a7a496
Doc: Fix Wikipedia link for functools.lru_cache (GH-16183)
(cherry picked from commit 336b3064d8)

Co-authored-by: amist <amistern0@gmail.com>
2019-09-16 11:55:43 -07:00
Stéphane Wirtel 7aae4f004e [3.7] bpo-38100: Fix spelling error in unittest.mock code (GH-16195)
https://bugs.python.org/issue38100



Automerge-Triggered-By: @matrixise
2019-09-16 11:16:34 -07:00
Miss Islington (bot) ad4ce9edf3 Doc: Add link of GNU Readline library to interpreter tutorial (GH-16152) (GH-16188)
(cherry picked from commit f18242be16)

Co-authored-by: Adorilson Bezerra <adorilson@gmail.com>
2019-09-16 18:29:50 +02:00
Steve Dower 76d8fb7716
bpo-38117: Update bundled Windows OpenSSL to 1.1.1d (GH-16184) 2019-09-16 15:55:07 +01:00
Julien Palard 210dc3bb37
[3.7] bpo-33095: Add reference to isolated mode in -m and script option (GH-7764) (GH-16181)
Attempt to make isolated mode easier to discover via additional inline documentation.

Co-Authored-By: Julien Palard <julien@palard.fr>.
(cherry picked from commit bdd6945d4d)

Co-authored-by: Xtreak <tir.karthi@gmail.com>
2019-09-16 14:30:33 +02:00
Miss Islington (bot) e857fe624d
[3.7] bpo-38168: Fix a possbile refleak in setint() of mmapmodule.c (GH-16136) (GH-16175)
(cherry picked from commit 56a45142e7)


Co-authored-by: Hai Shi <shihai1992@gmail.com>

Automerge-Triggered-By: @zhangyangyu
2019-09-15 23:27:38 -07:00
Miss Islington (bot) 26c44b5144
bpo-38117: Updated OpenSSL to 1.1.1d in macOS installer. (GH-16170)
(cherry picked from commit 24d1597e43)

Co-authored-by: Ned Deily <nad@python.org>
2019-09-15 19:56:04 -07:00
Miss Islington (bot) 701c4886bb
bpo-38178: Don't explicitly pass "loop" to EchoClientProtocol. (GH-16159)
https://bugs.python.org/issue38178
(cherry picked from commit c717c73fa3)

Co-authored-by: Hrvoje Nikšić <hniksic@gmail.com>
2019-09-15 10:12:13 -07:00
Miss Islington (bot) b9f932f9e2
bpo-37635: Update arg name for seek() in IO tutorial (GH-16147)
Typically, the second positional argument for ``seek()`` is *whence*. That is the POSIX standard name (http://man7.org/linux/man-pages/man3/lseek.3p.html) and the name listed in the documentation for ``io`` module (https://docs.python.org/3/library/io.htmlGH-io.IOBase.seek).

The tutorial for IO is the only location where the second positional argument for ``seek()`` is referred to as *from_what*. I suspect this was created at an early point in Python's history, and was never updated (as this section predates the GitHub repository):

```
$ git grep "from_what"
Doc/tutorial/inputoutput.rst:To change the file object's position, use ``f.seek(offset, from_what)``.  The position is computed
Doc/tutorial/inputoutput.rst:the *from_what* argument.  A *from_what* value of 0 measures from the beginning
Doc/tutorial/inputoutput.rst:the reference point.  *from_what* can be omitted and defaults to 0, using the
```

For consistency, I am suggesting that the tutorial be updated to use the same argument name as the IO documentation and POSIX standard for ``seek()``, particularly since this is the only location where *from_what* is being used.

Note: In the POSIX standard, *whence* is technically the third positional argument, but the first argument *fildes* (file descriptor) is implicit in Python.

https://bugs.python.org/issue37635
(cherry picked from commit ff603f6c3d)

Co-authored-by: Kyle Stanley <aeros167@gmail.com>
2019-09-14 13:47:39 -07:00