[issue41546] pprint() gives exception when ran from pythonw

2020-08-15 Thread Henrique Gj


Henrique Gj  added the comment:

> Debug prints should not crash a program.

> 'Not a bug'

wait

--
nosy: +henriquesdj0

___
Python tracker 

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



[issue41561] test_ssl fails in Ubuntu 20.04: test_min_max_version_mismatch

2020-08-15 Thread Bug Reporter


New submission from Bug Reporter :

FAIL: test_min_max_version_mismatch (test.test_ssl.ThreadedTests)
--
Traceback (most recent call last):
  File "/home/vbk/Downloads/Python-3.8.5/Lib/test/test_ssl.py", line 217, in 
wrapper
return func(*args, **kw)
  File "/home/vbk/Downloads/Python-3.8.5/Lib/test/test_ssl.py", line 3841, in 
test_min_max_version_mismatch
self.assertIn("alert", str(e.exception))
AssertionError: 'alert' not found in '[SSL: NO_PROTOCOLS_AVAILABLE] no 
protocols available (_ssl.c:1123)'

--
assignee: christian.heimes
components: Build, SSL, Tests
messages: 375502
nosy: bugsrep, christian.heimes
priority: normal
severity: normal
status: open
title: test_ssl fails in Ubuntu 20.04: test_min_max_version_mismatch
type: compile error
versions: Python 3.8

___
Python tracker 

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



[issue1635741] Py_Finalize() doesn't clear all Python objects at exit

2020-08-15 Thread hai shi


Change by hai shi :


--
pull_requests: +21015
pull_request: https://github.com/python/cpython/pull/21896

___
Python tracker 

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



[issue41489] HTMLParser : HTMLParser.error creating multiple errors.

2020-08-15 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +berker.peksag

___
Python tracker 

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



[issue41513] Scale by power of two in math.hypot()

2020-08-15 Thread Raymond Hettinger


Change by Raymond Hettinger :


Added file: https://bugs.python.org/file49399/test_hypot_accuracy.py

___
Python tracker 

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



[issue41513] Scale by power of two in math.hypot()

2020-08-15 Thread Raymond Hettinger


Change by Raymond Hettinger :


Added file: https://bugs.python.org/file49398/test_hypot_commutativity.py

___
Python tracker 

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



[issue41513] Scale by power of two in math.hypot()

2020-08-15 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

If someone thinks there is a case for using the C library hypot() for the 
two-argument form, feel free to reopen this.

Likewise, if someone thinks there is a case for doing the expensive but more 
accurate algorithm, go ahead and reopen this.

Otherwise, I think we're done for now :-)

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

___
Python tracker 

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



[issue41513] Scale by power of two in math.hypot()

2020-08-15 Thread Raymond Hettinger


Raymond Hettinger  added the comment:


New changeset fff3c28052e6b0750d6218e00acacd2fded4991a by Raymond Hettinger in 
branch 'master':
bpo-41513: Improve speed and accuracy of math.hypot() (GH-21803)
https://github.com/python/cpython/commit/fff3c28052e6b0750d6218e00acacd2fded4991a


--

___
Python tracker 

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



[issue41560] pathlib.Path.glob fails on empty string

2020-08-15 Thread Alexander Heger


New submission from Alexander Heger :

Passing an empty string to pathlib.Path.glob fails.

Example
```
from pathlib import Path
path = Path('./myfile.txt')
path.glob('')
```

The result is:
```
~/Python/lib/python3.8/pathlib.py in glob(self, pattern)
   1129 """
   1130 if not pattern:
-> 1131 raise ValueError("Unacceptable pattern: 
{!r}".format(pattern))
   1132 drv, root, pattern_parts = self._flavour.parse_parts((pattern,))
   1133 if drv or root:

ValueError: Unacceptable pattern: ''
```

This is not the desired or expected behaviour, which would be to just return 
`path` if it exists.  This behaviour is also inconsistent with the 
documentation which states (Python 3.8.5):
"""
Glob the given relative pattern in the directory represented by this path, 
yielding all matching files (of any kind):
"""

