[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 Thread Eric V. Smith


Eric V. Smith  added the comment:

I realize it might break some corner cases, but I really think we should 
re-write pprint to use functools.singledispatch. Or if the breakage isn't 
acceptable, abandon it and create a new module that does use singledispatch. 
That way it would be easily extensible.

pprint currently works with a dispatch table (_dispatch), it's just hidden.

@fdrake: From the comments: "If you find it useful, thank small children who 
sleep at night". I assume they're not small anymore!

--

___
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


New submission from Ketan Bhatt :

The below statement is not clearing the text, although there are three 
backspaces:

print("123",end="\b\b\b")

The output from the Jupiter note book is 12!!!

--
files: bug.ipynb
messages: 375469
nosy: ketanbhatt18
priority: normal
severity: normal
status: open
title: Backspace not clearing the text
versions: Python 3.9
Added file: https://bugs.python.org/file49397/bug.ipynb

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

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

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


Fred Drake  added the comment:

And that is why the original code was checking not only for the type, but the 
actual __repr__ method itself.

I think the current behavior is broken.

--

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

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

While writing the tests I see that it's even more interesting:

(Pdb) dd = MyDict()
(Pdb) pprint.pformat(dd)
'{}'
(Pdb) pprint.saferepr(dd)
'I do my own thing '

--

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


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

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


David Edelsohn  added the comment:

AIX uses a "late" memory allocation scheme by default.  If the test wants to 
malloc(52631578947368422ULL) and intends it to fail, it should run with the AIX

$ export PSALLOC=early

environment variable.  More than all of the other maxdata changes.

Separate from all of this, you are configuring as 64 bit (-q64).  -qmaxmem 
affects the compiler optimization.

-Wl,-bmaxdata:0x8 is a GCC command line option.  "-Wl," passes the 
appended flag to the linker.  So somehow you're using GCC to invoke the linker, 
although building with XLC.  XLC knows about -bmaxdata directly.

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.

So I think that -bmaxdata may be helping, but not for the reason that you 
believe.  -Wl,-bmaxdata:0x8000 may work, although I don't understand how 
that correctly interacts with XLC.  If you truly are running in 64 bit mode, 
then -bmaxdata has an effect like PSALLOC.

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

--

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


--
components: +Library (Lib)
title: Redundant code in pprint module. -> pprint handling of dict subclasses 
that override __repr__
type: enhancement -> behavior

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


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

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



[issue41541] [PATCH] Make pty.spawn set window size

2020-08-15 Thread Soumendra Ganguly


Soumendra Ganguly  added the comment:

v0.4 puts try-except guards around imports so that existing code does not break.

--
Added file: https://bugs.python.org/file49396/pty.diff

___
Python tracker 

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



[issue41552] uuid.uuid1() on certain Macs does not generate unique IDs

2020-08-15 Thread Vedran Čačić

Vedran Čačić  added the comment:

Yes, you're right. Xoring can be replaced by any key-derivation function, 
though of course that's probably overkill.

--

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

Thanks.   But if talking about empty matches, there would be endless empty
matches at the end in such cases.  So in my opinion, [^\.]*$ should match
txt plus the empty match because the greedy rule applies here.

On Fri, Aug 14, 2020 at 10:37 PM Ma Lin  wrote:

>
> Ma Lin  added the comment:
>
> The re.sub() doc said:
> Changed in version 3.7: Empty matches for the pattern are replaced when
> adjacent to a previous non-empty match.
>
> IMO 3.7+ behavior is more reasonable, and it fixed a bug, see issue25054.
>
> --
> nosy: +malin
>
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

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



[issue41556] hostname verification fails if hostname starts with literal IPv4

2020-08-15 Thread Christian Heimes


Christian Heimes  added the comment:

I filed https://github.com/openssl/openssl/issues/12649 with OpenSSL.

--

___
Python tracker 

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



[issue41556] hostname verification fails if hostname starts with literal IPv4

2020-08-15 Thread Christian Heimes


Christian Heimes  added the comment:

Python uses OpenSSL's a2i_IPADDRESS() to check if the hostname is actually an 
IP address. I'm surprised as you that the function considers a hostname like 
145.100.57.105.surf-hosted.nl as a valid IP address.

--

___
Python tracker 

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



[issue41549] IDLE leaks `_` into hint box

2020-08-15 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

The global completion list for Shell or Editor comprises keywords (recently 
added), builtins, and global names bound by code executed in the current 
subprocess.  The doc recommends restarting the subprocess when editing so that 
the global names are those resulting from the code being edited rather than 
code enter in Shell.  (I an trying to make this even clearer in the doc.)

wyz23x2 appears to claim that at least one leading underscore name, in 
particular '_', appeared in the list without having ever entered '_' as the 
prefix to be completed.  That would be a bug.  (_ names appear after 
ZeroDivisionError.)  This might have happened in the past, but I do not see 
this in current IDLE.  Without further info, I will close this as 'not a bug'. 

If '_' appeared alone, without the builtins, that would be a deeper bug.

--
versions: +Python 3.10 -Python 3.8, Python 3.9

___
Python tracker 

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



[issue41557] Upgrade Windows and macOS builds to use SQLite 3.33

2020-08-15 Thread Erlend Egeberg Aasland


New submission from Erlend Egeberg Aasland :

SQLite 3.33.0 was just released: https://www.sqlite.org/releaselog/3_33_0.html

Suggesting to wait one week before updating, to see if a patch version appears.

Python 3.9 and 3.10 both build fine against SQLite 3.33.0, and make test 
completes without complaints.

I'll prepare a patch for the source deps repo, and a pair of patches for 
macOS/Windows.

--
components: Library (Lib)
messages: 375455
nosy: erlendaasland
priority: normal
severity: normal
status: open
title: Upgrade Windows and macOS builds to use SQLite 3.33
type: enhancement
versions: Python 3.10, Python 3.8, Python 3.9

___
Python tracker 

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



[issue41556] hostname verification fails if hostname starts with literal IPv4

2020-08-15 Thread Dick Visser


New submission from Dick Visser :

I'm trying to connect to an HTTPS site with ssl.create_default_context, which 
implies hostname verification is done. This fails when connecting to a hostname 
that starts with a literal IPv4 address. Reproduce with:


#!/usr/bin/env python3
import socket
import ssl

hostname = '145.100.57.105.surf-hosted.nl'
# hostname = 'python.org'

context = ssl.create_default_context()

with socket.create_connection((hostname, 443)) as sock:
with context.wrap_socket(sock, server_hostname=hostname) as ssock:
cert = ssock.getpeercert()
print(cert)



Running this yeidls:

ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate 
verify failed: IP address mismatch, certificate is not valid for 
'145.100.57.105.surf-hosted.nl'. (_ssl.c:1123)

While the certificate on that host is perfectly fine (is has both CN and a 
subject alt name).

Since the actual verification is done by OpenSSL, I tried that manually, and 
that does validate the hostname OK:


dnmvisser@NUC8i5BEK ~$ openssl s_client -connect 
145.100.57.105.surf-hosted.nl:443 -verify_hostname 145.100.57.105.surf-hosted.nl
CONNECTED(0005)
depth=2 O = Digital Signature Trust Co., CN = DST Root CA X3
verify return:1
depth=1 C = US, O = Let's Encrypt, CN = Let's Encrypt Authority X3
verify return:1
depth=0 CN = 145.100.57.105.surf-hosted.nl
verify return:1
---
Certificate chain
 0 s:CN = 145.100.57.105.surf-hosted.nl
   i:C = US, O = Let's Encrypt, CN = Let's Encrypt Authority X3
 1 s:C = US, O = Let's Encrypt, CN = Let's Encrypt Authority X3
   i:O = Digital Signature Trust Co., CN = DST Root CA X3
---
Server certificate
-BEGIN CERTIFICATE-
MIIFcTCCBFmgAwIBAgISAxA+MIkEpMc+JZEnhsWHqhSiMA0GCSqGSIb3DQEBCwUA
MEoxCzAJBgNVBAYTAlVTMRYwFAYDVQQKEw1MZXQncyBFbmNyeXB0MSMwIQYDVQQD
ExpMZXQncyBFbmNyeXB0IEF1dGhvcml0eSBYMzAeFw0yMDA3MjUxNDM2NDdaFw0y
MDEwMjMxNDM2NDdaMCgxJjAkBgNVBAMTHTE0NS4xMDAuNTcuMTA1LnN1cmYtaG9z
dGVkLm5sMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAvrpqHQUU2AMF
KD+aF/XP4qdUe02NiZNG20s1YX8o9T8tVpFlaMbC5GouNpUWvchtRk2uwAEjW7xo
//NCBPi5PuT0pfBz5gBhOpMMs3CXUqKCeFK+HxpWQM6h8+TARlWAfUpJ1EDcEK04
L0Oo0hPiq4utQSNouUpLmRMZtiZNH7ct4nht1JUJFr87p+IV9sDqxkZXdqSGvPyq
El3dJq+id9f3eaPiTypHg08KGEaH6Cujuhrs98p0lXqZMG/dlR7AOtjHbJCaX0WI
iodBri3BrhotMKyMNzWj35rlwf0lJO/vyEf0FanbjWwgfAQSQuTWY3Z4Aerl4DoY
0B063LU+EwIDAQABo4ICcTCCAm0wDgYDVR0PAQH/BAQDAgWgMB0GA1UdJQQWMBQG
CCsGAQUFBwMBBggrBgEFBQcDAjAMBgNVHRMBAf8EAjAAMB0GA1UdDgQWBBR+vf/J
VqaQVTf6YUJvUxh95h3n5TAfBgNVHSMEGDAWgBSoSmpjBH3duubRObemRWXv86js
oTBvBggrBgEFBQcBAQRjMGEwLgYIKwYBBQUHMAGGImh0dHA6Ly9vY3NwLmludC14
My5sZXRzZW5jcnlwdC5vcmcwLwYIKwYBBQUHMAKGI2h0dHA6Ly9jZXJ0LmludC14
My5sZXRzZW5jcnlwdC5vcmcvMCgGA1UdEQQhMB+CHTE0NS4xMDAuNTcuMTA1LnN1
cmYtaG9zdGVkLm5sMEwGA1UdIARFMEMwCAYGZ4EMAQIBMDcGCysGAQQBgt8TAQEB
MCgwJgYIKwYBBQUHAgEWGmh0dHA6Ly9jcHMubGV0c2VuY3J5cHQub3JnMIIBAwYK
KwYBBAHWeQIEAgSB9ASB8QDvAHUAb1N2rDHwMRnYmQCkURX/dxUcEdkCwQApBo2y
CJo32RMAAAFzhp6XvgAABAMARjBEAiARmq5foTaEABWuwX7XEwkVe7bnml98UGLw
xXNG6DOtnwIgYgw+zA5LZICtlFS6QXXxtjUBZ6eNReieBYFHQywZcf4AdgAHt1wb
5X1o//Gwxh0jFce65ld8V5S3au68YToaadOiHXOGnpfnAAAEAwBHMEUCIFhg
BCwM0ywDEP23WLRSOdSSSEAiTzAWQiDnT/St7FlHAiEAwOH86Z4dfV6HivcCZmEG
MxsOywJC3JNO0ei0nFZXurIwDQYJKoZIhvcNAQELBQADggEBAFZytDjS2R1jwp8q
2qXp2kl9L33jV5tjAk+q08x0QVLdquBu5QsFjzq6ukZIlZsZV/08Jnb8rn0LaOgg
B2nRlbl4Hmwcb4hL3Zpb7yH0nBZiOAI45SbYC/jnjHG2GzKazvtu/Sx8FYQgmRt+
vEGopOKdXrBd0OAJODV/bbv3SwwrQU0Z5cHriqSYz+Mho7aK57bQp2kuyiznNnuP
VVxC+F0HL/z2jFq2cbjzFJS3tD8nS45ZR3i2dt/QRqcWqWaUVwoSA4DwoJMhoHQu
unMnkBlXJpCodRvTNy/FmLJsCmOZbl2R0PH8Xd9qc4qfBnzzMvyI6iiT1Qb0qFAn
HnciWiE=
-END CERTIFICATE-
subject=CN = 145.100.57.105.surf-hosted.nl

issuer=C = US, O = Let's Encrypt, CN = Let's Encrypt Authority X3

---
No client certificate CA names sent
Peer signing digest: SHA512
Peer signature type: RSA
Server Temp Key: ECDH, P-256, 256 bits
---
SSL handshake has read 3085 bytes and written 457 bytes
Verification: OK
Verified peername: 145.100.57.105.surf-hosted.nl
---
New, TLSv1.2, Cipher is ECDHE-RSA-AES256-GCM-SHA384
Server public key is 2048 bit
Secure Renegotiation IS supported
Compression: NONE
Expansion: NONE
No ALPN negotiated
SSL-Session:
Protocol  : TLSv1.2
Cipher: ECDHE-RSA-AES256-GCM-SHA384
Session-ID: FE1915CF13C685CBE0A3B19238967A3F8B16C2322D69212492404DE230339E09
Session-ID-ctx: 
Master-Key: 
756B52BC2B2823DD8992E7EE5869CFE929107142AE311B68D9245DF3D049C2FEDE931210F5D11B6F6A3A504923D833D1
PSK identity: None
PSK identity hint: None
SRP username: None
Start Time: 1597482694
Timeout   : 7200 (sec)
Verify return code: 0 (ok)
Extended master secret: no
---



I'm guessing that there is some (greedy) IPv4 matching logic that causes the 
bare literal IPv4 address to be sent to OpenSSL for verification instead of the 
entire hostname?
Because the error (X509_V_ERR_IP_ADDRESS_MISMATCH, 
https://github.com/python/cpython/blob/3.8/Modules/_ssl.c#L666-L670) indicates 
that OpenSSL is doing an IP address 

[issue39994] Redundant code in pprint module.

2020-08-15 Thread Irit Katriel


Irit Katriel  added the comment:

Thanks, I'll create a new PR and credit @Palak Kumar Jha as co-author.

--

___
Python tracker 

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



[issue41541] [PATCH] Make pty.spawn set window size

2020-08-15 Thread Soumendra Ganguly


Soumendra Ganguly  added the comment:

v0.3 removes _login_pty() and defines _login_tty() instead; the latter is based 
on login_tty(3) from glibc.

--
Added file: https://bugs.python.org/file49395/pty.diff

___
Python tracker 

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



[issue39994] Redundant code in pprint module.

2020-08-15 Thread Eric V. Smith


Eric V. Smith  added the comment:

I went ahead and closed the PR. Either @Palak Kumar Jha or someone else can 
create a new PR. The suggestions in the original PR should be addresses.

--
nosy: +eric.smith

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


Dennis Sweeney  added the comment:

This is exactly the motivation for context managers, no? I attached no_gc.py, 
which works when nested and should additionally be thread-safe. Usage:

from no_gc import no_gc

with no_gc():
# collection disabled
with no_gc():
# collection is still disabled
# collection is still disabled
# collection is finally re-enabled here

--
nosy: +Dennis Sweeney
Added file: https://bugs.python.org/file49394/no_gc.py

___
Python tracker 

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