[issue16779] Fix compiler warning when building extension modules on 64-bit Windows

2014-10-14 Thread Stefan Krah
Changes by Stefan Krah : -- nosy: -skrah ___ Python tracker <http://bugs.python.org/issue16779> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue19412] Add docs for test.support.requires_docstrings decorator

2014-10-14 Thread Stefan Krah
Changes by Stefan Krah : -- nosy: -skrah ___ Python tracker <http://bugs.python.org/issue19412> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue9246] os.getcwd() hardcodes max path len

2014-10-14 Thread Stefan Krah
Changes by Stefan Krah : -- nosy: -skrah ___ Python tracker <http://bugs.python.org/issue9246> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue18842] Add float.is_finite is_nan is_infinite to match Decimal methods

2014-10-14 Thread Stefan Krah
Changes by Stefan Krah : -- nosy: -skrah ___ Python tracker <http://bugs.python.org/issue18842> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue19904] Add 128-bit integer support to struct

2014-10-14 Thread Stefan Krah
Changes by Stefan Krah : -- nosy: -skrah ___ Python tracker <http://bugs.python.org/issue19904> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue3367] Uninitialized value read in parsetok.c

2014-10-14 Thread Stefan Krah
Changes by Stefan Krah : -- nosy: -skrah ___ Python tracker <http://bugs.python.org/issue3367> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue21368] Check for systemd locale on startup if current locale is set to POSIX

2014-10-14 Thread Stefan Krah
Changes by Stefan Krah : -- nosy: -skrah ___ Python tracker <http://bugs.python.org/issue21368> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue19298] Use __attribute__(cleanup ...) to detect refleaks

2014-10-14 Thread Stefan Krah
Changes by Stefan Krah : -- nosy: -skrah ___ Python tracker <http://bugs.python.org/issue19298> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue6083] Reference counting bug in PyArg_ParseTuple and PyArg_ParseTupleAndKeywords

2014-10-14 Thread Stefan Krah
Changes by Stefan Krah : -- nosy: -skrah ___ Python tracker <http://bugs.python.org/issue6083> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue21510] fma documentation should provide better example.

2014-10-14 Thread Stefan Krah
Stefan Krah added the comment: I have no strong opinion, except that the docs appear clear: "Return self*other+third with no rounding of the intermediate product self*other." -- ___ Python tracker <http://bugs.python.o

[issue13797] Allow objects implemented in pure Python to export PEP 3118 buffers

2014-10-14 Thread Stefan Krah
Changes by Stefan Krah : -- nosy: -skrah ___ Python tracker <http://bugs.python.org/issue13797> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue17247] int and float should detect inconsistent format strings

2014-10-14 Thread Stefan Krah
Changes by Stefan Krah : -- nosy: -skrah ___ Python tracker <http://bugs.python.org/issue17247> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue1820] Enhance Object/structseq.c to match namedtuple and tuple api

2014-10-14 Thread Stefan Krah
Changes by Stefan Krah : -- nosy: -skrah ___ Python tracker <http://bugs.python.org/issue1820> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue10746] ctypes c_long & c_bool have incorrect PEP-3118 type codes

2014-10-14 Thread Stefan Krah
Changes by Stefan Krah : -- nosy: -skrah ___ Python tracker <http://bugs.python.org/issue10746> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue3132] implement PEP 3118 struct changes

2014-10-14 Thread Stefan Krah
Changes by Stefan Krah : -- nosy: -skrah ___ Python tracker <http://bugs.python.org/issue3132> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue18340] float related test has problem with Denormal Flush to Zero compiler options

2014-10-14 Thread Stefan Krah
Changes by Stefan Krah : -- nosy: -skrah ___ Python tracker <http://bugs.python.org/issue18340> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue19666] Format string for ASCII unicode or bytes-like object as readonly buffer

2014-10-14 Thread Stefan Krah
Changes by Stefan Krah : -- nosy: -skrah ___ Python tracker <http://bugs.python.org/issue19666> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue17611] Move unwinding of stack for "pseudo exceptions" from interpreter to compiler.

2014-10-14 Thread Stefan Krah
Changes by Stefan Krah : -- nosy: -skrah ___ Python tracker <http://bugs.python.org/issue17611> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue21929] Rounding properly

