[issue32597] Bad detection of clang

2018-01-20 Thread Stefan Krah
Stefan Krah added the comment: > https://bugs.python.org/issue20767 was showing the issue and imho badly fixed. You do realize that the fix was proposed by FreeBSD people and that the upstream Clang issue is still open? -- nosy: +skrah ___ Pyt

[issue32597] Bad detection of clang

2018-01-22 Thread Stefan Krah
Change by Stefan Krah : -- nosy: -skrah ___ Python tracker <https://bugs.python.org/issue32597> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue20767] Some python extensions can't be compiled with clang 3.4

2018-01-22 Thread Stefan Krah
Stefan Krah added the comment: Well, they had ample time to articulate themselves. :) -- ___ Python tracker <https://bugs.python.org/issue20767> ___ ___ Pytho

[issue28716] Fractions instantiation revisited

2018-01-22 Thread Stefan Behnel
Stefan Behnel added the comment: Not sure if it's relevant for this specific change, but here's a benchmark that you could use for Fractions: issue22458 -- nosy: +scoder ___ Python tracker <https://bugs.python.o

[issue32630] Migrate decimal to use PEP 567 context variables

2018-01-23 Thread Stefan Krah
Stefan Krah added the comment: I'll take a look. -- assignee: -> skrah ___ Python tracker <https://bugs.python.org/issue32630> ___ ___ Python-bugs-lis

[issue32630] Migrate decimal to use PEP 567 context variables

2018-01-25 Thread Stefan Krah
Stefan Krah added the comment: I realize that you had to fight massive mailing list distractions during the PEP discussions, but this is very close to the beta ... Let's start here: >>> from decimal import * ==18887== Invalid read of size 8 ==18887==at 0x5324E0: contextvar_

[issue32630] Migrate decimal to use PEP 567 context variables

2018-01-25 Thread Stefan Krah
Change by Stefan Krah : -- priority: release blocker -> normal ___ Python tracker <https://bugs.python.org/issue32630> ___ ___ Python-bugs-list mailing list Un

[issue32630] Migrate decimal to use PEP 567 context variables

2018-01-25 Thread Stefan Krah
Stefan Krah added the comment: Sure, and *I* am the one running the extended decimal test suite as we speak, not Guido. You are playing power games here, and you did that from the start by choosing the nosy list. -- ___ Python tracker <ht

[issue32630] Migrate decimal to use PEP 567 context variables

2018-01-26 Thread Stefan Krah
Stefan Krah added the comment: Tests - I ran some of my own tests (not even close to all), they seem fine. However, I could not find any tests for the added feature (safe use with async) though. We would be adding a new feature without tests. Performance --- I'm getting a

[issue32630] Migrate decimal to use PEP 567 context variables

2018-01-26 Thread Stefan Krah
Stefan Krah added the comment: On Fri, Jan 26, 2018 at 09:06:38PM +, Yury Selivanov wrote: > This benchmark is specially constructed to profile creating decimal contexts > and doing almost nothing with the It is not constructed at all. It was the first thing I wrote down trying to

[issue32630] Migrate decimal to use PEP 567 context variables

2018-01-26 Thread Stefan Krah
Stefan Krah added the comment: Guido, I have the feeling that the feature -- about which I was actually positive in the first place -- is being pushed aggressively with no respect for the module author. BTW, prec is changed quite frequently in decimal code, so if people want infix notation

[issue32630] Migrate decimal to use PEP 567 context variables

2018-01-26 Thread Stefan Krah
Stefan Krah added the comment: I have run about 1000 times more decimal benchmarks than both Yury and you. You attempt to hurt my reputation is laughable. Show me some top-performance code that you have written. -- ___ Python tracker <ht

[issue32630] Migrate decimal to use PEP 567 context variables

2018-01-26 Thread Stefan Krah
Stefan Krah added the comment: Yury, would you be willing to work this out by email? -- I think it was you who I discussed the context-subclassing with and that was quite a pleasant experience. -- ___ Python tracker <https://bugs.python.

