Re: [Python-Dev] memoryview: "B", "c", "b" format specifiers

2011-08-18 Thread Stefan Krah
AD or PyBUF_WRITE. In the Python source tree, it could completely replace PyBuffer_FillInfo() and PyMemoryView_FromBuffer(). Stefan Krah ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Re: [Python-Dev] cpython (3.2): NUL -> NULL

2011-08-18 Thread Stefan Krah
represent the null character." So I think it should be either NUL or "null character" with the lower case spelling. Stefan Krah ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Re: [Python-Dev] memoryview: "B", "c", "b" format specifiers

2011-08-18 Thread Stefan Krah
d PEP-3118 grow support for int8_t and uint8_t, I think "b" and "B" should probably be restricted to integers. Stefan Krah ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscri

Re: [Python-Dev] memoryview: "B", "c", "b" format specifiers

2011-08-18 Thread Stefan Krah
Antoine Pitrou wrote: > On Thu, 18 Aug 2011 18:57:00 +0200 > Stefan Krah wrote: > > > > Oh no, the name isn't quite right then. It should be a replacement > > for the combination PyBuffer_FillInfo()/PyMemoryView_FromBuffer() > > and it should tempora

Re: [Python-Dev] FileSystemError or FilesystemError?

2011-08-23 Thread Stefan Krah
Barry Warsaw wrote: > My online dictionaries prefer "file system" to be two words, so for me, > FileSystemError is preferred. +1 Stefan Krah ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/lis

Re: [Python-Dev] Do we have interest in a clang buildbot?

2011-09-15 Thread Stefan Krah
es sense. clang has different warnings and the versions >= 2.9 apparently optimize extremely aggressively. Probably it would be most useful to run these bots with -O2 (and not --with-pydebug). Stefan Krah ___ Python-Dev mailing list Python-D

Re: [Python-Dev] [Python-checkins] cpython: Issue #1172711: Add 'long long' support to the array module.

2011-09-21 Thread Stefan Krah
cleaner, but have_long_long is pretty established elsewhere (for example in pyport.h). Stefan Krah ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Re: [Python-Dev] Hg tips

2011-09-29 Thread Stefan Krah
; It's easier for my brain because I just have 2 versions of the same > code, not 3! I also prefer /usr/bin/merge and I've never quite figured out the GUI. Not that I spent a lot of time on it, since the "legacy" merge works well (and is self-explanatory). Stefan Kr

[Python-Dev] PEP-393: request for keeping PyUnicode_EncodeDecimal()

2011-10-01 Thread Stefan Krah
know what input is currently regarded as a decimal digit. See also: http://bugs.python.org/issue10557 http://bugs.python.org/issue10557#msg123123 "The API won't go away (it does have its use and is being used in 3rd party extensions) [...]

Re: [Python-Dev] PEP-393: request for keeping PyUnicode_EncodeDecimal()

2011-10-01 Thread Stefan Krah
ascii(PyObject *self) { return PyUnicode_TransformDecimalAndSpaceToASCII(self); } #endif Will PyUnicode_TransformDecimalAndSpaceToASCII() be public? Stefan Krah ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/li

Re: [Python-Dev] PEP-393: request for keeping PyUnicode_EncodeDecimal()

2011-10-02 Thread Stefan Krah
as well: Decimal("\u180E1.233"). > > Will PyUnicode_TransformDecimalAndSpaceToASCII() be public? > > It's already included in 3.2, so it can't be removed that easily. > I wish it had been private, though - we have way too many API functions > dealing with

Re: [Python-Dev] check for PyUnicode_READY look backwards

2011-10-07 Thread Stefan Krah
foo). > > I prefer PyUnicode_IS_READY(foo) < 0 over PyUnicode_IS_READY(foo) == -1. Do you mean PyUnicode_READY(foo) < 0? I also prefer that idiom. Stefan Krah ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.o

Re: [Python-Dev] Test failures on Windows 7

2011-10-11 Thread Stefan Krah
on.org/issue11732 Stefan Krah ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Re: [Python-Dev] Buildbots with rpm installed

