Commit Graph

102898 Commits

Author SHA1 Message Date
Miss Islington (bot) c76add7afd
Improve version added references in `typing` module docs (GH-13457)
(cherry picked from commit b7daabd711)

Co-authored-by: Anthony Sottile <asottile@umich.edu>
2019-06-01 17:23:40 -07:00
Miss Islington (bot) ac60d1afd2
bpo-32411: IDLE: Remove line number sort in browser.py (GH-5011)
Insertion in line order makes sorting keys by line order unneeded.
(cherry picked from commit 1a4d9ffa1a)

Co-authored-by: Cheryl Sabella <cheryl.sabella@gmail.com>
2019-06-01 15:26:00 -07:00
Miss Islington (bot) fefdc00990
Fix the error handling in bytesio_sizeof(). (GH-10459)
bytesio_sizeof() must check if an error has occurred in _PySys_GetSizeOf().
(cherry picked from commit 36dcaab7fd)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
2019-06-01 14:58:33 -07:00
Miss Islington (bot) fc914dd5e0
Doc: Correct the creation year and the credits of the Logo Programming language (GH-13520)
(cherry picked from commit 66501058fe)

Co-authored-by: Stéphane Wirtel <stephane@wirtel.be>
2019-06-01 04:47:15 -07:00
Miss Islington (bot) f286e0373f
bpo-36813: Fix QueueListener to call task_done() upon termination. (GH-13113)
Fixed QueueListener in order to avoid random deadlocks.
Unable to add regression tests atm due to time constraints, will add it in a bit.
Regarding implementation, although it's nested, it does not cause performance issues whatsoever, and does not call task_done() in case of an exception (which is the right thing to do IMHO).

https://bugs.python.org/issue36813
(cherry picked from commit 6b282e1887)

Co-authored-by: Bar Harel <bzvi7919@gmail.com>
2019-06-01 02:36:29 -07:00
Miss Islington (bot) 18e23f227b bpo-18911: clarify that the minidom XML writer receives texts but not bytes (GH-13718)
(cherry picked from commit 5ac0b988fd)

Co-authored-by: Windson yang <wiwindson@outlook.com>
2019-06-01 08:58:54 +02:00
Miss Islington (bot) 464c1ec65a
bpo-15115: Document deprecation of email.encoders in Python 3 (GH-5354)
(cherry picked from commit a747c3a5ed)

Co-authored-by: Cheryl Sabella <cheryl.sabella@gmail.com>
2019-05-31 13:26:01 -07:00
Miss Islington (bot) a6dc5d4e1c bpo-33361: Fix bug with seeking in StreamRecoders (GH-8278)
(cherry picked from commit a6ec1ce1ac)

Co-authored-by: Ammar Askar <ammar_askar@hotmail.com>
2019-05-31 23:03:22 +03:00
Miss Islington (bot) 49fc57abf5
bpo-12639: msilib.Directory.start_component() fails if *keyfile* is not None (GH-13688)
msilib.Directory.start_component() was passing an extra argument to CAB.gen_id().
(cherry picked from commit c8d5bf6c3f)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
2019-05-31 10:22:14 -07:00
Miss Islington (bot) fc3b8437c8
bpo-25735: math.factorial doc should mention integer return type (GH-6420)
(cherry picked from commit 4612671df2)

Co-authored-by: Akshay Sharma <akshay.sharma09695@gmail.com>
2019-05-31 09:58:27 -07:00
Miss Islington (bot) 8135455c84
bpo-37094: Add example for TestCase.skipTest in unittest doc (GH-13645)
Also includes other minor test skipping doc improvements.

https://bugs.python.org/issue37094
(cherry picked from commit ffed76b6fc)

Co-authored-by: Makdon <makdon@makdon.me>
2019-05-31 09:31:53 -07:00
Miss Islington (bot) ee114d7795
IDLE - Capitalize search dialogs' 'Close' button label. (GH-13691)
It seems to be the only widget label not capitalized.
(cherry picked from commit ba0430211f)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2019-05-31 01:44:29 -07:00
Miss Islington (bot) e8661c1dab
bpo-30969: Fix docs about the comparison in absence of __contains__ (GH-2761)
(cherry picked from commit 2f5b9dcc0a)