And it is in contrast to the behaviour of glob.glob, which is just fine with 
the empty string, returning an empty list.

--
components: Library (Lib)
messages: 375499
nosy: alex.heger
priority: normal
severity: normal
status: open
title: pathlib.Path.glob fails on empty string
type: crash
versions: Python 3.8

___
Python tracker 

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



[issue41513] Scale by power of two in math.hypot()

2020-08-15 Thread Tim Peters


Tim Peters  added the comment:

Oh no - I wouldn't use this as a default implementation. Too expensive. There 
is one aspect you may find especially attractive, though: unlike even the 
Decimal approach, it should be 100% insensitive to argument order (no info is 
lost before fsum() is called, and fsum's output should be unaffected by summand 
order).

--

___
Python tracker 

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



[issue32751] wait_for(future, ...) should wait for the future (even if a timeout occurs)

2020-08-15 Thread Elvis Pranskevichus


Change by Elvis Pranskevichus :


--
nosy: +Elvis.Pranskevichus
nosy_count: 6.0 -> 7.0
pull_requests: +21014
pull_request: https://github.com/python/cpython/pull/21895

___
Python tracker 

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



[issue41545] gc API requiring matching number of gc.disable - gc.enable calls

2020-08-15 Thread Irit Katriel


Irit Katriel  added the comment:

There is also gc.isenabled(), so couldn't you check that before disabling and 
remember whether you needed to disable or not?

--
nosy: +iritkatriel

___
Python tracker 

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



[issue37658] In some cases asyncio.wait_for can lead to socket leak.

2020-08-15 Thread Elvis Pranskevichus


Change by Elvis Pranskevichus :


--
keywords: +patch
nosy: +Elvis.Pranskevichus
nosy_count: 3.0 -> 4.0
pull_requests: +21013
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/21894

___
Python tracker 

___
___
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 

___
___
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 

___
___
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 

___
___
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 

___
___
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 

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



[issue38628] Issue with ctypes in AIX

2020-08-15 Thread Vinay Sajip


Vinay Sajip  added the comment:

> stgdict.c currently includes a target-specific work-around for small 
> structures that is not restricted to the one target (x64) affected. What's 
> the best way to proceed?

I think more data is needed to determine the best way to proceed. The original 
failure was for x64, but other targets may be affected too if structs below a 
certain size, when passed by value, are passed in registers - libffi would have 
incomplete information about how to pass the struct correctly, as arrays are 
normally encoded as pointers in libffi. Do we know for particular targets what 
the struct size limits are for passing by value in registers? If so, we could 
set the MAX_STRUCT_SIZE according to target.