2011-10-19 Thread Stefan Krah
r that. Yes, the Fedora bot currently fails the bdist_rpm tests: http://www.python.org/dev/buildbot/all/builders/AMD64%20Fedora%20without%20threads%203.x/builds/873/steps/test/logs/stdio Stefan Krah ___ Python-Dev mailing list Python-Dev@pyt

Re: [Python-Dev] ints not overflowing into longs?

2011-11-03 Thread Stefan Krah
issue13061 and Issue11149. For clang version 3.0 (trunk 139691) on FreeBSD this is the case. Stefan Krah ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/opti

Re: [Python-Dev] Hashable memoryviews

2011-11-13 Thread Stefan Krah
gt; m_array = memoryview(a) >>> m_bytes = memoryview(b) >>> m_cast = m_array.cast('B') >>> m_bytes == m_cast True >>> hash(b) == hash(a) Traceback (most recent call last): File "", line 1, in TypeError: unhashable type: 

Re: [Python-Dev] Hashable memoryviews

2011-11-13 Thread Stefan Krah
> > True > > >>> hash(b) == hash(a) > > Traceback (most recent call last): > > File "", line 1, in > > TypeError: unhashable type: 'array.array' > > In this case, the memoryview wouldn't be hashable either. Hmm, the point w

Re: [Python-Dev] Hashable memoryviews

2011-11-13 Thread Stefan Krah
y necessarily have to use the same hash, since: exporter = m1 ==> hash(exporter) = hash(m1) m1 = m2 ==> hash(m1) = hash(m2) Am I missing something? Stefan Krah ___ Python-Dev mailing list Python-Dev@python.org http://mail.pytho

Re: [Python-Dev] Hashable memoryviews

2011-11-13 Thread Stefan Krah
Antoine Pitrou wrote: > Stefan Krah wrote: > > I think they necessarily have to use the same hash, since: > > > > exporter = m1 ==> hash(exporter) = hash(m1) > > m1 = m2 ==> hash(m1) = hash(m2) > > > > Am I missing something? > > The hash

Re: [Python-Dev] PyUnicode_EncodeDecimal

2011-11-22 Thread Stefan Krah
e it. The > function is already deprecated beacuse it uses the deprecated Py_UNICODE type. I'd be fine with removing the function in 3.4. For consistency, it might be better to remove it in 4.0 together with all the other deprecated functions (at least I understood that t

Re: [Python-Dev] Reject characters bigger than U+10FFFF and Solaris issues

2011-12-08 Thread Stefan Krah
} The main issue is that there is no portable function mbst_to_utf8() that uses the current locale. If possible, it would be great to have such a thing in the C-API. I'm not sure why the b'\xA0' problem only occurs in Solaris. Many systems have this thousands separator.

Re: [Python-Dev] Reject characters bigger than U+10FFFF and Solaris issues

2011-12-08 Thread Stefan Krah
Stefan Krah wrote: > I'm not sure why the b'\xA0' problem only occurs in Solaris. Many systems > have this thousands separator. Are LC_CTYPE and LC_NUMERIC set to the same value on the buildbot? Otherwise you encounter http://bugs.python.org/issu

Re: [Python-Dev] Reject characters bigger than U+10FFFF and Solaris issues

2011-12-08 Thread Stefan Krah
It can be a motivation to fix the root of the issue ;-) Yes, if the cause is a broken mbstowcs() that sounds good. Stefan Krah ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://ma

Re: [Python-Dev] French sprint this week-end

2011-12-16 Thread Stefan Krah
sk like improving code coverage or support of > some rare platforms? On some buildbots compiler warnings are starting to accumulate. Installing a recent version of gcc and fixing those might be a good task. If the participants are new to buildbot, it might even be interesting f

Re: [Python-Dev] cpython (3.2): Avoid the compiler warning about the unused return value.

2012-01-21 Thread Stefan Krah
disable the warning. I would prefer if stop using these kinds of > hacks. Do you mean (void)write(...)? Many people think this is good practice, since it indicates to the reader that the return value is deliberately ignored. Stefan Krah ___ Pyt

