classification
Title: Namespace pollution from multiprocessing
Type: Stage:
Components: Versions:
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: jnoller Nosy List: Rhamphoryncus, benjamin.peterson, jnoller, loewis, roudkerk (5)
Priority: low Keywords

Created on 2008-06-12 19:57 by Rhamphoryncus, last changed 2009-01-22 19:14 by jnoller.

Messages (4)
msg68078 - (view) Author: Adam Olsen (Rhamphoryncus) Date: 2008-06-12 19:57
All these in multiprocessing.h are lacking suitable py/_py/Py/_Py/PY/_PY
prefixes:

PyObject *mp_SetError(PyObject *Type, int num);
extern PyObject *pickle_dumps;
extern PyObject *pickle_loads;
extern PyObject *pickle_protocol;
extern PyObject *BufferTooShort;
extern PyTypeObject SemLockType;
extern PyTypeObject ConnectionType;
extern PyTypeObject PipeConnectionType;
extern HANDLE sigint_event;

Additionally, win32_functions.c exposes Win32Type and
create_win32_namespace.

semaphore.c has sem_timedwait_save.

multiprocessing.c has ProcessError.
msg68080 - (view) Author: Benjamin Peterson (benjamin.peterson) Date: 2008-06-12 20:18
Is this really that much of an issue? multiprocessing lives in it's own
directory and isn't part of the Python public API.
msg68110 - (view) Author: Adam Olsen (Rhamphoryncus) Date: 2008-06-13 00:15
The directory is irrelevant.  C typically uses a flat namespace for
symbols.  If python loads this library it will conflict with any other
libraries using the same name.  This has happened numerous times in the
past, so there's no questioning the correct practises.
msg68131 - (view) Author: Martin v. Löwis (loewis) Date: 2008-06-13 07:21
Alternatively, I think the _multiprocessing module should be rewritten
to use a single C file only, and make all symbols except its init
function static.

I agree with Adam that the current code needs to be fixed, one way or
the other.
History
Date User Action Args
2009-01-22 19:14:37jnollersetpriority: low
2009-01-21 02:27:00jnollersettitle: Namespace polution from multiprocessing -> Namespace pollution from multiprocessing
2009-01-19 16:43:35jnollersetassignee: jnoller
2008-06-13 07:21:26loewissetnosy: + loewis
messages: + msg68131
2008-06-13 00:15:20Rhamphoryncussetmessages: + msg68110
2008-06-12 20:18:07benjamin.petersonsetnosy: + benjamin.peterson
messages: + msg68080
2008-06-12 19:59:44jnollersetnosy: + roudkerk, jnoller
2008-06-12 19:57:39Rhamphoryncuscreate