I would suggest adding a test to Lib/ctypes/test/test_structures.py in the 
test_array_in_struct method (or an analogous test_38628 method), to get it to 
fail - rather than using the OP's MemchrArgsHack. Then any patches to the 
stgdict.c code would have to pass that test on all architectures. But, noting 
that test_array_in_struct passes 16-byte structures by value to a C function to 
verify correct passing of the struct - if these tests aren't failing on AIX 
now, how come? That test was failing on x64 before the stgdict.c patch was 
added, and started working afterwards. Unfortunately I don't have an AIX 
environment I can try things in :-(

--

___
Python tracker 

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



[issue41558] Backspace not clearing the text

2020-08-15 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

I do not even think that it is a bug in Jupyter. It is expected that different 
output devices can support or not support specific control characters. It is 
rather a feature request to add support of the backslash character (and maybe 
other control characters like caret return, horizontal and vertical tabs, etc) 
in Jupiter.

--
nosy: +serhiy.storchaka
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

___
Python tracker 

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



[issue39994] pprint handling of dict subclasses that override __repr__

2020-08-15 Thread Eric V. Smith


Eric V. Smith  added the comment:

Only 3.8 - 3.10 would be eligible for this fix. 3.7 is getting only security 
fixes.

--
versions:  -Python 3.5, Python 3.6, Python 3.7

___
Python tracker 

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



[issue39994] pprint handling of dict subclasses that override __repr__

2020-08-15 Thread Irit Katriel


Change by Irit Katriel :


--
versions: +Python 3.10, Python 3.5, Python 3.6, Python 3.7

___
Python tracker 

___
___
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 

___
___
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 

___
___
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 

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



[issue41513] Scale by power of two in math.hypot()

2020-08-15 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

> Cheapest way I know of that "seemingly always" reproduces 
> the Decimal result (when that's rounded back to float) 
> combines fsum(), Veltkamp splitting, and the correction 
> trick from the paper.

That's impressive.  Do you think this is worth implementing?  Or should we 
declare victory with the current PR which is both faster and more accurate than 
what we have now?

Having 1-ulp error 17% of the time and correctly rounded 83% of the time is 
pretty darned good (and on par with C library code for the two-argument case).

Unless we go all-out with the technique you described, the paper shows that 
we're already near the limit of what can be done by trying to make the sum of 
squares more accurate, "... the correctly rounded square root of the correctly 
rounded a**2+b**2 can still be off by as much as one ulp. This hints at the 
possibility that working harder to compute a**2+b**2 accurately may not be the 
best path to a better answer".  

FWIW, in my use cases, the properties that matter most are monotonicity, 
commutativity, cross-platform portability, and speed.  Extra accuracy would 
nice to have but isn't essential and would likely never be noticed.

--

___
Python tracker 

___
___
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 

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



[issue41559] Add support for PEP 612 to typing.py

2020-08-15 Thread Guido van Rossum


New submission from Guido van Rossum :

We need stub versions of ParamSpec and Concatenate added to typing.py, plus 
tests that ensure these actually work in all situations required by the PEP. 
(It's not so important to ensure that they raise exceptions at runtime in cases 
where the PEP says they needn't work -- static type checkers will flag those 
better.)

--
components: Library (Lib)
messages: 375487
nosy: gvanrossum
priority: normal
severity: normal
stage: needs patch
status: open
title: Add support for PEP 612 to typing.py
type: behavior
versions: Python 3.10

___
Python tracker 

___
___
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 

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



[issue39994] pprint handling of dict subclasses that override __repr__

2020-08-15 Thread Irit Katriel


Irit Katriel  added the comment:

I've created a new PR, with two commits. The first has just tests added, which 
show the problems and assert that the bug is there. The second has the fix and 
update to the tests. Let me know what you think.

--

___
Python tracker 

___
___
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 miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 4.0 -> 5.0
pull_requests: +21012
pull_request: https://github.com/python/cpython/pull/21893

___
Python tracker 

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



[issue39994] pprint handling of dict subclasses that override __repr__

2020-08-15 Thread Irit Katriel


Change by Irit Katriel :


--
pull_requests: +21011
pull_request: https://github.com/python/cpython/pull/21892

___
Python tracker 

___
___
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 miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 2.0 -> 3.0
pull_requests: +21010
pull_request: https://github.com/python/cpython/pull/21891

___
Python tracker 

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



[issue31122] SSLContext.wrap_socket() throws OSError with errno == 0

2020-08-15 Thread miss-islington


miss-islington  added the comment:


New changeset fc8ffe27b6f29d67b76fb2ef57466c95af5a9f82 by Miss Islington (bot) 
in branch '3.9':
bpo-31122: ssl.wrap_socket() now raises ssl.SSLEOFError rather than OSError 
when peer closes connection during TLS negotiation (GH-18772)
https://github.com/python/cpython/commit/fc8ffe27b6f29d67b76fb2ef57466c95af5a9f82


--

___
Python tracker 

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



[issue41513] Scale by power of two in math.hypot()

2020-08-15 Thread Tim Peters


Tim Peters  added the comment:

> ...
> one at a time subtract a**2 (an argument squared) in descending
> order of magnitude
> ...

But that doesn't really help unless the sum of squares was computed without 
care to begin with. Can do as well by skipping that but instead computing the 
original sum of squares in increasing order of magnitude.

Cheapest way I know of that "seemingly always" reproduces the Decimal result 
(when that's rounded back to float) combines fsum(), Veltkamp splitting, and 
the correction trick from the paper:

def split(x, T27=ldexp(1.0, 27)+1.0):
t = x * T27
hi = t - (t - x)
lo = x - hi
assert hi + lo == x
return hi, lo

# result := hypot(*xs)
parts = []
for x in xs:
a, b = split(x)
parts.append(a*a)
parts.append(2.0*a*b)
parts.append(b*b)
result = sqrt(fsum(parts))
a, b = split(result)
parts.append(-a*a)
parts.append(-2.0*a*b)
parts.append(-b*b)
x = fsum(parts) # best float approx to sum(x_i ** 2) - result**2
result += x / (2.0 * result)

--

___
Python tracker 

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



[issue31122] SSLContext.wrap_socket() throws OSError with errno == 0

2020-08-15 Thread miss-islington


miss-islington  added the comment:


New changeset 243458115e2cb295fb5bbb61e6ac528c6b2cf5be by Miss Islington (bot) 
in branch '3.8':
bpo-31122: ssl.wrap_socket() now raises ssl.SSLEOFError rather than OSError 
when peer closes connection during TLS negotiation (GH-18772)
https://github.com/python/cpython/commit/243458115e2cb295fb5bbb61e6ac528c6b2cf5be


--

___
Python tracker 

___
___
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 

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



[issue31122] SSLContext.wrap_socket() throws OSError with errno == 0

2020-08-15 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

While this is present in 3.7 (and earlier?), 3.7 is EOL - security fix only 
stage.  the 3.8 and 3.9 PRs should automerge after CI finishes.

please reopen the issue or ping me on those PRs if they somehow fail to do so.

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

___
Python tracker 

___
___
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 

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



[issue31122] SSLContext.wrap_socket() throws OSError with errno == 0

2020-08-15 Thread miss-islington


miss-islington  added the comment:


New changeset 495bd035662fda29639f9d52bb6baebea31d72fa by Dima Tisnek in branch 
'master':
bpo-31122: ssl.wrap_socket() now raises ssl.SSLEOFError rather than OSError 
when peer closes connection during TLS negotiation (GH-18772)
https://github.com/python/cpython/commit/495bd035662fda29639f9d52bb6baebea31d72fa


--
nosy: +miss-islington

___
Python tracker 

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



[issue31122] SSLContext.wrap_socket() throws OSError with errno == 0

2020-08-15 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

Thanks!

fyi for confirmation incase anyone doubted:

>>> issubclass(ssl.SSLEOFError, OSError)
True

So from a code point of view, anything already catching the error still catches 
the error.  100% bugfix.

--
assignee: christian.heimes -> gregory.p.smith

___
Python tracker 

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



[issue31122] SSLContext.wrap_socket() throws OSError with errno == 0

2020-08-15 Thread miss-islington


Change by miss-islington :


--
pull_requests: +21007
pull_request: https://github.com/python/cpython/pull/21888

___
Python tracker 

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



[issue31122] SSLContext.wrap_socket() throws OSError with errno == 0

2020-08-15 Thread miss-islington


Change by miss-islington :


--
pull_requests: +21008
pull_request: https://github.com/python/cpython/pull/21889

___
Python tracker 

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



[issue41558] Backspace not clearing the text

2020-08-15 Thread Ketan Bhatt


Ketan Bhatt  added the comment:

Dear Steven,

Checked in the interpreter from the terminal and you are right, the output is 
as desired, and there is no bug.
As advised, I will report this to the Jupyter team.
Thank you for your confirmation and advised.
Regards,
Ketan Bhatt.

> On 15-Aug-2020, at 9:38 PM, Steven D'Aprano  wrote:
> 
> 
> Steven D'Aprano  added the comment:
> 
> Works correctly for me in the Python interpreter.
> 
> Please check if it works for you in the Python interpreter, if it does, then 
> it is a bug in Jupyter and should be reported to them, we cannot do anything 
> to fix it.
> 
> --
> nosy: +steven.daprano
> 
> ___
> Python tracker 
> 
> ___

--

___
Python tracker 

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



[issue41558] Backspace not clearing the text

2020-08-15 Thread Ketan Bhatt


Ketan Bhatt  added the comment:

> Dear Steven,
> 
> Checked in the interpreter from the terminal and you are right, the output is 
> as desired, and there is no bug.
> As advised, I will report this to the Jupyter team.
> Thank you for your confirmation and advised.
> Regards,
> Ketan Bhatt.

> 
> 
>> On 15-Aug-2020, at 9:38 PM, Steven D'Aprano  wrote:
>> 
>> 
>> Steven D'Aprano  added the comment:
>> 
>> Works correctly for me in the Python interpreter.
>> 
>> Please check if it works for you in the Python interpreter, if it does, then 
>> it is a bug in Jupyter and should be reported to them, we cannot do anything 
>> to fix it.
>> 
>> --
>> nosy: +steven.daprano
>> 
>> ___
>> Python tracker 
>> 
>> ___
> 
> --
> 
> ___
> Python tracker 
> 
> ___

--

___
Python tracker 

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



[issue41555] re.sub replaces twice

2020-08-15 Thread S. Zhang


S. Zhang  added the comment:

Okay.  Thanks.

On Sat, Aug 15, 2020 at 9:07 AM Ma Lin  wrote:

>
> Ma Lin  added the comment:
>
> There can be at most one empty match at a position. IIRC, Perl's regex
> engine has very similar behavior.
> If don't want empty match, use + is fine.
>
> --
>
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

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



[issue41558] Backspace not clearing the text

2020-08-15 Thread Steven D'Aprano


Steven D'Aprano  added the comment:

Works correctly for me in the Python interpreter.

Please check if it works for you in the Python interpreter, if it does, then it 
is a bug in Jupyter and should be reported to them, we cannot do anything to 
fix it.

--
nosy: +steven.daprano

___
Python tracker 

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



[issue39994] pprint handling of dict subclasses that override __repr__

2020-08-15 Thread Irit Katriel


Irit Katriel  added the comment:

import pprint

class MyDict(dict):
def __repr__(self):
return '*'*len(dict.__repr__(self))

if __name__ == '__main__':
d=MyDict({})
print('pprint.pformat(d):\n%s' % pprint.pformat(d))
print('pprint.pformat(d, width=1, indent=0):\n%s' % pprint.pformat(d, 
width=1, indent=0))



Output:

pprint.pformat(d):
**
pprint.pformat(d, width=1, indent=0):
{}

--

___
Python tracker 

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



[issue37095] [Feature Request]: Add zstd support in tarfile

2020-08-15 Thread Ma Lin


Ma Lin  added the comment:

There are two zstd modules on pypi:

https://pypi.org/project/zstd/
https://pypi.org/project/zstandard/

The first one is too simple.

The second one is powerful, but has too many APIs:
ZstdCompressorIterator
ZstdDecompressorIterator
ZstdCompressionReader
ZstdCompressionWriter
ZstdCompressionChunkerIterator
(multi-thread compression)

IMO these are not necessary for stdlib.

In addition, it needs to add something, such as the `max_length` parameter, and 
a `ZstdFile` class that can be integrated with the tarfile module. These 
workloads are not big.

I looked at the zstd API, it's a bit simpler than lzma/bz2/zlib. If spend a 
month, should be able to make a zstd module for stdlib. Then discuss the 
detailed API on Python-Ideas.
 
I once wanted to do this job, but it seems my time does not allow it. If anyone 
wants to do this work, please reply here.

FYI, Python 3.10 schedule:
3.10.0 beta 1: 2021-05-03 (No new features beyond this point.)

--

___
Python tracker 

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



[issue31122] SSLContext.wrap_socket() throws OSError with errno == 0

2020-08-15 Thread Safihre


Safihre  added the comment:

Would anyone be able to review this? People keep reporting this bug in my 
project.
Months are just passing while the PR is just a few lines of code:
https://github.com/python/cpython/pull/18772/files

--

___
Python tracker 

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



[issue39994] pprint handling of dict subclasses that override __repr__

2020-08-15