[issue32630] Migrate decimal to use PEP 567 context variables

2018-01-26 Thread Stefan Krah
Stefan Krah added the comment: Guido, I apologize for the outburst. I had the impression that msg310799 implicitly asserted my incompetence in benchmarking. -- ___ Python tracker <https://bugs.python.org/issue32

[issue32630] Migrate decimal to use PEP 567 context variables

2018-01-27 Thread Stefan Krah
Stefan Krah added the comment: On Fri, Jan 26, 2018 at 11:11:00PM +, STINNER Victor wrote: > vstinner@apu$ ./python -m perf compare_to master.json pr5278.json > Mean +- std dev: [master] 1.86 us +- 0.03 us -> [pr5278] 2.27 us +- 0.04 us: > 1.22x slower (+22%) > > N

[issue32368] Segfault when compiling many conditional expressions

2018-02-06 Thread Stefan Nordhausen
Stefan Nordhausen added the comment: The fix for https://bugs.python.org/issue31113 also fixed this issue. -- resolution: -> duplicate stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue32767] Mutating a list while iterating: clarify the docs

2018-02-06 Thread Stefan Pochmann
Stefan Pochmann added the comment: Yes, there's also `array.array`. -- nosy: +Stefan Pochmann ___ Python tracker <https://bugs.python.org/issue32767> ___ ___

[issue32767] Mutating a list while iterating: clarify the docs

2018-02-07 Thread Stefan Pochmann
Stefan Pochmann added the comment: And `bytearray`. -- ___ Python tracker <https://bugs.python.org/issue32767> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue32848] Valgrind error with python

2018-02-15 Thread Stefan Krah
Stefan Krah added the comment: You have two options: a) ./configure CFLAGS="-O0 -g" --without-pymalloc b) ./configure CFLAGS="-O0 -g" --with-valgrind For b) you need the Valgrind headers installed. --with-pydebug is always wrong when using Valgrind. --

[issue32848] Valgrind error with python

2018-02-15 Thread Stefan Krah
Change by Stefan Krah : -- resolution: -> not a bug status: open -> closed ___ Python tracker <https://bugs.python.org/issue32848> ___ ___ Python-bugs-list

[issue32858] Improve OpenSSL ECDH support

2018-02-16 Thread Stefan Rüster
New submission from Stefan Rüster : Tested with OpenSSL v1.1.0g, Python does not support selection of curve Curve25519 with _ssl.ctx.set_ecdh_curve("X25519"). Additionally the DH key exchange parameters (which curve has been chosen, what DH bit size was used) are not available throu

[issue20928] xml.etree.ElementInclude does not include nested xincludes

2018-02-17 Thread Stefan Behnel
Stefan Behnel added the comment: The latest "fixed2" patch looks good to me, but the author didn't sign a contributors agreement. However, I did, and I already wrote the same thing for lxml, so I put together an initial PR. -- type: behavior -> enhancement ver

[issue20928] xml.etree.ElementInclude does not include nested xincludes

2018-02-17 Thread Stefan Behnel
Change by Stefan Behnel : -- pull_requests: +5508 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue20928> ___ ___ Python-bugs-list mai

[issue20928] xml.etree.ElementInclude does not include nested xincludes

2018-02-18 Thread Stefan Behnel
Stefan Behnel added the comment: > The check may miss infinite recursions if the hrefs happen to be written in > non-matching but equivalent forms. Ex: relative versus absolute paths. I thought about that, too, but it's not a real problem. There are only a few different ways t

[issue32388] Remove cross-version binary compatibility

2018-02-19 Thread Stefan Behnel
Change by Stefan Behnel : -- nosy: +scoder ___ Python tracker <https://bugs.python.org/issue32388> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue32387] Disallow untagged C extension import on major platforms

2018-02-19 Thread Stefan Behnel
Change by Stefan Behnel : -- nosy: +scoder ___ Python tracker <https://bugs.python.org/issue32387> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue32856] Optimize the `for y in [x]` idiom in comprehensions

