bpo-31185: Fixed miscellaneous errors in asyncio speedup module.#3076
Merged
serhiy-storchaka merged 1 commit intopython:masterfrom Sep 3, 2017
Merged
Conversation
methane
reviewed
Aug 17, 2017
| func = _PyObject_GetAttrId(task->task_loop, &PyId_call_exception_handler); | ||
| if (func != NULL) { | ||
| res = PyObject_CallFunctionObjArgs(func, context, NULL); | ||
| PyObject *res = PyObject_CallFunctionObjArgs(func, context, NULL); |
Member
There was a problem hiding this comment.
(nits) While method calling API with PyID is not exported by DLL, static variable can be used.
static PyObject *call_exception_handler = NULL;
if (!call_exception_handler) {
call_exception_handler = PyUnicode_InternFromString("call_exception_handler");
if (!call_exception_handler) {
goto finally;
}
}
PyObject *res = PyObject_CallMethodObjArgs(task->task_loop, call_exception_handler, context, NULL);
This may be able to avoid creating temporary unbound method object.
Member
Author
There was a problem hiding this comment.
This would change the semantic. Currently if the "call_exception_handler" method is not defined the code does nothing. PyObject_CallMethodObjArgs() would raise an error.
methane
reviewed
Aug 17, 2017
| Py_DECREF(ot); | ||
| PyErr_Restore(et, ev, tb); | ||
| Py_XDECREF(ot); | ||
| _PyErr_ChainExceptions(et, ev, tb); |
Member
There was a problem hiding this comment.
I'm surprised this API is usable from extension module while python3.def doesn't include this.
Maybe, I don't understand what APIs can be used from extension on Windows...
methane
approved these changes
Aug 17, 2017
serhiy-storchaka
added a commit
to serhiy-storchaka/cpython
that referenced
this pull request
Sep 3, 2017
serhiy-storchaka
added a commit
that referenced
this pull request
Sep 3, 2017
jimmylai
pushed a commit
to jimmylai/cpython
that referenced
this pull request
Sep 4, 2017
* 'master' of https://github.com/python/cpython: (601 commits) remove check for bug last seem in Solaris 9 (python#3285) Change code owners for hashlib and ssl to the crypto team (python#3284) bpo-31281: Fix pathlib.Path incompatibility in fileinput (pythongh-3208) remove autoconf check for select() (python#3283) remove configure check for 'volatile' (python#3281) Add missing _sha3 module to Setup.dist (python#2395) bpo-12383: Also ignore __PYVENV_LAUNCHER__ (python#3278) bpo-9146: add the missing NEWS entry. (python#3275) Fix a c.f.as_completed() refleak previously introduced in bpo-27144 (python#3270) bpo-31185: Fixed miscellaneous errors in asyncio speedup module. (python#3076) remove a redundant lower in urllib.parse.urlsplit (python#3008) bpo-31323: Fix reference leak in test_ssl (python#3263) bpo-31250, test_asyncio: fix EventLoopTestsMixin.tearDown() (python#3264) bpo-31326: ProcessPoolExecutor waits for the call queue thread (python#3265) bpo-27144: concurrent.futures as_complete and map iterators do not keep reference to returned object (python#1560) bpo-31250, test_asyncio: fix dangling threads (python#3252) bpo-31217: Fix regrtest -R for small integer (python#3260) bpo-30096: Use ABC in abc reference examples (python#1220) bpo-30737: Update DevGuide links to new URL (pythonGH-3228) [Trivial] Remove now redundant assert (python#3245) ...
GadgetSteve
pushed a commit
to GadgetSteve/cpython
that referenced
this pull request
Sep 10, 2017
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
https://bugs.python.org/issue31185