Victor Stinner
ef5aa9af7c
bpo-38858: Reorganize pycore_init_types() (GH-17265)
...
* Call _PyLong_Init() and _PyExc_Init() earlier
* new_interpreter() reuses pycore_init_types()
2019-11-20 00:38:03 +01:00
Brandt Bucher
ac2235432c
bpo-38823: Fix refleaks in faulthandler init error path on Windows (GH-17250)
2019-11-20 00:13:05 +01:00
Pablo Galindo
293dd23477
Remove binding of captured exceptions when not used to reduce the chances of creating cycles (GH-17246)
...
Capturing exceptions into names can lead to reference cycles though the __traceback__ attribute of the exceptions in some obscure cases that have been reported previously and fixed individually. As these variables are not used anyway, we can remove the binding to reduce the chances of creating reference cycles.
See for example GH-13135
2019-11-19 21:34:03 +00:00
Jake Tesler
c6b20be85c
bpo-38707: Fix for multiprocessing.Process MainThread.native_id (GH-17088)
...
This PR implements a fix for `multiprocessing.Process` objects; the error occurs when Processes are created using either `fork` or `forkserver` as the `start_method`.
In these instances, the `MainThread` of the newly created `Process` object retains all attributes from its parent's `MainThread` object, including the `native_id` attribute. The resulting behavior is such that the new process' `MainThread` captures an incorrect/outdated `native_id` (the parent's instead of its own).
This change forces the Process object to update its `native_id` attribute during the bootstrap process.
cc @vstinner
https://bugs.python.org/issue38707
Automerge-Triggered-By: @pitrou
2019-11-19 11:50:12 -08:00
Adam Johnson
892221bfa0
bpo-38839: Fix some unused functions in tests (GH-17189)
2019-11-19 11:45:20 -08:00
Brandt Bucher
54b32c9871
bpo-38823: Clean up refleak in fcntl module initialization. (GH-17236)
2019-11-19 11:16:29 -08:00
Vincent Michel
8e0de2a480
bpo-35409: Ignore GeneratorExit in async_gen_athrow_throw (GH-14755)
...
Ignore `GeneratorExit` exceptions when throwing an exception into the `aclose` coroutine of an asynchronous generator.
https://bugs.python.org/issue35409
2019-11-19 05:53:52 -08:00
Jules Lasne (jlasne)
f25875af42
Added missing coma after end of list in subprocess.rst (GH-17217)
...
Automerge-Triggered-By: @csabella
2019-11-19 04:14:53 -08:00
Jules Lasne (jlasne)
b1f160a236
Add missing comma and period in unittest docs (GH-17211)
...
Automerge-Triggered-By: @csabella
2019-11-19 04:05:45 -08:00
Batuhan Taşkaya
24555ce2f9
bpo-21767: explicitly mention abc support in functools.singledispatch docs ( #17171 )
2019-11-19 09:16:46 +01:00
Dong-hee Na
9960230f76
bpo-22367: Update test_fcntl.py for spawn process mode ( #17154 )
2019-11-19 09:12:42 +01:00
Brandt Bucher
79e18ec75d
Clean up module initialization. (GH-17215)
2019-11-18 23:16:23 -08:00
Tomás Farías
fe75b62575
bpo-38807: Add os.PathLike to exception message raised by _check_arg_types ( #17160 )
2019-11-18 21:54:00 -08:00
Pablo Galindo
02b8051a5e
Add @pablogsal to code owners file for the garbage collector (GH-17248)
...
Add myself to the codeowners file as I would like to
be automatically added as a reviewer for PRs that touch
that component and its documentation.
2019-11-19 02:03:55 +00:00
Pablo Galindo
b028f589dd
Minor fixes to the formatting of the notes of Modules/gcmodule.c (GH-17247)
2019-11-19 01:36:57 +00:00
Steve Dower
dcf1f83de8
bpo-38622: Ensure ctypes.PyObj_FromPtr audit event passes tuples as a single argument (GH-17243)
2019-11-18 13:30:01 -08:00
Steve Dower
00923c6399
bpo-38622: Add missing audit events for ctypes module (GH-17158)
2019-11-18 11:32:46 -08:00
Tal Einat
476e76f7cf
Revert "remove a strange non-ASCII character in _iomodule.c" (GH-17240)
...
This reverts commit bcc1cc5c
, which removed an intentionally placed
"form feed" character.
2019-11-18 21:19:51 +02:00
jsnklln
e243bae999
bpo-38722: Runpy use io.open_code() (GH-17234)
...
https://bugs.python.org/issue38722
Automerge-Triggered-By: @taleinat
2019-11-18 11:11:13 -08:00
Tal Einat
bcc1cc5cc3
remove a strange non-ASCII character in _iomodule.c (GH-17239)
2019-11-18 20:39:47 +02:00
Tal Einat
ee703cbb41
bpo-38809: Windows build scripts use python.exe from virtual envs (GH-17164)
...
https://bugs.python.org/issue38809
2019-11-18 09:32:25 -08:00
Victor Stinner
bc7d3aa6d7
bpo-38631: Avoid Py_FatalError() in _multibytecodec init (GH-17233)
...
If an exception is raised and PyInit__multibytecodec() returns NULL,
Python reports properly the exception to the user. There is no need
to crash Python with Py_FatalError().
2019-11-18 17:40:07 +01:00
Victor Stinner
04394df74b
bpo-38631: Avoid Py_FatalError() in float.__getformat__() (GH-17232)
...
Replace Py_FatalError() with a regular RuntimeError exception in
float.__getformat__().
2019-11-18 17:39:48 +01:00
Роман Донченко
f49f6baa6b
Correct the description of the 3.7 change in urllib.parse.quote (GH-17065)
...
`~` is now treated as an unreserved character (i.e. it doesn't get quoted), not a reserved one.
2019-11-18 07:30:53 -08:00
Brandt Bucher
289cf0fbf7
bpo-38823: Clean up refleaks in _tkinter initialization. (GH-17206)
...
https://bugs.python.org/issue38823
2019-11-18 06:52:36 -08:00
Vinay Sajip
5383956583
bpo-38830: Correct slot signature in Qt example. (GH-17220)
2019-11-18 12:03:22 +00:00
Victor Stinner
59c80889ff
Revert "bpo-38811: Check for presence of os.link method in pathlib. (GH-17170)" ( #17219 )
...
This reverts commit 111772fc27
.
2019-11-18 12:26:37 +01:00
Raymond Hettinger
04c79d6088
bpo-38678: Improve argparse example in tutorial (GH-17207)
2019-11-17 22:06:19 -08:00
alclarks
4544e78ec4
bpo-25866: Minor cleanups to "sequence" in docs (GH-17177)
2019-11-17 14:00:43 -08:00
Zackery Spytz
2bc343417a
bpo-36589: Fix the error handling in curses.update_lines_cols(). (GH-12766)
...
Return None instead of 1.
2019-11-17 19:10:13 +02:00
Toke Høiland-Jørgensen
111772fc27
bpo-38811: Check for presence of os.link method in pathlib. (GH-17170)
...
Fix also the Path.symplink() method implementation for the case when
symlinks are not supported.
2019-11-17 19:06:38 +02:00
Andrey Doroschenko
645005e947
bpo-38724: Implement subprocess.Popen.__repr__ (GH-17151)
2019-11-17 16:08:31 +02:00
Brandt Bucher
143a97f641
bpo-38823: Clean up refleaks in _contextvars initialization. (GH-17198)
...
https://bugs.python.org/issue38823
2019-11-16 15:57:32 -08:00
Brandt Bucher
c3f6bdc332
bpo-38823: Clean up refleaks in _asyncio initialization. (GH-17195)
...
https://bugs.python.org/issue38823
2019-11-16 14:26:54 -08:00
Jason (Perry) Taylor
d0acdfcf34
Fix typo in Lib/socketserver.py (GH-17024)
...
changed 'This is bad class design, but save some typing'
into 'This is bad class design, but saves some typing'.
2019-11-16 19:14:45 +01:00
Serhiy Storchaka
a0652328a2
bpo-28286: Deprecate opening GzipFile for writing implicitly. (GH-16417)
...
Always specify the mode argument for writing.
2019-11-16 18:56:57 +02:00
Serhiy Storchaka
bd44a7ead9
bpo-38650: Constify PyStructSequence_UnnamedField. (GH-17005)
...
Make it a constant and referring to a constant string.
2019-11-16 18:55:29 +02:00
Serhiy Storchaka
5fd5cb8d85
bpo-38639: Optimize floor(), ceil() and trunc() for floats. (GH-16991)
2019-11-16 18:00:57 +02:00
Victor Stinner
51edf8aaa2
bpo-38644: Cleanup ceval.h (GH-17185)
...
Move CPython API (Py_LIMITED_API macro not defined) from ceval.h
to cpython/ceval.h
2019-11-16 01:04:44 +01:00
Steve Dower
7c6130c8c3
bpo-38453: Ensure correct short path is obtained for test (GH-17184)
2019-11-15 16:04:00 -08:00
Victor Stinner
b5e170f127
bpo-38644: Add _PyEval_EvalCode() (GH-17183)
...
_PyFunction_Vectorcall() now pass tstate to function calls.
2019-11-16 01:03:22 +01:00
Jules Lasne (jlasne)
0fe0b88d6e
Updated missing periods in cmdline.rst (GH-17173)
2019-11-15 23:18:17 +01:00
HongWeipeng
84f2528d48
Fix the description of isdatadescriptor in inspect.rst ( #16645 )
2019-11-15 23:47:26 +02:00
Eric Snow
73cdb0c6b2
bpo-38816: Add notes in the C-API docs about fork in subinterpreters. (GH-17176)
...
The C-API docs are a bit sparse on the interplay between C `fork()` and the CPython runtime. This change adds some more information on the subject.
https://bugs.python.org/issue38816
2019-11-15 13:28:54 -08:00
Steve Dower
abde52cd8e
bpo-38453: Ensure ntpath.realpath correctly resolves relative paths (GH-16967)
...
Ensure isabs() is always True for \\?\ prefixed paths
Avoid unnecessary usage of readlink() to avoid resolving broken links incorrectly
Ensure shutil tests run in test directory
2019-11-15 09:49:21 -08:00
Phil Connell
b22030073b
bpo-38778: Document that os.fork is not allowed in subinterpreters (GH-17123)
...
Small docs update for [bpo-34651](https://bugs.python.org/issue34651 ).
Other references to fork (e.g. the PyOS.*Fork functions or discussions of fork() when embedding Python) point back to os.fork, so I don't think any other updates are needed.
https://bugs.python.org/issue38778
Automerge-Triggered-By: @ericsnowcurrently
2019-11-15 08:56:03 -08:00
Andrey Doroschenko
e8acc865a3
bpo-38351: Modernize email examples from %-formatting to f-strings (GH-17162)
2019-11-15 11:03:46 +02:00
Marco Paolini
b44ffc8b40
bpo-38677: Fix arraymodule error handling in module initialization. (GH-17039)
2019-11-15 10:42:51 +02:00
Brandt Bucher
57d3ab85a4
Add .pytest_cache to .gitignore (GH-16595)
2019-11-15 10:22:41 +02:00
Kyle Stanley
3f8cebd32c
bpo-38692: Add asyncio.PidfdChildWatcher to __all__ (GH-17161)
...
/cc @asvetlov @1st1
https://bugs.python.org/issue38692
Automerge-Triggered-By: @benjaminp
2019-11-14 18:47:56 -08:00