2018-02-19 Thread Stefan Behnel
Change by Stefan Behnel : -- nosy: +scoder ___ Python tracker <https://bugs.python.org/issue32856> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue20928] xml.etree.ElementInclude does not include nested xincludes

2018-02-23 Thread Stefan Behnel
Stefan Behnel added the comment: I've added a 'max_depth' argument to limit the maximum recursive include depth to 6 by default (which is a small, arbitrarily chosen value). Users can set it to None to disable the limit. >From my side, I don't see any more features th

[issue32925] AST optimizer: Change a list into tuple in iterations and containment tests

2018-02-24 Thread Stefan Behnel
Stefan Behnel added the comment: An obvious optimisation, if you ask me. PR looks good to me superficially, but I don't know the AST code well. -- nosy: +scoder ___ Python tracker <https://bugs.python.org/is

[issue32945] sorted(generator) is slower than sorted(list-comprehension)

2018-02-25 Thread Stefan Behnel
Stefan Behnel added the comment: sorted() *does* convert its input to a list first, and only then sorts it. It calls PySequence_List() for that, which in turn uses list_extend(), which then applies the obvious optimisation of copying input lists (and tuples) directly. What you are seeing

[issue32945] sorted(generator) is slower than sorted(list-comprehension)

2018-02-25 Thread Stefan Behnel
Stefan Behnel added the comment: The constant function call overhead doesn't make a big difference: $ /opt/python3.7-opt/bin/python3 -m timeit 'list(i for i in range(1000))' 5000 loops, best of 5: 55 usec per loop $ /opt/python3.7-opt/bin/python3 -m timeit '[i for i in

[issue32945] sorted(generator) is slower than sorted(list-comprehension)

2018-02-25 Thread Stefan Behnel
Stefan Behnel added the comment: > as `range` may have been shadowed at that point No, range() has in fact already been executed at that point. And it returned an iterable that knows its length (search for "LengthHint" in the CP

[issue32973] Importing the same extension module under multiple names breaks non-reinitialisable extension modules

2018-03-02 Thread Stefan Behnel
Change by Stefan Behnel : -- components: +Extension Modules nosy: +scoder ___ Python tracker <https://bugs.python.org/issue32973> ___ ___ Python-bugs-list mailin

[issue32973] Importing the same extension module under multiple names breaks non-reinitialisable extension modules

2018-03-02 Thread Stefan Behnel
Stefan Behnel added the comment: > change the extension module cache to key on filename and init function name ... or on the pointer to the PyInit function. If that's the same, we obviously have the same extension module. If it differs, even for the same module name, then other gl

[issue32388] Remove cross-version binary compatibility

2018-03-03 Thread Stefan Behnel
Stefan Behnel added the comment: I'm ok with "removing" this "guarantee" (although it seems too late to apply this specific change to 3.7 now). While Cython users do ask for a way to build cross-version binaries from time to time, it's neither supported n

[issue28716] Fractions instantiation revisited

2018-03-04 Thread Stefan Behnel
Stefan Behnel added the comment: Just FYI and as further motivation, I reimplemented this dedicated parser for quicktions (in Cython, so the timings and speedups are not comparable). https://github.com/scoder/quicktions/commit/cc034e07325ec492decdb7b1bcca69246cc780fd I was able to get

[issue26680] Incorporating float.is_integer into the numeric tower and Decimal

2018-03-12 Thread Stefan Krah
Stefan Krah added the comment: I agree with Mark's mailing list statements: There is no ambiguity for decimal, given that the existing predicates ignore the context. -- ___ Python tracker <https://bugs.python.org/is

[issue26680] Incorporating float.is_integer into the numeric tower and Decimal

2018-03-15 Thread Stefan Krah
Stefan Krah added the comment: In effect: "!(Py_IS_FINITE(dx) && dx == floor(dx))" I don't understand why Robert is questioned so much. mpd_as_integer() (or rather the optimized version _mpd_isint() is used all over the place inside libm

[issue26680] Incorporating float.is_integer into the numeric tower and Decimal

2018-03-15 Thread Stefan Krah
Stefan Krah added the comment: libmpdec is an example of numerical code. I don't think anyone but you has argued that is_integer() is useless in numerical code. Whether it is float or decimal doesn't matter. I get the API-bloat argument, but I'm completely surprised th

[issue26680] Incorporating float.is_integer into the numeric tower and Decimal

2018-03-15 Thread Stefan Krah
Change by Stefan Krah : -- nosy: -skrah ___ Python tracker <https://bugs.python.org/issue26680> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue33083] math.factorial accepts non-integral Decimal instances

2018-03-15 Thread Stefan Krah
Change by Stefan Krah : -- nosy: -skrah ___ Python tracker <https://bugs.python.org/issue33083> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue32476] Add concat functionality to ElementTree xpath find

2018-03-16 Thread Stefan Behnel
Stefan Behnel added the comment: I can't see why this should be restricted to attribute values and not text content in general. Therefore, I would suggest adding general support for functions, and making this only a special case. Otherwise, this would only solve a very niche problem

[issue18338] python --version should send output to STDOUT

2018-03-24 Thread Stefan Sauer
Stefan Sauer added the comment: Is there a workaround for python2? The issue is that autotools is checking that installed tools support --help and --version and it expects those to stdout: bad=0; pid=$$; list="gtkdoc-check gtkdoc-depscan gtkdoc-fixxref gtkdoc-mkdb gtkdoc-mkhtml g

[issue18338] python --version should send output to STDOUT

2018-03-24 Thread Stefan Sauer
Stefan Sauer added the comment: Sorry need to find the ticket for argparse .. -- ___ Python tracker <https://bugs.python.org/issue18338> ___ ___ Python-bug

[issue18920] argparse version action should print to stdout, not stderr

2018-03-24 Thread Stefan Sauer
Stefan Sauer added the comment: Is there a workaround for python2? The issue is that autotools is checking that installed tools support --help and --version and it expects those to stdout: bad=0; pid=$$; list="gtkdoc-check gtkdoc-depscan gtkdoc-fixxref gtkdoc-mkdb gtkdoc-mkhtml g

[issue33126] Some C buffer protocol APIs not documented

2018-03-24 Thread Stefan Krah
Stefan Krah added the comment: I fixed PyBuffer_ToContiguous() in 3.3, PyBuffer_FromContiguous() was broken until #23370. For a start, here's a doc patch for PyBuffer_ToContiguous(). PyBuffer_FromContiguous() does the opposite and loads a contiguous buffer into a possibly non-contiguous

[issue33126] Some C buffer protocol APIs not documented

2018-03-25 Thread Stefan Krah
Stefan Krah added the comment: Yes, the signatures are weird. In PyBuffer_FromContiguous(), "len" is the size of "buf" in bytes. If "buf" contains 6 floats, but "view" only has space for 4, then only 4 are copied into "view". To avoid that s

[issue33126] Some C buffer protocol APIs not documented

2018-03-25 Thread Stefan Krah
Stefan Krah added the comment: And if view->len > len in PyBuffer_FromContiguous(), then view will contain uninitialized bytes, which is bad. -- ___ Python tracker <https://bugs.python.org/i

[issue33187] Document ElementInclude (XInclude) support in ElementTree

2018-03-30 Thread Stefan Behnel
New submission from Stefan Behnel : The ElementInclude module in ElementTree seems undocumented. I couldn't find any documentation in the stdlib docs. Pretty much the only source that I could find is here: http://effbot.org/zone/element-xinclude.htm I noticed it while looking for a pla

[issue20928] xml.etree.ElementInclude does not include nested xincludes

2018-03-30 Thread Stefan Behnel
Stefan Behnel added the comment: There seems to be no documentation currently for ElementInclude. Would be nice if someone who's interested in this feature could take the time to write something up. I created a documentation ticket as issue #

[issue20928] xml.etree.ElementInclude does not include nested xincludes

2018-03-30 Thread Stefan Behnel
Stefan Behnel added the comment: PR is complete now, ready for merging. -- ___ Python tracker <https://bugs.python.org/issue20928> ___ ___ Python-bugs-list mailin

[issue31455] ElementTree.XMLParser() mishandles exceptions

2018-03-31 Thread Stefan Behnel
Stefan Behnel added the comment: Right, Zachary, thanks for noticing. Py2.7 is actually way more different than I thought, and I hadn't paid enough attention to that. Py3 does all of this in "__init__", whereas Py2 essentially implements "__new__" in C, which requires

[issue31455] ElementTree.XMLParser() mishandles exceptions

2018-03-31 Thread Stefan Behnel
Change by Stefan Behnel : -- pull_requests: +6034 stage: resolved -> patch review ___ Python tracker <https://bugs.python.org/issue31455> ___ ___ Python-

[issue31455] ElementTree.XMLParser() mishandles exceptions

2018-03-31 Thread Stefan Behnel
Stefan Behnel added the comment: PR 6318 fixes the reference leak for Py2.7. -- ___ Python tracker <https://bugs.python.org/issue31455> ___ ___ Python-bugs-list m

[issue33189] pygettext doesn't work with f-strings

2018-04-01 Thread Stefan Behnel
Stefan Behnel added the comment: Is there really a use case for this? I would normally expect place holders to get replaced *after* translation, i.e. in the translated text, not before. -- nosy: +scoder ___ Python tracker <https://bugs.python.

[issue33230] _decimal build failure (unsupported platform for that module) - evolution possible?

2018-04-05 Thread Stefan Krah
Stefan Krah added the comment: I don't have OS X. However, this is the first time in 6 years that anyone has reported an OS X build failure. Perhaps Ned knows the answer. -- nosy: +ned.deily, skrah ___ Python tracker <https://bugs.py

[issue33230] _decimal build failure (unsupported platform for that module) - evolution possible?

2018-04-06 Thread Stefan Krah
Stefan Krah added the comment: It looks to me as if you are compiling --with-system-libmpdec. You don't need that, libmpdec is included in the Python tarball. -with-system-libmpdec was added mainly for Linux distros. If there's a widespread interest to support it on OS X, I'

[issue33230] _decimal build failure (unsupported platform for that module) - evolution possible?

2018-04-06 Thread Stefan Krah
Stefan Krah added the comment: Another source of error is of course if the external libmpdec was not compiled as "universal" but Python is. -- ___ Python tracker <https://bugs.python.o

[issue33230] _decimal build failure (unsupported platform for that module) - evolution possible?

2018-04-10 Thread Stefan Krah
Stefan Krah added the comment: I'm trying to reduce the number of open issues that I'm involved in. If something concrete comes up, feel free to reopen. -- resolution: -> works for me stage: -> resolved status: open -> closed ___

[issue33310] Update references to PIL-style arrays

2018-04-18 Thread Stefan Krah
Stefan Krah added the comment: I guess I don't really see much of an issue: The first link for "PIL Python" goes Pillow page and since Pillow is just a fork, the technical term is IMHO "PIL-style". I like to give c

[issue33310] Update references to PIL-style arrays

2018-04-18 Thread Stefan Krah
Stefan Krah added the comment: I think I want to leave it as is. Probably no one is using suboffsets anyway. :-) -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue33389] argparse redundant help string