2014-10-14 Thread Stefan Krah
Changes by Stefan Krah : -- nosy: -skrah ___ Python tracker <http://bugs.python.org/issue21929> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue16535] json encoder unable to handle decimal

2014-10-14 Thread Stefan Krah
Changes by Stefan Krah : -- nosy: -skrah ___ Python tracker <http://bugs.python.org/issue16535> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue15722] PEP 3121, 384 Refactoring applied to decimal module

2014-10-14 Thread Stefan Krah
Stefan Krah added the comment: I would like to reject this until either the performance problems are solved or someone actually uses _decimal in multiple interpreters. If you do, you get tons of warnings about libmpdec being reinitialized, so I suspect no one has ever done that in Python 3.3

[issue12851] ctypes: getbuffer() never provides strides

2014-10-14 Thread Stefan Krah
Changes by Stefan Krah : -- assignee: skrah -> nosy: -skrah ___ Python tracker <http://bugs.python.org/issue12851> ___ ___ Python-bugs-list mailing list Un

[issue9116] test_capi.test_no_FatalError_infinite_loop crash on Windows

2014-10-14 Thread Stefan Krah
Changes by Stefan Krah : -- nosy: -skrah ___ Python tracker <http://bugs.python.org/issue9116> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue7442] _localemodule.c: str2uni() with different LC_NUMERIC and LC_CTYPE

2014-10-14 Thread Stefan Krah
Stefan Krah added the comment: Well, I originally opened this issue but personally I'm not that bothered by it any more. Victor, do you want to keep it open? -- versions: +Python 3.2 -Python 3.3, Python 3.4 ___ Python tracker

[issue10803] ctypes: better support of bytearray objects

2014-10-14 Thread Stefan Krah
Changes by Stefan Krah : -- nosy: -skrah ___ Python tracker <http://bugs.python.org/issue10803> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue1621] Do not assume signed integer overflow behavior

2014-10-14 Thread Stefan Krah
Changes by Stefan Krah : -- nosy: -skrah ___ Python tracker <http://bugs.python.org/issue1621> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue19577] memoryview bind (the opposite of release)

2014-10-14 Thread Stefan Krah
Changes by Stefan Krah : -- nosy: -skrah ___ Python tracker <http://bugs.python.org/issue19577> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue22113] memoryview and struct.pack_into

2014-10-14 Thread Stefan Krah
Changes by Stefan Krah : -- nosy: -skrah ___ Python tracker <http://bugs.python.org/issue22113> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue21855] Fix decimal in unicodeless build

2014-10-14 Thread Stefan Krah
Stefan Krah added the comment: LGTM, too. -- ___ Python tracker <http://bugs.python.org/issue21855> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue21833] Fix unicodeless build of Python

2014-10-14 Thread Stefan Krah
Changes by Stefan Krah : -- nosy: -skrah ___ Python tracker <http://bugs.python.org/issue21833> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue14130] memoryview: add multi-dimensional indexing and slicing

2014-10-14 Thread Stefan Krah
Changes by Stefan Krah : -- assignee: skrah -> ___ Python tracker <http://bugs.python.org/issue14130> ___ ___ Python-bugs-list mailing list Unsubscrib

[issue10977] Concrete object C API considered harmful to subclasses of builtin types

2014-10-14 Thread Stefan Krah
Changes by Stefan Krah : -- nosy: -skrah ___ Python tracker <http://bugs.python.org/issue10977> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue15381] Optimize BytesIO to do less reallocations when written, similarly to StringIO

2014-10-14 Thread Stefan Krah
Changes by Stefan Krah : -- nosy: -skrah ___ Python tracker <http://bugs.python.org/issue15381> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue15903] Make rawiobase_read() read directly to bytes object

2014-10-14 Thread Stefan Krah
Changes by Stefan Krah : -- nosy: -skrah ___ Python tracker <http://bugs.python.org/issue15903> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue15994] memoryview to freed memory can cause segfault

2014-10-14 Thread Stefan Krah
Changes by Stefan Krah : -- nosy: -skrah ___ Python tracker <http://bugs.python.org/issue15994> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue17884] Try to reuse stdint.h types like int32_t

