[issue19521] Parallel build race condition on AIX since python-2.7

2020-09-10 Thread Stefan Krah


Stefan Krah  added the comment:

I have been asked to backport this to 3.8. There's a very small window
of opportunity:

3.8.6: Monday, 2020-09-21
3.8.7rc1: Monday, 2020-11-02
3.8.7: Monday, 2020-11-16 (final version!)


Backporting procedures since 3.8 are unclear and a source of
constant friction, so most core developers seem to have stopped
doing any backports at all.  It is not a battle I'll choose, but
if you get a second core dev to review this trivial patch I'll
commit it.

There's a simple solution for 3.8: Do not use the parallel build,
the regular build takes around 4 min.


For the buildbots you can ask the operator for a custom command
line.

--
status: closed -> open

___
Python tracker 
<https://bugs.python.org/issue19521>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41732] Custom iterator to memoryview - performance improvement

2020-09-08 Thread Stefan Krah


Change by Stefan Krah :


--
nosy:  -skrah

___
Python tracker 
<https://bugs.python.org/issue41732>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41732] Custom iterator to memoryview - performance improvement

2020-09-08 Thread Stefan Krah


Stefan Krah  added the comment:

It would have been nice to have had a chance to look at this, but
apparently those days are over.

--

___
Python tracker 
<https://bugs.python.org/issue41732>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39610] memoryview.__len__ should raise an exception for 0d buffers

2020-09-07 Thread Stefan Krah


Stefan Krah  added the comment:

list() has to *interpret* the endianness to display it. The endianness
of the *native* format does not matter.  The endianness of an explicit
format matters, since list has to be able to convert non-native formats.

I suggest to look at XND, which is a memoryview on steroids and
has a lot of those features.

--

___
Python tracker 
<https://bugs.python.org/issue39610>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39610] memoryview.__len__ should raise an exception for 0d buffers

2020-09-07 Thread Stefan Krah


Stefan Krah  added the comment:

memoryview can store anything, but only access and display
the native format. The reason is that conversions in the manner
of the struct module are very expensive.

You can construct all sorts of formats that memoryview cannot
handle:

>>> x = array(1, "c")
>>> x
array(b'1', dtype='|S1')
>>> y = memoryview(x)
>>> 
>>> list(y)
Traceback (most recent call last):
  File "", line 1, in 
NotImplementedError: memoryview: unsupported format 1s


I don't think that the message is obscure, since all these
facts are documented.

--
assignee:  -> skrah

___
Python tracker 
<https://bugs.python.org/issue39610>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41717] [AIX] test_io: files was modified by test_io: (@test_6488748_tmpæ) on POWER6 AIX 3.9

2020-09-05 Thread Stefan Krah


Stefan Krah  added the comment:

I think this is a duplicate of #41401.

--
nosy: +skrah
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> Using non-ascii that require UTF-8 breaks AIX testing

___
Python tracker 
<https://bugs.python.org/issue41717>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41721] xlc: add -qalias=noansi -qmaxmem=-1

2020-09-05 Thread Stefan Krah


Change by Stefan Krah :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 
<https://bugs.python.org/issue41721>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41721] xlc: add -qalias=noansi -qmaxmem=-1

2020-09-04 Thread Stefan Krah


Stefan Krah  added the comment:


New changeset fb050d0d60f38dc9b6c30df1864020a92981be5b by Miss Islington (bot) 
in branch '3.9':
bpo-41721: Add xlc options (GH-22097)
https://github.com/python/cpython/commit/fb050d0d60f38dc9b6c30df1864020a92981be5b


--

___
Python tracker 
<https://bugs.python.org/issue41721>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41721] xlc: add -qalias=noansi -qmaxmem=-1

2020-09-04 Thread Stefan Krah


Stefan Krah  added the comment:

The code example is for 64-bit Linux with sizeof(long) == sizeof(long long).

It also works on 32-bit xlc with int/long.

--

___
Python tracker 
<https://bugs.python.org/issue41721>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41721] xlc: add -qalias=noansi -qmaxmem=-1

2020-09-04 Thread Stefan Krah


Stefan Krah  added the comment:


New changeset 84a7917b4c9afec07575065cffa143b91fe98c14 by Stefan Krah in branch 
'master':
bpo-41721: Add xlc options (GH-22096)
https://github.com/python/cpython/commit/84a7917b4c9afec07575065cffa143b91fe98c14


--

___
Python tracker 
<https://bugs.python.org/issue41721>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41721] xlc: add -qalias=noansi -qmaxmem=-1

2020-09-04 Thread Stefan Krah


Stefan Krah  added the comment:

-qmaxmem=-1 is added to disable verbose remarks.

--

___
Python tracker 
<https://bugs.python.org/issue41721>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41721] xlc: add -qalias=noansi -qmaxmem=-1

2020-09-04 Thread Stefan Krah


Stefan Krah  added the comment:

We would also need -fwrapv to be safe, but I cannot find an equivalent
option for xlc.