2018-04-29 Thread Stefan Seefeld
New submission from Stefan Seefeld : I'm using Python's `argparse` module to define optional arguments. I'm calling the `argparse.add_argument` method to add both short and long arguments, but I notice that the generated help message lists some information twi

[issue32797] Tracebacks from Cython modules no longer work

2018-05-04 Thread Stefan Behnel
Change by Stefan Behnel : -- type: -> behavior versions: +Python 3.5, Python 3.6, Python 3.7, Python 3.8 ___ Python tracker <https://bugs.python.org/issu

[issue32915] Running Python 2 with -3 flag doesn't complain about cmp/__cmp__

2018-05-06 Thread Stefan Behnel
Stefan Behnel added the comment: > cmp(a,b) can be replaced with (a>b)-(a b" and "a < b" both return something that supports the minus operator, such as a boolean value. That might not be the case, and it is definitely impossible to infer automatically from a given

[issue28055] pyhash's siphash24 assumes alignment of the data pointer

2018-05-13 Thread Stefan Krah
Stefan Krah added the comment: MSVC optimizes memcpy() to an assignment, sometimes too well (pgo): https://bugs.python.org/issue15993 But that is fixed long ago, so I also think that the memcpy() approach is best. -- ___ Python tracker <ht

[issue31569] inconsistent case of PCbuild/ directory

2017-09-24 Thread Stefan Grönke
New submission from Stefan Grönke: While reading the build documentation for Windows, I've noticed the `PCbuild/` directory to be mentioned with a different case than the directory in the repository (`PCBuild/` instead of `PCbuild/`). Every occasion of `PCBuild` should be replaced

[issue31465] Allow _PyType_Lookup() to raise exceptions

2017-09-25 Thread Stefan Behnel
Stefan Behnel added the comment: Any comments on this? -- ___ Python tracker <https://bugs.python.org/issue31465> ___ ___ Python-bugs-list mailing list Unsub

[issue31336] Speed up _PyType_Lookup() for class creation

2017-09-25 Thread Stefan Behnel
Stefan Behnel added the comment: Still ready for merging :) -- ___ Python tracker <https://bugs.python.org/issue31336> ___ ___ Python-bugs-list mailing list Unsub