Re: [Python-Dev] PEP 410 (Decimal timestamp): the implementation is ready for a review

2012-02-17 Thread Stefan Krah
ecimal module. Apart from the rarity of these systems, decimal.py is arbitrary precision. If I restricted _decimal to DECIMAL64, I could probably speed it up further. All that said, personally I wouldn't have problems with a chunked representatio

[Python-Dev] State of PEP-3118 (memoryview part)

2012-02-26 Thread Stefan Krah
the release managers. Stefan Krah ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Re: [Python-Dev] State of PEP-3118 (memoryview part)

2012-02-29 Thread Stefan Krah
Antoine Pitrou wrote: > Stefan Krah wrote: > > In Python 3.3 most issues with the memoryview object have been fixed > > in a recent commit (3f9b3b6f7ff0). > > Oh and congrats for doing this, of course. Thanks! Stefan Krah _

Re: [Python-Dev] State of PEP-3118 (memoryview part)

2012-02-29 Thread Stefan Krah
tly have three +1 for "too complex to backport". I'm not strongly in favor of backporting myself. The main reason for me would be to prevent having additional 2->3 or 3->2 porting obstacles. Stefan Krah ___ Python-Dev mailing

Re: [Python-Dev] State of PEP-3118 (memoryview part)

2012-03-01 Thread Stefan Krah
ures will ever be used. Even if a new 3.3 project is started that needs to be backwards compatible, I can imagine that people will shun anything that 3to2 isn't able to handle (out of the box). This would be less of an issue if the officially sanctioned way of porting were the

Re: [Python-Dev] Spreading the Python 3 religion

2012-03-01 Thread Stefan Krah
he master branch (as it should). 5) For the user: running 2to3 on install sends the signal that version 2 is the real version. This is not the case if there are, say, src2/ and src3/ directories in the distribution. Stefan Krah

Re: [Python-Dev] Spreading the Python 3 religion

2012-03-01 Thread Stefan Krah
's possible or best for other projects. I do think though that choosing the separate branches strategy will pay off eventually (at the very latest when Python-2.7 will reach the status that Python-1.5 currently has). Stefan Krah [1] I don't

Re: [Python-Dev] Spreading the Python 3 religion

2012-03-01 Thread Stefan Krah
th* versions do not use their full potential, but that is strongly related to the "using all (new) features" item in the list. Stefan Krah ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-d

Re: [Python-Dev] Compiling Python on Linux with Intel's icc

2012-03-01 Thread Stefan Krah
, mainly > involved with floating point precision: test_cmath, test_math and test_float. I think you have to compile with "-fp-model strict". In general, please submit suspected bugs on http://bugs.python.org/ (after searching the archives) and post things like speed comparisons on

Re: [Python-Dev] Assertion in _PyManagedBuffer_FromObject()

2012-03-02 Thread Stefan Krah
er.html#Py_buffer http://docs.python.org/dev/c-api/typeobj.html#buffer-object-structures Since the Py_buffer.obj filed was undocumented in 3.2, I think we're within out rights to restrict the field to the exporter. Stefan Krah ___ Python-Dev mai

Re: [Python-Dev] Compiling Python on Linux with Intel's icc

2012-03-02 Thread Stefan Krah
_ and should therefore support the types in question. Stefan Krah ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Re: [Python-Dev] Assertion in _PyManagedBuffer_FromObject()

2012-03-02 Thread Stefan Krah
tests or they don't test against a new Python version is that really our problem? Modules do need to be recompiled anyway due to the removal of Py_buffer.smalltable, otherwise they will almost certainly crash. Perhaps an addition to whatsnew/3.3 woul

Re: [Python-Dev] Assertion in _PyManagedBuffer_FromObject()

2012-03-02 Thread Stefan Krah
n that needs to be absorbed. > it's still not all that unlikely that it breaks user code (assuming that it > currently works). The decision to enforce this restriction should not be > taken lightly. As I said, user code using the (also undocumented) Py_buffer.smalltable will also be bro