2014-10-14 Thread Stefan Krah
Changes by Stefan Krah : -- nosy: -skrah ___ Python tracker <http://bugs.python.org/issue17884> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue15993] Windows: 3.3.0-rc2.msi: test_buffer fails

2014-10-14 Thread Stefan Krah
Changes by Stefan Krah : -- nosy: -skrah ___ Python tracker <http://bugs.python.org/issue15993> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue17870] Python does not provide PyLong_FromIntMax_t() or PyLong_FromUintMax_t() function

2014-10-14 Thread Stefan Krah
Changes by Stefan Krah : -- nosy: -skrah ___ Python tracker <http://bugs.python.org/issue17870> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue21167] float('nan') returns 0.0 on Python compiled with icc

2014-10-14 Thread Stefan Krah
Changes by Stefan Krah : -- nosy: -skrah ___ Python tracker <http://bugs.python.org/issue21167> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue15913] PyBuffer_SizeFromFormat is missing

2014-10-14 Thread Stefan Krah
Changes by Stefan Krah : -- nosy: -skrah ___ Python tracker <http://bugs.python.org/issue15913> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue15944] memoryviews and ctypes

2014-10-16 Thread Stefan Krah
Changes by Stefan Krah : -- versions: +Python 3.5 -Python 3.3 ___ Python tracker <http://bugs.python.org/issue15944> ___ ___ Python-bugs-list mailing list Unsub

[issue15944] memoryviews and ctypes

2014-10-16 Thread Stefan Krah
Stefan Krah added the comment: We could add a flag memoryview(x, raw=True) to the constructor. This view would behave exactly like the regular one except that it ignores buf.format entirely. So you could do assignments like: m[10] = b'\x00\x00\x00\x01' This would be more f

[issue22655] Build error on CentOS 5.4

2014-10-17 Thread Stefan Krah
Stefan Krah added the comment: It's a gcc bug, see #20324. -- nosy: +skrah resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker <http://bugs.pyth

[issue22724] byte-compile fails for cross-builds

2014-10-26 Thread Stefan Krah
Changes by Stefan Krah : -- nosy: +doko ___ Python tracker <http://bugs.python.org/issue22724> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue22741] suggestion for improving wording on len(s) (built-in function)

2014-10-27 Thread Stefan Krah
Stefan Krah added the comment: The original wording is clearer (this also applies to similar issues that have been opened recently). -- nosy: +skrah ___ Python tracker <http://bugs.python.org/issue22

[issue22747] Interpreter fails in initialize on systems where HAVE_LANGINFO_H is undefined

2014-10-31 Thread Stefan Krah
Stefan Krah added the comment: Has anyone made an effort to get this fixed in Android? I find it strange that hundreds of projects now work around Android bugs instead of putting (friendly) pressure on the Android maintainers. Minimal langinfo.h and locale.h support should be trivial to

[issue22747] Interpreter fails in initialize on systems where HAVE_LANGINFO_H is undefined

2014-10-31 Thread Stefan Krah
Stefan Krah added the comment: To expand a little, here ... https://code.google.com/p/android/issues/list ... I cannot find either a localeconv() or an nl_langinfo() issue. Perhaps the maintainers would be willing to add minimal versions

[issue22896] Don't use PyObject_As*Buffer() functions

2014-12-19 Thread Stefan Krah
Stefan Krah added the comment: Yes, a PyBUF_SIMPLE request implies c-contiguous, so it's ok. -- ___ Python tracker <http://bugs.python.org/issue22896> ___ ___

[issue23201] Decimal(0)**0 is an error, 0**0 is 1, but Decimal(0) == 0

2015-01-09 Thread Stefan Krah
Stefan Krah added the comment: The behavior is already documented (power function): "at least one of x or y must be nonzero" The decimal docs are already so large that it is probably a bad idea to add a warning. -- ___ Python trac

[issue23201] Decimal(0)**0 is an error, 0**0 is 1, but Decimal(0) == 0

2015-01-10 Thread Stefan Krah
Stefan Krah added the comment: For the differences between the standard and IEEE 754-2008 we could link to: http://speleotrove.com/decimal/dascope.html In the long run, perhaps we should move to IEEE, because we're almost there (but that's a sepa

[issue22668] memoryview.format is corrupted due to dangling shared pointer