[issue31580] Defer compiling regular expressions

2017-09-26 Thread Stefan Behnel
Stefan Behnel added the comment: I'm also against changing re.compile() to not compile. And I often write code like this: replace_whitespace = re.compile(r"\s+").sub which is not covered by your current proposed change. -

[issue30576] http.server should support HTTP compression (gzip)

2017-09-27 Thread Stefan Behnel
Stefan Behnel added the comment: FWIW, both the feature and the PR look ok to me. Code formatting is a little funny at times, but the implementation looks good. -- nosy: +scoder ___ Python tracker <https://bugs.python.org/issue30

[issue30576] http.server should support HTTP compression (gzip)

2017-09-27 Thread Stefan Behnel
Change by Stefan Behnel : -- nosy: -scoder ___ Python tracker <https://bugs.python.org/issue30576> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue31465] Allow _PyType_Lookup() to raise exceptions

2017-09-28 Thread Stefan Behnel
Change by Stefan Behnel : -- nosy: +haypo ___ Python tracker <https://bugs.python.org/issue31465> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue31619] Strange error when convert hexadecimal with underscores to int

2017-09-29 Thread Stefan Krah
Stefan Krah added the comment: > We see if digits * bits_per_char + PyLong_SHIFT -1 overflows an int? Yes, but the check is too late: UB can already occur in this calculation and then all bets are off. It looks like 'n' was Py_ssize_t in 2.7. :) --

