[issue9972] PyGILState_XXX missing in Python builds without threads

2010-09-28 Thread Lisandro Dalcin
New submission from Lisandro Dalcin : I've built Python-2.6.5 form with this : $ ./configure --without-threads --prefix=$HOME/python-without-threads $ make && make install $ cd ~/python-without-threads/lib $ nm libpython2.6.so | grep PyGILState $ At Include/pystate.h, PyGIL

[issue3639] segfaults calling warnings.warn() with non-string message

2008-08-21 Thread Lisandro Dalcin
New submission from Lisandro Dalcin <[EMAIL PROTECTED]>: from warnings import warn warn("hello world") # -> Success warn(UserWarning) # -> Segmentation fault warn(None) # -> Segmentation fault warn(1) # -> Segmentation fault --

[issue5175] negative PyLong -> C unsigned integral, TypeError or OverflowError?

2009-02-06 Thread Lisandro Dalcin
New submission from Lisandro Dalcin : At Objects/longobject.c, in almost all cases OverflowError is raised when a unsigned integral is requested from a negative PyLong. However, this one breaks the rules: int _PyLong_AsByteArray(PyLongObject* v, unsigned char* bytes, size_t n

[issue5175] negative PyLong -> C unsigned integral, TypeError or OverflowError?

2009-02-08 Thread Lisandro Dalcin
Lisandro Dalcin added the comment: I can contribute a patch. However, I would like to wait until Tim comments on this. ___ Python tracker <http://bugs.python.org/issue5

[issue5175] negative PyLong -> C unsigned integral, TypeError or OverflowError?

2009-02-10 Thread Lisandro Dalcin
Lisandro Dalcin added the comment: Mark, here you have a patch. I've only 'make test' on a 32bit Linux box Just two comments: - in docs: perhaps the 'versionchanged' stuff should be added. - in tests: I did not touch Modules/_testcapimodule.c, as it seems the test

[issue5175] negative PyLong -> C unsigned integral, TypeError or OverflowError?

2009-02-10 Thread Lisandro Dalcin
Lisandro Dalcin added the comment: It worked for me. BTW, 'make test' did not noticed the change in Modules/testcapi_long.h, which is #include'd by Modules/_testcapimodule.c. I've attached a trivial patch for setup.py fixing the dependency issue. Added file: http://bugs.

[issue5248] Adding T_SIZET to structmember.h

2009-02-13 Thread Lisandro Dalcin
New submission from Lisandro Dalcin : structmember.h lacks a 'T_SIZET' define in order to properly support struct fields of type 'size_t' within PyMemberDef. If this feature request is accepted, I can provide the patches. For 2.7, It would be nice to do: #de

[issue5248] Adding T_SIZET to structmember.h

2009-02-13 Thread Lisandro Dalcin
Lisandro Dalcin added the comment: In 2.6 and 3.0, we already have 'Py_ssize_t', see 'T_PYSSIZET' definition on Include/structmember.h. I'm asking for 'size_t' support. ___ Python tracker

[issue5630] Update CObject API so it is safe and regular

2009-03-31 Thread Lisandro Dalcin
Lisandro Dalcin added the comment: Two questions: 1) Why do you prefer to pass destructor as a first argument? 2) Do we really need two different calls for providing a context pointer? Why no just one call and pass a NULL context? A comment: Suppose one wants to implement export/import

[issue5630] Create alternative CObject API that is safe and clean

2009-05-04 Thread Lisandro Dalcin
Lisandro Dalcin added the comment: In Doc/c-api/capsule.rst, you wrote .. cfunction:: int PyCapsule_Import(const char* name, int no_block) but it should be: .. cfunction:: void* PyCapsule_Import(const char* name, int no_block) Additionally, you wrote "disambugate" in m

[issue6195] Serious regression in doctest in Py3.1rc1

2009-06-04 Thread Lisandro Dalcin
New submission from Lisandro Dalcin : When doctests are written in docstrings from C extension modules, 'doctest' reads the binary extension module file. The attached one-line patch seems to fix the problem, it is in fact very similar to patch for issue4050 related t

[issue6195] Serious regression in doctest in Py3.1rc1

2009-06-09 Thread Lisandro Dalcin
Lisandro Dalcin added the comment: I've tested latest David's patch against Cython test suite (doctests living in extension modules), and all is working as expected. -- ___ Python tracker <http://bugs.python.