The Intel compiler had a similar failure to #40244 that was resolved
by -fwrapv (see #40223).

--

___
Python tracker 
<https://bugs.python.org/issue41721>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41721] xlc: add -qalias=noansi -qmaxmem=-1

2020-09-04 Thread Stefan Krah


New submission from Stefan Krah :

At least the xlc version on AIX 7.1 has aggressive optimizations even
with -O:

 
#include 
#include 


static int
f(long *a, long long *b)
{
 int t = *a;
 *b = 0;  // cannot change *a
 return *a - t;   // can be folded to zero
}

int
main(void)
{
long a = 10;

printf("%d\n", f(, (long long *)));

return 0;
}




$ xlc -O -o alias alias.c
$ ./alias
0
$ 
$ xlc -O -qalias=noansi -o alias alias.c
$ ./alias
-10

--
components: +Build
type:  -> behavior
versions: +Python 3.10, Python 3.9

___
Python tracker 
<https://bugs.python.org/issue41721>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41721] xlc: add -qalias=noansi -qmaxmem=-1

2020-09-04 Thread Stefan Krah


Change by Stefan Krah :


--
keywords: +patch
pull_requests: +21183
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/22096

___
Python tracker 
<https://bugs.python.org/issue41721>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41721] xlc: add -qalias=noansi -qmaxmem=-1

2020-09-04 Thread Stefan Krah


Change by Stefan Krah :


--
nosy: David.Edelsohn, skrah
priority: normal
severity: normal
status: open
title: xlc: add -qalias=noansi -qmaxmem=-1

___
Python tracker 
<https://bugs.python.org/issue41721>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37168] small_ints[] modified (third party C-extension?)

2020-08-30 Thread Stefan Krah


Stefan Krah  added the comment:

If nothing has been diagnosed, I suggest closing this.

--
status: open -> pending

___
Python tracker 
<https://bugs.python.org/issue37168>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37168] small_ints[] modified (third party C-extension?)

2020-08-30 Thread Stefan Krah


Change by Stefan Krah :


--
title: Decimal divisions sometimes 10x or 100x too large -> small_ints[] 
modified (third party C-extension?)

___
Python tracker 
<https://bugs.python.org/issue37168>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19521] Parallel build race condition on AIX since python-2.7

2020-08-29 Thread Stefan Krah


Stefan Krah  added the comment:

This is in master and 3.9.1.  I'll not backport to 3.8 because a release 
candidate is imminent.

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
type:  -> behavior
versions: +Python 3.9

___
Python tracker 
<https://bugs.python.org/issue19521>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19521] Parallel build race condition on AIX since python-2.7

2020-08-29 Thread Stefan Krah


Stefan Krah  added the comment:


New changeset 88b86a9752afc2c50ca196f6ba1a8d62d71cf398 by Miss Islington (bot) 
in branch '3.9':
bpo-19521: Fix parallel build race condition on AIX (GH-22001)
https://github.com/python/cpython/commit/88b86a9752afc2c50ca196f6ba1a8d62d71cf398


--

___
Python tracker 
<https://bugs.python.org/issue19521>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19521] Parallel build race condition on AIX since python-2.7

2020-08-29 Thread Stefan Krah


Stefan Krah  added the comment:


New changeset e6dcd371b2c54a94584dd124e8c592a496d46a47 by Stefan Krah in branch 
'master':
bpo-19521: Fix parallel build race condition on AIX (GH-21997)
https://github.com/python/cpython/commit/e6dcd371b2c54a94584dd124e8c592a496d46a47


--

___
Python tracker 
<https://bugs.python.org/issue19521>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19521] Parallel build race condition on AIX since python-2.7

2020-08-29 Thread Stefan Krah


Stefan Krah  added the comment:

I can't find the reason for:

if test -z "$EXPORTSYMS"; then
EXPORTSYMS="Modules/python.exp"
fi


Modules/python.exp is hardcoded elsewhere, and I'd rather set
EXPORTSYMS unconditionally on AIX and unset it unconditionally
for all other systems (which don't build with the patch if
EXPORTSYMS happens to be defined).

--

___
Python tracker 
<https://bugs.python.org/issue19521>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19521] Parallel build race condition on AIX since python-2.7

2020-08-29 Thread Stefan Krah


Stefan Krah  added the comment:

Okay, thanks.  The -G option is of course attractive for Linux projects
because it requires minimal changes in the build machinery.

I've added support for libmpdec/libmpdec++ (next release) for AIX-style
shared libraries (shr.o inside libmpdec.a).  The AIX linker has a certain
elegance, but it requires something like 150 lines of code changes and
conditionals inside the Makefiles.

I can confirm that -G is substantially slower, so I'm going to commit this
patch soon.

--

___
Python tracker 
<https://bugs.python.org/issue19521>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19521] Parallel build race condition on AIX since python-2.7

2020-08-29 Thread Stefan Krah


Change by Stefan Krah :


--
pull_requests: +21103
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/21997

___
Python tracker 
<https://bugs.python.org/issue19521>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19521] Parallel build race condition on AIX since python-2.7

2020-08-18 Thread Stefan Krah


Stefan Krah  added the comment:

The original patch is a bit dated, do we still need the export symbol 
generation?

https://www.ibm.com/support/knowledgecenter/en/SSGH3R_16.1.0/com.ibm.xlcpp161.aix.doc/proguide/compiling_shared_aix.html

"Use the -G option to create a shared library from the generated object files, 
and to enable runtime linking with applications that support it."

"If you do not specify a -bE option, all the global symbols are exported except 
for those symbols that have the hidden or internal visibility attribute."

--

___
Python tracker 
<https://bugs.python.org/issue19521>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41540] Test test_maxcontext_exact_arith (_decimal) consumes all memory on AIX

2020-08-17 Thread Stefan Krah


Stefan Krah  added the comment:

Well, I misunderstood this sentence then, so it's just for testing. :)

> Our customers should use it or use ulimit -d.


One will hit this issue also when following the MAX_PREC section
in the FAQ, but that is a rare case:

https://docs.python.org/3.10/library/decimal.html#decimal-faq

--

___
Python tracker 
<https://bugs.python.org/issue41540>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41540] Test test_maxcontext_exact_arith (_decimal) consumes all memory on AIX

2020-08-17 Thread Stefan Krah


Stefan Krah  added the comment:

> That's probably due to a very small size of the Paging Space of the AIX 
> machine you used for testing.

That is the case, the machine has 160GB of memory and 1GB of paging space. I 
guess it is configured specifically for not freezing.


> About PSALLOC=early , I confirm that it perfectly fixes the issue.

I'm surprised, because it is unspeakably slow on this machine,
even with the skips in place:

PSALLOC=early time ./python -m test -uall test_decimal

I hit Ctrl-C after 10min, so it takes even longer:

Real   622.11
User   11.63
System 350.12  (!)



The -bmaxdata approach has no speed penalty. Note that you can
use 10 petabytes for the value, it should still prevent this issue.

--

___
Python tracker 
<https://bugs.python.org/issue41540>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19521] Parallel build race condition on AIX since python-2.7

2020-08-15 Thread Stefan Krah


Change by Stefan Krah :


--
nosy: +BTaskaya, Michael.Felt, kadler, skrah

___
Python tracker 
<https://bugs.python.org/issue19521>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19521] Parallel build race condition on AIX since python-2.7

2020-08-15 Thread Stefan Krah


Change by Stefan Krah :


--
versions: +Python 3.10 -Python 2.7, Python 3.2, Python 3.3, Python 3.4, Python 
3.5, Python 3.6, Python 3.7

___
Python tracker 
<https://bugs.python.org/issue19521>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40424] AIX: makexp_aix, parallel build (failures) and ld WARNINGS

2020-08-15 Thread Stefan Krah


Stefan Krah  added the comment:

I understand that both of you are in favor of #19521 (the patch of
which I have not tried yet).

Can we close this as a duplicate? Please just reopen if you disagree.

--
nosy: +skrah
resolution:  -> duplicate
stage: patch review -> resolved
status: open -> closed
superseder:  -> Parallel build race condition on AIX since python-2.7

___
Python tracker 
<https://bugs.python.org/issue40424>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41205] Documentation Decimal power 0 to the 0 is Nan (versus 0 to the 0 which is 1)