[issue31648] Improve ElementPath

2017-09-30 Thread Stefan Behnel
New submission from Stefan Behnel : * Allow whitespace around predicate parts, i.e. "[a = 'text']" instead of requiring the less readable "[a='text']". * Add support for text comparison of the current node, like "[.='text']"

[issue31648] Improve ElementPath

2017-09-30 Thread Stefan Behnel
Change by Stefan Behnel : -- keywords: +patch pull_requests: +3816 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue31648> ___ ___ Py

[issue31648] Improve ElementPath

2017-09-30 Thread Stefan Behnel
Stefan Behnel added the comment: Well, there's XPath for a standard: https://www.w3.org/TR/xpath/ ElementPath deviates from it in its namespace syntax (it allows "{ns}tag" where XPath requires "p:tag" prefixes), but that's about it. All other differences are bas

[issue31648] Improve ElementPath

2017-09-30 Thread Stefan Behnel
Stefan Behnel added the comment: Thanks for noticing. I added a test and fixed it. -- ___ Python tracker <https://bugs.python.org/issue31648> ___ ___ Python-bug

[issue31555] Windows pyd slower when not loaded via load_dynamic

2017-09-30 Thread Stefan Krah
Stefan Krah added the comment: Does the difference stay at 10-15% if you run it 5 times or is it a one time cost of around 100 ms? -- nosy: +skrah ___ Python tracker <https://bugs.python.org/issue31