2015-01-27 Thread Stefan Krah
Stefan Krah added the comment: Thanks for the detailed report! Making a private copy of 'format' for each memoryview generally sounds like the best solution. However, format strings can be arbitrarily large, so we'd need to store the copy in the ob_array after shape, strides

[issue23284] curses, readline, tinfo, and also --prefix, dbm, CPPFLAGS

2015-01-29 Thread Stefan Krah
Stefan Krah added the comment: What system are you using? The patch is quite large, and the existing libtinfo logic should work on most systems. Is the main problem that ldd is not found? -- nosy: +skrah ___ Python tracker <http://bugs.python.

[issue22668] memoryview.format is corrupted due to dangling shared pointer

2015-01-29 Thread Stefan Krah
Stefan Krah added the comment: Thanks, David. The tests assumed little-endian, which is now fixed. The MemoryError is sporadic and unrelated -- the OpenIndiana bot often has system load issues. I don't see any more related failures, please reopen if you do. :) -- status:

[issue23284] curses, readline, tinfo, and also --prefix, dbm, CPPFLAGS

2015-01-29 Thread Stefan Krah
Stefan Krah added the comment: I think even the curses changes alone are rather large, especially for 2.7. Perhaps you could give us exact instructions how to reproduce the issue (OS, version, build command line). -- ___ Python tracker <h

[issue23284] curses, readline, tinfo, and also --prefix, dbm, CPPFLAGS

2015-01-29 Thread Stefan Krah
Stefan Krah added the comment: I still don't understand why libncurses is linked against libtinfo but libreadline is not. Again, what is your OS? Example Ubuntu (a modern system): $ ldd /lib/x86_64-linux-gnu/libncurses.so.5 linux-vdso.so.1 => (0x7fff5bfed000) li

[issue23352] PyBuffer_IsContiguous() sometimes returns wrong result if suboffsets != NULL

2015-01-30 Thread Stefan Krah
Stefan Krah added the comment: PEP-3118 says: Py_buffer.suboffsets: "If all suboffsets are negative (i.e. no de-referencing is needed, then this must be NULL (the default value)." I would be inclined to go with the PEP here and make a doc f

[issue23352] PyBuffer_IsContiguous() sometimes returns wrong result if suboffsets != NULL

2015-01-30 Thread Stefan Krah
Stefan Krah added the comment: For the record: I'm myself guilty of accepting all-negative suboffsets in memoryview.c (see init_slice()) and I think there's even a test for it. However, while it's ok for a specific function to accept this corner case, I'm not sure

[issue23349] PyBuffer_ToContiguous() off-by-one error for non-contiguous buffers

2015-01-30 Thread Stefan Krah
Changes by Stefan Krah : -- nosy: +skrah ___ Python tracker <http://bugs.python.org/issue23349> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue23284] Improve termcap detection in setup.py

2015-01-30 Thread Stefan Krah
Stefan Krah added the comment: Ok thanks, I understand the issue now. I'm focusing this issue on the termcap detection. For the other parts of the patch you'd have to open separate issues. As an aside, the ncurses maintainer seems to endorse a distro enforced choice for libreadline

[issue23284] Improve termcap detection in setup.py

2015-01-30 Thread Stefan Krah
Stefan Krah added the comment: FWIW, even http://www.linuxfromscratch.org/lfs/view/stable/chapter06/readline.html enforces -ncurses linking of readline. [They should be compiling ncurses with tinfo split out though and use -tinfo instead

[issue23349] PyBuffer_ToContiguous() off-by-one error for non-contiguous buffers

2015-01-30 Thread Stefan Krah
Stefan Krah added the comment: Looks good, here's a patch with tests. -- Added file: http://bugs.python.org/file37927/issue23349-2.diff ___ Python tracker <http://bugs.python.org/is

[issue11578] Increase test coverage for timeit.py

2015-01-30 Thread Stefan Krah
Stefan Krah added the comment: I think all 2.7 bots are broken. :) -- nosy: +skrah ___ Python tracker <http://bugs.python.org/issue11578> ___ ___ Python-bug

[issue23055] PyUnicode_FromFormatV crasher

2015-01-30 Thread Stefan Krah
Stefan Krah added the comment: I think in 2.7 there's a slight problem since e6b9e277fbf4: [1/1] test_unicode Debug memory block at address p=0x7f4ebba3fae0: API 'o' 100 bytes originally requested The 7 pad bytes at p-7 are FORBIDDENBYTE, as expected. The 8 pa

