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
Change by Stefan Krah :
--
nosy: -skrah
___
Python tracker
<https://bugs.python.org/issue32597>
___
___
Python-bugs-list mailing list
Unsubscribe:
Stefan Krah added the comment:
Well, they had ample time to articulate themselves. :)
--
___
Python tracker
<https://bugs.python.org/issue20767>
___
___
Pytho
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
Stefan Krah added the comment:
I'll take a look.
--
assignee: -> skrah
___
Python tracker
<https://bugs.python.org/issue32630>
___
___
Python-bugs-lis
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_
Change by Stefan Krah :
--
priority: release blocker -> normal
___
Python tracker
<https://bugs.python.org/issue32630>
___
___
Python-bugs-list mailing list
Un
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
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
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
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
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
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.
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
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
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
Stefan Pochmann added the comment:
Yes, there's also `array.array`.
--
nosy: +Stefan Pochmann
___
Python tracker
<https://bugs.python.org/issue32767>
___
___
Stefan Pochmann added the comment:
And `bytearray`.
--
___
Python tracker
<https://bugs.python.org/issue32767>
___
___
Python-bugs-list mailing list
Unsubscribe:
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.
--
Change by Stefan Krah :
--
resolution: -> not a bug
status: open -> closed
___
Python tracker
<https://bugs.python.org/issue32848>
___
___
Python-bugs-list
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
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
Change by Stefan Behnel :
--
pull_requests: +5508
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue20928>
___
___
Python-bugs-list mai
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
Change by Stefan Behnel :
--
nosy: +scoder
___
Python tracker
<https://bugs.python.org/issue32388>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Stefan Behnel :
--
nosy: +scoder
___
Python tracker
<https://bugs.python.org/issue32387>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Stefan Behnel :
--
nosy: +scoder
___
Python tracker
<https://bugs.python.org/issue32856>
___
___
Python-bugs-list mailing list
Unsubscribe:
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
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
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
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
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
Change by Stefan Behnel :
--
components: +Extension Modules
nosy: +scoder
___
Python tracker
<https://bugs.python.org/issue32973>
___
___
Python-bugs-list mailin
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
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
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
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
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
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
Change by Stefan Krah :
--
nosy: -skrah
___
Python tracker
<https://bugs.python.org/issue26680>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Stefan Krah :
--
nosy: -skrah
___
Python tracker
<https://bugs.python.org/issue33083>
___
___
Python-bugs-list mailing list
Unsubscribe:
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
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
Stefan Sauer added the comment:
Sorry need to find the ticket for argparse ..
--
___
Python tracker
<https://bugs.python.org/issue18338>
___
___
Python-bug
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
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
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
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
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
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 #
Stefan Behnel added the comment:
PR is complete now, ready for merging.
--
___
Python tracker
<https://bugs.python.org/issue20928>
___
___
Python-bugs-list mailin
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
Change by Stefan Behnel :
--
pull_requests: +6034
stage: resolved -> patch review
___
Python tracker
<https://bugs.python.org/issue31455>
___
___
Python-
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
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.
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
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'
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
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
___
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
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
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
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
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
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
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
Stefan Behnel added the comment:
Any comments on this?
--
___
Python tracker
<https://bugs.python.org/issue31465>
___
___
Python-bugs-list mailing list
Unsub
Stefan Behnel added the comment:
Still ready for merging :)
--
___
Python tracker
<https://bugs.python.org/issue31336>
___
___
Python-bugs-list mailing list
Unsub
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.
-
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
Change by Stefan Behnel :
--
nosy: -scoder
___
Python tracker
<https://bugs.python.org/issue30576>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Stefan Behnel :
--
nosy: +haypo
___
Python tracker
<https://bugs.python.org/issue31465>
___
___
Python-bugs-list mailing list
Unsubscribe:
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. :)
--
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']"
Change by Stefan Behnel :
--
keywords: +patch
pull_requests: +3816
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue31648>
___
___
Py
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
Stefan Behnel added the comment:
Thanks for noticing. I added a test and fixed it.
--
___
Python tracker
<https://bugs.python.org/issue31648>
___
___
Python-bug
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
Stefan Behnel added the comment:
Thanks for the reviews, and thank you for merging it, Serhiy.
--
___
Python tracker
<https://bugs.python.org/issue31336>
___
___
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
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
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.
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.
--
_
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
Change by Stefan Behnel :
--
pull_requests: +3968
___
Python tracker
<https://bugs.python.org/issue31455>
___
___
Python-bugs-list mailing list
Unsubscribe:
Stefan Behnel added the comment:
Backport PR for 2.7 added: 3992
--
___
Python tracker
<https://bugs.python.org/issue31455>
___
___
Python-bugs-list mailin
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
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
Stefan Krah added the comment:
That's fine.
--
___
Python tracker
<https://bugs.python.org/issue31792>
___
___
Python-bugs-list mailing list
Unsubscr
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
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
<
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
Change by Stefan Behnel :
--
pull_requests: +4029
___
Python tracker
<https://bugs.python.org/issue25658>
___
___
Python-bugs-list mailing list
Unsubscribe:
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
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
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
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
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
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
Change by Stefan Krah :
--
nosy: +eric.snow
___
Python tracker
<https://bugs.python.org/issue31845>
___
___
Python-bugs-list mailing list
Unsubscribe:
2001 - 2100 of 4951 matches
Mail list logo