2020-08-15 Thread Stefan Krah


Stefan Krah  added the comment:

Mark, do you think that we should document the other oddity as well
or should we close this?

--
status: open -> pending

___
Python tracker 
<https://bugs.python.org/issue41205>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39576] Surprising MemoryError in `decimal` with MAX_PREC

2020-08-15 Thread Stefan Krah


Stefan Krah  added the comment:

Thanks to David Edelsohn I have AIX access now. The issue reported
by Pablo is the same as #41540, for a summary see msg375480.

It is a trivial issue that requires that ulimits are in place due to
the fact that AIX over-allocates petabytes even when the physical memory
is just 16GB.


I have verified that the Python-3.7.7 release, which contains the
feature, behaves exactly like master:


No limits
=

./configure CC=xlc AR="ar -X64" CFLAGS="-q64 -qmaxmem=7 -qlanglvl=extc99 
-qcpluscmt -qkeyword=inline -qalias=ansi -qthreaded -D_THREAD_SAFE 
-D__VACPP_MULTI__" LDFLAGS="-L/usr/lib64 -q64"

skrah@gcc119:[/home/skrah/Python-3.7.7]./python -m test -uall test_decimal
0:00:00 Run tests sequentially
0:00:00 [1/1] test_decimal
Killed


There is no segfault, the program receives SIGKILL.



Data limits (-bmaxdata)
===

./configure CC=xlc AR="ar -X64" CFLAGS="-q64 -qmaxmem=7 -qlanglvl=extc99 
-qcpluscmt -qkeyword=inline -qalias=ansi -qthreaded -D_THREAD_SAFE 
-D__VACPP_MULTI__" LDFLAGS="-L/usr/lib64 -q64 -bmaxdata:0x8"

skrah@gcc119:[/home/skrah/Python-3.7.7]./python -m test -uall test_decimal
0:00:00 Run tests sequentially
0:00:00 [1/1] test_decimal

== Tests result: SUCCESS ==

1 test OK.

Total duration: 18.0 sec
Tests result: SUCCESS



In summary, since 64-bit AIX users should be familiar with data limits,
I don't consider the situation a _decimal bug at all.

--

___
Python tracker 
<https://bugs.python.org/issue39576>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41540] Test test_maxcontext_exact_arith (_decimal) consumes all memory on AIX

2020-08-15 Thread Stefan Krah


Change by Stefan Krah :


--
assignee:  -> skrah
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 
<https://bugs.python.org/issue41540>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40878] Use c99 on the aixtools bot

2020-08-15 Thread Stefan Krah


Change by Stefan Krah :


--
assignee:  -> skrah
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
type:  -> compile error

___
Python tracker 
<https://bugs.python.org/issue40878>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41540] Test test_maxcontext_exact_arith (_decimal) consumes all memory on AIX

2020-08-15 Thread Stefan Krah


Stefan Krah  added the comment:


New changeset 28bf82661ac9dfaf1b2d0fd0ac98fc0b31cd95bb by Miss Islington (bot) 
in branch '3.9':
bpo-41540: AIX: skip test that is flaky with a default ulimit. (GH-21890) 
(#21893)
https://github.com/python/cpython/commit/28bf82661ac9dfaf1b2d0fd0ac98fc0b31cd95bb


--

___
Python tracker 
<https://bugs.python.org/issue41540>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40878] Use c99 on the aixtools bot

2020-08-15 Thread Stefan Krah


Stefan Krah  added the comment:


New changeset 1864eacc22485b26c0ec0a059c9330f877861afb by Miss Islington (bot) 
in branch '3.9':
bpo-40878: xlc cannot handle C99 extern inline. (GH-21891)
https://github.com/python/cpython/commit/1864eacc22485b26c0ec0a059c9330f877861afb


--

___
Python tracker 
<https://bugs.python.org/issue40878>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41540] Test test_maxcontext_exact_arith (_decimal) consumes all memory on AIX

2020-08-15 Thread Stefan Krah


Stefan Krah  added the comment:


New changeset 39dab24621122338d01c1219bb0acc46ba9c9956 by Stefan Krah in branch 
'master':
bpo-41540: AIX: skip test that is flaky with a default ulimit. (#21890)
https://github.com/python/cpython/commit/39dab24621122338d01c1219bb0acc46ba9c9956


--

___
Python tracker 
<https://bugs.python.org/issue41540>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41540] Test test_maxcontext_exact_arith (_decimal) consumes all memory on AIX

2020-08-15 Thread Stefan Krah


Change by Stefan Krah :


--
keywords: +patch
pull_requests: +21009
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/21890

___
Python tracker 
<https://bugs.python.org/issue41540>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41540] Test test_maxcontext_exact_arith (_decimal) consumes all memory on AIX

2020-08-15 Thread Stefan Krah


Stefan Krah  added the comment:

To recap for people who find this: The problem occurs because of AIX's
extreme over-allocation and is specific to the 64-bit build.

Workarounds:

  1) Something like  ulimit -d 800.

  2) xlc: LDFLAGS="-L/usr/lib64 -q64 -bmaxdata:0x8" or
 LDFLAGS="-L/usr/lib64 -q64 -Wl,-bmaxdata:0x8".

 The first version seems more natural for xlc.

  3) gcc: LDFLAGS="-L/usr/lib64 -Wl,-bmaxdata:0x8 -maix64"



PSALLOC=early works really well for the libmpdec tests but is extremely
slow with the Python interpreter. Also, setting the environment in the
tests does not work.  It looks like it needs to be set before main()
starts.



So I'll just skip that test on AIX. It is not that important, and
the libmpdec maxprec tests, which are way more thorough, all pass
with PSALLOC=early.

--

___
Python tracker 
<https://bugs.python.org/issue41540>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41540] Test test_maxcontext_exact_arith (_decimal) consumes all memory on AIX

2020-08-15 Thread Stefan Krah


Stefan Krah  added the comment:

> -qmaxmem affects the compiler optimization.

I know, that's just from the Python README.AIX.  I didn't expect it to have any 
influence.


> -Wl,-bmaxdata:0x8 is a GCC command line option.

That is indeed surprising. Linking is prepared by a script:

$ ./Modules/makexp_aix Modules/python.exp . libpython3.10.a;  xlc -L/usr/lib64 
-q64 -Wl,-bmaxdata:0x8-Wl,-bE:Modules/python.exp -lld -o python 
Programs/python.o libpython3.10.a -lintl -ldl  -lpthread -lm   -lm

The xlc command runs without warnings or errors.



Without Wl,-bmaxdata:0x8


$ ./python -m test -uall test_decimal
0:00:00 Run tests sequentially
0:00:00 [1/1] test_decimal
Killed