[issue23055] PyUnicode_FromFormatV crasher

2015-01-30 Thread Stefan Krah
Stefan Krah added the comment: I think I still get a problem in 2.7: [1/1] test_unicode ==23430== Invalid read of size 1 ==23430==at 0x484541: PyUnicodeUCS2_FromFormatV (unicodeobject.c:736) ==23430==by 0x485C75: PyUnicodeUCS2_FromFormat (unicodeobject.c:1083) 736 for (f

[issue23055] PyUnicode_FromFormatV crasher

2015-01-30 Thread Stefan Krah
Stefan Krah added the comment: issue23055_2.patch looks good. -- ___ Python tracker <http://bugs.python.org/issue23055> ___ ___ Python-bugs-list mailing list Unsub

[issue23352] PyBuffer_IsContiguous() sometimes returns wrong result if suboffsets != NULL

2015-01-31 Thread Stefan Krah
Stefan Krah added the comment: Cython doesn't follow the spec though (use Python 3): from _testbuffer import * cpdef foo(): cdef unsigned char[:] v = bytearray(b"testing") nd = ndarray(v, getbuf=PyBUF_ND) print(nd.suboffsets) nd = ndarray(v, getbuf=PyBUF_

[issue23349] PyBuffer_ToContiguous() off-by-one error for non-contiguous buffers

2015-01-31 Thread Stefan Krah
Stefan Krah added the comment: Should be fixed, thanks for the patch. -- resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker <http://bugs.python.or

[issue23352] PyBuffer_IsContiguous() sometimes returns wrong result if suboffsets != NULL

2015-01-31 Thread Stefan Krah
Stefan Krah added the comment: To summarize, I think this is different from #22445, which also requests relaxed contiguity tests. #22445 is motivated by the fact that slicing can create a certain class of contiguous buffers that aren't recognized as such. No such reason exists here

[issue12834] memoryview.to_bytes() and PyBuffer_ToContiguous() incorrect for non-contiguous arrays

2015-01-31 Thread Stefan Krah
Stefan Krah added the comment: Sorry, #23349. -- ___ Python tracker <http://bugs.python.org/issue12834> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue12834] memoryview.to_bytes() and PyBuffer_ToContiguous() incorrect for non-contiguous arrays

2015-01-31 Thread Stefan Krah
Stefan Krah added the comment: Fixed for 2.7 in #22668. -- ___ Python tracker <http://bugs.python.org/issue12834> ___ ___ Python-bugs-list mailing list Unsub

[issue23352] PyBuffer_IsContiguous() sometimes returns wrong result if suboffsets != NULL

2015-01-31 Thread Stefan Krah
Stefan Krah added the comment: Prepare for a partial reversal of opinion. :) Indexing *can* actually create all-negative suboffsets in a natural way: >>> from _testbuffer import * >>> nd = ndarray([1,2,3,4,5,6,7,8,9,10,11,12], shape=[3,4], flags=ND_PIL) >>> nd.to

[issue23352] PyBuffer_IsContiguous() sometimes returns wrong result if suboffsets != NULL

2015-02-01 Thread Stefan Krah
Stefan Krah added the comment: > Richard Hansen added the comment: > > Cython doesn't follow the spec though (use Python 3): > > > > from _testbuffer import * > > cpdef foo(): > > cdef unsigned char[:] v = bytearray(b"testing&qu

[issue23352] PyBuffer_IsContiguous() sometimes returns wrong result if suboffsets != NULL

2015-02-01 Thread Stefan Krah
Stefan Krah added the comment: > How might an application break with this change? func1: if (!PyBuffer_IsContiguous(view, 'C')) error(); func2(view); func2: assert(view->suboffsets == NULL); ... Yes, I *did* insert sanity checks like thi

[issue23352] Document "suboffsets if needed" in 2.7

2015-02-01 Thread Stefan Krah
Stefan Krah added the comment: But only Cython does not set suboffsets to NULL and you already have a small patch to fix that. The Python 3 docs say "suboffsets only if needed" and the PEP says the same, so the situation is not completely undocumented. I think your doc patch go

[issue22445] Memoryviews require more strict contiguous checks then necessary