Re: [Python-Dev] Assertion in _PyManagedBuffer_FromObject()

2012-03-02 Thread Stefan Krah
Stefan Krah wrote: > > Careful. There are tons of code out there that use the buffer interface, > > and the "obj" field has been the way to handle the buffer release ever > > since the interface actually worked (somewhere around the release of Py3.0, > > IIRC).

Re: [Python-Dev] Assertion in _PyManagedBuffer_FromObject()

2012-03-02 Thread Stefan Krah
the one that exports the buffer? It doesn't have to be. This is now possible: >>> from _testbuffer import * >>> exporter = b'123' >>> nd = ndarray(exporter) >>> m = memoryview(nd) >>> nd.obj b'123' >>> m.obj Stefan Krah

Re: [Python-Dev] Assertion in _PyManagedBuffer_FromObject()

2012-03-02 Thread Stefan Krah
Stefan Krah wrote: > > Why would the object that bf_getbuffer() is being called on have to > > be identical with the one that exports the buffer? > > It doesn't have to be. This is now possible: > > >>> from _testbuffer import * > >>> expo

Re: [Python-Dev] Compiling Python on Linux with Intel's icc

2012-03-02 Thread Stefan Krah
Alex Leach wrote: > Can you translate Intel's suggestion into a patch for ffi64? Well probably, but this really belongs on the bug tracker. Also, as I said, there are many issues with higher priority. Stefan Krah ___ Python-Dev mailing lis

Re: [Python-Dev] Assertion in _PyManagedBuffer_FromObject()

2012-03-03 Thread Stefan Krah
ered re-exporting rather than redirecting the standard model and built the test suite around it. Stefan Krah ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Re: [Python-Dev] Assertion in _PyManagedBuffer_FromObject()

2012-03-03 Thread Stefan Krah
part of a getbufferproc, exporter MUST be set to the exporting object. Otherwise, exporter MUST be NULL." Stefan Krah ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Re: [Python-Dev] Assertion in _PyManagedBuffer_FromObject()

2012-03-03 Thread Stefan Krah
et this field to NULL. But even if existing code uses the view.obj==NULL scheme from PyBuffer_FillInfo() correctly, it will still work in the new implementation. I'd just prefer to forbid this in the documentation, because it's much easier to remember: getbuffer "returns

Re: [Python-Dev] Assertion in _PyManagedBuffer_FromObject()

2012-03-04 Thread Stefan Krah
ow hypothetical) API change. I would have some comments about valid uses of explicit aborts in a library that essentially perform the same function as compiling said library with -D_FORTIFY_SOURCE=2 and -ftrapv (i.e. crash when an external program violates a function contract), but I

[Python-Dev] Undocumented view==NULL argument in PyObject_GetBuffer()

2012-03-06 Thread Stefan Krah
ed view==NULL in the future or can we remove the special case? Stefan Krah ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Re: [Python-Dev] Undocumented view==NULL argument in PyObject_GetBuffer()

2012-03-06 Thread Stefan Krah
Nick Coghlan wrote: > On Tue, Mar 6, 2012 at 8:34 PM, Stefan Krah wrote: > > The obvious question is: Will anyone need view==NULL in the future or > > can we remove the special case? > > The public API will still need a guard (to report an error), but +1 > for o

[Python-Dev] PEP-393/PEP-3118: unicode format specifiers

2012-03-06 Thread Stefan Krah
27; -> UCS2 'w' -> UCS4 Actually we could even add 'a' -> ASCII, then a unicode object could be a buffer provider that gives the correct view according to the maxchar in the buffer. This opens the possibility for strongly typ

Re: [Python-Dev] PEP-393/PEP-3118: unicode format specifiers

2012-03-06 Thread Stefan Krah
ee struct module) the format is unsigned bytes, which are integers in struct module syntax: >>> unsigned_bytes = memoryview(b"abc") >>> unsigned_bytes.format 'B' >>> char_array = unsigned_bytes.cast('c') >>> char_array.format &

Re: [Python-Dev] PEP-393/PEP-3118: unicode format specifiers

