Stefan Krah added the comment:
Actually, I think we have to match the C-API: For instance, in
Modules/_decimal/_decimal.c:5527 the libmpdec allocators are
set to the Python allocators.
So I'd need to do:
mpd_callocfunc = PyMem_Calloc;
I suppose that's a commo
Stefan Krah added the comment:
>> 1. _asdict() returns a normal dictionary. I don't know if this is what
>>is required.
Good question. I don't think we can import OrderedDict from collections
because of the impact on startup time (_collections_abc was created
Stefan Krah added the comment:
This is probably offtopic, but I think people who want reliable
MemoryErrors can use limits, e.g. via djb's softlimit (daemontools):
$ softlimit -m 1 ./python
Python 3.5.0a0 (default:462470859e57+, Apr 27 2014, 19:34:06)
[GCC 4.7.2] on linux
Type
Changes by Stefan Krah :
--
nosy: +lizhenhua
___
Python tracker
<http://bugs.python.org/issue20305>
___
___
Python-bugs-list mailing list
Unsubscribe:
Stefan Krah added the comment:
This looks like a duplicate.
--
nosy: +skrah
resolution: -> duplicate
stage: -> resolved
status: open -> closed
superseder: -> Android's incomplete locale.h implementation prevents
cross-compilation
_
Stefan Krah added the comment:
Ping. Is this still an issue for anyone in 3.4?
--
___
Python tracker
<http://bugs.python.org/issue5404>
___
___
Python-bugs-list m
Stefan Krah added the comment:
With the latest patch the decimal benchmark with a lot of small
allocations is consistently 2% slower. Large factorials (where
the operands are initialized to zero for the number-theoretic
transform) have the same performance with and without the patch.
It would
Stefan Krah added the comment:
Is accessing _fields a common operation? Personally I'd use a
PyGetSetDef and generate the tuple on access (perhaps cache the
result).
--
___
Python tracker
<http://bugs.python.org/i
Stefan Krah added the comment:
Hmm, obmalloc.c changed as well, so already the gcc optimizer can take
different paths and produce different results.
Also I did set mpd_callocfunc to PyMem_Calloc(). 2% slowdown is far
from being a tragic result, so I guess we can ignore that.
The bytes
New submission from Stefan Krah:
>>> x = Decimal(9).as_tuple()
>>> import pickle
>>> pickle.dumps(x)
Traceback (most recent call last):
File "", line 1, in
_pickle.PicklingError: Can't pickle :
attribute lookup DecimalTuple on _frozen_importli
Changes by Stefan Krah :
--
resolution: -> out of date
stage: -> resolved
status: pending -> closed
___
Python tracker
<http://bugs.python.or
Stefan Krah added the comment:
I cannot reproduce this. Which platform? Does it happen with
Python 3.4?
--
nosy: +skrah
___
Python tracker
<http://bugs.python.org/issue21
Stefan Krah added the comment:
Given msg84518 and msg118909 I think this can be closed.
--
resolution: -> out of date
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<http://bugs.python.org/
Stefan Krah added the comment:
Here's a cross-compile script for arm-linux-gnueabi. Building 3.4 works
on Ubuntu 14.04. I cannot run the tests, since I only have an old
Debian-ARM qemu image with the wrong glibc version.
For 3.5 we have a regression due to the new matrix ope
Stefan Krah added the comment:
The order of the nelem/elsize matters for readability. Otherwise it is
not intuitive what happens after the jump to redirect in _PyObject_Alloc().
Why would you assert that 'nelem' is one?
--
___
Python trac
Stefan Krah added the comment:
Okay, if no one else wants this, I'll go ahead with the _fields part.
Andrew, could you sign a contributor agreement?
--
___
Python tracker
<http://bugs.python.org/i
Changes by Stefan Krah :
--
resolution: -> duplicate
stage: -> resolved
status: open -> closed
___
Python tracker
<http://bugs.python.org/issue20230>
___
___
Changes by Stefan Krah :
--
superseder: -> Enhance Object/structseq.c to match namedtuple and tuple
api
___
Python tracker
<http://bugs.python.org/issu
Stefan Krah added the comment:
Since Fedora 16 is EOL, let's close this.
--
resolution: -> out of date
stage: needs patch -> resolved
status: open -> closed
___
Python tracker
<http://bugs.pyth
New submission from Stefan Krah:
We could remove decimal.InvalidContext, which is completely unused
both in decimal.py and _decimal.
--
messages: 217519
nosy: mark.dickinson, rhettinger, skrah
priority: normal
severity: normal
status: open
title: decimal.InvalidContext is unused
type
Changes by Stefan Krah :
--
resolution: -> fixed
stage: needs patch -> resolved
status: open -> closed
___
Python tracker
<http://bugs.python.or
Stefan Krah added the comment:
Okay, also it is easier to keep it. I was just busy with the exception
docs and found the InvalidContext situation slightly odd.
Of course, there is a very small chance that external software is
using it.
--
resolution: -> not a bug
stage: -> re
Stefan Krah added the comment:
Are we fixing these on a case by case basis or is it hopeless (msg146615)?
--
___
Python tracker
<http://bugs.python.org/issue21
New submission from Stefan Krah:
$ ./python -m pydoc heapq
Traceback (most recent call last):
File "/home/stefan/hg/cpython/Lib/runpy.py", line 170, in _run_module_as_main
"__main__", mod_spec)
File "/home/stefan/hg/cpython/Lib/runpy.py", line 85, in _run_c
Changes by Stefan Krah :
--
type: -> behavior
___
Python tracker
<http://bugs.python.org/issue21398>
___
___
Python-bugs-list mailing list
Unsubscrib
New submission from Stefan Krah:
In Python2.7, the cls parameter shows up in pydoc:
frombuf(cls, buf) from __builtin__.type
Construct a TarInfo object from a 512 byte string buffer.
In 3.5, it doesn't:
frombuf(buf, encoding, errors) from builtins.type
Constr
Stefan Krah added the comment:
Did you use the same locale settings?
--
___
Python tracker
<http://bugs.python.org/issue21398>
___
___
Python-bugs-list mailin
Stefan Krah added the comment:
Sorry, then I should have been more explicit: The failure only occurs
with LC_CTYPE=C.
--
title: pydoc heapq leaves terminal in an unusable state -> LC_CTYPE=C: pydoc
leaves terminal in an unusable state
___
Pyt
Stefan Krah added the comment:
I can also confirm the need to reset the terminal when using
a working locale and Ctrl-C.
So we have two issues then:
1) The UnicodeDecodeError should not happen.
2) pydoc behaves erratically after various exceptions.
In Python2.7 neither of the issues
Stefan Krah added the comment:
Victor, sure, maybe not right away. If you prefer to commit very soon,
I promise to do a post commit review.
--
___
Python tracker
<http://bugs.python.org/issue21
Stefan Behnel added the comment:
Works for me in 3.2 and 3.4, fails in 2.7, as reported.
I'll leave it to Eli to decide if this should get fixed in 2.7. In Py2, ET and
cET were different modules, so this could also be considered a missing feature
in cET. Given that it leads to a serialis
Stefan Behnel added the comment:
Ah, sorry, actually, it does not work in Py3.2:
>>> import xml.etree.cElementTree as cET
>>> root = cET.Element('root', attrib={'Name':'Root'})
>>> child = cET.SubElement(root, 'child', attrib={
Stefan Behnel added the comment:
According to issue 1572710, this is not a bug. The "attrib" argument is
supposed to be a positional argument, not a keyword argument. This makes sense,
given that arbitrary keyword arguments are accepted for additional XML
Changes by Stefan Krah :
--
assignee: skrah
components: Extension Modules
nosy: skrah
priority: normal
severity: normal
status: open
title: Add function signatures to _decimal
type: enhancement
versions: Python 3.5
___
Python tracker
<h
Stefan Krah added the comment:
Okay, thanks. I've used "$cls" for Decimal.from_float in 40b06a75d1c6,
and it appears to work already.
Feel free to close the issue (I don't know whether AC emits "$cls" or
if it should).
--
___
Changes by Stefan Krah :
--
resolution: -> fixed
stage: -> resolved
status: open -> closed
___
Python tracker
<http://bugs.python.org/issue21407>
___
Stefan Behnel added the comment:
Note that this has been fixed in Py3 already (Py3.3, I guess). The only
question is whether the behaviour will be changed in Py2.7.
--
components: -XML
___
Python tracker
<http://bugs.python.org/issue21
Stefan Krah added the comment:
On SPARC/suncc the flags in http://bugs.python.org/issue15963#msg170661
appear to work.
Also, we have several Solaris build slaves that don't core dump.
Some are offline, but you can click through to the ./configure
steps of past builds to see the build
Stefan Krah added the comment:
> Hmm... perhaps Stefan would like to set something up?
Being a correctness tool hipster, of course I already have the latest toy. :)
The patch works on Debian 64-bit + clang.
I can set up a VM. We may have to react quickly to some of the issues.
Then ag
Stefan Krah added the comment:
> By default AC emits "$type" for class methods, see dict_fromkeys in
> Objects/dictobject.c.
Thanks, good choice.
--
___
Python tracker
<http://bugs.py
Stefan Krah added the comment:
Antoine, if you send me the buildbot credentials, we can get started.
Environment vars:
CC=clang
ASAN_OPTIONS="allocator_may_return_null=1,handle_segv=0"
I suggest to compile the release build, just --with-address
Stefan Krah added the comment:
Why is the default encoding of POSIX wrong on a modern Linux system?
Today I installed Debian testing, and the first question of the
installer is to choose between "C" and "English" locales for the
install. This with the remark that the chose
Stefan Krah added the comment:
Thanks, Ned. I'm attaching a second version of the existing patch
with improved error handling and a fix for test_distutils, which
failed.
The result is slightly overcomplicated, so I came up with a
different approach in issue21121-3.diff. Tho
Changes by Stefan Krah :
Added file: http://bugs.python.org/file35134/issue21121-3.diff
___
Python tracker
<http://bugs.python.org/issue21121>
___
___
Python-bugs-list m
Stefan Krah added the comment:
STINNER Victor wrote:
> I don't see how to ensure that the terminal state is restored, even on error.
Python2 suppresses the exception until after normal exit (pressing 'q').
I think that behavior is better.
In Python3 you can also get the un
Stefan Krah added the comment:
The patch works well BTW. We can create another issue for the
general misbehavior of pydoc with other exceptions.
--
___
Python tracker
<http://bugs.python.org/issue21
Stefan Behnel added the comment:
LGTM, can't see a case where this might go wrong (errors and type checks are
handled before the added code).
It also seems a sufficiently common case to optimise it internally. The 2**n
spelling is easier to read and to get right than the shifting, so
Stefan Krah added the comment:
I did a post-commit review. A couple of things:
1) I think Victor and I have a different view of the calloc() parameters.
calloc(size_t nmemb, size_t size)
If a memory region of bytes is allocated, IMO 'nbytes' should be in the
place of &
Stefan Krah added the comment:
I forgot one thing:
5) If WITH_VALGRIND is defined, nbytes is uninitialized in _PyObject_Alloc().
--
___
Python tracker
<http://bugs.python.org/issue21
Stefan Krah added the comment:
Another thing:
6) We need some kind of prominent documentation that existing
programs need to be changed:
Python 3.5.0a0 (default:62438d1b11c7+, May 3 2014, 23:35:03)
[GCC 4.8.2] on linux
Type "help", "copyright", "credits" or
Stefan Krah added the comment:
> > 5) If WITH_VALGRIND is defined, nbytes is uninitialized in
> _PyObject_Alloc().
>
> Did you see my second commit? It's nlt already fixed?
I don't think so, I have revision 5d076506b3f5 here.
--
_
Stefan Krah added the comment:
STINNER Victor wrote:
> PyObject_Malloc(100) asks to allocate one object of 100 bytes.
Okay, then let's please call it:
_PyObject_Calloc(void *ctx, size_t nobjs, size_t objsize)
_PyObject_Alloc(int use_calloc, void *ctx, size_t nobjs, size_t
Stefan Krah added the comment:
> If you guys want this in 3.4.1, please get it checked in in the next, oh,
> eight hours.
I can't commit today. Perhaps one of you wants to take over (I think we all
agree that the third patch
Stefan Krah added the comment:
STINNER Victor wrote:
> My final commit includes an addition to What's New in Python 3.5 doc,
> including a notice in the porting section. It is not enough?
I'm not sure: The usual case with ABI changes is that extensions may segfault
if they are
Stefan Krah added the comment:
One more question:
I think it's nicer to add CFLAGS_NODIST to 'renamed_variables' in
Lib/sysconfig.py:265:
renamed_variables = ('CFLAGS', 'CFLAGS_NODIST', 'LDFLAGS', 'CPPFLAGS')
That way it's possib
Stefan Krah added the comment:
The current patch allows the user to specify e.g.:
CFLAGS_NODIST="-march=core2" ./configure
So it would be surprising to get:
>>> import sysconfig
>>> sysconfig.get_config_var('CFLAGS_NODIST')
''
Now,
Stefan Krah added the comment:
The VM is set up. It's on an external unreliable host though. :)
--
___
Python tracker
<http://bugs.python.org/issue21037>
___
___
Stefan Behnel added the comment:
The "avoid rebuilding" part doesn't seem to work for me. Source build currently
fails as follows:
"""
/bin/mkdir -p Include
python ./Parser/asdl_c.py -h Include ./Parser/Python.asdl
# Substitution happens here, as the compl
Stefan Behnel added the comment:
That fixes it. Thanks!
--
___
Python tracker
<http://bugs.python.org/issue19655>
___
___
Python-bugs-list mailing list
Unsub
Changes by Stefan Krah :
--
nosy: -skrah
___
Python tracker
<http://bugs.python.org/issue15871>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Stefan Krah :
--
nosy: -skrah
___
Python tracker
<http://bugs.python.org/issue16108>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Stefan Krah :
--
nosy: -skrah
___
Python tracker
<http://bugs.python.org/issue20051>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Stefan Krah :
--
nosy: -skrah
___
Python tracker
<http://bugs.python.org/issue13669>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Stefan Krah :
--
nosy: -skrah
___
Python tracker
<http://bugs.python.org/issue2552>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Stefan Krah :
--
resolution: -> wont fix
stage: needs patch -> resolved
status: open -> closed
___
Python tracker
<http://bugs.python.or
Changes by Stefan Krah :
--
nosy: -skrah
___
Python tracker
<http://bugs.python.org/issue6467>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Stefan Krah :
--
nosy: -skrah
___
Python tracker
<http://bugs.python.org/issue7836>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Stefan Krah :
--
nosy: -skrah
___
Python tracker
<http://bugs.python.org/issue4999>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Stefan Krah :
--
nosy: -skrah
___
Python tracker
<http://bugs.python.org/issue12923>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Stefan Krah :
--
nosy: -skrah
___
Python tracker
<http://bugs.python.org/issue7424>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Stefan Krah :
--
nosy: -skrah
___
Python tracker
<http://bugs.python.org/issue6895>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Stefan Krah :
--
nosy: -skrah
___
Python tracker
<http://bugs.python.org/issue14341>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Stefan Krah :
--
nosy: -skrah
___
Python tracker
<http://bugs.python.org/issue5619>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Stefan Krah :
--
nosy: -skrah
___
Python tracker
<http://bugs.python.org/issue15192>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Stefan Krah :
--
resolution: -> out of date
stage: -> resolved
status: open -> closed
type: -> behavior
___
Python tracker
<http://bugs.python
Changes by Stefan Krah :
--
nosy: -skrah
___
Python tracker
<http://bugs.python.org/issue14141>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Stefan Krah :
--
nosy: -skrah
___
Python tracker
<http://bugs.python.org/issue15668>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Stefan Krah :
--
nosy: -skrah
___
Python tracker
<http://bugs.python.org/issue13837>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Stefan Krah :
--
nosy: -skrah
___
Python tracker
<http://bugs.python.org/issue16721>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Stefan Krah :
--
nosy: -skrah
___
Python tracker
<http://bugs.python.org/issue15757>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Stefan Krah :
--
nosy: -skrah
___
Python tracker
<http://bugs.python.org/issue16275>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Stefan Krah :
--
nosy: -skrah
___
Python tracker
<http://bugs.python.org/issue15963>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Stefan Krah :
--
nosy: -skrah
___
Python tracker
<http://bugs.python.org/issue19554>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Stefan Krah :
--
nosy: -skrah
___
Python tracker
<http://bugs.python.org/issue18859>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Stefan Krah :
--
nosy: -skrah
___
Python tracker
<http://bugs.python.org/issue21412>
___
___
Python-bugs-list mailing list
Unsubscribe:
Stefan Krah added the comment:
Closing due to lack of response.
--
resolution: -> works for me
stage: -> resolved
status: open -> closed
type: -> crash
___
Python tracker
<http://bugs.python
Changes by Stefan Krah :
--
nosy: -skrah
___
Python tracker
<http://bugs.python.org/issue4928>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Stefan Krah :
--
nosy: -skrah
___
Python tracker
<http://bugs.python.org/issue1747670>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Stefan Krah :
--
nosy: -skrah
___
Python tracker
<http://bugs.python.org/issue1615158>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Stefan Krah :
--
nosy: -skrah
___
Python tracker
<http://bugs.python.org/issue1043134>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Stefan Krah :
--
nosy: -skrah
___
Python tracker
<http://bugs.python.org/issue15745>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Stefan Krah :
--
nosy: -skrah
___
Python tracker
<http://bugs.python.org/issue969718>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Stefan Krah :
--
nosy: -skrah
___
Python tracker
<http://bugs.python.org/issue4130>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Stefan Krah :
--
nosy: -skrah
___
Python tracker
<http://bugs.python.org/issue17781>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Stefan Krah :
--
nosy: -skrah
___
Python tracker
<http://bugs.python.org/issue12271>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Stefan Krah :
--
nosy: -skrah
___
Python tracker
<http://bugs.python.org/issue12991>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Stefan Krah :
--
nosy: -skrah
___
Python tracker
<http://bugs.python.org/issue5404>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Stefan Krah :
--
nosy: -skrah
___
Python tracker
<http://bugs.python.org/issue7511>
___
___
Python-bugs-list mailing list
Unsubscribe:
Stefan Krah added the comment:
This should be fixed now.
--
resolution: -> duplicate
stage: -> resolved
status: open -> closed
superseder: -> HAVE_PY_SET_53BIT_PRECISION for m68k
type: -> behavior
___
Python tracker
<http
Stefan Krah added the comment:
I've run Evgeniy's example under Valgrind and changed it to import
various C extensions. Unfortunately they all leak more or less, so
perhaps we can revisit this when (if?) the PEP 3121 and PEP 384
changes have been i
2901 - 3000 of 4951 matches
Mail list logo