With Wl,-bmaxdata:0x8
=

$ ./python -m test -uall test_decimal
0:00:00 Run tests sequentially
0:00:00 [1/1] test_decimal

== Tests result: SUCCESS ==

1 test OK.

Total duration: 17.3 sec
Tests result: SUCCESS


> On the other hand, -bmaxdata behaves differently in 32 bit mode and 64 bit 
> mode.  In 32 bit mode, it increases the heap size from the default 256MB.  In 
> 64 bit mode, it sets a guaranteed maximum size for the heap.

Yes, that's what I expected. The test only allocates that much memory
for 64-bit builds.  The workaround only needs to be enabled for 64-bit.

So a memory softlimit, same as e.g. djb uses for qmail with his
softlimit program, is exactly what I was looking for.


> I sort of think that the solution desired for the testcase is PSALLOC=early 
> to match traditional Unix/Linux malloc() behavior.

I can try that, but our test suite might complain about the environment
being modified.

--

___
Python tracker 
<https://bugs.python.org/issue41540>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40878] Use c99 on the aixtools bot

2020-08-15 Thread Stefan Krah


Stefan Krah  added the comment:


New changeset 40e700ad042089120456cc2ee79b8ca69479416b by Stefan Krah in branch 
'master':
bpo-40878: xlc cannot handle C99 extern inline. (GH-21887)
https://github.com/python/cpython/commit/40e700ad042089120456cc2ee79b8ca69479416b


--

___
Python tracker 
<https://bugs.python.org/issue40878>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40878] Use c99 on the aixtools bot

2020-08-15 Thread Stefan Krah


Change by Stefan Krah :


--
keywords: +patch
pull_requests: +21006
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/21887

___
Python tracker 
<https://bugs.python.org/issue40878>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41540] Test test_maxcontext_exact_arith (_decimal) consumes all memory on AIX

2020-08-15 Thread Stefan Krah


Stefan Krah  added the comment:

Thank you, David!
  
Now that I can test on AIX, I can confirm that the data limit is the
culprit:

libmpdec deliberately calls malloc(52631578947368422ULL) in the
maxprec tests, which is supposed to fail, but succeeds.

However, instead of freezing the machine, the process gets a proper
SIGKILL almost instantly.



As I suggested earlier, using -bmaxdata prevents this from happening
and the test passes.

./configure CC=xlc AR="ar -X64" CFLAGS="-q64 -qmaxmem=7 -qlanglvl=extc99 
-qcpluscmt -qkeyword=inline -qalias=ansi -qthreaded -D_THREAD_SAFE 
-D__VACPP_MULTI__" LDFLAGS="-L/usr/lib64 -q64 -Wl,-bmaxdata:0x8"


I have not figured out a similar gcc option yet, but only searched for 5 min.



The question now is: Since this is expected behavior on AIX, and xlc (and 
probably
gcc as well) have limit command line switches, do we need to disable the test?



I tried to set rlimit in the test, which works on Linux but is broken on AIX:

test test_decimal failed -- Traceback (most recent call last):
  File "/home/skrah/cpython/Lib/test/test_decimal.py", line 5684, in 
test_maxcontext_exact_arith
resource.setrlimit(resource.RLIMIT_DATA, (800, hardlimit))
OSError: [Errno 14] Bad address


So disabling the test would be the best option, unless we want to educate users
about -bmaxdata.

--

___
Python tracker 
<https://bugs.python.org/issue41540>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41540] Test test_maxcontext_exact_arith (_decimal) consumes all memory on AIX

2020-08-14 Thread Stefan Krah


Stefan Krah  added the comment:

> So, this issue with v3.10 (master) appeared to me as a regression.

I understand that from your point of view it appears as a regression.

However, quoting the C standard, 7.20.3 Memory management functions:

"The pointer returned points to the start (lowest byte
address) of the allocated space. If the space cannot be allocated, a null 
pointer is
returned."


So, for a system that is not currently officially supported, I don't
consider it my problem if AIX thinks the space can be allocated.

But as I said, I can disable that test on AIX.  If I get AIX access,
I can look at this more.

--

___
Python tracker 
<https://bugs.python.org/issue41540>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41540] Test test_maxcontext_exact_arith (_decimal) consumes all memory on AIX

2020-08-14 Thread Stefan Krah


Stefan Krah  added the comment:

> Core developers have full access to AIX system for the asking.  Back to you, 
> Stefan.

That sounds great. Can we contact you directly, or have I missed an earlier 
announcement from someone else giving out AIX access?

Or are you working on it and I misunderstand the idiomatic English? :)

--

___
Python tracker 
<https://bugs.python.org/issue41540>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41540] Test test_maxcontext_exact_arith (_decimal) consumes all memory on AIX

2020-08-13 Thread Stefan Krah


Stefan Krah  added the comment:

The test (size > (size_t)PY_SSIZE_T_MAX)) has nothing to do with it. Within 
Python, most sizes are ssize_t, so a value larger than SSIZE_MAX is suspicious.


AIX is an unsupported platform.

Realistically, if people want AIX to be supported, someone has to give core 
devs full ssh access to an AIX system.

Perhaps I'll just skip this test on AIX.

--
components: +Extension Modules -C API
nosy: +David.Edelsohn
priority: normal -> low
type: crash -> behavior

___
Python tracker 
<https://bugs.python.org/issue41540>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41540] Test test_maxcontext_exact_arith (_decimal) consumes all memory on AIX

2020-08-13 Thread Stefan Krah


Stefan Krah  added the comment:

Also, perhaps build Python with -bmaxdata?

https://www.enterprisedb.com/edb-docs/d/postgresql/reference/manual/11.1/installation-platform-notes.html

--

___
Python tracker 
<https://bugs.python.org/issue41540>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41540] Test test_maxcontext_exact_arith (_decimal) consumes all memory on AIX

2020-08-13 Thread Stefan Krah


Stefan Krah  added the comment:

We need more information.

Is this 64-bit AIX?

How much physical memory does the machine have?

Linux also has over-allocation and the default for ulimit is unlimited.
But it does not attempt to over-allocate such an outrageous amount of
memory.

Neither do FreeBSD, Windows, etc.

--
nosy: +skrah

___
Python tracker 
<https://bugs.python.org/issue41540>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41324] Add a minimal decimal capsule API

2020-08-10 Thread Stefan Krah


Change by Stefan Krah :


--
components: +C API -Extension Modules
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 
<https://bugs.python.org/issue41324>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41324] Add a minimal decimal capsule API

2020-08-10 Thread Stefan Krah


Stefan Krah  added the comment:


