[issue7652] Merge C version of decimal into py3k.

2012-03-07 Thread Stefan Krah
Stefan Krah added the comment: Marc-Andre Lemburg wrote: > Does the C version have a C API importable as capsule ? Not yet. I'll try to make a list with proposed function names and post it here. > If not, could you add one and a decimal.h to go with it ?

[issue7652] Merge C version of decimal into py3k.

2012-03-07 Thread Stefan Krah
Stefan Krah added the comment: This issue was raised by Jim on Rietveld: Currently, the order of arguments in Context.__init__() differs from repr(Context): >>> Context() Context(prec=28, rounding=ROUND_HALF_EVEN, Emin=-9, Emax=9, capitals=1, flags=[], traps=[Divis

[issue14212] Segfault when using re.finditer over mmap

2012-03-07 Thread Stefan Krah
Changes by Stefan Krah : -- nosy: +skrah ___ Python tracker <http://bugs.python.org/issue14212> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue7652] Merge C version of decimal into py3k.

2012-03-07 Thread Stefan Krah
Stefan Krah added the comment: Jim Jewett wrote: > > OK, as a basis for discussion I've added: > > http://hg.python.org/features/cdecimal/file/8b75c2825508/Modules/_decimal/FILEMAP.txt > > Starting from that URL, I don't actually find setup.py. It's the s

[issue7652] Merge C version of decimal into py3k.

2012-03-10 Thread Stefan Krah
Changes by Stefan Krah : Added file: http://bugs.python.org/file24776/9b3b1f5c4072.diff ___ Python tracker <http://bugs.python.org/issue7652> ___ ___ Python-bugs-list m

[issue7652] Merge C version of decimal into py3k.

2012-03-10 Thread Stefan Krah
Stefan Krah added the comment: Here's a new patch that addresses several remarks: o _decimal now has __floor__ and __ceil__methods. o libmpdec is now in a separate directory. o I removed the big libmpdec test suite. This is why: - It reduces the number of files that has

[issue7652] Merge C version of decimal into py3k.

2012-03-10 Thread Stefan Krah
Stefan Krah added the comment: Here's a new patch that addresses several remarks: o _decimal now has __floor__ and __ceil__methods. o libmpdec is now in a separate directory. o I removed the big libmpdec test suite. This is why: - It reduces the number of files that has

[issue14249] unicodeobject.c: aliasing warnings

2012-03-10 Thread Stefan Krah
New submission from Stefan Krah : There are a couple of aliasing warnings in non-debug mode. For example: http://www.python.org/dev/buildbot/all/builders/x86%20Gentoo%20Non-Debug%203.x/builds/1741 Objects/object.c:293: warning: ignoring return value of 'fwrite', declared with

[issue7652] Merge C version of decimal into py3k.

2012-03-11 Thread Stefan Krah
Stefan Krah added the comment: Benjamin Peterson wrote: > Speaking of inline, the "inline" keyword will have to go because it's not C89. Actually the trickier instances of "inline" in the .c files are already suppressed when LEGACY_COMPILER (i.e. C89) is defined.

[issue14249] unicodeobject.c: aliasing warnings

2012-03-12 Thread Stefan Krah
Stefan Krah added the comment: Benjamin Peterson wrote: > gcc 4.5 doesn't warn for me. Is this a compiler bug in 4.4 or 4.5? > That is, are these actual aliasing violations? I see this with 4.4 but also with 4.6 when using -Wstrict-aliasing=2. However, nothing bad happens when I c

[issue14272] ast.c: windows compile error

2012-03-12 Thread Stefan Krah
New submission from Stefan Krah : The Windows build seems to be broken: Python-ast.c ..\Python\Python-ast.c(459) : error C2059: syntax error

[issue14272] ast.c: windows compile error

2012-03-13 Thread Stefan Krah
Stefan Krah added the comment: Looks fixed in 6bee4eea1efa. -- resolution: -> fixed stage: -> committed/rejected status: open -> closed ___ Python tracker <http://bugs.python.or

[issue14286] xxlimited.obj: unresolved external symbol __imp__PyObject_New

2012-03-13 Thread Stefan Krah
New submission from Stefan Krah : Linking fails on Windows 64-bit. Perhaps Py_LIMITED_API ifdefs are missing. Creating library C:\Users\stefan\hg\cpython\PCbuild\\amd64\\xxlimited.lib and object C:\Users\stefan\hg\c python\PCbuild\\amd64\\xxlimited.exp

[issue13889] str(float) and round(float) issues with FPU precision

2012-03-13 Thread Stefan Krah
Stefan Krah added the comment: I've looked at the latest patch: It seems that new_387controlword is not set if old_387controlword already has the desired precision and rounding mode. Attached is a revised patch that uses the same logic as the Linux version. A couple of remarks: - It

[issue13889] str(float) and round(float) issues with FPU precision

2012-03-13 Thread Stefan Krah
Stefan Krah added the comment: Mark Dickinson wrote: > http://msdn.microsoft.com/en-us/library/e9b52ceh(v=vs.100).aspx > Question 1: when doing __control87_2(new, mask, &old, NULL), does the > resulting value in old reflect the *new* FPU state or the old one? The new one, but

[issue13889] str(float) and round(float) issues with FPU precision

2012-03-13 Thread Stefan Krah
Stefan Krah added the comment: Stefan Krah wrote: > > Stefan Krah added the comment: > > Mark Dickinson wrote: > > http://msdn.microsoft.com/en-us/library/e9b52ceh(v=vs.100).aspx > > Question 1: when doing __control87_2(new, mask, &old, NULL), does the > &

[issue7652] Merge C version of decimal into py3k.

2012-03-14 Thread Stefan Krah
Stefan Krah added the comment: Mark Dickinson wrote: > > FWIW, I think we would be better off if this patch were merged in soon. > > +1 OK, I'm counting three +1 for merging soon. Thanks everyone for the encouragement! I'll then proceed with the merge this weekend or s

[issue7652] Merge C version of decimal into py3k.

2012-03-14 Thread Stefan Krah
Stefan Krah added the comment: Arfrever Frehtes Taifersar Arahesis wrote: > Please add --with-system-libmpdec (or --with-system-mpdecimal) option in > `configure`, similarly to --with-system-expat and --with-system-ffi options. I've added that to the list of issues. However, if t

[issue11826] Leak in atexitmodule

2012-03-15 Thread Stefan Krah
Stefan Krah added the comment: Antoine Pitrou wrote: > Well, if it doesn't crash, it's probably ok ;) > Perhaps check modstate->atexit_callbacks for non-NULL? > Or do we trust free() to do the right thing? I was initially surprised by this, but the docs state

[issue14334] Invalid free in _PyUnicode_Ready()

2012-03-16 Thread Stefan Krah
New submission from Stefan Krah : Hi -- I'm getting a segfault running the attached crasher.py script. Valgrind traces it down to an Invalid free() / delete / delete[] in _PyUnicode_Ready(). Reproduce: == Rev: 870c0ef7e8a2 Build: ./configure --without-pymalloc CFLAGS="-O0 -

[issue14334] Invalid free in _PyUnicode_Ready()

2012-03-16 Thread Stefan Krah
Stefan Krah added the comment: 3.2 also crashes. 2.7 runs fine. So it's certainly not related to the new Unicode API. -- versions: +Python 3.2 ___ Python tracker <http://bugs.python.org/is

[issue14334] Crash: getattr(type, '__getattribute__')(type, type)

2012-03-16 Thread Stefan Krah
Stefan Krah added the comment: I've traced it down to this line: >>> getattr(type, '__getattribute__')(type, type) Segmentation fault Setting to 'normal', since there are apparently more of these. -- priority: high -> normal title: Invali

[issue14325] Stop using the garbage collector to manage the lifetime of the getargs.c freelist

2012-03-16 Thread Stefan Krah
Stefan Krah added the comment: I'm getting a leak since this revision: ./configure --without-pymalloc CFLAGS="-O0 -g" && make valgrind --db-attach=yes --suppressions=./Misc/valgrind-python.supp --leak-check=full ./python leak.py ==32303== 16 bytes in 1 blocks are

[issue14325] Stop using the garbage collector to manage the lifetime of the getargs.c freelist

2012-03-16 Thread Stefan Krah
Stefan Krah added the comment: Here's leak.py. -- Added file: http://bugs.python.org/file24890/leak.py ___ Python tracker <http://bugs.python.org/is

[issue14337] test_builtin: refleaks

2012-03-16 Thread Stefan Krah
New submission from Stefan Krah : I don't see immediately why, but since 3877bf2e323 test_builtin and a couple of other tests leak in refcounting mode: hg up 8a5742b7a14d make distclean && ./configure --with-pydebug && make ./python -m test -uall -R :: test_built

[issue14337] Recent refleaks

2012-03-16 Thread Stefan Krah
Stefan Krah added the comment: Ah, thanks for the pointer. 9e7f6ddc0d76 is clean, but default still leaks. Next attempt: OK: d2460ff173ff Leak: 3b2856d8614b test_dict leaked [12, 12] references, sum=24 test_builtin leaked [24, 24] references, sum=48 test_unittest leaked [970, 970

[issue14337] Recent refleaks

2012-03-17 Thread Stefan Krah
Stefan Krah added the comment: Nice. 0554183066b5 is completely clean except for a leak in test_curses. I think that one may be due to the fact that I'm running the tests in an ssh terminal. -- resolution: -> fixed stage: -> committed/rejected status: ope

[issue14363] Can't build Python 3.3a1 on Centos 5

2012-03-18 Thread Stefan Krah
Stefan Krah added the comment: This is a duplicate of #14296. See also #14359. -- nosy: +skrah resolution: -> duplicate stage: -> committed/rejected status: open -> closed superseder: -> Compilation error on CentOS 5.8 type: ->

[issue14370] enumerate() lead to system crashes

2012-03-20 Thread Stefan Krah
Stefan Krah added the comment: I can reproduce this with Python 3.2 on Linux-2.4.32/i686 with 512M of RAM. The machine does not crash, it freezes completely in the same manner as with a fork bomb. A hard reboot is required. -- nosy: +skrah type: performance -> resource us

[issue14198] Backport parts of the new memoryview documentation

2012-03-20 Thread Stefan Krah
Stefan Krah added the comment: Kristj??n Valur J??nsson wrote: > Stefan, I just want to point out this issue, if you are touching 2.7: > http://bugs.python.org/issue10538 > Do you think it merits being fixed? I think so. A patch would be appreciated, since the issue touches the o

[issue10538] PyArg_ParseTuple("s*") does not always incref object

2012-03-20 Thread Stefan Krah
Changes by Stefan Krah : -- nosy: +skrah ___ Python tracker <http://bugs.python.org/issue10538> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue3367] Uninitialized value read in parsetok.c

2012-03-20 Thread Stefan Krah
Stefan Krah added the comment: It isn't fixed. Also, there's now an additional invalid read in sys_update_path(): $ valgrind --db-attach=yes --suppressions=Misc/valgrind-python.supp ./python ==20258== Memcheck, a memory error detector ==20258== Copyright (C) 2002-2010, and GNU

[issue7652] Merge C version of decimal into py3k.

2012-03-20 Thread Stefan Krah
Stefan Krah added the comment: We need to decide what to do with the different limits of the 64-bit and 32-bit versions: MAX_EMAX default context 10**9-1 64-bit 10**18-1 32-bit42500 I think it would be annoying to have the

[issue7652] Merge C version of decimal into py3k.

2012-03-21 Thread Stefan Krah
Stefan Krah added the comment: > The best thing might be to use Emax=10**8-1 and Emin=-(10**8-1) throughout. > I don't think many applications depend on having Emax=10**9-1. If they do, > they'll have to use the 64-bit version. 10**6-1 would be another option. The adv

[issue14387] Include\accu.h incompatible with Windows.h

2012-03-22 Thread Stefan Krah
Stefan Krah added the comment: Hmm, I still get the error in 13cefcbcc7da: c:\Users\stefan\pydev\cpython\Include\accu.h(21) : error C2059: syntax error : 'type' c:\Users\stefan\pydev\cpython\Include\accu.h(22) : error C2059: syntax error : '}'

[issue14387] Include\accu.h incompatible with Windows.h

2012-03-22 Thread Stefan Krah
Stefan Krah added the comment: Jeff's #undef suggestion works here (see patch). But I have a question: Where is Windows.h pulled in anyway? A grep only shows signalmodule.c: $ find . -name "\.hg" -prune -o -type f -print0 | xargs -0 grep -n 'Windows\.h' ./Modules/

[issue14387] Include\accu.h incompatible with Windows.h

2012-03-22 Thread Stefan Krah
Stefan Krah added the comment: Jeff Robbins wrote: > I am sorry if I've caused any confusion. I am building a Python extension > (APSW), and it includes the sqlite "amalgamation" and also includes Python.h. The Python build itself failed here, too, specifically in unicod

[issue14387] Include\accu.h incompatible with Windows.h

2012-03-22 Thread Stefan Krah
Stefan Krah added the comment: To prevent further confusion. :) db154e62ac03 -> OK 5fe7d19ec49a -> failure 5fe7d19ec49a with #undef patch -> OK So I don't know if it is better to revert to db154e62ac03 or to use the #undef patch. Jeff, you originally said: 'An exten

[issue14394] missing links on performance claims of cdecimal

2012-03-23 Thread Stefan Krah
Stefan Krah added the comment: > But there's no link on the benchmark code. I don't know if external links are appropriate in whatsnew, but this is it: http://www.bytereef.org/mpdecimal/quickstart.html -- nosy: +skrah ___ Python t

[issue3367] Uninitialized value read in parsetok.c

2012-03-26 Thread Stefan Krah
Stefan Krah added the comment: It's the line argv0 = argv[0] in sys_update_path(). The copies of argv made in python.c aren't NULL terminated. Kristján's patch worked around that (and fixes the problem), but I'd prefer to make a full copy of argv in python.c. Could one of y

[issue3367] Uninitialized value read in parsetok.c

2012-03-26 Thread Stefan Krah
Stefan Krah added the comment: > 3) line 1812 assumes n to be equal to the length of arg0, but depending > > on conditional compilation, it may not get set at all, and in any> > case in line line 1805 it gets set only if p is not NULL. n is initialized to 0 when