2012-03-07 Thread Stefan Krah
aised the issue is this: If Python-3.3 is shipped with 'u' -> UCS4 in the array module and *then* someone figures out that the above format codes are a great idea, we'd be stuck with yet another format code incompatibility. Stefan Krah

Re: [Python-Dev] Drop the new time.wallclock() function?

2012-03-14 Thread Stefan Krah
Antoine Pitrou wrote: > time.monotonic(fallback=False) would be a better API. +1 Stefan Krah ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/opti

Re: [Python-Dev] Docs of weak stdlib modules should encourage exploration of 3rd-party alternatives

2012-03-14 Thread Stefan Krah
, but vast knowledge required (how do you prove that using (freefunc) is safe if it's the first usage in the tree?). http://bugs.python.org/file21610/atexit-leak.patch I think there are many issues like that one where the implications of a short patch can only be assessed by small n

Re: [Python-Dev] Docs of weak stdlib modules should encourage exploration of 3rd-party alternatives

2012-03-14 Thread Stefan Krah
L to the issue itself? That sounds like an excellent plan. :) http://bugs.python.org/issue11826 Stefan Krah ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org

[Python-Dev] svn.python.org and buildbots down

2012-03-19 Thread Stefan Krah
Hello, you might be aware of it already. In case not, it appears that svn.python.org and the buildbots are down. Stefan Krah ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http

Re: [Python-Dev] svn.python.org and buildbots down

2012-03-19 Thread Stefan Krah
#x27;t bother to find out how to restart it just for me. I presume Martin knows the setup and will do it later. Stefan Krah ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://ma

Re: [Python-Dev] [Python-checkins] cpython: Issue #7652: Integrate the decimal floating point libmpdec library to speed

2012-03-22 Thread Stefan Krah
rats Stefan! And thanks for the huge chunk of code. Thanks, much appreciated. I'll take the opportunity to thank you in return for the gigantic amount of work you've done on Python in the past year! Stefan Krah ___ Python-Dev mailing list

Re: [Python-Dev] Setting up a RHEL6 buildbot

2012-03-23 Thread Stefan Krah
stable under qemu with 512MB allocated for the VM. I've never limited CPU or disk space. On an i7 quad core with 8GB of memory, I've been running two buildbot VMs, four deccheck processes at 100% CPU and a web server without any kind of noticable performance

Re: [Python-Dev] [Python-checkins] cpython: Issue #7652: Integrate the decimal floating point libmpdec library to speed

2012-03-23 Thread Stefan Krah
h-system-libmpdec option with the caveat that changes will probably make it first into the libmpdec shipped with Python, see also: http://bugs.python.org/issue7652#msg155744 On the bright side, I don't expect many changes, since the specification is stable. Stefan Krah ___

Re: [Python-Dev] [Python-checkins] cpython: Issue #7652: Integrate the decimal floating point libmpdec library to speed

2012-03-23 Thread Stefan Krah
he impression that 3.x is already used in the financial community, where web framework dependencies aren't an issue. On the web side, there seems to be a huge interest in speeding up database accesses, so let me evangelize again: Database applications using decimal will run 12x faster in 3.

Re: [Python-Dev] [Python-checkins] cpython: Issue #7652: Integrate the decimal floating point libmpdec library to speed

2012-03-23 Thread Stefan Krah
We've got to keep you on your toes, don't we? :) > Fortunately the libmpdec directory should be reusable as is. > Nice work! Thanks, also for helping out with the MutableMapping context. Stefan Krah ___ Python-Dev mailing list Python-

Re: [Python-Dev] [Python-checkins] cpython: Issue #7652: Integrate the decimal floating point libmpdec library to speed

2012-03-23 Thread Stefan Krah
erence gets larger and larger. For huge numbers _decimal is also faster than int: factorial(100): _decimal, calculation time: 6.844487905502319 _decimal, tostr(): 0.033592939376831055 int, calculation time: 17.96010398864746 int, tostr(): ... still running ... Stefa

