| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
| |
(GH-2712). (#2727)
(cherry picked from commit 49f6449ef4b81537c19b82329caaf60596c516c2)
|
|
|
|
|
|
| |
(GH-2634) (#2656)
called with bytes-like argument..
(cherry picked from commit 1180e5a51871fa53ca6892e83fd2e69dc2600447)
|
|
|
|
|
| |
Handle getattr(copy, 'deepcopy') error in _elementtree module
initialization.
(cherry picked from commit b136f11f3a51f9282ae992bac68f170ca5563b55)
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If history-length is set in .inputrc, and the history file is double the
history size (or more), history_get(N) returns NULL, and python
segfaults. Fix that by checking for NULL return value.
It seems that the root cause is incorrect handling of bigger history in
readline, but Python should not segfault even if readline returns
unexpected value.
This issue affects only GNU readline. When using libedit emulation
system history size option does not work.
|
| |
|
|
|
|
|
| |
`asyncio.CFuture.remove_done_callback() (GH-2569) (#2590)
(cherry picked from commit 833a3b0d3707200daeaccdd218e8f18a190284aa)
|
|
|
|
|
| |
socket.close() was modified in Python 3.6 to raise OSError on
failure: see bpo-26685.
(cherry picked from commit 67e1478dba6efe60b8e1890192014b8b06dd6bd9)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* [3.6] bpo-30703: Improve signal delivery (GH-2415)
* Improve signal delivery
Avoid using Py_AddPendingCall from signal handler, to avoid calling signal-unsafe functions.
* Remove unused function
* Improve comments
* Add stress test
* Adapt for --without-threads
* Add second stress test
* Add NEWS blurb
* Address comments @haypo.
(cherry picked from commit c08177a1ccad2ed0d50898c2731b518c631aed14)
* bpo-30796: Fix failures in signal delivery stress test (#2488)
* bpo-30796: Fix failures in signal delivery stress test
setitimer() can have a poor minimum resolution on some machines,
this would make the test reach its deadline (and a stray signal
could then kill a subsequent test).
* Make sure to clear the itimer after the test
|
|
|
|
|
|
|
|
| |
(GH-2493) (#2497)
* bpo-30807: signal.setitimer() may disable the timer by mistake
* Add NEWS blurb
(cherry picked from commit 729780a810bbcb12b245a1b652302a601fc9f6fd)
|
|
|
|
| |
Fix memory leak when _winconsoleio tries to open a non-console file:
free the name buffer.
|
|
|
|
|
|
| |
When os.spawnv() fails while handling arguments, free correctly
argvlist: pass lastarg+1 rather than lastarg to free_string_array()
to also free the first item.
(cherry picked from commit 8acb4cf2b3436652568d7a70228b166316181466)
|
|
|
|
|
|
|
|
|
|
| |
(GH-2302) (#2462)
Based on patch by Victor Stinner.
Add private C API function _PyUnicode_AsUnicode() which is similar to
PyUnicode_AsUnicode(), but checks for null characters..
(cherry picked from commit f7eae0adfcd4c50034281b2c69f461b43b68db84)
|
|
|
|
|
|
|
| |
(GH-2285) (#2443)
Raise a ValueError if the second argument is NULL and the wchar_t\*
string contains null characters..
(cherry picked from commit e613e6add5f07ff6aad5802924596b631b707d2a)
|
|
|
|
|
|
|
|
| |
New error condition paths were introduced, which did not decrement
`key2` and `val2` objects. Therefore, decrement references before
jumping to the error label.
Signed-off-by: Eric N. Vander Weele <ericvw@gmail.com>
(cherry picked from commit a7874c73c0c729bbec2fd4b077bd0eec276cfff4)
|
|
|
|
|
|
|
| |
(GH-2382) (#2391)
in `os.putenv()` and `os.spawn*()`..
(cherry picked from commit 77703942c5997dff00c48f10df1b29b11645624c)
|
|
|
|
|
| |
(#2378)
(cherry picked from commit 0ee32c1)
|
|
|
|
|
|
| |
Windows. (GH-2325) (#2360)
Prevent passing other invalid environment variables and command arguments..
(cherry picked from commit d174d24a5d37d1516b885dc7c82f71ecd5930700)
|
|
|
|
|
| |
Fix a regression introduced by myself in the commit
526b22657cb18fe79118c2ea68511aca09430c2c.
(cherry picked from commit c8d6ab2e25ff212702d387e516e258b1d8c52910)
|
|
|
|
| |
New file: Modules/expat/siphash.h.
(cherry picked from commit 5ff7132313eb651107b179d20218dfe5d4e47f13)
|
|
|
|
|
| |
(#2215)
(cherry picked from commit 0d32218)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* bpo-29591: Upgrade Modules/expat to libexpat 2.2
* bpo-29591: Restore Python changes on expat
* bpo-29591: Remove expat config of unsupported platforms
Remove the configuration (Modules/expat/*config.h) of unsupported
platforms:
* Amiga
* MacOS Classic on PPC32
* Open Watcom
* bpo-29591: Remove useless XML_HAS_SET_HASH_SALT
The XML_HAS_SET_HASH_SALT define of Modules/expat/expat.h became
useless since our local expat copy was upgrade to expat 2.1 (it's now
expat 2.2.0).
(cherry picked from commit 23ec4b57e1359f9c539b8defc317542173ae087e)
|
|
|
|
|
|
| |
(#2121)
The traceback no longer displayed for SystemExit raised in a callback registered by atexit..
(cherry picked from commit 3fd54d4a7e604067e2bc0f8cfd58bdbdc09fa7f4)
|
|
|
|
| |
(#2109)
|
|
|
| |
Also updates checked-in line endings on some files
|
|
|
|
| |
(cherry picked from commit 5f31d5cf6efa8c304d352e34f9f2a1ed0074298e)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before, it was possible to get the following sequence of
events (especially on Windows, where the C-level signal handler for
SIGINT is run in a separate thread):
- SIGINT arrives
- trip_signal is called
- trip_signal writes to the wakeup fd
- the main thread wakes up from select()-or-equivalent
- the main thread checks for pending signals, but doesn't see any
- the main thread drains the wakeup fd
- the main thread goes back to sleep
- trip_signal sets is_tripped=1 and calls Py_AddPendingCall to notify
the main thread the it should run the Python-level signal handler
- the main thread doesn't notice because it's asleep
This has been causing repeated failures in the Trio test suite:
https://github.com/python-trio/trio/issues/119
(cherry picked from commit 4ae01496971624c75080431806ed1c08e00f22c7)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(GH-1081) (#1640)
If we have a chain of generators/coroutines that are 'yield from'ing
each other, then resuming the stack works like:
- call send() on the outermost generator
- this enters _PyEval_EvalFrameDefault, which re-executes the
YIELD_FROM opcode
- which calls send() on the next generator
- which enters _PyEval_EvalFrameDefault, which re-executes the
YIELD_FROM opcode
- ...etc.
However, every time we enter _PyEval_EvalFrameDefault, the first thing
we do is to check for pending signals, and if there are any then we
run the signal handler. And if it raises an exception, then we
immediately propagate that exception *instead* of starting to execute
bytecode. This means that e.g. a SIGINT at the wrong moment can "break
the chain" – it can be raised in the middle of our yield from chain,
with the bottom part of the stack abandoned for the garbage collector.
The fix is pretty simple: there's already a special case in
_PyEval_EvalFrameEx where it skips running signal handlers if the next
opcode is SETUP_FINALLY. (I don't see how this accomplishes anything
useful, but that's another story.) If we extend this check to also
skip running signal handlers when the next opcode is YIELD_FROM, then
that closes the hole – now the exception can only be raised at the
innermost stack frame.
This shouldn't have any performance implications, because the opcode
check happens inside the "slow path" after we've already determined
that there's a pending signal or something similar for us to process;
the vast majority of the time this isn't true and the new check
doesn't run at all..
(cherry picked from commit ab4413a7e9bda95b6fcd517073e2a51dafaa1624)
|
|
|
|
|
|
|
|
| |
Test C functions:
* _PyObject_FastCall()
* _PyObject_FastCallDict()
* _PyObject_FastCallKeywords()
(cherry picked from commit 3b5cf85edc188345668f987c824a2acb338a7816)
|
|
|
|
|
|
| |
* RFC 1750 has been been obsoleted by RFC 4086.
* RFC 3280 has been obsoleted by RFC 5280.
* RFC 4366 has been obsoleted by RFC 6066.
(cherry picked from commit 63c2c8ac17750ba2be2cfc4e339cae1f4edee54f)
|
|
|
|
|
|
| |
Fix a reference leak in _io._WindowsConsoleIO: PyUnicode_FSDecoder()
always initialize decodedname when it succeed and it doesn't clear
input decodedname object.
(cherry picked from commit 29adc13bd797d9c9e7fcb893a7c49ce7f7ad388c)
|
|
|
|
| |
If pass a server_hostname= that fails IDNA decoding to SSLContext.wrap_socket or SSLContext.wrap_bio, then the SSLContext object had a spurious Py_DECREF called on it, eventually leading to segfaults.
(cherry picked from commit 65ece7ca2366308fa91a39a8dfa255e6bdce3cca)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
… (#1960)
* bpo-30557: faulthandler now correctly filters and displays exception codes on Windows (#1924)
* bpo-30557: faulthandler now correctly filters and displays exception codes on Windows
* Adds test for non-fatal exceptions.
* Adds bpo number to comment.
* bpo-30557: Fix test_faulthandler (#1969)
On Windows 8, 8.1 and 10 at least, the exit code is the exception
code (no bit is cleared).
|
|
|
|
|
|
|
| |
WriteConsoleW fails (#1912) (#1925)
* bpo-30544: _io._WindowsConsoleIO.write raises the wrong error when WriteConsoleW fails
* bpo-30544: _io._WindowsConsoleIO.write raises the wrong error when WriteConsoleW fails
|
|
|
| |
(cherry picked from commit 9616a82e7802241a4b74cf7ae38d43c37bf66e48)
|
| |
|
|
|
|
|
|
|
|
| |
timegm() return type is time_t, not int. Use time_t to prevent the
following compiler warning on Windows:
timemodule.c: warning C4244: '=': conversion from 'time_t' to 'int',
possible loss of data
(cherry picked from commit 0d659e5614cad512a1940125135b443b3eecb5d7)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
when there are no more `await` or `yield (from)` before return in coroutine,
cancel was ignored.
example:
async def coro():
asyncio.Task.current_task().cancel()
return 42
...
res = await coro() # should raise CancelledError
(cherry picked from commit 991adca012f5e106c2d4040ce619c696ba6f9c46)
|
|
|
| |
When decoding a 4-byte GB18030 sequence, the first and third byte cannot exceed 0xFE.
|
|
|
|
|
|
| |
It was possible to get a core dump by using uninitialized
_json objects. Now __new__ methods create initialized objects.
__init__ methods are removed..
(cherry picked from commit 76a3e51a403bc84ed536921866c86dd7d07aaa7e)
|
|
|
|
|
| |
(GH-1316). (#1441)
(cherry picked from commit 5f161fd86dd5bb936a1a2a13391b13b7e59ec201)
|
| |
|
|
|
|
| |
On Windows, faulthandler.disable() now removes the exception handler
installed by faulthandler.enable().
|
|
|
|
|
| |
(GH-1110) (#1186)
(cherry picked from commit 66bffd1)
|
|
|
|
|
| |
module. (GH-1131). (#1184)
(cherry picked from commit a79f4c219531c05fc8f670c1e4bbf12c081935d3)
|
|
|
|
|
|
|
| |
(#1096) (#1180)
raised an error.
(cherry picked from commit bf623ae8843dc30b28c574bec8d29fc14be59d86)
|
|
|
|
| |
present (#1130) (#1150)
|
|
|
|
|
|
|
|
|
| |
* Remove conditional on free of `dps`, since `dps` is now allocated for
all versions of OpenSSL
* Remove call to `x509_check_ca` since it was only used to cache
the `crldp` field of the certificate
CRL_DIST_POINTS_free is available in all supported versions of OpenSSL
(recent 0.9.8+) and LibreSSL.
(cherry picked from commit 2849cc34a8db93d448a62d69c462402347b50dcb)
|
| |
|
|
|
| |
(cherry picked from commit b879fe82e7e5c3f7673c9a7fa4aad42bd05445d8)
|