[issue3367] Uninitialized value read in parsetok.c

2012-03-26 Thread Stefan Krah
Stefan Krah added the comment: I only have the C99 standard. It says [5.1.2.2.1]: - argv[argc] shall be a NULL pointer. Is this different in C89? Also, my patch terminates the *copies* of argv, not argv itself. -- ___ Python tracker <h

[issue3367] Uninitialized value read in parsetok.c

2012-03-26 Thread Stefan Krah
Stefan Krah added the comment: K&R page 115 also says: The standard requires that argv[argc] be a NULL pointer. So it must be in C89 as well. -- ___ Python tracker <http://bugs.python.org/is

[issue11826] Leak in atexitmodule

2012-03-26 Thread Stefan Krah
Stefan Krah added the comment: Actually _iomodule.c already has a freefunc with the same signature. atexit_free() is properly called in: static void module_dealloc(PyModuleObject *m) { PyObject_GC_UnTrack(m); if (m->md_def && m->md_def->m_free) m->md_def-&

[issue14386] Expose dictproxy as a public type

2012-03-26 Thread Stefan Krah
Stefan Krah added the comment: I wonder about the name: There is already a collections.abc.MappingView. -- nosy: +skrah ___ Python tracker <http://bugs.python.org/issue14

[issue11826] Leak in atexitmodule

2012-03-27 Thread Stefan Krah
Changes by Stefan Krah : -- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed versions: -Python 3.2 ___ Python tracker <http://bugs.python.or

[issue7652] Merge C version of decimal into py3k.

2012-03-27 Thread Stefan Krah
Stefan Krah added the comment: I have a couple of questions about the proposed capsule C API. In order to be useful, it should be possible to set temporary contexts and pass them to functions. For example, PyDec_Add could look like: PyDec_Add(PyObject *a, PyObject *b, PyObject *context

[issue14417] dict RuntimeError workaround

2012-03-31 Thread Stefan Krah
Stefan Krah added the comment: By adding a slow __eq__() method to Nick's script I can trigger the RuntimeError reliably. -- nosy: +skrah Added file: http://bugs.python.org/file25086/hammer_dict_eq.py ___ Python tracker <http://bugs.py

[issue14394] Add speed improvement note to the decimal docs.

2012-04-01 Thread Stefan Krah
Stefan Krah added the comment: Leaving this open since a "New in version 3.3" speed improvement note in the docs would be useful. -- title: missing links on performance claims of cdecimal -> Add speed improvement note to the

[issue14387] Include\accu.h incompatible with Windows.h

2012-04-01 Thread Stefan Krah
Stefan Krah added the comment: > Should I contact the extension's author(s)/maintainer(s) and tell them about > this ordering requirement? FWIW, it is the recommended way in the docs. The Python build itself has been fixed. Does the http://code.google.com/p/apsw/ modul

[issue14417] dict RuntimeError workaround

2012-04-01 Thread Stefan Krah
Stefan Krah added the comment: OK, here's a version with a low switch interval. Of course it's also contrived, but it works. Generally I'd appreciate the RuntimeError, since it's a hint that something needs to be rewritten in an application. It might be a problem if t

[issue14387] Include\accu.h incompatible with Windows.h

2012-04-02 Thread Stefan Krah
Stefan Krah added the comment: Jeff Robbins wrote: > I'm happy to try another build of apsw, but am not up-to-speed with how to > get development copies of Python. As a user, I typically download the > latest Windows .msi file and install it. If you can point me to a documen

[issue14387] Include\accu.h incompatible with Windows.h

2012-04-02 Thread Stefan Krah
Stefan Krah added the comment: > The fix solved my apsw build problem. Thanks for testing. As for the test failure, that could be really anything. Often these kinds of failures turn out to be overly strict assumptions in the test suite. Best ask the maintainer of the package. So 3.3

[issue14341] sporadic (?) test_urllib2 failures

2012-04-02 Thread Stefan Krah
Stefan Krah added the comment: This occurs quite frequently now. In the latest build four bots show this error. http://www.python.org/dev/buildbot/all/builders/x86%20Ubuntu%20Shared%203.x/builds/5605/steps/test/logs/stdio http://www.python.org/dev/buildbot/all/builders/AMD64%20FreeBSD%209.0

[issue14478] Decimal hashing very slow, could be cached

2012-04-03 Thread Stefan Krah
Stefan Krah added the comment: I agree that caching the hash would be useful for 3.2, but the request comes at a unfortunate time: 3.2.3 is about to be released, and there's no way that the change would go into it. So let's focus on the C version in 3.3. These are the timings o

[issue14478] Decimal hashing very slow, could be cached

2012-04-03 Thread Stefan Krah
Stefan Krah added the comment: > but hashing will be faster. I retract that. The exponent actually makes things worse. -- ___ Python tracker <http://bugs.python.org/issu

[issue14065] Element should support cyclic GC

2012-04-03 Thread Stefan Krah
Stefan Krah added the comment: Just in case you missed it: The Windows buildbots fail to compile 14abfa27ff19: http://www.python.org/dev/buildbot/all/builders/x86%20Windows7%203.x -- nosy: +skrah ___ Python tracker <http://bugs.python.

[issue14249] unicodeobject.c: aliasing warnings

2012-04-05 Thread Stefan Krah
Stefan Krah added the comment: On 64-bit Linux with gcc-4.4 I get: Unpatched: $ ./python -m timeit -s 'import codecs; d = codecs.utf_16_be_decode; x = (" " * 1000).encode("utf-16be")' 'd(x)' 10 loops, best of 3: 4.1 usec per loop $

[issue14341] sporadic (?) test_urllib2 failures

2012-04-06 Thread Stefan Krah
Stefan Krah added the comment: Running test_http_cookiejar and test_urllib2 in succession always fails here. The same thing occurs when running test_urllib2 twice: $ ./python -m test test_http_cookiejar test_urllib2 [1/2] test_http_cookiejar [2/2] test_urllib2 test test_urllib2 failed

[issue14520] Buggy Decimal.__sizeof__

2012-04-07 Thread Stefan Krah
Stefan Krah added the comment: It isn't implemented at all. The Python version also always returns 96, irrespective of the coefficient length. Well, arguably the coefficient is a separate object in the Python version: 96 >>> sys.getsizeof(d._int) 212 For the C version I'l

[issue14520] Buggy Decimal.__sizeof__

2012-04-07 Thread Stefan Krah
Stefan Krah added the comment: In full: >>> d = >>> Decimal(1) >>> >>> sys.getsizeof(d)

[issue14520] Buggy Decimal.__sizeof__

2012-04-09 Thread Stefan Krah
Stefan Krah added the comment: Mark Dickinson wrote: > In the C version of decimal, do distinct Decimal objects ever share > coefficients? The coefficients are members of the mpd_t struct (libmpdec data type), and they are not exposed as Python objects or shared. Cache local

[issue14520] Buggy Decimal.__sizeof__

2012-04-09 Thread Stefan Krah
Stefan Krah added the comment: Thanks for the explanations. The new __sizeof__() method should now report the exact memory usage. -- resolution: -> fixed stage: -> committed/rejected status: open -> closed ___ Python track

[issue14478] Decimal hashing very slow, could be cached

2012-04-10 Thread Stefan Krah
Stefan Krah added the comment: I think it would be a good idea to fix this in the Python version for the other implementations. -- ___ Python tracker <http://bugs.python.org/issue14

[issue14478] Decimal hashing very slow, could be cached

2012-04-10 Thread Stefan Krah
Stefan Krah added the comment: I changed the C version to cache the hash as well: For the submitted test case the speedup is only 5x, but hashing times vary greatly depending of the size of the coefficient and the exponent. BTW, the tests already call both hash() and __hash__() on the same

[issue14478] Decimal hashing very slow, could be cached

2012-04-10 Thread Stefan Krah
Stefan Krah added the comment: The patch for the Python version looks good to me. -- ___ Python tracker <http://bugs.python.org/issue14478> ___ ___ Python-bug

[issue14341] sporadic (?) test_urllib2 failures

2012-04-10 Thread Stefan Krah
Stefan Krah added the comment: How about silencing the AssertionError until a better solution is found? The patch works here. -- keywords: +patch Added file: http://bugs.python.org/file25173/issue14341.diff ___ Python tracker <h

[issue14583] try/except import fails --without-threads

2012-04-14 Thread Stefan Krah
New submission from Stefan Krah : In the build --without-threads, catching an ImportError in support.py fails. Fedora buildbot: http://www.python.org/dev/buildbot/all/builders/AMD64%20Fedora%20without%20threads%203.x/builds/1986/steps/test/logs/stdio ./python ./Tools/scripts/run_tests.py -j 1

[issue14583] try/except import fails --without-threads

2012-04-15 Thread Stefan Krah
Stefan Krah added the comment: The SystemError has changed to a KeyError: http://www.python.org/dev/buildbot/all/builders/AMD64%20Fedora%20without%20threads%203.x/builds/2004/steps/test/logs/stdio At least that makes it easy to spot the location in import.c. The shortest way to reproduce

[issue36970] Rename _PyObject_FastCall functions

2019-05-20 Thread Stefan Krah
Stefan Krah added the comment: Sorry for the bikeshedding here, but I'll read those function names a lot. Is it possible to rename Vectorcall, which looks good on its own but not inside _PyObject_VectorcallDict()? _PyObject_FastCallDict is much easier to read. Has the PEP been accepte

[issue36970] Rename _PyObject_FastCall functions

2019-05-20 Thread Stefan Krah
Stefan Krah added the comment: > You think that "_PyObject_FastCallDict" is easier to read than > "_PyObject_VectorcallDict"? I don't think that there is much difference. Marvellous. How much do you work with the C-API? -- ___

[issue36970] Rename _PyObject_FastCall functions

2019-05-20 Thread Stefan Krah
Stefan Krah added the comment: It is one thing to name something __vectorcall, and quite another to mix camel and normal case. When I'm scanning the code very quickly, I initially parse _PyObject_VectorcallDict as PyObject_VectorallDict or_PyObject_Vector_callDict. >From the per

[issue36970] Rename _PyObject_FastCall functions

2019-05-20 Thread Stefan Krah
Change by Stefan Krah : -- nosy: -skrah ___ Python tracker <https://bugs.python.org/issue36970> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue36970] Rename _PyObject_FastCall functions

2019-05-20 Thread Stefan Krah
Change by Stefan Krah : -- nosy: -skrah ___ Python tracker <https://bugs.python.org/issue36970> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue36970] Rename _PyObject_FastCall functions

2019-05-20 Thread Stefan Krah
Stefan Krah added the comment: Only people with very much time on their hands have the luxury to discuss changes like this on python-dev. -- ___ Python tracker <https://bugs.python.org/issue36

[issue36970] Rename _PyObject_FastCall functions

2019-05-20 Thread Stefan Krah
Stefan Krah added the comment: Also, thank you for lecturing a core dev again. -- nosy: +skrah ___ Python tracker <https://bugs.python.org/issue36970> ___ ___

[issue36839] Support the buffer protocol in code objects

2019-06-01 Thread Stefan Krah
Stefan Krah added the comment: The managed buffer can be shared: >>> b = b'12345' >>> m1 = memoryview(b) >>> m2 = memoryview(m1) >>> gc.get_referents(m1)[0] >>> gc.get_referents(m2)[0] And I understood that Dino proposed to sh

[issue36839] Support the buffer protocol in code objects

2019-06-02 Thread Stefan Krah
Stefan Krah added the comment: On Sun, Jun 02, 2019 at 02:38:21AM +, Inada Naoki wrote: > What instance means? code object? co_code? > Anyway, Dino didn't propose such thing. He only proposed accepting buffer > object for code constructor. > He didn't describe ho

[issue36839] Support the buffer protocol in code objects

2019-06-04 Thread Stefan Krah
Stefan Krah added the comment: 720MB <= "3-4 dozen" * 20 MB <= 960MB. Per server. It has all been said. :-) I don't understand the objections about alignment. malloc() and obmalloc() are at least 8-byte aligned, mmap() with NULL as the first para

[issue36839] Support the buffer protocol in code objects

2019-06-04 Thread Stefan Krah
Stefan Krah added the comment: There's no point discussing unless people develop reading skills. -- ___ Python tracker <https://bugs.python.org/is

[issue36839] Support the buffer protocol in code objects

2019-06-04 Thread Stefan Krah
Change by Stefan Krah : -- nosy: -skrah ___ Python tracker <https://bugs.python.org/issue36839> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue37168] Decimal divisions sometimes 10x or 100x too large

2019-06-05 Thread Stefan Krah
Stefan Krah added the comment: Thank you for the detailed report. So, in an attempt to summarize, this is the crucial passage: >>> ideal_exp = -1 >>> exp = -29 >>> coeff = 15 >>> division_counter = 0 >>> while exp &

[issue37168] Decimal divisions sometimes 10x or 100x too large

2019-06-06 Thread Stefan Krah
Stefan Krah added the comment: There are lots of ideas still. :) As I said, on a Linux other than RedHat or Debian or such I'd first try to blame the shipped Python, then the libc (I had a glibc memmove issue once with similar inexplicable results). Alpine Linux apparently uses musl