New changeset 39042e00ab01d6521548c1b7cc6554c09f4389ff by Stefan Krah in branch 
'master':
bpo-41324 Add a minimal decimal capsule API (#21519)
https://github.com/python/cpython/commit/39042e00ab01d6521548c1b7cc6554c09f4389ff


--

___
Python tracker 
<https://bugs.python.org/issue41324>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41369] Update to libmpdec-2.5.1

2020-07-22 Thread Stefan Krah


Stefan Krah  added the comment:


New changeset 9b9f1582753979f38d2fd927cddf0621a65e9ed6 by Stefan Krah in branch 
'master':
bpo-41369 Update to libmpdec-2.5.1: new features (GH-21593)
https://github.com/python/cpython/commit/9b9f1582753979f38d2fd927cddf0621a65e9ed6


--

___
Python tracker 
<https://bugs.python.org/issue41369>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41369] Update to libmpdec-2.5.1

2020-07-22 Thread Stefan Krah


Change by Stefan Krah :


--
keywords: +patch
pull_requests: +20732
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/21593

___
Python tracker 
<https://bugs.python.org/issue41369>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41369] Update to libmpdec-2.5.1

2020-07-22 Thread Stefan Krah


New submission from Stefan Krah :

This issue tracks the update of the included libmpdec to version 2.5.1.

The version includes features required for #41324.

--
assignee: skrah
components: Extension Modules
messages: 374101
nosy: skrah
priority: normal
severity: normal
status: open
title: Update to libmpdec-2.5.1
type: enhancement
versions: Python 3.10

___
Python tracker 
<https://bugs.python.org/issue41369>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41324] Add a minimal decimal capsule API

2020-07-20 Thread Stefan Krah


Stefan Krah  added the comment:

I'm happy with the API, except that --with-system-libmpdec is naturally
broken.  So I've to release a new libmpdec, which I'd rather do soon
because I don't want to revisit this later.

Antoine has looked at the API.  If anyone else has requests or objections,
now would be a good time to raise concerns.  These two functions are
the centerpiece of the PR:

   mpd_uint128_triple_t PyDec_AsUint128Triple(const PyObject *dec)
   PyObject *PyDec_FromUint128Triple(const mpd_uint128_triple_t *triple)

--

___
Python tracker 
<https://bugs.python.org/issue41324>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41262] Convert memoryview to Argument Clinic

2020-07-19 Thread Stefan Krah


Stefan Krah  added the comment:

Thanks, I can confirm that the speedup for memoryview.cast() is large in 
microbenchmarks.

Still, if the speedup cannot be seen in programs like test_buffer,
the amount of code that's being added for a speedup < 5% in real
world programs is quite substantial (if you count the generated
code and the fast_call machinery).

But we can leave it in.  Preemptively, if someone sees this and
thinks the flood gates are open for _decimal:  No, it won't be
converted to AC.

--
status: open -> closed

___
Python tracker 
<https://bugs.python.org/issue41262>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41205] Documentation Decimal power 0 to the 0 is Nan (versus 0 to the 0 which is 1)

2020-07-19 Thread Stefan Krah

Stefan Krah  added the comment:


New changeset 10e466448f67850ed7bb2e2a4e7f017f2b050cad by Srinivas Reddy 
Thatiparthy (శ్రీనివాస్  రెడ్డి తాటిపర్తి) in branch 'master':
bpo-41205: Document Decimal power 0 to the 0 (GH-21386)
https://github.com/python/cpython/commit/10e466448f67850ed7bb2e2a4e7f017f2b050cad


--

___
Python tracker 
<https://bugs.python.org/issue41205>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41324] Add a minimal decimal capsule API

2020-07-18 Thread Stefan Krah


Stefan Krah  added the comment:

It looks like the API would be usable, so the PR now has documentation.

--

___
Python tracker 
<https://bugs.python.org/issue41324>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41262] Convert memoryview to Argument Clinic

2020-07-18 Thread Stefan Krah


Stefan Krah  added the comment:

I cannot detect a speedup in test_buffer, which is a heavy user of memoryviews:

# before:
>>> a = [3.742, 3.589, 3.542, 3.495, 3.481, 3.620, 3.773, 3.755, 3.701, 3.661]
>>> sum(a) / 10
3.63589995

# after
>>> b = [3.63, 3.596, 3.475, 3.43, 3.792, 3.58, 3.810, 3.52, 3.55, 3.690]
>>> sum(b) / 10
3.60729995



A microbenchmark shows a speedup:

# before:
$ ./python -m timeit -s "b = b'1234567890'" "memoryview(b)"
200 loops, best of 5: 116 nsec per loop

# after:

./python -m timeit -s "b = b'1234567890'" "memoryview(b)"
500 loops, best of 5: 98 nsec per loop



As the original author, I'm not sure why I should put up with the
less readable code for such a gain.  For decimal I'm using the pi
benchmark, which, while small, is at least a real math function in
pure Python. 

Do you have other benchmarks?

--
status: closed -> open

___
Python tracker 
<https://bugs.python.org/issue41262>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41324] Add a minimal decimal capsule API

2020-07-17 Thread Stefan Krah


Stefan Krah  added the comment:

Adding Daniele Varrazzo, in case this is useful for the PostgreSQL
adapter.

--
nosy: +piro

___
Python tracker 
<https://bugs.python.org/issue41324>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41324] Add a minimal decimal capsule API

2020-07-17 Thread Stefan Krah


Stefan Krah  added the comment:

Also as a note for Mark and Raymond: This API is for exact conversions
and avoids the use of the context except for raising ConversionSyntax.

I'll add documentation once Antoine has tried it out for his use case.

--

___
Python tracker 
<https://bugs.python.org/issue41324>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41324] Add a minimal decimal capsule API

2020-07-17 Thread Stefan Krah


Change by Stefan Krah :


--
type:  -> enhancement

___
Python tracker 
<https://bugs.python.org/issue41324>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22194] access to cdecimal / libmpdec API

2020-07-17 Thread Stefan Krah


Stefan Krah  added the comment:

Closing in favor of #41324, which adds just the most important
functions.

--
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> Add a minimal decimal capsule API

___
Python tracker 
<https://bugs.python.org/issue22194>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41324] Add a minimal decimal capsule API

2020-07-17 Thread Stefan Krah


New submission from Stefan Krah :

This adds a minimal decimal capsule API.  As can be seen from the patch,
adding anything to decimal while doing it properly is quite labor and
testing intensive, so the intent is to *keep* the API minimal!

That said, some functions are really necessary:

  1) PyDec_TypeCheck() -- for obvious reasons.

  2) PyDec_Alloc() -- create new decimals.

  3) PyDec_Get()   -- get the mpd_t, enables the use of all 
