Commit Graph

102888 Commits

Author SHA1 Message Date
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
Miss Islington (bot) aea49b1875
[3.7] bpo-36035: fix Path.rglob for broken links (GH-11988) (GH-13469)
Links creating an infinite symlink loop would raise an exception.
(cherry picked from commit d5c120f7eb)


Co-authored-by: Jörg Stucke <joerg.stucke@fkie.fraunhofer.de>


https://bugs.python.org/issue36035
2019-05-21 12:05:08 -07:00
Tal Einat 390d88e49c
[3.7] bpo-19376: Added doc mentioning `datetime.strptime()` without a year fails for Feb 29. (GH-10243)
(cherry picked from commit 56027ccd6b)

Co-authored-by: Abhishek Kumar Singh <toanant@users.noreply.github.com>
2019-05-21 22:03:58 +03:00
Miss Islington (bot) 6b48e658bf
bpo-36929: Modify io/re tests to allow for missing mod name (GH-13392)
* bpo-36929: Modify io/re tests to allow for missing mod name

For a vanishingly small number of internal types, CPython sets the
tp_name slot to mod_name.type_name, either in the PyTypeObject or the
PyType_Spec. There are a few minor places where this surfaces:

* Custom repr functions for those types (some of which ignore the
  tp_name in favor of using a string literal, such as _io.TextIOWrapper)
* Pickling error messages

The test suite only tests the former. This commit modifies the test
suite to allow Python implementations to omit the module prefix.

https://bugs.python.org/issue36929
(cherry picked from commit ccb7ca728e)

Co-authored-by: Max Bernstein <tekknolagi@users.noreply.github.com>
2019-05-21 10:51:56 -07:00
Miss Islington (bot) 3c9c2dc8dd
bpo-34144: Fix of venv acvtivate.bat for win 10 (GH-8321)
The script needs to be updated to support win 10/ 1803 chcp.com command (output has trailing dot)

https://bugs.python.org/issue34144
(cherry picked from commit 6955d44b41)

Co-authored-by: Lorenz Mende <Lorenz.mende@gmail.com>
2019-05-21 08:41:44 -07:00
Geoff Shannon cdb2dbfe92 [3.7] bpo-22865: Expand on documentation for the pty.spawn function (GH-11980) (GH-13455)
(cherry picked from commit 522ccef869)

Co-authored-by: Geoff Shannon <earthlingzephyr@gmail.com>
2019-05-21 11:36:57 +02:00
Miss Islington (bot) 50b3f205d8
bpo-36969: Make PDB args command display keyword only arguments (GH-13452)
(cherry picked from commit bf457c7d82)

Co-authored-by: Rémi Lapeyre <remi.lapeyre@henki.fr>
2019-05-20 15:34:23 -07:00
Miss Islington (bot) 3887932e10
bpo-35721: Close socket pair if Popen in _UnixSubprocessTransport fails (GH-11553)
This slightly expands an existing test case `test_popen_error` to trigger a `ResourceWarning` and fixes it.

https://bugs.python.org/issue35721
(cherry picked from commit 9932fd91e8)

Co-authored-by: Niklas Fiekas <niklas.fiekas@backscattering.de>
2019-05-20 05:35:56 -07:00
Miss Islington (bot) 2d94d4f1a5
bpo-36958: In IDLE, print exit message (GH-13435)
Print any argument other than None or int passed to SystemExit
or sys.exit().
(cherry picked from commit 6d965b39b7)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2019-05-20 00:16:53 -07:00
Miss Islington (bot) 64b0bdba7e
closes bpo-36951: Correct some types in the type_members struct in typeobject.c. (GH-13403)
(cherry picked from commit 53d378c812)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
2019-05-19 17:54:08 -07:00
Miss Islington (bot) 205c1f0e36 bpo-34580: Update sqlite3 examples to call close() explicitly (GH-9079)
The sqlite3.Connection object doesn't call its close() method when it's used
as a context manager.

(cherry picked from commit 287b84de93)

Co-authored-by: Xtreak <tir.karthi@gmail.com>
2019-05-20 01:36:32 +03:00