Commit Graph

102065 Commits

Author SHA1 Message Date
Miss Islington (bot) d6d35d0a00
Fix several reference counting bugs in pyexpat.c. (GH-9955)
(cherry picked from commit 68def052dc)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
2018-10-19 00:16:25 -07:00
Miss Islington (bot) 2bc1e8c909 In email docs, correct spelling of foregoing (GH-9856) (#9919)
(cherry picked from commit c984d20ec8)

Co-authored-by: Cheryl Sabella <cheryl.sabella@gmail.com>
2018-10-18 20:17:25 -04:00
Miss Islington (bot) 8ba831f847 In email.parser in message_from_bytes, update `strict` to `policy` (GH-9854) (#9917)
According to the versionchanged note, the `strict` argument was removed in 3.3 and `policy` was added, but the name of the argument in the paragraph wasn't updated.
(cherry picked from commit a5ca98537b)

Co-authored-by: Cheryl Sabella <cheryl.sabella@gmail.com>
2018-10-18 20:16:16 -04:00
Miss Islington (bot) 6802964fb4 Updated documentation on logging.debug(). (GH-9946) (GH-9949)
(cherry picked from commit bbd90e4f62)

Co-authored-by: Vinay Sajip <vinay_sajip@yahoo.co.uk>
2018-10-18 11:55:15 +01:00
Miss Islington (bot) 5b9b9353de
bpo-35008: Fix possible leaks in Element.__setstate__(). (GH-9924)
C implementation of xml.etree.ElementTree.Element.__setstate__()
leaked references to children when called for already initialized
element.
(cherry picked from commit 6f906b3d72)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2018-10-18 00:17:15 -07:00
Miss Islington (bot) 178d1c0777
bpo-24658: Fix read/write greater than 2 GiB on macOS (GH-1705)
On macOS, fix reading from and writing into a file with a size larger than 2 GiB.
(cherry picked from commit 74a8b6ea7e)

Co-authored-by: Stéphane Wirtel <stephane@wirtel.be>
2018-10-17 23:58:40 -07:00
Miss Islington (bot) 35ae99d7b3
[3.7] bpo-35011: Restore use of pyexpatns.h in libexpat (GH-9939) (GH-9940)
Restores the use of pyexpatns.h to isolate our embedded copy of the expat C
library so that its symbols do not conflict at link or dynamic loading time
with an embedding application or other extension modules with their own
version of libexpat.

5dc3f23b5fGH-diff-3afaf7274c90ce1b7405f75ad825f545 inadvertently removed it when upgrading expat.
(cherry picked from commit 9d4712bc8f)


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


https://bugs.python.org/issue35011
2018-10-17 19:06:30 -07:00
Stéphane Wirtel 657e3f9a2c [3.7] bpo-23420: Verify the value of '-s' when execute the CLI of cProfile (GH-9925) (GH-9926)
[3.7] [bpo-23420](https://bugs.python.org/issue23420): Verify the value of '-s' when execute the CLI of cProfile (GH-9925)

Verify the value for the parameter '-s' of the cProfile CLI. Patch by Robert
Kuska.

Co-authored-by: Robert Kuska <rkuska@gmail.com>
(cherry picked from commit fcd5e84a51)





https://bugs.python.org/issue23420
2018-10-17 04:48:05 -07:00
Miss Islington (bot) 514bbfc7fc
bpo-34967: Sphinx is deprecating add_description_unit, use add_object_type (GH-9827)
(cherry picked from commit e385d0661e)

Co-authored-by: Stéphane Wirtel <stephane@wirtel.be>
2018-10-15 23:46:38 -07:00
Miss Islington (bot) 350aeab812
bpo-34783: Fix test_nonexisting_script() (GH-9896)
Fix test_cmd_line_script.test_nonexisting_script(): the test must not
rely on sys.executable, since main.c uses config->program which can
be different than sys.executable in many cases (for example, on macOS
when using the framework).
(cherry picked from commit ea75187c68)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
2018-10-15 15:30:05 -07:00
Miss Islington (bot) 802de12d99
bpo-23554: Change echo server example class name from EchoServerClientProtocol to EchoServerProtocol (GH-9859)
(cherry picked from commit 43a5bd7b45)

Co-authored-by: Braden Groom <braden.groom@gmail.com>
2018-10-15 14:59:49 -07:00
Miss Islington (bot) fcea3ddc4a
bpo-34989: python-gdb.py: fix current_line_num() (GH-9889)
python-gdb.py now handles errors on computing the line number
of a Python frame.

Changes:

* PyFrameObjectPtr.current_line_num() now catchs any Exception on
  calling addr2line(), instead of failing with a surprising "<class
  'TypeError'> 'FakeRepr' object is not subscriptable" error.
* All callers of current_line_num() now handle current_line_num()
  returning None.
* PyFrameObjectPtr.current_line() now also catchs IndexError on
  getting a line from the Python source file.
(cherry picked from commit 2e438cc255)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
2018-10-15 14:47:56 -07:00
Miss Islington (bot) d991ede16b
bpo-34521: Add NEWS entry for changes in GH-9613 (GH-9850)
* Add News entry for the change in multiprocessing.reduction.recvfds
made in GH-9613.
(cherry picked from commit bd036d3d15)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
2018-10-15 14:20:11 -07:00
Cheryl Sabella b248a8c9a5 [3.7] bpo-11233: Create availability directive for documentation (GH-9692) (GH-9830)
Replace "Availability: xxx" with ".. availability:: xxx" in the doc.
 Original patch by Georg Brandl.

 Co-Authored-By: Georg Brandl <georg@python.org>
 (cherry picked from commit 2d6097d027)

 Co-authored-by: Cheryl Sabella <cheryl.sabella@gmail.com>
2018-10-15 22:52:26 +02:00
Miss Islington (bot) c804a5975d fix dangling keyfunc examples in documentation of heapq and sorted (GH-1432)
* fix dangling mention of key=str.lower in heapq doc

* Fix dangling mention of keyfunc example for sorted()
(cherry picked from commit 6bdb6f7675)

Co-authored-by: Wolfgang Maier <wolfgang.maier@biologie.uni-freiburg.de>
2018-10-15 13:19:08 -06:00
Miss Islington (bot) 1370832af2
bpo-34974: Do not replace unexpected errors in bytes() and bytearray(). (GH-9852)
bytes and bytearray constructors converted unexpected exceptions
(e.g. MemoryError and KeyboardInterrupt) to TypeError.
(cherry picked from commit e890421e33)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2018-10-14 14:26:28 -07:00
Miss Islington (bot) 91b863d93b Update compound_stmts.rst (GH-9864) (GH-9869)
(cherry picked from commit c8bb467f40)

Co-authored-by: Andrés Delfino <adelfino@gmail.com>
2018-10-14 11:32:58 +03:00
Miss Islington (bot) b1c800303e
bpo-34941: Fix searching Element subclasses. (GH-9766)
Methods find(), findtext() and findall() of xml.etree.ElementTree.Element
were not able to find chldren which are instances of Element subclasses.
(cherry picked from commit b11c5667f9)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2018-10-14 00:55:49 -07:00
Miss Islington (bot) 77e0abe228
bpo-33656: Move pyshell ctypes import inside try block. (GH-9858)
A Windows build with _tkinter, tkinter, and idlelib
but without ctypes is unlikely but apparently possible.
(cherry picked from commit d274afb5e5)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2018-10-13 17:19:22 -07:00
Ned Deily 6a1238cb44 Post release bump 2018-10-13 16:45:49 -04:00
Ned Deily d04d3eaa6b Python 3.7.1rc2
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEDZbfTUEQ5cQ/v7F/LTR+pqplQh0FAlvBmH8ACgkQLTR+pqpl
 Qh2IJA//eIpaKR58zbWV1eTNaAE6doaZTFPm9nz2eGpniXmSsdenCqJZpFP6RT1G
 Su52FkCcapNwlBKifaZNU3tndYswG43/V1lB83km98PY/57j6OfCQhfOYE8POvJB
 Aj+cto2pLUErbHAOv7IfPadhD7DtNLUAye//xRbuichlCKNOUJ/DSUhETf3E3SMJ
 Tq1ukAWNZ6R+MWNm3jt6YMPU0BKO9knNxZp8GYRmxFgFy+/1pPF3AkrGch7UArns
 lyRIzFzfg8VU3O/zunpRqsOByPduJrnXl5iHj37nq2laTjVPzhP9ketpYaFzwH7f
 2NWWLBAiU2VwNkdVCN6o8fgk7jZmvdN/twMbihHV50K3AUihcsmF6pMzsSGSLTcX
 Hl5tA3bZMnbGfxZWMrKWX/vZFGdKUK5mkolMM/fCvvs1rsfN3us5bC2+yjD64Uh7
 EiDNCBANyYYsvPiRlFJgTXTuif/yJjJGwsJ9oUL/n6mRCyLYXAiqvYjVZukhdFAT
 8g1jaIt3ArIR17X0wL//saFNo/qtTO7y+IVnlsMg0VR5ctWn1I9N59szAubRkBF1
 Cr+pBQ6y8MYgMrLMxd1w3j946EOTxarNYt2YVPgGPjTZ250Fhs9bZ2hCl7rrleEW
 u5o+l/JeCefnW0ffIaFLszAsOW743GOZ4bSRgUzeAfA3BkiNASk=
 =gNS9
 -----END PGP SIGNATURE-----

Merge tag 'v3.7.1rc2' into 3.7
2018-10-13 16:43:23 -04:00
Miss Islington (bot) 5dbb1b7df1 bpo-34970: Protect tasks weak set manipulation in asyncio.all_tasks() (GH-9837) (GH-9849)
https://bugs.python.org/issue34970
(cherry picked from commit 97cf082872)

Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
2018-10-13 22:26:47 +03:00
Miss Islington (bot) d07564274a
Add new tests for bytes and bytearray constructors. (GH-9843)
Covered all special cases: bytes, tuple, list, differend
kinds of iterables and iterators.
(cherry picked from commit 1a997eb291)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2018-10-13 11:02:23 -07:00
Miss Islington (bot) 22381394ad
bpo-16965: 2to3 now rewrites execfile() to open with 'rb'. (GH-8569)
(cherry picked from commit d4d60134b2)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
2018-10-13 02:48:18 -07:00
Ned Deily 6c06ef7dc3 3.7.1rc2 2018-10-13 03:01:13 -04:00
Ned Deily d8b6425e58 bpo-34370: Revert to using released Tk 8.6.8 with macOS installers
For 3.7.1rc1 and 3.6.7rc1 we used a pre-release development
snapshot of Tk 8.6 to pick up some post-8.6.8 fixes for macOS.
But the snapshot introduced at least one regression (bpo-34927).
For rc2, revert to using the standard release 8.6.8 for now.
This reverts commit d9cfe5ed2c.
2018-10-13 01:38:43 -04:00
Miss Islington (bot) 5d8ef8bc3f bpo-34783: Disable test_nonexisting_script for macOS framework builds (GH-9831) (GH-9832)
With macOS framework builds, test case test_nonexisting_script in
test_nonexisting_script fails because the test case assumes that
the file name in sys.executable will appear in the error message.
For macOS framework builds, sys.executable is the file name of the
stub launcher and its file name bears no relationship to the file
name of the actual python executable.  For now, skip the test in
this case.
(cherry picked from commit f6c29a65e2)

Co-authored-by: Ned Deily <nad@python.org>
2018-10-13 00:07:01 -04:00
Miss Islington (bot) d4ed8809dd
bpo-34203: FAQ now recommends python 3.x over 2.x (GH-9796)
(cherry picked from commit 4505f65ae7)

Co-authored-by: Gus Goulart <augusto@goulart.me>
2018-10-12 05:06:07 -07:00
Miss Islington (bot) 7a98e302c3 bpo-34900: Make TestCase.debug() work with subtests (GH-9707)
(cherry picked from commit da2bf9f66d)

Co-authored-by: Bruno Oliveira <nicoddemus@gmail.com>
2018-10-12 14:07:01 +03:00
Miss Islington (bot) c327a5499f
bpo-31516: Skip test_main_thread_during_shutdown() with COUNT_ALLOCS builds. (GH-8052)
(cherry picked from commit 65d2f8c044)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
2018-10-12 01:49:07 -07:00
Miss Islington (bot) 72927d0d17
Fix an incorrect check in compiler_try_except(). (GH-9810)
(cherry picked from commit 53ebf4b070)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
2018-10-12 00:19:20 -07:00
Miss Islington (bot) 1c2cb516e4
Fix a possible decref of a borrowed reference in symtable.c. (GH-9786)
(cherry picked from commit fc439d20de)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
2018-10-10 22:24:14 -07:00
Serhiy Storchaka 8b040e5539
[3.7] bpo-34922: Fix integer overflow in the digest() and hexdigest() methods (GH-9751) (GH-9798)
for the SHAKE algorithm in the hashlib module.
(cherry picked from commit 9b8c2e7676)
2018-10-11 08:06:36 +03:00
Miss Islington (bot) 57038bcb24
bpo-34576 warn users on security for http.server (GH-9720)
It was proposed to add an warning for http.server regarding security
issues. The wording was provided at bpo-26005 by @orsenthil
(cherry picked from commit 1d26c72e6a)

Co-authored-by: Felipe Rodrigues <felipe@felipevr.com>
2018-10-10 20:55:34 -07:00
Stéphane Wirtel a4910c2498 [3.7] bpo-34906: Doc: Fix typos (2) (GH-9735)
(cherry picked from commit 683281f536)
2018-10-10 15:39:17 +02:00
Miss Islington (bot) 8e23ba021f
bpo-23596: Add unit tests for the command line for the gzip module (GH-9775)
Add unit tests for the command line for the gzip module
(cherry picked from commit 84eec11995)

Co-authored-by: Stéphane Wirtel <stephane@wirtel.be>
2018-10-09 14:42:58 -07:00
Miss Islington (bot) 41e5ec377b
bpo-34769: Thread safety for _asyncgen_finalizer_hook(). (GH-9716)
(cherry picked from commit c880ffe7d2)

Co-authored-by: twisteroid ambassador <twisteroidambassador@users.noreply.github.com>
2018-10-09 09:03:35 -07:00
Miss Islington (bot) 0ce31d340b
bpo-32962: Fix test_gdb failure in debug build with -mcet -fcf-protection -O0 (GH-9656)
When Python is built with the intel control-flow protection flags,
-mcet -fcf-protection, gdb is not able to read the stack without
actually jumping inside the function. This means an extra
'next' command is required to make the $pc (program counter)
enter the function and make the stack of the function exposed to gdb.

Co-Authored-By: Marcel Plch <gmarcel.plch@gmail.com>

(cherry picked from commit 9b7c74ca32)
(cherry picked from commit 79d21331e6)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
2018-10-09 08:21:17 -07:00
Miss Islington (bot) c4c86fad80
bpo-32174: Let .chm document display non-ASCII characters properly (GH-9758)
Let .chm document display non-ASCII characters properly

Escape the `body` part of .chm source file to 7-bit ASCII, to fix visual effect on some MBCS Windows systems.
(cherry picked from commit 6261ae9b01)

Co-authored-by: animalize <animalize@users.noreply.github.com>
2018-10-08 14:26:55 -07:00
Miss Islington (bot) c59e75ccf0
bpo-34901: add isolated (-I) flag to sys.flags (GH-9708)
https://bugs.python.org/issue34901
(cherry picked from commit 656d52dbfd)

Co-authored-by: Danish Prakash <grafitykoncept@gmail.com>
2018-10-07 09:18:20 -07:00
Miss Islington (bot) 3b699932e5 bpo-6721: Hold logging locks across fork() (GH-4071) (#9291)
bpo-6721: When os.fork() was called while another thread holds a logging lock, the child process may deadlock when it tries to log.  This fixes that by acquiring all logging locks before fork and releasing them afterwards.

A regression test that fails before this change is included.

Within the new unittest itself: There is a small _potential_ due to mixing of fork and a thread in the child process if the parent's thread happened to hold a non-reentrant library call lock (malloc?) when the os.fork() happens.  buildbots and time will tell if this actually manifests itself in this test or not.  :/  A functionality test that avoids that would be a challenge.

An alternate test that isn't trying to produce the deadlock itself but just checking that the release and acquire calls are made would be the next best alternative if so.
(cherry picked from commit 19003841e9)

Co-authored-by: Gregory P. Smith <greg@krypto.org> [Google]
2018-10-07 00:09:59 -07:00
Miss Islington (bot) 1a2189353f bpo-34334: Don't log traceback twice in QueueHandler (GH-9537) (GH-9581)
(cherry picked from commit d345bb4d9b)

Co-authored-by: Cheryl Sabella <cheryl.sabella@gmail.com>
2018-10-07 00:33:37 -04:00
Miss Islington (bot) 4322b8dd0f
Correct grammar mistake in re.rst. (GH-9745)
(cherry picked from commit 7dfbd49671)

Co-authored-by: Andrés Delfino <adelfino@gmail.com>
2018-10-06 12:56:45 -07:00
Miss Islington (bot) 453b3b0e87 bpo-34909: keep searching mixins until base class is found (GH-9737) (GH-9738)
(cherry picked from commit cd45385ffa)
2018-10-06 00:43:20 -07:00
Miss Islington (bot) 49fb49d6f5
bpo-34910: Ensure that PyObject_Print() always returns -1 on error. (GH-9733)
(cherry picked from commit ae62f01524)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
2018-10-06 00:07:12 -07:00
Miss Islington (bot) 0991b9bb94 [3.7] bpo-34158: Documentation UTC offset update (GH-8377) (GH-9732)
* Documentation of UTC offset update
Since changes in the UTC offset that allows sub-minute offsets, the documentation needs update:

- "%z" format code documentation update
Karthikeyan Singaravelan commented on bugs.python.org:
Added as part of 018d353c1c and a fix regarding duplicate words for that part was added at bac2d5ba30.
Relevant format string at https://github.com/python/cpython/pull/2896/filesGH-diff-25e2d173c84057d069b7890450714eddR214.
Relevant test case with 6-digit string for microsecond : https://github.com/python/cpython/pull/2896/filesGH-diff-acc40bec51c7de832de3361db3edae52R309.
Table at https://docs.python.org/3.7/library/datetime.htmlGH-strftime-and-strptime-behavior could also be updated with microseconds being optional in the second column
%z | UTC offset in the form ±HHMM[SS] (empty string if the object is naive). | (empty), +0000, -0400, +1030

- isoformat documentation update
According to me, needs confirmation:
Relevant format string at https://github.com/python/cpython/pull/4699/filesGH-diff-25e2d173c84057d069b7890450714eddR176
Relevant test case at https://github.com/python/cpython/pull/4699/filesGH-diff-25e2d173c84057d069b7890450714edd

* From Martin Panter: some style improvment;
From @pganssle: using f for fractional part of seconds in all file.
(cherry picked from commit 92878829c3)

Co-authored-by: Christophe Nanteuil <35002064+christopheNan@users.noreply.github.com>
2018-10-05 22:44:23 -04:00
Miss Islington (bot) 2fcaaaca52 [3.7] Make it clear that the msg argument to assertWarns/assertWarnsRegex/assertRaisesRegex is keyword-only. (GH-9680) (GH-9681)
A follow up to be4e5b8920.
(cherry picked from commit e006b39a40)

Co-authored-by: Benjamin Peterson <benjamin@python.org>
2018-10-05 22:39:47 -04:00
Andrés Delfino b38ff71501 Fix markup for xml.sax in 3.7.rst (GH-9604) 2018-10-05 22:37:14 -04:00
Miss Islington (bot) 414d58f745 Clarify that AsyncExitStack works with coroutine functions (GH-9405) (GH-9408)
The docs were ambiguous about whether you pass in a coroutine function
or a coroutine object, e.g. is it:

  aestack.push_async_exit(some_async_func)

or

  aestack.push_async_exit(some_async_func())

(It's the first one.)
(cherry picked from commit a3c88ef12c)

Co-authored-by: Nathaniel J. Smith <njs@pobox.com>
2018-10-05 22:29:17 -04:00
Miss Islington (bot) 28dd737c46 bpo-34565: Change a PC/launcher.c comment to accurately describe valid major versions. (GH-9037) (GH-9065)
(cherry picked from commit 3876af4f7c)

Co-authored-by: Brendan Gerrity <brerrity@gmail.com>
2018-10-05 22:18:41 -04:00