libmpdec functions.

  4) PyDec_AsUint128Triple()   -- export the decimal as (sign, hi, lo, exp).

  5) PyDec_FromUint128Triple() -- create a decimal from (sign, hi, lo, exp).


4) and 5) have been requested by Antoine for a real world use case.  (hi, lo)
is the coefficient as a __uint128_t split in two uint64_t.


Antoine, could you verify that this is sufficient for the database use case?

--
nosy: +mark.dickinson, pitrou, rhettinger

___
Python tracker 
<https://bugs.python.org/issue41324>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41324] Add a minimal decimal capsule API

2020-07-17 Thread Stefan Krah


Change by Stefan Krah :


--
keywords: +patch
pull_requests: +20656
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/21519

___
Python tracker 
<https://bugs.python.org/issue41324>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41324] Add a minimal decimal capsule API

2020-07-17 Thread Stefan Krah


Change by Stefan Krah :


--
assignee: skrah
components: Extension Modules
nosy: skrah
priority: normal
severity: normal
stage: needs patch
status: open
title: Add a minimal decimal capsule API
versions: Python 3.10

___
Python tracker 
<https://bugs.python.org/issue41324>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41315] Add mathematical functions as wrappers to decimal.Decimal methods

2020-07-16 Thread Stefan Krah


Stefan Krah  added the comment:

The top level decimal.py that dispatches to either _decimal or
_pydecimal is pure Python.  So perhaps these applications could
add these methods themselves:


>>> import decimal
>>> def exp(x):
... return x.exp()
... 
>>> decimal.exp = exp
>>> 
>>> from decimal import *
>>> exp(Decimal(2))
Decimal('7.389056098930650227230427461')


As you see, it is no big deal, but it feels a bit odd to have
some methods like exp() and sqrt() exposed in the top level.


We already have:

  Decimal.exp()

And:

  >>> c = getcontext()
  >>> c.exp(Decimal(2))
  Decimal('7.389056098930650227230427461')

--

___
Python tracker 
<https://bugs.python.org/issue41315>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41313] sys.setrecursionlimit: OverflowError still raised when int limited in sys.maxsize

2020-07-16 Thread Stefan Krah


Stefan Krah  added the comment:

Mark has already mentioned that setting the recursion limit to a
value higher than 2000-1 makes no sense.

Apart from that, sys.maxsize is actually documented like this:

   maxsize -- the largest supported length of containers.


So it applies to Py_ssize_t (signed version of size_t), but not to
any C integer in general.

--
nosy: +skrah
stage:  -> resolved
status: pending -> closed

___
Python tracker 
<https://bugs.python.org/issue41313>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41302] _decimal failed to build with system libmpdec 2.5

2020-07-15 Thread Stefan Krah


Stefan Krah  added the comment:

Closing, thanks for all the patches!

--
stage:  -> resolved
status: open -> closed
versions: +Python 3.8

___
Python tracker 
<https://bugs.python.org/issue41302>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41302] _decimal failed to build with system libmpdec 2.5

2020-07-15 Thread Stefan Krah


Stefan Krah  added the comment:


New changeset 16eea45fbd3b7c3d1b222b7eb7a5d7ee427f70bd by Felix Yan in branch 
'3.8':
[3.8] bpo-41302: Support system libmpdec 2.5 for Python 3.8 (GH-21488)
https://github.com/python/cpython/commit/16eea45fbd3b7c3d1b222b7eb7a5d7ee427f70bd


--

___
Python tracker 
<https://bugs.python.org/issue41302>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41302] _decimal failed to build with system libmpdec 2.5

2020-07-15 Thread Stefan Krah


Stefan Krah  added the comment:

I'm going to reclassify this as a build fix for 3.8. 3.8 promises:

#if !defined(MPD_VERSION_HEX) || MPD_VERSION_HEX < 0x02040100
  #error "libmpdec version >= 2.4.1 required"
#endif

So it seems reasonable to support at least two or three consecutive
system libmpdec versions, otherwise the >= is pointless.

--

___
Python tracker 
<https://bugs.python.org/issue41302>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41285] memoryview does not support subclassing

2020-07-15 Thread Stefan Krah


Change by Stefan Krah :


--
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> Allow objects implemented in pure Python to export PEP 3118 
buffers

___
Python tracker 
<https://bugs.python.org/issue41285>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41285] memoryview does not support subclassing

2020-07-15 Thread Stefan Krah


Stefan Krah  added the comment:

Yes, let's make #13797 a superseder.

--

___
Python tracker 
<https://bugs.python.org/issue41285>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41285] memoryview does not support subclassing

2020-07-15 Thread Stefan Krah


Stefan Krah  added the comment:

If I understand this correctly, I think this may be a duplicate of #13797.


Something like a __getbuffer__ protocol would be needed. I'm not
saying we *should* go that route, just stating the requirements
from my perspective.

--

___
Python tracker 
<https://bugs.python.org/issue41285>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41302] _decimal failed to build with system libmpdec 2.5

2020-07-15 Thread Stefan Krah


Change by Stefan Krah :


--
resolution:  -> fixed
stage: patch review -> 
status: open -> pending

___
Python tracker 
<https://bugs.python.org/issue41302>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41302] _decimal failed to build with system libmpdec 2.5

2020-07-15 Thread Stefan Krah


Stefan Krah  added the comment:

Thanks for the patch!

The integrated libmpdec-2.4.2 in Python 3.8 still has a couple of
UNUSED, so the simple approach of moving the define would not work.
It would be easy to replace the few instances of UNUSED with void
casts like in 2.5.0.


Strictly speaking though, this would be a feature for 3.8 and not
a build fix.


On the other hand, if Debian also plans to use 2.5.0 with 3.8,
there would be a stronger case for this build feature.

--
nosy: +doko

___
Python tracker 
<https://bugs.python.org/issue41302>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41302] _decimal failed to build with system libmpdec 2.5

2020-07-15 Thread Stefan Krah


Stefan Krah  added the comment:


New changeset 015efdbef7454a522e88cd79ba2b4cd77a5fb2a2 by Felix Yan in branch 
'master':
bpo-41302: Fix build with system libmpdec (GH-21481)
https://github.com/python/cpython/commit/015efdbef7454a522e88cd79ba2b4cd77a5fb2a2


--

___
Python tracker 
<https://bugs.python.org/issue41302>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41302] _decimal failed to build with system libmpdec 2.5

2020-07-15 Thread Stefan Krah


Stefan Krah  added the comment:

Thank you for the report, I'll add the define or remove UNUSED in 3.9
and 3.10.


