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

[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

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

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

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

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

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

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

[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

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

[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

[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

[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

[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

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

[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

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

[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

[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

[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

[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

[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

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

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

[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

[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

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

[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

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

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

[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

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

[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

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

[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

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

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

[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

[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

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

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

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

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

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

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

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

[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

[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' %

[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

[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

[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

[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

[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: $

[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

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

[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

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

[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

[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

[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

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

[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

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

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

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

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

[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

[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

[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

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

[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

[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

[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