Re: [Python-Dev] [Python-checkins] cpython: Issue #7652: Integrate the decimal floating point libmpdec library to speed

2012-03-23 Thread Stefan Krah
Antoine Pitrou wrote: > > On the web side, there seems to be a huge interest in speeding up database > > accesses, so let me evangelize again: Database applications using decimal > > will run 12x faster in 3.3. > > Are you sure it isn't 12.5x ? Well, that was mar

Re: [Python-Dev] Playing with a new theme for the docs, iteration 2

2012-03-25 Thread Stefan Krah
the presence of fixed elements. Stefan Krah ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Re: [Python-Dev] Playing with a new theme for the docs, iteration 2

2012-03-25 Thread Stefan Krah
7;s almost the center of my attention (when I should be focusing on the text). Perhaps users can discover the collapsible sidebar without the '<<' hint? Or let it move up like in the existing version? Stefan Krah ___ Python-Dev mailing list

Re: [Python-Dev] Playing with a new theme for the docs, iteration 2

2012-03-25 Thread Stefan Krah
and I personally don't have > *that* strong a preference either way. Maybe. It's hard to determine. It's just that I don't see fixed search boxes or fixed elements like '<<' on big name websites (who may or

Re: [Python-Dev] [Python-checkins] cpython: Issue #7652: Integrate the decimal floating point libmpdec library to speed

2012-03-26 Thread Stefan Krah
there is no complicated base conversion. > If yes, would it be possible to reuse the multiply algorithm of _decimal > (and maybe of other functions) for int? Or does it depend heavily on > _decimal internal structures? Large parts of the Number Theoretic Transform could be reused, but there wo

Re: [Python-Dev] [Python-checkins] Who are the decimal volunteers? Re: cpython: Resize the coefficient to MPD_MINALLOC also if the requested size is below

2012-04-09 Thread Stefan Krah
ing initialization. All operations in _decimal.c follow the same scheme: /* dec contains an mpd_t with MPD_MINALLOC words. */ dec = dec_alloc(); /* Initialization by a libmpdec function. MPD() is the accessor macro for the mpd_t. */ mpd_func(MPD(dec), x, y, ...); /* From here on dec

Re: [Python-Dev] [Python-checkins] cpython: avoid unitialized memory

2012-05-04 Thread Stefan Krah
ong *ns) > { > int result = 0; > -PyObject *divmod; > +PyObject *divmod = NULL; > divmod = PyNumber_Divmod(py_long, billion); > if (!divmod) > goto exit; If I'm not mistaken, divmod was already unconditional

Re: [Python-Dev] [Python-checkins] cpython: Issue #14127: Add ns= parameter to utime, futimes, and lutimes.

2012-05-04 Thread Stefan Krah
ted of type 'a * kwargs In Python it makes sense if (for the purpose of raising an error) one assumes that {"times":(0, 0)}, {"ns":(0, 0)} and {"times":(0, 0), "ns":(0, 0)} have different types. Stefan Krah ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Re: [Python-Dev] [Python-checkins] cpython: what is a invalid tuple?

2012-05-04 Thread Stefan Krah
" a tuple of two ints or None", Unrelated to this commit, but 'time' should be 'times'. Stefan Krah ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Re: [Python-Dev] [Python-checkins] cpython: Update Misc/NEWS for issues #14127 and #14705. (And, technically, #10148.)

2012-05-05 Thread Stefan Krah
larry.hastings wrote: > Update Misc/NEWS for issues #14127 and #14705. (And, technically, #10148.) > > + * De-vararg'd PyArg_ParseTupleAndKeywords() This looks like an accidental commit. Is there an issue number for the varargs changes (just out of interest)?

Re: [Python-Dev] Point of building without threads?

2012-05-08 Thread Stefan Krah
mething else than > curiosity of mind? _decimal is about 12% faster without threads, because the expensive thread local context can be disabled. On OpenBSD threading leads to strange problems like delayed signals in the REPL http://bugs.python.org/issue8714 . Without threads these problems don

Re: [Python-Dev] Point of building without threads?

2012-05-09 Thread Stefan Krah
his reduces the speed difference to about 4%! Stefan Krah ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Re: [Python-Dev] Point of building without threads?

2012-05-10 Thread Stefan Krah
Antoine Pitrou wrote: > On Wed, 9 May 2012 11:26:29 +0200 > Stefan Krah wrote: > > Antoine Pitrou wrote: > > > > _decimal is about 12% faster without threads, because the expensive > > > > thread local context can be disabled. > > > > >

Re: [Python-Dev] Point of building without threads?

2012-05-10 Thread Stefan Krah
Stefan Krah wrote: > > > Nice. This reduces the speed difference to about 4%! > > > > Note that you don't need the actual thread id, the Python thread state > > is sufficient: PyThreadState_GET should be a simply variable lookup in > > release builds. >

Re: [Python-Dev] [Python-checkins] cpython: Issue #14779: Do not use get_config_var('SIZEOF_VOID_P') on OS X 64-/32-bit

2012-05-13 Thread Stefan Krah
pyport.h or Python.h. > I'd also hard-code that sys.maxsize ought to be either 2**31-1 or 2**63-1. I would have done exactly that, but the example in the docs that was quoted to me in the issue uses > 2**32: http://docs.python.org/dev/library/platform.html Stefan Krah __

Re: [Python-Dev] python 3.3 b2

2012-07-30 Thread Stefan Krah
Yury Selivanov wrote: > What's the status of Python 3.3 beta 2? It's postponed until next weekend. Stefan Krah ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://ma

Re: [Python-Dev] Understanding the buffer API

2012-08-04 Thread Stefan Krah
s a different layout, the exporter must perform a full cast so that the above mentioned invariants are kept. The disadvantage of this is that the original layout is lost for the consumer. I do not know if there is a use case that requires the consumer to have the original

Re: [Python-Dev] Understanding the buffer API

2012-08-04 Thread Stefan Krah
g flags in the new MemoryViewObject. It would be handy to have these flags in the Py_buffer structure, but that can only be considered for a future version of Python, perhaps no earlier than 4.0. The same applies of course to all three points that I made above. Stefan Krah ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Re: [Python-Dev] Understanding the buffer API

2012-08-04 Thread Stefan Krah
rides data, can strides data be > provided anyway, if that's easier than returning NULL but is > consistent with doing so? This is not explicitly disallowed, but IMO the intent is that strides should also be NULL in that case. For example, strides==NULL might be used for a quick C-contiguit

Re: [Python-Dev] Understanding the buffer API

2012-08-04 Thread Stefan Krah
http://docs.python.org/dev/c-api/buffer.html#PyBUF_WRITABLE Stefan Krah ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Re: [Python-Dev] Understanding the buffer API

2012-08-04 Thread Stefan Krah
t would also be possible to add new flags for things like byte order. The main reason is that it turns out that in any general C function that takes a Py_buffer argument one has to reconstruct full information anyway, otherwise obscure cases *will* be overlooked (in the absence of a formal proo

[Python-Dev] SPARC testers (and buildbot!) needed

2012-08-08 Thread Stefan Krah
SPARC buildbot. Stefan Krah ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Re: [Python-Dev] Understanding the buffer API

2012-08-08 Thread Stefan Krah
g it. Can we continue this discussion some other time, perhaps after 3.3 is out? I'd like to respond, but need a bit more time to think about it than I have right now (for this issue). Stefan Krah ___ Python-Dev mailing list Python-Dev@python.or

Re: [Python-Dev] SPARC testers (and buildbot!) needed

2012-08-10 Thread Stefan Krah
ut. In case someone is > interested in this, see > http://www.opencsw.org/extend-it/signup/to-upstream-maintainers/ Thanks for the link. Perhaps I'll try to get an account there. Stefan Krah ___ Python-Dev mailing list Python-Dev@python.org

Re: [Python-Dev] Mountain Lion drops sign of zero, breaks test_cmath...

2012-08-17 Thread Stefan Krah
rs the problem: http://bugs.python.org/issue15477 Stefan Krah ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

[Python-Dev] hg verify warnings

2012-08-19 Thread Stefan Krah
al revisions 3 warnings encountered! Stefan Krah ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Re: [Python-Dev] hg verify warnings

2012-08-19 Thread Stefan Krah
versions of hg: http://permalink.gmane.org/gmane.comp.version-control.mercurial.general/23195 So it looks like a known issue, see also: https://bugzilla.mozilla.org/show_bug.cgi?id=644904 Stefan Krah ___ Python-Dev mailing list Python-Dev@python.org http://

Re: [Python-Dev] Python 2.7: only Visual Studio 2008?

2012-08-25 Thread Stefan Krah
;s 'n' format specifier actually relies on the CRT locale. The functions in question are in libmpdec, so on Windows it is not possible to compile a static libmpdec and build the module from that. Well, it's possible, but setting the locale from Python then h

Re: [Python-Dev] Py_buffer.obj documentation

2012-08-30 Thread Stefan Krah
' when the memoryview is deallocated? Permanent memoryviews can now be safely created with PyMemoryView_FromMemory(). PyMemoryView_FromBuffer() isn't really that useful any more. It's hard to document all this in a few lines. Perhaps you can open an issue for this? Stefan Kra

Re: [Python-Dev] Coverity scan

2012-09-05 Thread Stefan Krah
r you? Not yet, please do if it's no problem. Stefan Krah ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Re: [Python-Dev] Coverity scan

2012-09-05 Thread Stefan Krah
Your request for analysis of Python has been completed. The results > should be available now in the database: http://scan5.coverity.com:8080/ Thanks Christian, works perfectly! Stefan Krah ___ Python-Dev mailing list Python-Dev@python.org

Re: [Python-Dev] Coverity scan

2012-09-06 Thread Stefan Krah
The mailing list would be nice especially if we could get the results in verbose text form, but I don't know if that's possible. BTW, do we keep all buffer overruns secret or can we post them on the tracker if it's an off-by-one and unlikely to be

Re: [Python-Dev] Coverity scan

2012-09-08 Thread Stefan Krah
mit messages. That said, for users of the Coverity web interface it's clearly useful. Stefan Krah ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Re: [Python-Dev] Failed issue tracker submission

2012-09-08 Thread Stefan Krah
x27;s avoid that in the future. Stefan Krah ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Re: [Python-Dev] [Python-checkins] cpython (merge 3.2 -> default): Fix out of bounds read in long_new() for empty bytes with an explicit base.

2012-09-12 Thread Stefan Krah
Coverity appears to have serious problems with shortcut evaluations in many places.

Re: [Python-Dev] [Python-checkins] cpython: Make sure that *really* no more than sizeof(ifr.ifr_name) chars are strcpy-ed

2012-09-12 Thread Stefan Krah
NG(interfaceName)) will not overrun ifr.ifr_name and ifr.ifr_name is always NUL terminated. So IMO the strcpy() was safe and the report is a false positive. Stefan Krah ___ Python-Dev mailing list Python-Dev@python.org http://mail.python

Re: [Python-Dev] [Python-checkins] cpython (merge 3.2 -> default): Closed reference leak of variable 'k' in function ste_new which wasn't decrefed

2012-09-12 Thread Stefan Krah
t; k = PyLong_FromVoidPtr(key); > if (k == NULL) > @@ -79,6 +79,7 @@ > > return ste; > fail: > +Py_XDECREF(k); > Py_XDECREF(ste); I think 'k' is owned by the PySTEntryObject after it is assigned here: ste->ste_id = k; So ste_dealloc() will call Py

Re: [Python-Dev] [Python-checkins] cpython (merge 3.2 -> default): Fix out of bounds read in long_new() for empty bytes with an explicit base.

2012-09-12 Thread Stefan Krah
Christian Heimes wrote: > Am 12.09.2012 16:22, schrieb Stefan Krah: > > This is a false positive: > > You might be right. But did you notice that there is much more code > beyond the large comment block in PyLong_FromString()? There might be > other code paths that push

<    1   2   3   4   >