3.8 is still supposed to use libmpdec-2.4.2, though it would be
harmless to use libmpdec-2.5.0.

Are you planning to use libmpdec-2.5.0 with 3.8?

--
assignee:  -> skrah
stage:  -> needs patch
versions:  -Python 3.8

___
Python tracker 
<https://bugs.python.org/issue41302>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39542] Cleanup object.h header

2020-07-07 Thread Stefan Krah


Stefan Krah  added the comment:

s/PyPy as a bottleneck/the C-API as a bottle neck for PyPy/

--

___
Python tracker 
<https://bugs.python.org/issue39542>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39542] Cleanup object.h header

2020-07-07 Thread Stefan Krah


Stefan Krah  added the comment:

A brief note for Victor that *nothing* was directed against him. On
the contrary, msg372995 was supporting him in case the commit had
actually been unreviewed, which it apparently wasn't. Sorry for
jumping on the bandwagon there.


> PEP 620 for the overall plan.

This one I have some trouble with.  It cites PyPy as a bottleneck, but
IIRC Armin Rigo was on record saying that such changes would not help
PyPy, and he would come up with a counter proposal. Has this changed?

It is also a bit unusual that the PEP is in draft status but a lot
of things are already committed.

--

___
Python tracker 
<https://bugs.python.org/issue39542>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40874] Update to libmpdec-2.5.0

2020-07-06 Thread Stefan Krah


Stefan Krah  added the comment:

More than that, I had *promised* Matthias privately to release a
new libmpdec for the sqrt-max-prec feature a couple of months ago.

I request that further packaging issues will be dealt with primarily
by Matthias and myself.

--

___
Python tracker 
<https://bugs.python.org/issue40874>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40874] Update to libmpdec-2.5.0

2020-07-06 Thread Stefan Krah


Stefan Krah  added the comment:

> The standalone libmpdec had to be updated, and was updated according
to the Debian-friendly way requested by Matthias himself.

Not updated, of course the sqrt-max-prec *had never been* in
the standalone libmpdec, it is new in 2.5.0.

--

___
Python tracker 
<https://bugs.python.org/issue40874>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40874] Update to libmpdec-2.5.0

2020-07-06 Thread Stefan Krah


Stefan Krah  added the comment:

As noted in the first message of this thread, the sqrt-max-prec feature
(requested by Mark and Tim) was already in 3.9 long before the beta
freeze.

I'm not sure why this is not clear from the original message.

That fix is safe for Python, but not for the standalone libmpdec.


The standalone libmpdec had to be updated, and was updated according
to the Debian-friendly way requested by Matthias himself.


Note that a pinning issue in another area of Python has surfaced in
the last 24 hours.  I wonder if the reaction will be a strong as here.

--

___
Python tracker 
<https://bugs.python.org/issue40874>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41215] AIX: build fails for xlc/xlC since new PEG parser

2020-07-05 Thread Stefan Krah


Change by Stefan Krah :


--
nosy: +skrah

___
Python tracker 
<https://bugs.python.org/issue41215>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40874] Update to libmpdec-2.5.0

2020-07-05 Thread Stefan Krah


Stefan Krah  added the comment:

Thanks for taking a look, Antoine.

IIRC, the version pinning already accommodates Debian:

#if !defined(MPD_VERSION_HEX) || MPD_VERSION_HEX < 0x0205
  #error "libmpdec version >= 2.5.0 required"
#endif


In the first libmpdec versions, I had a stricter equality check,
and I *think* (but I'm not 100% sure) that it was Matthias who
requested the relaxation.


Based on that, perhaps Debian should just use 2.5.0 for both
3.8 and 3.9 in the transition period.


I'm more comfortable with 3.8 using 2.5.0 than 3.9 using 2.4.2.

--

___
Python tracker 
<https://bugs.python.org/issue40874>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40874] Update to libmpdec-2.5.0

2020-07-04 Thread Stefan Krah


Stefan Krah  added the comment:

> In any case, I would have had a hard time giving a competent opinion on this 
> issue.

Essentially it's a really simple Linux packaging issue for the
external libmpdec.  To have the exact same behavior for the external
libmpdec as for the included libmpdec, packagers must use:

  3.8  <--> 2.4.2
  3.9  <--> 2.5.0


ArchLinux had no problems.  Debian, and by extension Ubuntu, requires
3.8 and 3.9 to be on the same system during a transitional period, as
pointed out in msg372928 (which is really the most important message
of this whole thread).  

The commit that pinned _decimal to libmpdec version 2.5.0 broke this
use case, but there are workarounds.


My stance is that it is important that libmpdec is pinned so distros
don't use a divergent version.  Since there are multiple mitigations
for Debian, I don't feel particularly guilty.


Review of the commit that pinned 2.5.0 would have led to the exact
same outcome: I would have pointed that out on GitHub.

Note that with the Debian scheme there is never a good time to
update libmpdec, regardless of the release cycle.

--

___
Python tracker 
<https://bugs.python.org/issue40874>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39542] Cleanup object.h header

2020-07-04 Thread Stefan Krah


Stefan Krah  added the comment:

I have no opinion about this commit (I did not benchmark anything,
but I wouldn't be surprised if Victor did).

I do have the opinion that unreviewed commits occur quite frequently
and nearly every committer has made some (or a lot), including the
committers who mention them.

They are not inherently bad, so I hope we can focus on the outcome.

--

___
Python tracker 
<https://bugs.python.org/issue39542>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41205] Documentation Decimal power 0 to the 0 is Nan (versus 0 to the 0 which is 1)

2020-07-04 Thread Stefan Krah


Stefan Krah  added the comment:

Agreed, and it's even slightly worse with the ROUND_FLOOR special case:

>>> c.rounding = ROUND_FLOOR
>>> +Decimal("-0")
Decimal('-0')
>>> 

That's why there are three slightly different methods for applying the
context:

   1) context.create_decimal() ==> special case for NaN payloads.

   2) context.apply() (private method) ==> no special cases at all.

   3) Decimal.plus() ==> ROUND_FLOOR special case.

--

___
Python tracker 
<https://bugs.python.org/issue41205>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39542] Cleanup object.h header

2020-07-04 Thread Stefan Krah


Stefan Krah  added the comment:

Ah, I see that the subject has already been answered in the negative:

https://discuss.python.org/t/make-code-review-mandatory/4174

He must have forgotten.

--

___
Python tracker 
<https://bugs.python.org/issue39542>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39542] Cleanup object.h header

2020-07-04 Thread Stefan Krah


Stefan Krah  added the comment:

Christian Heimes has expressed an interest (quite rudely) in unreviewed commits 
elsewhere.  I wonder if that applies to everyone regardless of employer.