2015-02-01 Thread Stefan Krah
Changes by Stefan Krah : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <http://bugs.python.or

[issue23370] PyBuffer_FromContiguous() off-by-one error for non-contiguous buffers

2015-02-01 Thread Stefan Krah
New submission from Stefan Krah: Same as #23349. -- messages: 235178 nosy: skrah priority: normal severity: normal stage: needs patch status: open title: PyBuffer_FromContiguous() off-by-one error for non-contiguous buffers type: behavior versions: Python 2.7, Python 3.4, Python 3.5

[issue23370] PyBuffer_FromContiguous() off-by-one error for non-contiguous buffers

2015-02-01 Thread Stefan Krah
Changes by Stefan Krah : -- keywords: +patch Added file: http://bugs.python.org/file37969/issue23370.diff ___ Python tracker <http://bugs.python.org/issue23

[issue23370] PyBuffer_FromContiguous() off-by-one error for non-contiguous buffers

2015-02-01 Thread Stefan Krah
Changes by Stefan Krah : -- status: open -> closed ___ Python tracker <http://bugs.python.org/issue23370> ___ ___ Python-bugs-list mailing list Unsubscrib

[issue23370] PyBuffer_FromContiguous() off-by-one error for non-contiguous buffers

2015-02-01 Thread Stefan Krah
Changes by Stefan Krah : -- resolution: -> fixed stage: needs patch -> resolved ___ Python tracker <http://bugs.python.org/issue23370> ___ ___ Python-bugs-

[issue22896] Don't use PyObject_As*Buffer() functions

