Serhiy Storchaka
520b7ae27e
bpo-17611. Move unwinding of stack for "pseudo exceptions" from interpreter to compiler. (GH-5006)
...
Co-authored-by: Mark Shannon <mark@hotpy.org >
Co-authored-by: Antoine Pitrou <antoine@python.org >
2018-02-22 23:33:30 +02:00
Serhiy Storchaka
4af8fd5614
bpo-32838: Fix Python versions in the table of magic numbers. ( #5658 )
2018-02-22 22:26:23 +02:00
Eric Snow
f53d9f2778
bpo-32604: Swap threads only if the interpreter is different. (gh-5778)
...
The CPython runtime assumes that there is a one-to-one relationship (for a given interpreter) between PyThreadState and OS threads. Sending and receiving on a channel in the same interpreter was causing crashes because of this (specifically due to a check in PyThreadState_Swap()). The solution is to not switch threads if the interpreter is the same.
2018-02-20 16:30:17 -07:00
Alexey Izbyshev
b3b4a9d300
bpo-32869: Fix incorrect dst buffer size for MultiByteToWideChar ( #5739 )
...
This function expects the destination buffer size to be given
in wide characters, not bytes.
2018-02-18 19:57:24 +02:00
Eric Snow
4c6955e2b0
bpo-32604: Clean up created subinterpreters before runtime finalization. (gh-5709)
2018-02-16 18:53:40 -07:00
Serhiy Storchaka
bfe4fd5f2e
Fix some warnings produced by different compilers. ( #5593 )
2018-02-09 17:31:26 +02:00
Alexey Izbyshev
c1e46e94de
bpo-32777: Fix _Py_set_inheritable async-safety in subprocess (GH-5560)
...
Fix a rare but potential pre-exec child process deadlock in subprocess on POSIX systems when marking file descriptors inheritable on exec in the child process. This bug appears to have been introduced in 3.4 with the inheritable file descriptors support.
This also changes Python/fileutils.c `set_inheritable` to use the "slow" two `fcntl` syscall path instead of the "fast" single `ioctl` syscall path when asked to be async signal safe (by way of being asked not to raise exceptions). `ioctl` is not a POSIX async-signal-safe approved function.
ref: http://pubs.opengroup.org/onlinepubs/9699919799/functions/V2_chap02.html
2018-02-05 22:09:34 -08:00
Serhiy Storchaka
07ca9afaa8
bpo-10544: Disallow "yield" in comprehensions and generator expressions. (GH-4564)
2018-02-04 10:53:48 +02:00
Leo Arias
c3d9508ff2
bpo-32746: Fix multiple typos (GH-5144)
...
Fix typos found by codespell in docs, docstrings, and comments.
2018-02-03 19:36:10 -05:00
Eric Snow
4e9da0d163
bpo-32604: Fix memory leaks in the new _xxsubinterpreters module. ( #5507 )
2018-02-02 21:49:49 -07:00
Barry Warsaw
bbbcf8693b
bpo-32303 - Consistency fixes for namespace loaders ( #5481 )
...
* Make sure ``__spec__.loader`` matches ``__loader__`` for namespace packages.
* Make sure ``__spec__.origin` matches ``__file__`` for namespace packages.
https://bugs.python.org/issue32303
https://bugs.python.org/issue32305
2018-02-02 15:15:58 -05:00
oldk
aa0735f597
bpo-32747: Remove trailing spaces in docstrings. (GH-5491)
2018-02-02 10:52:55 +02:00
oldk
461d225b19
bpo-32674: Improve the docstring for __import__ (GH-5339)
...
Clarify that the level argument is used to determine whether to
perform absolute or relative imports: 0 is absolute, while a positive number
is the number of parent directories to search relative to the current module.
2018-02-01 23:20:00 -05:00
Yury Selivanov
55e0839f26
bpo-32436: Fix compiler warning ( #5483 )
2018-02-01 22:24:56 -05:00
Dmitry Alimov
01a0cb8916
Fix typo in hamt.c comments ( #5478 )
2018-02-01 21:59:48 -05:00
Stéphane Wirtel
83ab995871
bpo-32711: Fix warnings for Python/ast_unparse.c ( #5426 )
...
* bpo-32711: Fix warnings for Python/ast_unparse.c
2018-02-01 17:59:27 +01:00
Eric Snow
7f8bfc9b9a
bpo-32604: Expose the subinterpreters C-API in a "private" stdlib module. (gh-1748)
...
The module is primarily intended for internal use in the test suite. Building the module under Windows will come in a follow-up PR.
2018-01-29 18:23:44 -07:00
Mark Shannon
332cd5ee4f
bpo-32550. Remove the STORE_ANNOTATION bytecode. (GH-5181)
2018-01-29 16:41:04 -08:00
Benjamin Peterson
c65ef772c3
rename _imp initialization function to follow conventions ( #5432 )
...
When the C imp module became _imp in 6f44d66bc4 , the initialization function should have been renamed from PyInit_imp to PyInit__imp.
2018-01-29 11:33:57 -08:00
Yury Selivanov
b647d7039d
bpo-32707: Fix warnings in hamt.c ( #5430 )
2018-01-29 13:31:37 -05:00
Victor Stinner
2914bb32e2
bpo-20891: Py_Initialize() now creates the GIL ( #4700 )
...
The GIL is no longer created "on demand" to fix a race condition when
PyGILState_Ensure() is called in a non-Python thread.
2018-01-29 11:57:45 +01:00
Xiang Zhang
997478eb79
bpo-32688: Make why the line is commented out clear (GH-5405)
2018-01-29 11:32:12 +08:00
Yury Selivanov
bc4123b0b3
bpo-32436: Use PyThreadState_GET() in all hot paths (GH-5363)
2018-01-27 13:24:20 -05:00
Yury Selivanov
226e50049d
bpo-32436: Make PyContextVar_Get a little bit faster ( #5350 )
...
Since context.c is compiled with Py_BUILD_CORE, using a macro
will result in a slightly more optimal code.
2018-01-26 17:24:52 -05:00
Yury Selivanov
43c47fe096
bpo-32670: Enforce PEP 479. ( #5327 )
2018-01-26 15:24:24 -05:00