Co-authored-by: Antti Haapala <antti@haapala.name>
2019-05-30 13:41:06 -07:00
Miss Islington (bot) f1487b3235 bpo-24564: shutil.copystat(): ignore EINVAL on os.setxattr() (GH-13369)
(cherry picked from commit a16387ab2d)

Co-authored-by: Ying Wang <me@yingw787.com>
2019-05-30 13:58:30 +08:00
Anthony Sottile 3a98bbf727 [3.7] bpo-36983: Fix typing.__all__ and add test for exported names (GH-13456) (GH-13662)
https://bugs.python.org/issue36983

Fixes issue 36983
2019-05-29 21:05:33 -07:00
Miss Islington (bot) 4e1e887203
bpo-36794: Document that Lock.acquire is fair. (GH-13082)
https://bugs.python.org/issue36794
(cherry picked from commit 34f4f5efea)

Co-authored-by: Hrvoje Nikšić <hniksic@gmail.com>
2019-05-29 11:24:32 -07:00
Miss Islington (bot) cee95fe182
bpo-36739: Update controlflow.rst (GH-12983)
in addition to global-statement also mention nonlocal-statement
(in the paragraph describing access to variables which are non local to a function
(cherry picked from commit e1f95e77e0)

Co-authored-by: pbhd <p-bauer-schriesheim@t-online.de>
2019-05-28 20:48:12 -07:00
Petr Viktorin 3708316afa [3.7] Fix a possible crash due to PyType_FromSpecWithBases() (GH-10304) (GH-13495)
If the PyObject_MALLOC() call failed in PyType_FromSpecWithBases(),
PyObject_Free() would be called on a static string in type_dealloc().
(cherry picked from commit 0613c1e481)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
2019-05-28 23:35:33 -04:00
Miss Islington (bot) 8ea0fd85bc bpo-26903: Limit ProcessPoolExecutor to 61 workers on Windows (GH-13132) (GH-13643)
Co-Authored-By: brianquinlan <brian@sweetapp.com>
(cherry picked from commit 39889864c0)

Co-authored-by: Brian Quinlan <brian@sweetapp.com>
2019-05-28 23:12:30 -04:00
Miss Islington (bot) 0eb69990c8
bpo-22102: Fixes zip files with disks set to 0 (GH-5985)
(cherry picked from commit ab0716ed1e)

Co-authored-by: Francisco Facioni <fran6co@gmail.com>
2019-05-28 16:33:21 -07:00
Miss Islington (bot) 218abd109c
Docs: FIX broken links. (GH-13491)
(cherry picked from commit 7114c6504a)

Co-authored-by: Julien Palard <julien@palard.fr>
2019-05-28 16:09:14 -07:00
karl ding d6a14a1483 [3.7] Fix typo in docs for socket.CAN_RAW_FD_FRAMES (GH-13635) (GH-13637)
There is an extra "one" in the text description for the constant
socket.CAN_RAW_FD_FRAMES
(cherry picked from commit 1b05aa2190)
2019-05-28 12:32:12 -07:00
Miss Islington (bot) 95b7706a95
Doc: Add missing forward reference in the tutorial. (GH-13499)
(cherry picked from commit 51ddab8dae)

Co-authored-by: Julien Palard <julien@palard.fr>
2019-05-28 06:20:58 -07:00
Miss Islington (bot) e7ddf586ae
bpo-26423: Fix possible overflow in wrap_lenfunc() (GH-13606)
Fix possible overflow in wrap_lenfunc() when
sizeof(long) < sizeof(Py_ssize_t) (e.g., 64-bit Windows).
(cherry picked from commit 05f16416d9)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
2019-05-28 06:17:43 -07:00
Miss Islington (bot) 1cfb90b69f
Doc: Space breaking whole definition. (GH-13615)
(cherry picked from commit 0811f2d81a)

Co-authored-by: Julien Palard <julien@palard.fr>
2019-05-28 05:28:34 -07:00
Miss Islington (bot) a6733fd0a2
Remove outdated time.monotonic reference (GH-13264)
Per ae58649, time.monotonic is always available, making the old note outdated.
(cherry picked from commit 293e9f86b8)

Co-authored-by: Brad <brad.solomon.1124@gmail.com>
2019-05-28 03:56:05 -07:00
Miss Islington (bot) d57bb1c2f7
Fix broken :ref: in asyncio docs (GH-11805)
(cherry picked from commit 5033e315d2)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
2019-05-27 21:22:25 -07:00
Miss Islington (bot) 1062cf71fa
bpo-36856: Handle possible overflow in faulthandler_stack_overflow (GH-13205)
(cherry picked from commit 6236c9823e)

Co-authored-by: Xi Ruoyao <xry111@mengyan1223.wang>
2019-05-27 17:14:21 -07:00
Miss Islington (bot) 0f352d44e7
bpo-37054, _pyio: Fix BytesIO and TextIOWrapper __del__() (GH-13601)
Fix destructor _pyio.BytesIO and _pyio.TextIOWrapper: initialize
their _buffer attribute as soon as possible (in the class body),
because it's used by __del__() which calls close().
(cherry picked from commit a3568417c4)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
2019-05-27 17:05:49 -07:00
Miss Islington (bot) abdda3ae2a
bpo-37039: IDLE - zoomheight fixes (GH-13576)
Move doc entry to match menu and refactor zoom function.
A followup patch will include a blurb.
(cherry picked from commit df9b032f47)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2019-05-27 16:48:04 -07:00
Miss Islington (bot) e8318f31f3 bpo-37051: Refine note on what objects are hashable (GH-13587) (GH-13595)
(cherry picked from commit cc1c582f6f)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
2019-05-27 10:43:18 -07:00
Andrew Svetlov a79b6c578f
[3.7] bpo-37035: Don't log OSError (GH-13548) (#13594)
https://bugs.python.org/issue37035.
(cherry picked from commit 1f39c28e48)

Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
2019-05-27 18:52:05 +03:00
Miss Islington (bot) bfd0b77201
[3.7] bpo-28866: No type cache for types with specialized mro, invalidation is hard. (GH-13157) (GH-13589)
* No type cache for types with specialized mro, invalidation is hard.

* FIX: Don't disable method cache custom types that do not implement mro().

* fixing implem.

* Avoid storing error flags, also decref.

* news entry

* Clear as soon as we're getting an error.

* FIX: Reference leak.
(cherry picked from commit 180dc1b0f4)


Co-authored-by: Julien Palard <julien@palard.fr>


https://bugs.python.org/issue28866
2019-05-26 15:14:23 -07:00
Michael Blahay f3d909428c BPO-27639: Correct return type for UserList slicing operation (#13203)
Added logic to __getitem__ magic method for UserList to ensure that the return
type matches that of self.
2019-05-26 15:28:09 +01:00
Miss Islington (bot) 1b85f4ec45
bpo-27987: pymalloc: align by 16bytes on 64bit platform (GH-12850)
(cherry picked from commit f0be4bbb9b)

Co-authored-by: Inada Naoki <songofacandy@gmail.com>
2019-05-25 10:18:34 -07:00
Gregory P. Smith 2156fec1f7
[3.7] Revert "align PyGC_Head to alignof(long double) (GH-13335)" (GH-13569)
This reverts commit ea2b76bdc5.
See the bug for discussion.

https://bugs.python.org/issue27987
2019-05-25 10:05:01 -07:00
Inada Naoki ea2b76bdc5
bpo-27987: align PyGC_Head to alignof(long double) (GH-13335) 2019-05-25 21:13:33 +09:00
Miss Islington (bot) c70ab1cca0
bpo-37038: Make idlelib.run runnable; add test clause (GH-13560)
(cherry picked from commit 81bb97df61)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2019-05-24 22:10:09 -07:00
Victor Stinner cee4ac8135
bpo-35907: Clarify the NEWS entry (GH-13558) 2019-05-24 23:29:10 +02:00
Miss Islington (bot) 310f414bbd
bpo-23395: Fix PyErr_SetInterrupt if the SIGINT signal is ignored or not handled (GH-7778)
``_thread.interrupt_main()`` now avoids setting the Python error status if the ``SIGINT`` signal is ignored or not handled by Python.
(cherry picked from commit 608876b6b1)

Co-authored-by: Matěj Cepl <mcepl@cepl.eu>
2019-05-24 02:22:38 -07:00
Miss Islington (bot) a3488e5902
bpo-36797: Reduce levels of indirection in outdated distutils docs (GH-13462)
(cherry picked from commit e788057a91)

Co-authored-by: Nick Coghlan <ncoghlan@gmail.com>
2019-05-23 07:19:41 -07:00
Miss Islington (bot) 7cc47e9c19
bpo-37008: make mock_open handle able to honor next() (GH-13492)
I've reported the issue on https://bugs.python.org/issue37008 and now I'm trying to bring a solution to this minor issue.

I think it could be trivially backported to 3.7 branch.

https://bugs.python.org/issue37008
(cherry picked from commit 394119afc6)

Co-authored-by: Damien Nadé <Anvil@users.noreply.github.com>
2019-05-23 03:21:11 -07:00
Miss Islington (bot) 0416d6f05a bpo-27737: Allow whitespace only headers encoding (GH-13478) (#13517)
(cherry picked from commit ef5bb25e2d)

Co-authored-by: Batuhan Taşkaya <47358913+isidentical@users.noreply.github.com>
2019-05-22 21:41:43 -04:00
Miss Islington (bot) 367fe5757a
bpo-35091: Objects/listobject.c: Replace overflow checks in gallop fu… (GH-10202)
…nctions with asserts

The actual overflow can never happen because of the following:
* The size of a list can't be greater than PY_SSIZE_T_MAX / sizeof(PyObject*).
* The size of a pointer on all supported plaftorms is at least 4 bytes.
* ofs is positive and less than the list size at the beginning of each iteration.

https://bugs.python.org/issue35091
(cherry picked from commit 6bc5917903)

Co-authored-by: Alexey Izbyshev <izbyshev@ispras.ru>
2019-05-22 17:18:55 -07:00
Miss Islington (bot) b73c21c0be
bpo-33110: Catch errors raised when running add_done_callback on already completed futures (GH-13141)
Wrap the callback call within the `add_done_callback` function within concurrent.futures, in order to behave in an identical manner to callbacks added to a running future are triggered once it has completed.
(cherry picked from commit 2a3a2ece50)

Co-authored-by: Sam Martin <ABitMoreDepth@users.noreply.github.com>
2019-05-22 15:02:24 -07:00
Victor Stinner 34bab21559
bpo-35907, CVE-2019-9948: urllib rejects local_file:// scheme (GH-13474) (GH-13505)
CVE-2019-9948: Avoid file reading as disallowing the unnecessary URL
scheme in URLopener().open() and URLopener().retrieve()
of urllib.request.

Co-Authored-By: SH <push0ebp@gmail.com>
(cherry picked from commit 0c2b6a3943)
2019-05-22 23:28:28 +02:00
Jelle Zijlstra 81c5ec9e41 [3.7] bpo-33482: fix codecs.StreamRecoder.writelines (GH-6779) (GH-13502)
A very simple fix. I found this while writing typeshed stubs for StreamRecoder.

https://bugs.python.org/issue33482.
(cherry picked from commit b3be407288)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>





https://bugs.python.org/issue33482
2019-05-22 09:28:38 -07:00
Victor Stinner a58db9628d
bpo-36829: Enhance PyErr_WriteUnraisable() (GH-13487)
PyErr_WriteUnraisable() now displays the exception even if displaying
the traceback failed. Moreover, hold a strong reference to sys.stderr
while using it.

Document that an exception must be set when calling
PyErr_WriteUnraisable(), but don't add an assertion to check it at
runtime.

Cleanup: use longer names for variables and create
write_unraisable_exc_file() subfunction.
2019-05-22 18:23:28 +02:00
Jeroen Demeyer d092caf096 bpo-36907: fix refcount bug in _PyStack_UnpackDict() (GH-13381) (GH-13493) 2019-05-22 14:52:13 +02:00
Erik Janssens 791e5fcbab bpo-36965: Fix includes in main.c on Windows with non-MSC compilers (GH-13421) (GH-13471)
Include windows.h rather than crtdbg.h to get STATUS_CONTROL_C_EXIT constant.
Moreover, include windows.h on Windows, not only when MSC is used.

(cherry picked from commit 925af1d99b)
2019-05-22 13:04:06 +02:00