2015-02-01 Thread Stefan Krah
Stefan Krah added the comment: [Slow internet connection, can't use Rietveld.] CDataType_from_buffer(): I'm not that familiar with ctypes. What is the high level goal here? Allocate a chunk of memory, wrap it in a memoryview and have the memoryview release that memory when its ref

[issue23376] getargs.c: redundant C-contiguity check

2015-02-02 Thread Stefan Krah
Changes by Stefan Krah : -- nosy: skrah priority: normal severity: normal status: open title: getargs.c: redundant C-contiguity check type: performance versions: Python 3.5 ___ Python tracker <http://bugs.python.org/issue23

[issue23376] getargs.c: redundant C-contiguity check

2015-02-02 Thread Stefan Krah
New submission from Stefan Krah: The call to PyBuffer_IsContiguous() (see patch) is redundant: PyBUF_WRITABLE is a flag that can be added to any buffer request. The real request here is (PyBUF_SIMPLE|PyBUF_WRITABLE), which is equal to PyBUF_WRITABLE since PyBUF_SIMPLE==0. PyBUF_SIMPLE implies

[issue23376] getargs.c: redundant C-contiguity check

2015-02-02 Thread Stefan Krah
Stefan Krah added the comment: Yes, _testbuffer.ndarray can create any buffer. -- ___ Python tracker <http://bugs.python.org/issue23376> ___ ___ Python-bugs-list m

[issue23376] getargs.c: redundant C-contiguity check

2015-02-02 Thread Stefan Krah
Stefan Krah added the comment: A unit test would not be so helpful. The potential problem is that third party extensions with broken getbufferprocs would suffer. But at some point we have to streamline PEP-3118 code, or it will remain inscrutable forever. Extension writers often copy code

[issue22896] Don't use PyObject_As*Buffer() functions

2015-02-02 Thread Stefan Krah
Stefan Krah added the comment: Thanks. No, I don't think there's an official way to accomplish that, but let's create one. How about a new function that takes the buffer request flags: PyMemoryView_FromObjectEx(exporter, PyBUF_SIMPLE|PyBUF_WRITABLE) If we can spare a

[issue23352] Document "suboffsets if needed" in 2.7

2015-02-02 Thread Stefan Krah
Changes by Stefan Krah : -- resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker <http://bugs.python.org/issue23352> ___

[issue22896] Don't use PyObject_As*Buffer() functions

2015-02-02 Thread Stefan Krah
Stefan Krah added the comment: Nice patch. I've found one issue (see Rietveld). I'm not sure about 3.4 (the patch contains minor refactorings), but otherwise I'd say go ahead with it. -- ___ Python tracker <http://bugs.pyt

[issue23376] getargs.c: redundant C-contiguity check

2015-02-02 Thread Stefan Krah
Stefan Krah added the comment: STINNER Victor wrote: > I don't understand the link between third party extensions and > test_getargs2. test_getargs2 is a unit test for non-regression of > CPython. Can you please elaborate? A test failure needs a broken buffer provider that h

[issue23376] getargs.c: redundant C-contiguity check

2015-02-02 Thread Stefan Krah
Stefan Krah added the comment: Well, here's a patch with tests. Victor, I think you added the contiguity test in 9d49b744078c. Do you remember why? -- Added file: http://bugs.python.org/file37987/issue23376-2.diff ___ Python tracker

[issue23376] getargs.c: redundant C-contiguity check

2015-02-02 Thread Stefan Krah
Stefan Krah added the comment: Ah yes, it seems to originate from #3139. -- ___ Python tracker <http://bugs.python.org/issue23376> ___ ___ Python-bugs-list mailin

[issue14203] bytearray_getbuffer: unnecessary code

2015-02-03 Thread Stefan Krah
Stefan Krah added the comment: New patch with tests. -- Added file: http://bugs.python.org/file38003/issue14203-2.diff ___ Python tracker <http://bugs.python.org/issue14

[issue14203] PEP-3118: remove obsolete write-locks

2015-02-03 Thread Stefan Krah
Stefan Krah added the comment: bytesiobuf_getbuffer() also still has this obsolete feature, so BufferError should be raised if view==NULL. I'm unsure if this plays well with the new SHARED_BUF(b) thing. Should the exception be raised before or after? -- nosy: +serhiy.storchaka

[issue14203] PEP-3118: remove obsolete write-locks

2015-02-03 Thread Stefan Krah
Stefan Krah added the comment: Ok, thanks! issue14203-3.diff should be correct, then. -- Added file: http://bugs.python.org/file38004/issue14203-3.diff ___ Python tracker <http://bugs.python.org/issue14

[issue14203] PEP-3118: remove obsolete write-locks

2015-02-03 Thread Stefan Krah
Stefan Krah added the comment: Argh, the extern _PyBytesIOBuffer_Type hack. I knew it would cause some trouble. Any ideas how to test bytesiobuf_getbuffer() with a NULL view in a more dignified way? -- ___ Python tracker <http://bugs.python.

[issue23390] make profile-opt: test_distutils failure

2015-02-03 Thread Stefan Krah
Changes by Stefan Krah : -- nosy: skrah priority: normal severity: normal status: open title: make profile-opt: test_distutils failure type: behavior ___ Python tracker <http://bugs.python.org/issue23

[issue23390] make profile-opt: test_distutils failure

2015-02-03 Thread Stefan Krah
New submission from Stefan Krah: Currently -fprofile-use etc. appear in the distutils CFLAGS, which causes test_distutils to fail. -- keywords: +patch nosy: +gregory.p.smith Added file: http://bugs.python.org/file38009/issue23390.diff ___ Python

[issue14203] PEP-3118: remove obsolete write-locks

2015-02-04 Thread Stefan Krah
Stefan Krah added the comment: I think it's sufficient to test bytesiobuf_getbuffer() on Linux and FreeBSD. The test just checks that the exception is raised. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed

[issue23446] Use PyMem_New instead of PyMem_Malloc

2015-02-11 Thread Stefan Krah
Stefan Krah added the comment: In _testbuffer.c: ndim <= 64, so the changes aren't really necessary. Somehow this fact needs to get widely known, since it does not make sense to check for overflow anytime ndim is used. The reason is of course that even an array with only 2 elem

[issue23446] Use PyMem_New instead of PyMem_Malloc

2015-02-12 Thread Stefan Krah
Stefan Krah added the comment: Yes, but these (degenerate) arrays tend to arise only as a result of slicing. Last time I looked NumPy had MAX_NDIM=32, so we should be fine. -- ___ Python tracker <http://bugs.python.org/issue23

[issue23460] Decimals do not obey ':g' exponential notation formatting rules

2015-02-14 Thread Stefan Krah
Stefan Krah added the comment: For Decimal the cutoff point is -6 instead of -4 (following the decimal specification instead of the C standard). -- assignee: -> docs@python components: +Documentation -Library (Lib) nosy: +docs@python, skrah type: behav

<    25   26   27   28   29   30   31   32   33   34   >