--
nosy: +christian.heimes, skrah

___
Python tracker 
<https://bugs.python.org/issue39542>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40874] Update to libmpdec-2.5.0

2020-07-03 Thread Stefan Krah


Stefan Krah  added the comment:

How witty!

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
type:  -> behavior

___
Python tracker 
<https://bugs.python.org/issue40874>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40874] Update to libmpdec-2.5.0

2020-07-03 Thread Stefan Krah


Stefan Krah  added the comment:

> Finally, while Raymond and Antoine are welcome to voice their opinions on the 
> matter, your change is landing in 3.9.0b4 which I'm about to announce. So we 
> won't be reverting it. In the future let's make sure we stick to the release 
> calendar to avoid similar heat. If we need to bend a rule or two, that's 
> okay, it happens. Making a fellow core developer stamp your change in such 
> case will increase visibility, and is a good practice regardless, required 
> for example in avionics software.

I've added Antoine, Mark and Raymond because they know the history of
libmpdec, unlike people who came later.

Like for libffi, it is not feasible to get review, because there is
no time.  This would effectively mean that nothing ever changes.

The alternative is to trust that the zero fault situation continues.

Or download *one* of the gigantic test suites, which I have laboriously
updated for this release:

http://www.bytereef.org/software/mpdecimal/releases/mpdecimal-testit-2.5.0.tar.gz

The second one isn't even published.


So again, just clamoring for review (which often is just rubber
stamping) leads to nothing but scoring a few cheap points.

--

___
Python tracker 
<https://bugs.python.org/issue40874>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40874] Update to libmpdec-2.5.0

2020-07-03 Thread Stefan Krah


Stefan Krah  added the comment:

Finally, about the Debian issue, of course you could also link 3.8
against the static lib.

--

___
Python tracker 
<https://bugs.python.org/issue40874>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40874] Update to libmpdec-2.5.0

2020-07-03 Thread Stefan Krah

Stefan Krah  added the comment:

Łukasz, which one is nicer?

> reverting this patch passes all the tests, what's the motivation and why were 
> there no code reviews for this?

or:

> Yeah, I already felt a bit guilty about adding you -- it could be a compiler 
> bug or an actual overflow.  My bet is also that the reordering exposes an 
> existing overflow.  The reordering itself certainly looks correct to me.



I'm always astonished that some of the CoC proponents (and reporters)
have little idea about actual politeness, a fact which is a main source
of friction.


Hint: I'd prefer actual politeness.

--

___
Python tracker 
<https://bugs.python.org/issue40874>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40874] Update to libmpdec-2.5.0

2020-07-03 Thread Stefan Krah


Stefan Krah  added the comment:

> both 3.8 and 3.9 have to be available on the systems for the transition 
> period.

If sonames can be incremented for libraries even if they are ABI compatible, 
how about using up as many as you need for the Debian
package?  Next time when I release mpdecimal, I'll ask you about
the highest version that's in use at Debian and increment it by
one.

--

___
Python tracker 
<https://bugs.python.org/issue40874>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40874] Update to libmpdec-2.5.0

2020-07-03 Thread Stefan Krah


Stefan Krah  added the comment:

> In the mean time may I request that you follow our protocol for code review.

Ah, who reviews libffi?  It is just updated.  Not counting the thousands of 
other cases people commit unreviewed, like in changing the C-API.

And no, Christian, that isn't "whataboutism", that is comparative analysis.

--

___
Python tracker 
<https://bugs.python.org/issue40874>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40874] Update to libmpdec-2.5.0

2020-07-03 Thread Stefan Krah


Stefan Krah  added the comment:

Matthias, to tell the truth, I was never sure about the soname.
I read this:

   https://www.debian.org/doc/debian-policy/ch-sharedlibs.html


"""
The SONAME and binary package name need not, and indeed normally should not, 
change if new interfaces are added but none are removed or changed, since this 
will not break binaries linked against the old shared library. Correct 
versioning of dependencies on the newer shared library by binaries that use the 
new interfaces is handled via the symbols or shlibs system (see Dependencies 
between the library and other packages).
"""

I took the interface to mean ABI, which did not change.  Also this:


"""Every time the shared library ABI changes in a way that may break binaries 
linked against older versions of the shared library, the SONAME of the library 
and the corresponding name for the binary package containing the runtime shared 
library should change. Normally, this means the SONAME should change any time 
an interface is removed from the shared library or the signature of an 
interface (the number of parameters or the types of parameters that it takes, 
for example) is changed. This practice is vital to allowing clean upgrades from 
older versions of the package and clean transitions between the old ABI and new 
ABI without having to upgrade every affected package simultaneously.
"""


So I left the soname at 2.

--

___
Python tracker 
<https://bugs.python.org/issue40874>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40874] Update to libmpdec-2.5.0

2020-07-03 Thread Stefan Krah


Stefan Krah  added the comment:

Since this issue has been brought to the attention of the CoC
committee. Here is how *I* report issues:

   https://bugs.python.org/issue40223#msg372578
   https://bugs.python.org/issue40223#msg372637
   https://github.com/google/sanitizers/issues/1257


Note that I do not go straight into accusing people, especially
in uncertain cases. I never have any problems with my bug reports.

--

___
Python tracker 
<https://bugs.python.org/issue40874>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40874] Update to libmpdec-2.5.0

2020-07-03 Thread Stefan Krah


Stefan Krah  added the comment:

> backwards incompatible changes.

It is not a backwards incompatible change. Slamming a 3.9 into
a nightly build has never been supported.

--

___
Python tracker 
<https://bugs.python.org/issue40874>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40874] Update to libmpdec-2.5.0

2020-07-03 Thread Stefan Krah


Stefan Krah  added the comment:

Raymond, Mark, Antoine:  If you think this should be reverted, I'll
revert it.

--
nosy: +mark.dickinson, pitrou, rhettinger

___
Python tracker 
<https://bugs.python.org/issue40874>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40874] Update to libmpdec-2.5.0

2020-07-03 Thread Stefan Krah


Stefan Krah  added the comment:

I was accused of breaking the release, which is false. It is outside
of a release manager's authority to claim that an *experimental* and
*nightly* build that uses a flag in an unintended manner needs counts
as breakage.

--

___
Python tracker 
<https://bugs.python.org/issue40874>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40874] Update to libmpdec-2.5.0

2020-07-03 Thread Stefan Krah


Change by Stefan Krah :


--
components: +Extension Modules
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
type:  -> behavior

___
Python tracker 
<https://bugs.python.org/issue40874>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



  1   2   3   4   5   6   7   8   9   10   >