[issue37168] Decimal divisions sometimes 10x or 100x too large

2019-06-06 Thread Stefan Krah
Stefan Krah added the comment: Yes, I'd try Debian first, then potential libc issues can also be eliminated in a single experiment. -- ___ Python tracker <https://bugs.python.org/is

[issue37188] Creating a ctypes array of an element with size zero causes "Fatal Python error: Floating point exception"

2019-06-07 Thread Stefan Krah
Stefan Krah added the comment: New changeset 0690c79c419b8d2bdfe7c5b6dca57b018f5a5a54 by Stefan Krah (Eric Wieser) in branch 'master': bpo-37188: Fix a divide-by-zero in arrays of size-0 objects (#13881) https://github.com/python/cpython/commit/0690c79c419b8d2bdfe7c5b6dca57b

[issue37188] Creating a ctypes array of an element with size zero causes "Fatal Python error: Floating point exception"

2019-06-07 Thread Stefan Krah
Stefan Krah added the comment: New changeset 8f0bbbdcae73f275faff90cc4559f616f001 by Stefan Krah (Miss Islington (bot)) in branch '3.7': bpo-37188: Fix a divide-by-zero in arrays of size-0 objects (GH-13881) (#13882) https://github.com/python/cpyt

[issue37188] Creating a ctypes array of an element with size zero causes "Fatal Python error: Floating point exception"

2019-06-07 Thread Stefan Krah
Stefan Krah added the comment: Thanks for the fix! 3.7/3.8 are done, 2.7 still needs a manual backport. -- versions: -Python 3.7, Python 3.8 ___ Python tracker <https://bugs.python.org/issue37

[issue37188] Creating a ctypes array of an element with size zero causes "Fatal Python error: Floating point exception"

2019-06-07 Thread Stefan Krah
Change by Stefan Krah : -- stage: patch review -> backport needed ___ Python tracker <https://bugs.python.org/issue37188> ___ ___ Python-bugs-list mai

[issue37188] Creating a ctypes array of an element with size zero causes "Fatal Python error: Floating point exception"

2019-06-08 Thread Stefan Krah
Stefan Krah added the comment: New changeset 48f190f79cd89f7ad4409b3c782e462368583309 by Stefan Krah (Eric Wieser) in branch '2.7': [2.7] bpo-37188: Fix a divide-by-zero in arrays of size-0 objects (#13906) https://github.com/python/cpython/commit/48f190f79cd89f7ad4409b3c782e46

[issue37188] Creating a ctypes array of an element with size zero causes "Fatal Python error: Floating point exception"

2019-06-08 Thread Stefan Krah
Stefan Krah added the comment: New changeset 3d03a35ba0f162a350898100efc95fdf392070a2 by Stefan Krah (Miss Islington (bot)) in branch '3.8': [3.8] bpo-37188: Fix a divide-by-zero in arrays of size-0 objects (#13911) https://github.com/python/cpyt

[issue37188] Creating a ctypes array of an element with size zero causes "Fatal Python error: Floating point exception"

2019-06-08 Thread Stefan Krah
Change by Stefan Krah : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue37483] Add PyObject_CallOneArg()

2019-07-03 Thread Stefan Krah
Stefan Krah added the comment: The motivation for this PR is "it would be convenient to have this function". This is probably true, but generally I would not change 47 files at once. Most of the locations are probably not performance sensitive. -- no

[issue37483] Add PyObject_CallOneArg()

2019-07-03 Thread Stefan Krah
Stefan Krah added the comment: It adds yet another special case underscore function that one cannot use in external projects. So I would not say that is simpler. Has there been any performance measurement at all? -- ___ Python tracker <ht

[issue37483] Add PyObject_CallOneArg()

2019-07-03 Thread Stefan Krah
Stefan Krah added the comment: > Or do you care about *using* API with underscore? If so, I'm OK to stop > changing some callers which are not tightly coupled with Python. I care about this one. Indeed I think underscore functions should be used in strategic places insi

[issue37415] Error build Python with Intel compiler: doesn't provide atomic_uintptr_t

2019-07-21 Thread Stefan Krah
Stefan Krah added the comment: Is it available with -std=c11? It is a bit strange that we use -std=c99. I thought that header is C11: https://en.cppreference.com/w/c/atomic -- nosy: +skrah ___ Python tracker <https://bugs.python.org/issue37

[issue19692] Rename Py_SAFE_DOWNCAST

2019-08-03 Thread Stefan Krah
Stefan Krah added the comment: Why would one not abort() in release mode? If the cast is inexact, the results will usually be so wrong that even on a web server a hard exit is preferable. I don't think the check costs much time with branch prediction. -- nosy: +

[issue30625] Documentation is unclear how "y*" and "y#" format units vary

2017-06-14 Thread Stefan Krah
Stefan Krah added the comment: Out of curiosity: Is the 3.2 documentation clearer? https://docs.python.org/3.2/c-api/arg.html#strings-and-buffers Lately we have a lot of churn in the docs, not necessarily written by subject experts

[issue30625] Documentation is unclear how "y*" and "y#" format units vary

2017-06-16 Thread Stefan Krah
Stefan Krah added the comment: Okay thanks, it's good to hear what others think about the docs. > So I have no clue why "y#" is refusing such an object. "y#" is refusing memoryview(bytes) because "y#" only allows objects without a releasebufferproc and

[issue24999] Segfault in test_re.test_sre_character_class_literals() when Python is compiled by ICC

2017-06-27 Thread Stefan Krah
Stefan Krah added the comment: icc on Linux has always worked exactly as gcc, except that -fp-model=strict needs to be specified. I can't test on Windows -- I don't seem to get MSVC licences any more. -- ___ Python tracker <http://bu

[issue29301] decimal: Use FASTCALL and/or Argument Clinic

2017-06-27 Thread Stefan Krah
Stefan Krah added the comment: I think I'll wait until #29464 is committed and the API is considered frozen (see msg295176?). -- ___ Python tracker <http://bugs.python.org/is

<    6   7   8   9   10   11   12   13   14   15   >