Issue 3093: Namespace pollution from multiprocessing (original) (raw)

Created on 2008-06-12 19:57 by Rhamphoryncus, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (5)
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) * (Python committer) 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) * (Python committer) 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.
msg192661 - (view) Author: Christian Heimes (christian.heimes) * (Python committer) Date: 2013-07-08 15:32
Python 3.4 no longer exports symbols without a Py or _Py prefix: $ nm -p build/lib.linux-x86_64-3.4-pydebug/_multiprocessing.cpython-34dm.so | sed -n "/ [TDB] /s/.* //p" sort __bss_start _edata _end _fini _init PyInit__multiprocessing _PyMp_SemLockType _PyMp_SetError Python 3.3 still does but I don't like to modify the ABI in a patch release. $ nm -p build/lib.linux-x86_64-3.3-pydebug/_multiprocessing.cpython-33dm.so sed -n "/ [TDB] /s/.* //p" sort __bss_start BufferTooShort _edata _end _fini _init mp_SetError ProcessError PyInit__multiprocessing SemLockType
History
Date User Action Args
2022-04-11 14:56:35 admin set github: 47343
2013-07-08 15:32:48 christian.heimes set status: open -> closednosy: + christian.heimesmessages: + resolution: fixed
2010-08-31 11:01:57 asksol set nosy: + asksolstage: needs patch
2009-01-22 19:14:37 jnoller set priority: low
2009-01-21 02:27:00 jnoller set title: Namespace polution from multiprocessing -> Namespace pollution from multiprocessing
2009-01-19 16:43:35 jnoller set assignee: jnoller
2008-06-13 07:21:26 loewis set nosy: + loewismessages: +
2008-06-13 00:15:20 Rhamphoryncus set messages: +
2008-06-12 20🔞07 benjamin.peterson set nosy: + benjamin.petersonmessages: +
2008-06-12 19:59:44 jnoller set nosy: + roudkerk, jnoller
2008-06-12 19:57:39 Rhamphoryncus create