Stefan Krah added the comment:
Also, if anyone changes the rounding-mode constants it is really their problem.
--
___
Python tracker
<http://bugs.python.org/issue29
Stefan Krah added the comment:
To expand a little, you use the terminology "possible bugs". All I can
see is a double exception if PyUnicode_Compare() returns -1.
I think I did it on purpose because this function is speed sensitive and
no user will change a valid rounding mode *cons
Stefan Krah added the comment:
I'm generally a little concerned about the way "bugs" are presented here
recently:
In #28701 you write:
'Correctness. Since no caller checks the error of
PyUnicode_CompareWithASCIIString(), it is incorrectly interpreted as "less
then&
Stefan Krah added the comment:
For the record: This is all that happened in decimal if a) you
pass a legacy string and b) force _PyUnicode_Ready() to throw
a MemoryError:
>>> from decimal import *
>>> import _testcapi
>>> context = Context()
>>> traps = _t
Stefan Behnel added the comment:
This bug makes the installation of lxml fail on many systems (especially MacOS)
when pip installs from sources, because it tries to download its library
dependencies from FTP and crashes due to the FTP "error". I guess the current
fix is to not use
Stefan Behnel added the comment:
Actually, it seems that calling urlcleanup() is sufficient as a work-around.
--
___
Python tracker
<http://bugs.python.org/issue27
Stefan Behnel added the comment:
I'm ok with the deprecations.
Regarding the cElementTree module, this is a bit problematic. The idiomatic
import has lost its use in Py2.5 when ET and cET were added to the stdlib, so
code that was written for Py2.5 or later (e.g. because it uses gener
Stefan Krah added the comment:
On Mon, Jan 09, 2017 at 08:21:17AM +, Serhiy Storchaka wrote:
> In the particular case of getround() in _decimal.c, seems the worst case is
> raising TypeError instead of MemoryError in pretty rare circumstances. This
> is not critically bad, there
Stefan Krah added the comment:
For _decimal I'm happy with just the cast from the first patch -- you have a
one line diff and it's easy to see the focus of the issue.
--
___
Python tracker
<http://bugs.python.o
Stefan Krah added the comment:
I'll take a look when I have the opportunity.
AC will not happen: It makes the module too large and unreadable.
--
___
Python tracker
<http://bugs.python.org/is
Stefan Krah added the comment:
> STINNER Victor added the comment:
> > AC will not happen: It makes the module too large and unreadable.
>
> Ah you dislike the additional [clinic input] sections?
Yes, they tear apart the code. I stopped reading many C files because
of this.
Stefan Krah added the comment:
PyBUF_SIMPLE implies C-contiguous for a conforming buffer provider.
--
nosy: +skrah
___
Python tracker
<http://bugs.python.org/issue29
Stefan Krah added the comment:
I agree it's too late to change 2.7, and 3.x cannot (and should not) be changed
at this stage.
--
___
Python tracker
<http://bugs.python.org/is
Stefan Krah added the comment:
Thanks. Strange that on other systems the compilers don't complain (usually
they do).
--
assignee: -> skrah
___
Python tracker
<http://bugs.python.org
Changes by Stefan Krah :
--
resolution: -> fixed
stage: -> resolved
status: open -> closed
versions: +Python 3.6
___
Python tracker
<http://bugs.python.or
Stefan Krah added the comment:
I didn't look at this one, but some "hacks" are necessary in setup.py (example:
usage of os.system() in some places).
--
nosy: +skrah
___
Python tracker
<http://bugs.pyt
Stefan Krah added the comment:
Perhaps test_decimal should fail for CPython if _decimal can't be imported.
All compilers that I tested seem to link fine without -lm in this case.
--
___
Python tracker
<http://bugs.python.org/is
Stefan Krah added the comment:
If the API can still change (msg287083), I think I'll wait with this until
shortly before 3.7 beta.
--
___
Python tracker
<http://bugs.python.org/is
Stefan Krah added the comment:
Adding Stefan Behnel, perhaps Cython doesn't need backwards compatibility.
--
nosy: +scoder, skrah
___
Python tracker
<http://bugs.python.org/is
Stefan Behnel added the comment:
Thanks for asking. Cython doesn't use METH_FASTCALL yet, so this doesn't
introduce any problems.
Generally speaking, if Cython generated user code stops working with a new
CPython version, we expect people to regenerate their code with the newe
Changes by Stefan Krah :
--
nosy: +mark.dickinson, rhettinger, skrah
___
Python tracker
<http://bugs.python.org/issue29534>
___
___
Python-bugs-list mailin
Stefan Krah added the comment:
I get the the same output, perhaps I misunderstand something here:
>>> from _decimal import *
>>> class X(Decimal):
... def __init__(self, a):
... print('__init__:', a)
...
>>> X.from_float(42.5)
__init__:
Stefan Krah added the comment:
It's not a matter of *necessary*, you simply cannot use argparse in setup.py.
Try to build with your patch and you'll see.
--
___
Python tracker
<http://bugs.python.o
Changes by Stefan Krah :
--
resolution: -> not a bug
stage: -> resolved
status: open -> closed
___
Python tracker
<http://bugs.python.org/issue29442>
___
___
Stefan Krah added the comment:
On Mon, Feb 13, 2017 at 03:04:09PM +, Chi Hsuan Yen wrote:
>
> Chi Hsuan Yen added the comment:
>
> I have used my old patch several days on Android, and it seems quite fine.
> Anyway that's not important anymore.
I find that very surp
New submission from Stefan Pochmann:
About https://docs.python.org/3/library/functions.html: The title "Built-in
Functions", the table header "Built-in Functions" and the "functions" in the
URL all suggest that what's on this page are functions. But many thin
Stefan Pochmann added the comment:
The page also contains many references like "As repr(), return a string
containing..." where the "()" should be removed.
--
___
Python tracker
<http://bug
Stefan Krah added the comment:
It's okay to reopen if some conditions have changed (which is the case here).
--
___
Python tracker
<http://bugs.python.org/is
Stefan Krah added the comment:
Or pretend in the documentation that it's a positional arg and make it one
later. There is a slight performance difference.
I agree with Damien that probably no one uses the keyword arg.
--
___
Python tracker
Stefan Krah added the comment:
Sorry, I meant *Demian*.
--
___
Python tracker
<http://bugs.python.org/issue20408>
___
___
Python-bugs-list mailing list
Unsub
Stefan Krah added the comment:
I think such warnings should be emitted at application level, similar to the
case when a program refuses to run under UID 0.
If admins wish, they can also integrate such checks into the system startup
sequence (e.g. runlevel 3 is only reached if randomness is
Stefan Krah added the comment:
On Tue, Jun 07, 2016 at 10:01:16AM +, STINNER Victor wrote:
> Maybe need something like time.get_clock_info(), sys.float_info and
> sys.thread_info for os.urandom(): a string describing the implementation of
> os.urandom(). It would allow the dev
Stefan Krah added the comment:
man urandom:
"A read from the /dev/urandom device will not block waiting for more entropy.
As a result, if there is not sufficient entropy in the
entropy pool, the returned values are theoretically vulnerable to
a cryptographic attack o
Stefan Behnel added the comment:
Etree patch looks straight forward to me, feel free to apply it.
--
___
Python tracker
<http://bugs.python.org/issue25
Stefan Krah added the comment:
posixmodule_3.patch looks good to me. Gregory has already approved the
approach, so I think you can go ahead and commit this.
--
___
Python tracker
<http://bugs.python.org/issue26
Stefan Krah added the comment:
Thank you for the detailed summary!
--
resolution: -> fixed
stage: -> resolved
status: open -> closed
___
Python tracker
<http://bugs.python.or
Stefan Krah added the comment:
> PyDec_CheckExact(type) always return 0. Should be PyDec_CheckExact(result).
'result' is always an exact decimal, because your enum example won't work
otherwise.
> And what about other calls of PyDecType_FromFloatExact()? Can they produce
Changes by Stefan Krah :
--
status: open -> closed
___
Python tracker
<http://bugs.python.org/issue27006>
___
___
Python-bugs-list mailing list
Unsubscrib
Stefan Krah added the comment:
Let's close it then.
--
resolution: -> not a bug
stage: -> resolved
status: open -> closed
___
Python tracker
<http://bugs.pyth
Stefan Krah added the comment:
I'll look at it soon -- I just don't have much time right now.
--
assignee: -> skrah
___
Python tracker
<http://bugs.pytho
Stefan Krah added the comment:
You need to install at least these development libraries:
sudo apt-get install libssl-dev liblzma-dev libbz2-dev libreadline-dev
libgdbm-dev libffi-dev
Possibly some are missing in this list, tkinter and zip for example.
Use "apt-cache search tkinter"
Stefan Krah added the comment:
I think you need tcl8.4-dev and tk8.4-dev and perhaps zlib1g-dev.
Actually the point is that it's expected that some modules don't build
if the corresponding libraries aren't installed.
--
___
Python
Stefan Krah added the comment:
Ah, so the tests pass when you run them manually but "make test"
fails. This looks like
https://bugs.python.org/issue26837 ,
which is fixed in the next release. You can just ignore this
failure, it's harmless.
[BTW, using aut
Changes by Stefan Krah :
--
components: +Tests -Build, Installation
resolution: fixed -> duplicate
status: open -> closed
type: compile error -> behavior
___
Python tracker
<http://bugs.python.or
Stefan Krah added the comment:
It looks like the peephole optimizer chokes on some constant folding.
Probably:
INF = float("inf")
NAN = float("nan")
-INF
-NAN
You could try some combinations in the REPL.
--
nosy: +skrah
___
P
Changes by Stefan Krah :
Added file: http://bugs.python.org/file43660/issue27442-3.patch
___
Python tracker
<http://bugs.python.org/issue27442>
___
___
Python-bugs-list m
Stefan Krah added the comment:
I did "hg pull -u" before re-generating the diff. Other than that, sometimes
newer mercurial versions behave better (I have 2.8.2).
--
___
Python tracker
<http://bugs.python.o
Stefan Krah added the comment:
Good point about Misc/NEWS: I just regenerated the patch mindlessly to check
the "diff --git" situation :)
Actually, Xavier, it's often better to leave out the NEWS section in the bug
tracker patches and just add it before pushing. Perhaps Rietvel
Stefan Krah added the comment:
I guess so. Our Rietveld setup apparently has some heuristics that work best
when you're on the default branch and completely synced with the main repo.
--
___
Python tracker
<http://bugs.python.org/is
Stefan Krah added the comment:
Strange, why can anyone edit the classification? It happens a lot lately.
--
___
Python tracker
<http://bugs.python.org/issue20
Stefan Krah added the comment:
The approaches look good, but for clarity I want to replace all method calls
that should never be overridden by the plain C functions of their corresponding
static types.
I have no opinion about the Python version. The diff also "fixes" #26975 for
the
Stefan Krah added the comment:
These are builtin static types. Even with non-builtin static types, the address
of the type should always be the same. C-extensions aren't reloaded.
--
___
Python tracker
<http://bugs.python.org/is
Stefan Krah added the comment:
Also, IMO the whole capsule mechanism would be broken if function pointers in
dynamic libs could just be invalidated due to reloading.
--
___
Python tracker
<http://bugs.python.org/issue26
Stefan Krah added the comment:
I'm leaving this open in case anyone wants to do something about the Python
version. I tend to agree with Raymond:
It is impractical to "fix" all such constructs in the Python version, unless
one consistently uses a style like:
float.as_inte
Stefan Krah added the comment:
Which makes me think that --no-use-wheel should be the default in pip ...
As a Linux user I'm *very* uneasy about this whole binary wheel thing.
--
nosy: +skrah
___
Python tracker
<http://bugs.python.org/is
Stefan Krah added the comment:
Apparently sysconfig.get_config_var() is already called in site.py anyway,
so in principle I'm fine with using it here.
In the stdlib it seems to be the first use outside site.py though, and
site.py can be disabled by using "python -S", so perha
Changes by Stefan Krah :
--
stage: commit review -> resolved
status: open -> closed
___
Python tracker
<http://bugs.python.org/issue26974>
___
___
Pyth
Stefan Krah added the comment:
I can see nothing wrong with msg271168. It's polite, informative, not apodictic
and does not rule out the possibility of accepting a patch.
Also, it answers a direct question from msg271142.
--
nosy: +skrah
___
P
Changes by Stefan Krah :
--
nosy: -skrah
___
Python tracker
<http://bugs.python.org/issue27604>
___
___
Python-bugs-list mailing list
Unsubscribe:
Stefan Behnel added the comment:
Here is a proposed patch for a new function "strip_namespaces(tree)" that
discards all namespaces from tags and attributes in a (sub-)tree, so that
subsequent processing does not have to deal with them.
The "__all__" test is failing (have
Stefan Behnel added the comment:
On second thought, I think it should be supported (also?) in the parser.
Otherwise, using it with an async parser would be different from (and more
involved than) one-shot parsing. That seems wrong.
--
___
Python
Stefan Krah added the comment:
Марк, sorry for all this negativity. ;)
But I'm also -1. What is wrong with socket.ntohs() etc.?
--
nosy: +skrah
___
Python tracker
<http://bugs.python.org/is
Stefan Krah added the comment:
Yes, I agree this is nicer. Thanks for the patch.
--
nosy: +skrah
___
Python tracker
<http://bugs.python.org/issue27241>
___
___
Changes by Stefan Krah :
--
assignee: -> skrah
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
versions: +Python 3.5
___
Python tracker
<http://bugs.python
Stefan Krah added the comment:
We can of course commit this, but could you also lobby here?
https://llvm.org/bugs/show_bug.cgi?id=18164
I'm seeing this quite often that we fix something here and no one insists on
the upstream bug tra
Stefan Krah added the comment:
@Evelyn @koobs Thanks for communicating with the other projects that are
involved in this issue!
Could you double-check that especially the 2.7 patch does exactly what you
want? For 2.7 it's practically a one time c
Changes by Stefan Krah :
--
stage: patch review -> commit review
___
Python tracker
<http://bugs.python.org/issue20767>
___
___
Python-bugs-list mailing list
Un
New submission from Stefan Rosewig:
Trying to build tkinter menu dynamically by reading an ini file (configparser)
I detect an issue with the lambda function used inside a loop.
If the loop variable is used as option in the lambda function, the lambda is
not place in time using the current
Stefan Rosewig added the comment:
@Emanuel Barry
thanks for clarification, I didn't find this when I was searching for.
regards
Stefan
--
___
Python tracker
<http://bugs.python.org/is
Stefan Krah added the comment:
@Antti The behavior follows this standard:
http://speleotrove.com/decimal/decarith.html
Nothing we can do about it even if we wanted to.
--
___
Python tracker
<http://bugs.python.org/issue27
Stefan Krah added the comment:
@Antti Please think before you write and stop making unfounded allegations.
--
___
Python tracker
<http://bugs.python.org/issue26
Stefan Krah added the comment:
In 2.7 we use -fno-strict-aliasing and -fwrapv for gcc. I think it is probably
required to use the equivalent options for xlc.
These are examples of things that have been cleaned up in 3.x. 2.7 actually
relies on these options
Stefan Krah added the comment:
On Thu, Aug 11, 2016 at 09:17:10AM +, Antti Haapala wrote:
> However the *precision* of decimals is meaningless anyhow. Add a very
> precisely measured '0e0' to any number and the sum also has exponent of 0,
> and is thus never displ
Stefan Krah added the comment:
On Thu, Aug 11, 2016 at 09:29:44AM +, REIX Tony wrote:
> -fno-strict-aliasing -fwrapv for gcc
>
> So, that means that you would get better performance if you applied on Python
> v2.7 what Python v3.5 did about Py_SIZE(x) .
> However, there are
Stefan Krah added the comment:
> after reading the bad standard ...
Make sure not to buy a Power 6 processor and not to use IEEE 754-2008, because
that's essentially what you'll get.
IEEE doesn't specify engineering notation though.
--
Stefan Krah added the comment:
Your "buffer overflow" png shows the regular "414 request-uri too large"
traceback.
A traceback is not a crash (I wonder if we need an faq for this).
--
nosy: +skrah
resolution: -> not a bug
stage: -> resol
Stefan Krah added the comment:
Aaron, I may be wrong, but I understood this to be something like:
>>> from __future__ import barry_as_FLUFL
>>> 3 <> 10
True
I *do* hope sympy supports that! :-)
--
nosy: +skrah
_
Stefan Krah added the comment:
On Fri, Aug 12, 2016 at 08:38:52PM +, Serge Stroobandt wrote:
> This should not be that difficult to implement?
> I promise, every six months an engineer will stop by here asking for this.
> Instead of nagging, this could already have been implemente
Changes by Stefan Krah :
--
nosy: -skrah
___
Python tracker
<http://bugs.python.org/issue12345>
___
___
Python-bugs-list mailing list
Unsubscribe:
Stefan Krah added the comment:
Pavel did another analysis with the external packages removed. Thanks
for this!
http://www.viva64.com/en/b/0418/
The new analysis found another glitch. Also see my message to
python-committers.
--
nosy: +skrah
Stefan Krah added the comment:
Sorry, I missed issue27587_pystate_addmodule.diff: no new issue in the
updated analysis.
--
___
Python tracker
<http://bugs.python.org/issue27
Stefan Krah added the comment:
It is a known problem that PEP 3121 and later similar PEPs address.
Most C extensions leak a (usually very small) amount of memory with
each call to Initialize()/Finalize().
IMO this issue can be closed.
--
nosy: +skrah
Stefan Krah added the comment:
#15787. All Python versions have these leaks, which aren't terribly important
in practice.
If it still bothers you, consider writing a Python C extension instead of
"embedding" Python, which is what most people do anyway.
--
status:
Stefan Krah added the comment:
I found the docstrings a bit too verbose (the power() docstring takes up more
than a page), but I'm happy to add it and review a patch.
The patch authors need to take the hand written function signatures into
account.
--
assignee: docs@python -&g
Stefan Krah added the comment:
Agreed, the changes are too big for 2.7.
--
resolution: -> wont fix
stage: -> resolved
status: open -> closed
___
Python tracker
<http://bugs.python.or
New submission from Stefan Behnel:
I noticed that quite some time during number formatting is spent parsing the
format spec. The attached patch speeds up float formatting by 5-15% and integer
formatting by 20-30% for me overall when using f-strings (Ubuntu 16.04, 64bit).
--
components
Stefan Behnel added the comment:
You can easily see it by running timeit on fstrings, e.g. patched:
$ ./python -m timeit 'f"{34276394612:15}"'
100 loops, best of 3: 0.352 usec per loop
$ ./python -m timeit 'f"{34.276394612:8.6f}"'
100 loops, best
Changes by Stefan Behnel :
--
nosy: +scoder
___
Python tracker
<http://bugs.python.org/issue27128>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Stefan Behnel :
--
nosy: +scoder
___
Python tracker
<http://bugs.python.org/issue27810>
___
___
Python-bugs-list mailing list
Unsubscribe:
Stefan Behnel added the comment:
I agree that this would be cool. There is a tiny bit of a backwards
compatibility concern as the new function signature would be incompatible with
anything we had before, but I would guess that any code that chooses to bypass
PyObject_Call() & friends woul
Stefan Behnel added the comment:
Extensive callback interfaces like map() come to mind, where a large number of
calls becomes excessively time critical and might thus have made people
implement their own special purpose calling code.
However, I don't know any such code (outside of Cython
Stefan Behnel added the comment:
FYI: I copied your (no-kwargs) implementation over into Cython and I get around
17% faster calls to Python functions with 2 positional arguments.
--
___
Python tracker
<http://bugs.python.org/issue27
Stefan Behnel added the comment:
> What do you mean by "I copied your (no-kwargs) implementation"?
I copied what you committed into CPython for _PyFunction_FastCall():
https://github.com/cython/cython/commit/8f3d3bd199a3d7f2a9fdfec0af57145b3ab363ca
and then enabled its usage i
Stefan Behnel added the comment:
I like the oneArg/noArg etc. macros. We use something similar in Cython. You
can even use them to inline the METH_O and METH_NOARGS call cases (although I
use inline functions for that in Cython).
--
___
Python
Stefan Behnel added the comment:
I just took a quick look at the fastcall_kwargs-2.patch for now. It looks ok in
general, but it also adds quite some special code for the dict-to-locals
mapping. Is the keyword argument calling case really that important? I mean, it
requires creating a dict
Stefan Behnel added the comment:
If you care so much about C stack space, you could also try to create two or
three entry point functions that keep (say) a 4, 8 and 16 items array on the
stack respectively, and then pass the pointer (and the overall length if you
need it) of that array on
Stefan Krah added the comment:
Wow, on my machine this is very stable, great.
The output should be like
http://www.bytereef.org/software/mpdecimal/benchmarks/telco.py ,
but printing one number only should be okay. The important thing is that some
decimal is printed at all to test the
Stefan Krah added the comment:
Here's a proposal for an alternative without parameter docstrings and a
different DSL (see os_stat.c). I guess it's easiest to present my thoughts
in list form.
Changes and rationale:
==
Split docstring into function heade
Stefan Krah added the comment:
Jim Jewett wrote:
> (1) The first several lines ( "/* pymacro.h */" until "/* could go into a
> separate header file */" ) would not be written at all, and are just there to
> help reviewers understand.
Yes, they should ultimat
New submission from Stefan Behnel:
The current documentation says:
"""
PyObject* PyUnicode_Format(PyObject *format, PyObject *args)
Return value: New reference.
Return a new string object from format and args; this is analogous to
format % args. The args argument
4001 - 4100 of 4955 matches
Mail list logo