New submission from Edward Catmur:
foo.c:
#include Python.h
static PyMethodDef mth[] = { {NULL, NULL, 0, NULL} };
static struct PyModuleDef mod = { PyModuleDef_HEAD_INIT, foo, NULL, -1, mth };
PyMODINIT_FUNC PyInit_foo(void) { return PyModule_Create(mod); }
bar.c:
#include Python.h
static
Edward Catmur added the comment:
Report dlerror() if dlsym() fails.
The error output is now something like:
ImportError: /.../foo.cpython-34dm.so: undefined symbol: PyInit_bar
--
keywords: +patch
Added file: http://bugs.python.org/file32643/dynload_report_dlerror.patch
New submission from Edward Catmur:
There is a race condition in multiprocessing.Pool._terminate_pool that can
result in workers being restarted during shutdown (process shutdown or
pool.terminate()).
worker_handler._state = TERMINATE# race from here
task_handler
Edward Catmur added the comment:
Suggested patch:
https://bitbucket.org/ecatmur/cpython/compare/19096-multiprocessing-race..#diff
Move the worker_handler.join() to immediately after setting the worker handler
thread state to TERMINATE. This is a safe change as nothing in the moved-over
code
Edward Catmur added the comment:
Ćukasz, thanks. When the most-derived class virtual-inherits two related ABCs
U, V:
object
/ | \
A W V
| .` .`
B` U`
| .`
C`
The secondary `for` loop is necessary to ensure U and V are ordered correctly
New submission from Edward Catmur:
Suppose we have a class C with MRO (C, B, A, object). C virtual-inherits an
ABC V, while B virtual-inherits an unrelated ABC W:
object
/ | \
A W |
| .` /
B` V
| .`
C`
Recalling that per PEP 443
Edward Catmur added the comment:
Apologies, the linked repository is for the 2.x backport of singledispatch.
I'll replace it with a proper Python repo.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18244
Changes by Edward Catmur e...@catmur.co.uk:
--
keywords: +patch
Added file: http://bugs.python.org/file30623/singledispatch-mro-18244.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18244
Changes by Edward Catmur e...@catmur.co.uk:
--
type: - behavior
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18244
___
___
Python-bugs-list
Edward Catmur added the comment:
See attachment for patch and test. Note that reproducing the issue without
access to singledispatch internals depends on iteration order of a dict of
types and is thus intermittent/environment dependent
10 matches
Mail list logo