New submission from Stefan Krah:
Hi Alexandre, the following leaks appear after 64c6d52793be. I'm
not sure yet if they're caused or just exposed by the changeset.
Code:
==
import sys
import pickle
sys.exit(0)
==
==8118== 864 (192 direct, 672 indirect)
Stefan Krah added the comment:
This patch fixes the leak, but needs review (I do not know the _pickle module
very well).
--
keywords: +patch
Added file: http://bugs.python.org/file33119/issue19972.patch
___
Python tracker
<http://bugs.python.
Changes by Stefan Krah :
--
stage: -> patch review
___
Python tracker
<http://bugs.python.org/issue19972>
___
___
Python-bugs-list mailing list
Unsubscrib
Stefan Krah added the comment:
See #11826 for more details where the freefunc is called. Perhaps the.
docs or the PEP need an update.
--
___
Python tracker
<http://bugs.python.org/issue19
Stefan Krah added the comment:
The docs say:
inquiry m_clear
A clear function to call during GC clearing of the module object, or NULL
if not needed.
freefunc m_free
A function to call during deallocation of the module object, or NULL if not
needed.
So I assume that GC clearing is
New submission from Stefan Krah:
I was just reading the _pickle sources and it appears that AC does not
generate a second arg for METH_NOARGS functions:
#define _PICKLE_PICKLERMEMOPROXY_CLEAR_METHODDEF\
{"clear", (PyCFunction)_pickle_PicklerMemoProxy_clear, M
Stefan Krah added the comment:
STINNER Victor wrote:
> If you prefer to add the unused parameter, what do you propose to avoid
> compiler warnings if unused parameters are checked?
This works quite portably in _decimal (I don't get warnings from gcc, icc,
suncc, Visual Studio,
Stefan Krah added the comment:
Stefan Krah wrote:
> The macro I posted really works on all obscure buildbot platforms.
N.B. clang also defines __GNUC__, as does the intel compiler.
--
___
Python tracker
<http://bugs.python.org/issu
Stefan Krah added the comment:
Larry Hastings wrote:
> To do it properly with Clang requires a pragma:
Hmm. I just tested and clang warns with -Wall -W, but does not warn if
__attribute__((unused)) is present.
The macro I posted really works on all obscure buildbot platfo
Stefan Krah added the comment:
STINNER Victor wrote:
> I would prefer Py_UNUSED name. This sounds like a nice addition to
> Include/pymacros.h.
Yes, Py_UNUSED is nicer.
--
___
Python tracker
<http://bugs.python.org/i
Changes by Stefan Krah :
--
nosy: +skrah
___
Python tracker
<http://bugs.python.org/issue19298>
___
___
Python-bugs-list mailing list
Unsubscribe:
Stefan Krah added the comment:
Our included libffi is:
2013-03-17 Anthony Green
* README: Update for 3.0.13.
* configure.ac: Ditto.
* configure: Rebuilt.
* doc/*: Update version.
According to https://sourceware.org/libffi/ that is the latest
released
Stefan Krah added the comment:
I just see that it should be:
static void
pickle_free(PyObject *m)
...
Even then, the cast is necessary, otherwise you get this warning:
/home/stefan/hg/cpython/Modules/_pickle.c:7450:1: warning: initialization from
incompatible pointer type [enabled by
Stefan Krah added the comment:
Should be fixed. Thanks for the comments everyone.
--
resolution: -> fixed
stage: patch review -> committed/rejected
status: open -> closed
___
Python tracker
<http://bugs.python.or
Stefan Krah added the comment:
I agree that warnings are annoying, but I'm not sure what to do
with this one: It's wrong and only occurs with fairly old gcc
versions.
My feeling was that pragmas are overkill for relatively old
compilers.
--
no
Changes by Stefan Krah :
--
resolution: -> fixed
stage: needs patch -> committed/rejected
status: open -> closed
type: compile error -> enhancement
___
Python tracker
<http://bugs.python
Stefan Krah added the comment:
-1 from me as well. I would not want to audit a large program for
accidentally converted floats.
--
nosy: +skrah
___
Python tracker
<http://bugs.python.org/issue19
Stefan Krah added the comment:
Hi, this happens on the OpenIndiana bot:
http://buildbot.python.org/all/builders/x86%20OpenIndiana%203.3/builds/1259/steps/test/logs/stdio
test_devpoll1 (test.test_devpoll.DevPollTests) ... ok
test_events_mask_overflow (test.test_devpoll.DevPollTests) ... ERROR
Stefan Krah added the comment:
Ethan Furman wrote:
> The current meaning is unfortunate in that it is possible to want a type that
> can be used as an index or slice but that is still not a number, and in fact
> won't be used as a number in any scenario _except_ bin(),
Stefan Krah added the comment:
> Did I mention __index__ is an unfortunate name for the current trend for this
> method?
Yes, but it's probably too late to change that now. Also, a fully precise
name would be something like:
__to_int_exact_iff_object_has_integer_nature__ :)
>
Changes by Stefan Krah :
--
nosy: +skrah
___
Python tracker
<http://bugs.python.org/issue17781>
___
___
Python-bugs-list mailing list
Unsubscribe:
Stefan Krah added the comment:
Assigning to myself, since my private 100% coverage test suite
would have to be updated as well.
I have just glanced at the patch and only have some superficial
remarks:
In any case, I would prefer a patch without stylistic changes. Elimination of
"return&
Stefan Krah added the comment:
I guess it makes porting to Python 3 easier, but can we do this in a
stable release?
--
nosy: +benjamin.peterson, skrah
___
Python tracker
<http://bugs.python.org/issue20
Stefan Krah added the comment:
Well, generally I'd be against adding features, but this particular one
could be rationalized in the same way as PEP 414. So I'm simply unsure
whether the feature should be added, but *if* it's added, it should
be backed by a pronouncement either
Changes by Stefan Krah :
--
nosy: +skrah
___
Python tracker
<http://bugs.python.org/issue20037>
___
___
Python-bugs-list mailing list
Unsubscribe:
Stefan Krah added the comment:
Also on System Z:
http://buildbot.python.org/all/builders/System%20Z%20Linux%203.x/builds/1009/steps/test/logs/stdio
Setting priority to "normal", since it's the only test failing on
System Z and generally green buildbots are more useful.
New submission from Stefan Krah:
http://buildbot.python.org/all/builders/AMD64%20Fedora%20without%20threads%203.x/builds/5874/steps/test/logs/stdio
test test_multiprocessing_main_handling crashed -- Traceback (most recent call
last):
File "/home/buildbot/buildarea/3.x.krah-fedora/buil
Stefan Krah added the comment:
Alexander, the "domain fo the function" probably refers to
the range [-1, 256].
C99:
The header declares several functions useful for classifying and
mapping
characters.166) In all cases the argument is an int, the value of which shall be
repres
Stefan Krah added the comment:
IOW, I also support closing this issue. :)
--
___
Python tracker
<http://bugs.python.org/issue20049>
___
___
Python-bugs-list mailin
New submission from Stefan Krah:
I think the demo mode for aCC has expired on h2 | HP-UX 11iv2 | PA-RISC:
bash-4.0$ cc +DD32 -o xxx xxx.c
Error: Demo mode has expired.
Contact your Hewlett-Packard sales office to order HP C Compiler
--
keywords: buildbot
messages: 206831
nosy
Stefan Krah added the comment:
I don't know why this fails exactly. I had a similar failure though that was
fixed by using the @run_with_locale decorator.
--
nosy: +skrah
___
Python tracker
<http://bugs.python.org/is
Stefan Krah added the comment:
I wanted to force people to link explicitly with -l:libmpdec.so.2 in
order to avoid picking up a wrong version. But indeed that won't work
since the GNU linker happily picks up the static lib with -lmpdec if
libmpdec.so is missing.
The docs are part of my we
Stefan Krah added the comment:
The machine has a high load: 6 processes at 100% CPU, one of which is
the FreeBSD virtual machine.
--
nosy: +skrah
___
Python tracker
<http://bugs.python.org/issue20
Stefan Krah added the comment:
The buildbot runs --without-doc-strings. Usually you just have to add the
@requires_docstrings decorator to some tests.
--
___
Python tracker
<http://bugs.python.org/issue20
Stefan Krah added the comment:
I’ve released mpdecimal-2.4.0:
http://www.bytereef.org/mpdecimal/download.html
sha256sum:
==
996c73b63868699c4f86694671bd7ff3d1a8a88d8af2c22a5abe0c9a5845cf75
mpdecimal-2.4.0.tar.gz
On obscure architectures I would recommend to run `make check
Changes by Stefan Krah :
--
resolution: -> fixed
stage: -> committed/rejected
status: open -> closed
type: -> behavior
___
Python tracker
<http://bugs.python
Stefan Krah added the comment:
> I think maybe I only showed it to Stefan Krah, who said it wouldn't help his
> use case so I dropped it.
I think we were talking about _decimal, where any tool will interfere with the
100% code coverage patches. But that'
Stefan Krah added the comment:
Thanks for the report! -- That's due to the commit in #9709.
PyMODINIT_FUNC is more than ten years old, so I hoped people
would be using by now.
On the other hand that's serious breakage. Martin, would you
have time to make a call on whether to revert
Stefan Krah added the comment:
Could you take out _testbuffer.c? It has 100% coverage patches which
would break and it is not a public module.
--
nosy: +skrah
___
Python tracker
<http://bugs.python.org/issue20
Stefan Krah added the comment:
Please take out _decimal.c. It has a huge test suite that would break entirely.
--
nosy: +skrah
___
Python tracker
<http://bugs.python.org/issue20
Stefan Krah added the comment:
Thanks, this is working here for the parameters. Is there a way to
specify the return annotation manually in the docstring?
--
___
Python tracker
<http://bugs.python.org/issue20
Stefan Krah added the comment:
The patch looks correct to me. locale.h is at least C99 (I don't have the
earlier standards).
--
nosy: +skrah
___
Python tracker
<http://bugs.python.org/is
Stefan Krah added the comment:
> Yes, it's just Python syntax, so you'd use "->".
I tried that, but it didn't filter through to inspect.signature().
> However, you are not permitted to according to PEP 8:
Ah, to
Stefan Krah added the comment:
3d805bee06e2 uses str.lower(), which fails on the Turkish 'i' if the Turkish
locale is set:
Python 2.7.6+ (2.7:0e5df5b62488+, Jan 10 2014, 23:25:35)
[GCC 4.6.3 20120306 (Red Hat 4.6.3-2)] on linux2
Type "help", "copyright", &
Stefan Krah added the comment:
I'm not sure if str.lower() is supposed to use tolower() in
stringobject.c. If tolower() is replaced by Py_TOLOWER(), the
problem disappears.
But maybe the locale dependent tolower() is used on purpose.
--
___
P
Stefan Krah added the comment:
Ignore me, the fine manual says that "For 8-bit strings, this method is
locale-dependent."
--
___
Python tracker
<http://bugs.python.o
Stefan Krah added the comment:
Another issue is that with the patch applied help() is broken for certain forms
of docstrings:
from decimal import *
>>> print(setcontext.__doc__)
setcontext(c) - Set a new default context.
>>> help(setcontext)
Traceback (most recent call last
Stefan Krah added the comment:
I think we cannot change PyLong_AsUnsignedLong() without a deprecation period,
if at all. That leaves the option of changing the converters.
My preference is to raise either OverflowError or ValueError for *both*
out-of-range conditions.
People may me used to
Stefan Krah added the comment:
Somehow Modules/_decimal/tests/bench.py and Modules/_decimal/tests/deccheck.py
are now executable, which (I think) they should not be.
--
nosy: +skrah
___
Python tracker
<http://bugs.python.org/issue19
Stefan Krah added the comment:
IMO the .bat files should have the executable bit as a reminder that they're
executable on Windows.
--
___
Python tracker
<http://bugs.python.org/is
Stefan Krah added the comment:
One test fails on FreeBSD 9.0 and 6.4:
==
ERROR: testRecvFromIntoSmallBuffer (test.test_socket.BufferIOTest)
--
Traceback (most
Stefan Krah added the comment:
MSG*1024 passes. I did not look at this issue: Would changing the value to 1024
invalidate the test?
--
___
Python tracker
<http://bugs.python.org/issue20
Stefan Krah added the comment:
I agree with Marc-Andre. Also, we should have an Android buildbot.
--
___
Python tracker
<http://bugs.python.org/issue20
Changes by Stefan Krah :
--
resolution: remind -> fixed
stage: -> committed/rejected
status: open -> closed
type: -> compile error
___
Python tracker
<http://bugs.python
Stefan Krah added the comment:
Shiz wrote:
> As far as maintaining an Android port for CPython goes; I may be interested
> in this as I'd need to regularly use it anyway. Can anyone tell me what the
> possibilities are here?
There seem to be some external ports already. -- On
Stefan Krah added the comment:
Do you mean gcc-4.2? The patch uses __GNUC_MINOR__ < 3.
On the FreeBSD build slave gcc-4.2 works:
gcc (GCC) 4.2.1 20070831 patched [FreeBSD]
Are you sure that there aren't any gcc patches for this version? It
looks like a gcc/binutils iss
Changes by Stefan Krah :
--
title: gcc-4.3 support on python-3.3 (libmpdec) -> gcc-4.2.4 support on
python-3.3 (libmpdec)
___
Python tracker
<http://bugs.python.org/issu
Stefan Krah added the comment:
"I've been looking into this, and the only option provided by the Android NDK
involves cross-compiling Python on a regular machine. This would require some
custom commands before and in between the builds, to build a host Python first,
then cross-c
Stefan Krah added the comment:
This is the gcc bug:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46861
I rather agree with this comment:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46861#c3
If a distro still maintains 4.2.x, the toolchain should be fixed
(like FreeBSD apparently did
Stefan Krah added the comment:
Larry Hastings wrote:
> I think we should change the syntax to something people would
> never write by accident. Here are some suggestions:
>
> "*("
> "*clinic*("
> "\01 clinic("
I like the original "def (.
Stefan Krah added the comment:
See also #20326.
--
nosy: +skrah
___
Python tracker
<http://bugs.python.org/issue20075>
___
___
Python-bugs-list mailing list
Unsub
Stefan Krah added the comment:
Thanks Ryan. As you say, the original segfault is also triggered with the
shortened message.
--
___
Python tracker
<http://bugs.python.org/issue20
New submission from Stefan Krah:
It seems that the relaxed timings in some tests are still not
sufficient:
http://buildbot.python.org/all/builders/AMD64%20OpenIndiana%203.x/builds/7417/steps/test/logs/stdio
==
FAIL
Stefan Krah added the comment:
+1 for "sig: ".
--
___
Python tracker
<http://bugs.python.org/issue20326>
___
___
Python-bugs-list mailing list
Uns
Stefan Krah added the comment:
I think we should probably not convert xx*.c. They are for newcomers
who will likely be confused by the additional information overload.
--
nosy: +skrah
___
Python tracker
<http://bugs.python.org/issue20
Stefan Krah added the comment:
The vast majority of C modules are in third-party packages. I doubt that
external
modules will all use AC. xxmodule.c is about explaining the basic structure of
a C extension. AC adds nothing to this and obfuscates (IMO) what is going on
Stefan Krah added the comment:
> I only wish someone had said something *before* I went ahead and converted
> them...
Yeah, sorry. It's also just my personal opinion. BTW, xxmodule did not compile
and there was a warning for xxsubtype. I just mention it in case these ar
Stefan Krah added the comment:
For gcc, #pragma pack(n) apparently sets the new aligment for the entire
compilation unit:
http://gcc.gnu.org/onlinedocs/gcc/Structure-Packing-Pragmas.html
--
nosy: +skrah
___
Python tracker
<http://bugs.python.
Stefan Krah added the comment:
I'm seeing other unrelated timeouts on the OpenIndiana machines.
Jesús, are the machines perhaps operating under an unusually high load?
--
nosy: +jcea
___
Python tracker
<http://bugs.python.org/is
Stefan Krah added the comment:
I see. That's astonishing, because usually the builds are ultra-fast
on those machines.
--
nosy: -gvanrossum
___
Python tracker
<http://bugs.python.org/is
Stefan Krah added the comment:
+1 for doing something about timing failures. Perhaps also a
decorator @skip_if_load_higher_than(x).
[Nick, I'm adding you because our current test suite could lead
to "commit impossible" situations with Zuul.]
--
Stefan Krah added the comment:
It was hanging on FreeBSD 7.2 recently:
http://buildbot.python.org/all/builders/x86%20FreeBSD%207.2%203.x/builds/4917/steps/test/logs/stdio
The older FreeBSD systems have broken threading though, so we could just
disable the offending tests. I would not waste
Stefan Krah added the comment:
OK, I have not seen the original issue in any recent builds either.
--
___
Python tracker
<http://bugs.python.org/issue19
Stefan Krah added the comment:
I like the "sig=" and the "$". There seems to be a small glitch in __rdivmod__:
help(int.__rdivmod__)
__rdivmod__(, value)
sig=($self, value)
Returns divmod(value, self).
The sig line is shown (and the preferred form is the impera
Stefan Krah added the comment:
> What is the redundant info?
{"__rdivmod__", __builtin_offsetof (PyHeapTypeObject, as_number.nb_divmod),
(void *)(slot_nb_divmod), wrap_binaryfunc_r, "sig=($self, value)\n"
"sig=($self, value)\nReturns divmod(value, self)."}
Th
Stefan Krah added the comment:
For integer sequences I think non-equality comparisons will be somewhat
confusing. Are the sequences little or big endian?
If we start to view bytes more like latin-1 again (PEP 461), it would
make sense for the 'B' and &
Stefan Krah added the comment:
One test fails --without-doc-strings:
http://buildbot.python.org/all/builders/AMD64%20FreeBSD%209.0%203.x/builds/6266/steps/test/logs/stdio
--
nosy: +skrah
___
Python tracker
<http://bugs.python.org/issue20
Stefan Krah added the comment:
I think test_idle is failing on many build slaves following this
commit.
--
nosy: +skrah
___
Python tracker
<http://bugs.python.org/issue20
Stefan Krah added the comment:
Ping. The blocker seems to have passed beta3. :)
--
___
Python tracker
<http://bugs.python.org/issue20166>
___
___
Python-bug
Stefan Krah added the comment:
Thanks, that seems to be the best course of action. Fixed in
69827c2ab9d0.
--
resolution: -> fixed
stage: -> committed/rejected
status: open -> closed
superseder: -> test_distutils warning: initfunc exported twice on Windows
type: ->
Stefan Krah added the comment:
Too many extensions are not using PyMODINIT_FUNC (See #20166).
Closing as WONT_FIX.
--
resolution: fixed -> wont fix
___
Python tracker
<http://bugs.python.org/iss
Stefan Krah added the comment:
Terry J. Reedy wrote:
> and fixed fixed the first-line deletion somewhere in changes to about 30
> other files.
Ah, so it was a Derby accident. Let's hope things stabilize soon.
--
___
Python tra
Stefan Krah added the comment:
The build is --without-doc-strings. That should do the trick.
--
nosy: +skrah
___
Python tracker
<http://bugs.python.org/issue20
Stefan Krah added the comment:
I think you just need to use the @requires_docstrings decorator for
the test. -- To me the failure looks expected if there aren't any
docstrings.
--
___
Python tracker
<http://bugs.python.org/is
Changes by Stefan Krah :
--
assignee: eric.araujo ->
resolution: duplicate ->
stage: committed/rejected -> needs patch
status: closed -> open
___
Python tracker
<http://bugs.python
Changes by Stefan Krah :
--
stage: needs patch -> patch review
___
Python tracker
<http://bugs.python.org/issue16779>
___
___
Python-bugs-list mailing list
Un
Stefan Krah added the comment:
Cross compiling for arm works here on Ubuntu:
$ cat config.site
ac_cv_file__dev_ptmx=no
ac_cv_file__dev_ptc=no
$ export CONFIG_SITE=$PWD/config.site
$ ./configure --host=arm-linux-gnueabi --build=x86_64 --disable-ipv6
$ make
I cannot test though, since I don
Stefan Krah added the comment:
Mauricio de Alencar wrote:
> String formatting is completely unaware of the concept of *significant
> digits*.
>>> format(Decimal(1), ".2f")
'1.00'
--
___
Python tracker
Stefan Krah added the comment:
Mauricio de Alencar wrote:
>
> Mauricio de Alencar added the comment:
>
> "Digits after the decimal mark" is not the same as "significant digits".
> See https://en.wikipedia.org/wiki/Significant_figures
>
> If I have
Stefan Krah added the comment:
Mauricio de Alencar wrote:
> The floats I posted are examples of computation results. The meaningful
> figures are related to the precision of the measurements fed to the
> computation.
Thank you, that makes it clear. Constructing Decimal('256.2
New submission from Stefan Krah:
As I understand, _decimal_to_ratio() should always produce an
integer ratio. But it does not for positive exponents:
>>> import statistics
>>> statistics.mean([Decimal("100"), Decimal("200")])
Decimal('150')
&
Stefan Krah added the comment:
OverflowError seems like a good choice if only values in the range
of a C long are accepted. ValueError would perhaps be more intuitive,
since the user normally only cares about the accepted range of
input values rather than the internal details.
--
nosy
Stefan Krah added the comment:
We can add a fast Decimal.as_integer_ratio() in C.
That said, why is the sum of Decimals not done in decimal arithmetic
with a very high context precision? It would be exact and with usual exponents
in the range [-384, 383] it should be very fast.
>>&g
Stefan Krah added the comment:
Oscar Benjamin wrote:
> If you're going to use decimals though then you can trap inexact and
> keep increasing the precision until it becomes exact.
For sums that is not necessary. Create a context with MAX_EMAX, MIN_EMIN and
MAX_PREC and mpd_a
Stefan Krah added the comment:
I must say that I'm moderately against these kinds of changes since
the benefit is small. The original reason for keeping the older
forms of assert* was to keep the diffs between 2.5-3.x manageable.
Perhaps that reason is gone now, but still: If anything ch
Stefan Krah added the comment:
I slightly favor the ValueError patch because there is only a single exception
to catch. PyLong_AsUnsignedLong() also raises OverflowError for both positive
values that are too large and for negative values.
Perhaps the error message could contain the actual range
Stefan Krah added the comment:
This looks like a duplicate of #20536. Steven, do you think you
have a chance to fix this before rc1?
--
keywords: +3.4regression
___
Python tracker
<http://bugs.python.org/issue20
Changes by Stefan Krah :
--
keywords: -3.4regression
___
Python tracker
<http://bugs.python.org/issue20561>
___
___
Python-bugs-list mailing list
Unsubscribe:
Stefan Krah added the comment:
Ian, could you please provide an example where multi-dimensional
indexing and slicing works in 2.x but not in 3.3?
--
___
Python tracker
<http://bugs.python.org/issue14
Stefan Krah added the comment:
Thanks, Ian. It seems to me that these issues should be sorted out
on the NumPy lists:
memoryview is not a drop-in replacement for buffer, so it has
different semantics.
What might help you is that you can cast any memoryview to
simple bytes without making a copy
2401 - 2500 of 3396 matches
Mail list logo