[issue31336] Speed up _PyType_Lookup() for class creation

2017-10-01 Thread Stefan Behnel
Stefan Behnel added the comment: Thanks for the reviews, and thank you for merging it, Serhiy. -- ___ Python tracker <https://bugs.python.org/issue31336> ___ ___

[issue31630] math.tan has poor accuracy near pi/2 on OpenBSD

2017-10-01 Thread Stefan Krah
Stefan Krah added the comment: OpenBSD reduces to the range [-pi/4,pi/4]: https://github.com/openbsd/src/blob/master/lib/libm/src/s_tan.c According to the man page on i386: http://man.openbsd.org/FreeBSD-11.0/math.3 "Argument reduction is not performed accurately for huge argu

[issue11063] Rework uuid module: lazy initialization and add a new C extension

2017-10-02 Thread Stefan Krah
Stefan Krah added the comment: I think the configure check should be this (sets HAVE_LIBUUID in pyconfig.h): diff --git a/configure.ac b/configure.ac index 41bd9effbf..90d53c1b7d 100644 --- a/configure.ac +++ b/configure.ac @@ -2657,6 +2657,7 @@ AC_MSG_RESULT($SHLIBS) AC_CHECK_LIB(sendfile

[issue31684] Scientific formatting of decimal 0 different from float 0

2017-10-04 Thread Stefan Krah
Stefan Krah added the comment: Yes, from the point of view of decimal it's the right thing: >>> x = Decimal("1e25").quantize(Decimal("1e30")) >>> x Decimal('0E+30') >>> '{:+.19e}'.format(x) '+0.

[issue31684] Scientific formatting of decimal 0 different from float 0

2017-10-04 Thread Stefan Krah
Stefan Krah added the comment: I don't think format() destroys the information: >>> '{:+.19e}'.format(Decimal("0.0e20")) '+0.000e+34' The original magnitude was e+15, after formatting it's still e+15. -- _

[issue31684] Scientific formatting of decimal 0 different from float 0

2017-10-04 Thread Stefan Krah
Stefan Krah added the comment: > I'm also assuming that Decimal(0) sets both base and exponent to 0. No, 0 is really special in the IBM specification. The magnitude is kept, the precision is not. >>> Decimal("0e10") * Decimal("0e20") Decimal('0E+30

[issue31455] ElementTree.XMLParser() mishandles exceptions

2017-10-13 Thread Stefan Behnel
Change by Stefan Behnel : -- pull_requests: +3968 ___ Python tracker <https://bugs.python.org/issue31455> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue31455] ElementTree.XMLParser() mishandles exceptions

2017-10-13 Thread Stefan Behnel
Stefan Behnel added the comment: Backport PR for 2.7 added: 3992 -- ___ Python tracker <https://bugs.python.org/issue31455> ___ ___ Python-bugs-list mailin

[issue31792] test_buffer altered the execution environment

2017-10-15 Thread Stefan Krah
Stefan Krah added the comment: So it is a numpy issue? Which numpy version is it? -- versions: +Python 3.8 -Python 3.6, Python 3.7 ___ Python tracker <https://bugs.python.org/issue31

[issue31792] test_buffer altered the execution environment

2017-10-15 Thread Stefan Krah
Stefan Krah added the comment: Thanks. If it only occurs when mixing debug/non-debug I don't think we have to do anything about it. -- ___ Python tracker <https://bugs.python.org/is

[issue31792] test_buffer altered the execution environment

2017-10-15 Thread Stefan Krah
Stefan Krah added the comment: That's fine. -- ___ Python tracker <https://bugs.python.org/issue31792> ___ ___ Python-bugs-list mailing list Unsubscr

[issue31792] test_buffer altered the execution environment

2017-10-15 Thread Stefan Krah
Stefan Krah added the comment: I can't figure out how to make the damn button green on GitHub, so LGTM. :) -- ___ Python tracker <https://bugs.python.org/is

[issue31792] test_buffer altered the execution environment

2017-10-15 Thread Stefan Krah
Stefan Krah added the comment: I'd push it so we don't have to worry about similar things in the future. The "warnings.catch_warnings()" thing is also a workaround for some past numpy release. -- ___ Python tracker <

[issue25658] PyThread assumes pthread_key_t is an integer, which is against POSIX

2017-10-20 Thread Stefan Behnel
Stefan Behnel added the comment: Would it be possible to define Py_tss_NEEDS_INIT as a constant variable instead of a static initialiser? That would enable its use also for non-static initialisations. -- nosy: +scoder ___ Python tracker <ht

[issue25658] PyThread assumes pthread_key_t is an integer, which is against POSIX

2017-10-20 Thread Stefan Behnel
Change by Stefan Behnel : -- pull_requests: +4029 ___ Python tracker <https://bugs.python.org/issue25658> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue25658] PyThread assumes pthread_key_t is an integer, which is against POSIX

2017-10-20 Thread Stefan Behnel
Stefan Behnel added the comment: It seems that there's a simpler way that uses a cast on the literal. I added a pull request. Looks simple enough to not merit its own ticket, I think. -- ___ Python tracker <https://bugs.python.org/is

[issue31828] Support Py_tss_NEEDS_INIT outside of static initialisation

2017-10-20 Thread Stefan Behnel
New submission from Stefan Behnel : Following up on issue 25658, it was found that the current definition of Py_tss_NEEDS_INIT restricts its use to initialisers in C and cannot be used for arbitrary assignments. It is currently declared as follows: #define Py_tss_NEEDS_INIT {0} which

[issue25658] PyThread assumes pthread_key_t is an integer, which is against POSIX

2017-10-20 Thread Stefan Behnel
Stefan Behnel added the comment: Seems like this isn't trivial, so I created a new ticket for this. See issue 31828. -- ___ Python tracker <https://bugs.python.org/is

[issue28224] Compilation warnings on Windows: export 'PyInit_xx' specified multiple times

2017-10-22 Thread Stefan Krah
Stefan Krah added the comment: I know I closed #20166 myself, but could we revisit this? I'm now in favor of telling people to fix their modules. -- nosy: +skrah status: closed -> open ___ Python tracker <https://bugs.python.org

[issue18835] Add aligned memory variants to the suite of PyMem functions/macros

2017-10-23 Thread Stefan Krah
Stefan Krah added the comment: I need this too. I would like to set this https://github.com/plures/ndtypes/commit/c260fdbae707da0dfefef499621a0a9f37a3e509#diff-2402fff6223084b74d97237c0d620b29R50 to something line PyMem_AlignedAlloc(), because the Python allocator is faster. I think many

[issue18835] Add aligned memory variants to the suite of PyMem functions/macros

2017-10-23 Thread Stefan Krah
Stefan Krah added the comment: Yes, I think it is partly convenience. I want to set ... ndt_mallocfunc = PyMem_Malloc; ndt_alignedallocfunc = PyMem_AlignedAlloc; ndt_callocfunc = PyMem_Calloc; ndt_reallocfunc = PyMem_Realloc; ndt_freefunc = PyMem_Free; ... so I can always just

[issue31845] PYTHONDONTWRITEBYTECODE and PYTHONOPTIMIZE have no effect

2017-10-23 Thread Stefan Krah
Change by Stefan Krah : -- nosy: +eric.snow ___ Python tracker <https://bugs.python.org/issue31845> ___ ___ Python-bugs-list mailing list Unsubscribe:

<    16   17   18   19   20   21   22   23   24   25   >