[issue39167] argparse boolean type bug

2019-12-31 Thread Trenton Bricken
Trenton Bricken added the comment: Thanks for all of these replies. The functionality is that the user adds --flag True False and then all of the other parameters are run with True. And then again with False. I thought this was a bug because of the confusing type=bool behavior. But it

[issue36051] Drop the GIL during large bytes.join operations?

2019-12-31 Thread Bruce Merry
Bruce Merry added the comment: > Do you think it would be sufficient to change the stress test from joining > 1000 items to joining 10 items? Actually that won't work, because the existing stress test is using a non-empty separator. I'll add another version of that stress test that uses

[issue18858] dummy_threading lacks threading.get_ident() equivalent

2019-12-31 Thread Inada Naoki
Change by Inada Naoki : -- resolution: -> wont fix stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue39172] Transformation of "string.find('asd', 'sd')" to Python 3 using 2to3

2019-12-31 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: Seems to be a duplicate of issue2899 -- nosy: +xtreak ___ Python tracker ___ ___

[issue39075] types.SimpleNamespace should preserve attribute ordering (?)

2019-12-31 Thread hai shi
hai shi added the comment: >Consider opening a separate issue (or start a thread on python-ideas) >about adding a more sophisticated implementation to the stdlib's >"reprlib" module. If you do so then please draw from the >argparse._AttributeHolder implementation. FWIW, i created a new bpo:

[issue39172] Transformation of "string.find('asd', 'sd')" to Python 3 using 2to3

2019-12-31 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Fixers find, rfind, etc in 'string' module ___ Python tracker

[issue18858] dummy_threading lacks threading.get_ident() equivalent

2019-12-31 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: dummy_threading was removed in Python 3.9 with issue37312 . I hope this issue can be closed as outdated. -- nosy: +inada.naoki, xtreak ___ Python tracker

[issue24925] Allow doctest to find line number of __test__ strings if formatted as a triple quoted string.

2019-12-31 Thread Jurjen N.E. Bos
Jurjen N.E. Bos added the comment: All is fixed. The PR apparently is correct. My first dent in the Python universe, however small :-) -- ___ Python tracker ___

[issue39172] Translation of "string.find('asd', 'sd')" doesn't work

2019-12-31 Thread ניסן בכר
New submission from ניסן בכר : When using the following code to run using python 2.x, it works: import string string.find("asd", "sd") But this method is deprecated in python 3.x When using "2to3" tool to convert, it doesn't convert it successfully. -- components: 2to3 (2.x to 3.x

[issue39171] Missing default root in tkinter simpledialog.py

2019-12-31 Thread Dominic Mayers
Dominic Mayers added the comment: If it's normal, then the error message should perhaps be more informative and user friendly than just a traceback: Traceback (most recent call last): File "./dialog.py", line 6, in integer_value = simpledialog.askinteger('Dialog Title',

[issue39173] _AttributeHolder of argparse should support the sort function or not?

2019-12-31 Thread hai shi
New submission from hai shi : Currently, many developers discuss the output of attributes of argparse should be sorted or not? >>> from argparse import ArgumentParser >>> parser = ArgumentParser() >>> _ = parser.add_argument('outstream') >>> _ = parser.add_argument('instream') >>> args =

[issue39172] Transformation of "string.find('asd', 'sd')" to Python 3 using 2to3

2019-12-31 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- title: Translation of "string.find('asd', 'sd')" doesn't work -> Transformation of "string.find('asd', 'sd')" to Python 3 using 2to3 ___ Python tracker

[issue39114] Python 3.9.0a2 changed how finally/return is traced

2019-12-31 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- keywords: +patch pull_requests: +17205 stage: resolved -> patch review pull_request: https://github.com/python/cpython/pull/17769 ___ Python tracker

[issue39146] too much memory consumption in re.compile unicode

2019-12-31 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: We usually do not backport optimizations to 2.7. It could be backported if a regression was introduced in one of 2.7 bugfixes, but range() was here before ebd48b4f650d. Also, range(0x1,0x10+1) takes only 32*2**16 = 2 MiB of memory. It is small in

[issue39171] Missing default root in tkinter simpledialog.py

2019-12-31 Thread Dominic Mayers
New submission from Dominic Mayers : My first "bug" report here. Not sure I am doing it right. It is just that if I execute the code import tkinter from tkinter import simpledialog tkinter.Tk().withdraw() integer_value = simpledialog.askinteger('Dialog Title', 'What is your

[issue39146] too much memory consumption in re.compile unicode

2019-12-31 Thread Zhipeng Xie
Zhipeng Xie <775350...@qq.com> added the comment: > but range() was here before ebd48b4f650d. before ebd48b4f650d, _optimize_unicode use xrange. So python2.7.8 is ok and python2.7.9 consume much memory in my test case. > Obviously there are other causes of the difference between 2.7 and 3.x.

[issue36051] Drop the GIL during large bytes.join operations?

2019-12-31 Thread Bruce Merry
Bruce Merry added the comment: > I'll take a look at extra unit tests soon. Do you know off the top of your > head where to look for existing `join` tests to add to? Never mind, I found it:

[issue36051] Drop the GIL during large bytes.join operations?

2019-12-31 Thread Bruce Merry
Change by Bruce Merry : Added file: https://bugs.python.org/file48813/benchjoin.py ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue36051] Drop the GIL during large bytes.join operations?

2019-12-31 Thread Bruce Merry
Change by Bruce Merry : Added file: https://bugs.python.org/file48812/new.csv ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue36051] Drop the GIL during large bytes.join operations?

2019-12-31 Thread Bruce Merry
Change by Bruce Merry : Added file: https://bugs.python.org/file48811/old.csv ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue39169] TypeError: 'int' object is not callable if the signal handler is SIG_IGN

2019-12-31 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- nosy: +ethan.furman, serhiy.storchaka ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue36051] Drop the GIL during large bytes.join operations?

2019-12-31 Thread Bruce Merry
Bruce Merry added the comment: I've attached a benchmark script and CSV results for master (whichever version that was at the point I forked) and with unconditional dropping of the GIL. It shows up to 3x performance improvement when using 4 threads. That's on my home desktop, which is quite

[issue39168] Generic type subscription is a huge toll on Python performance

2019-12-31 Thread Guido van Rossum
Guido van Rossum added the comment: OK let’s do it. Clearly for *some* applications the overhead is significant. -- --Guido (mobile) -- ___ Python tracker ___

[issue39171] Missing default root in tkinter simpledialog.py

2019-12-31 Thread Roundup Robot
Change by Roundup Robot : -- keywords: +patch pull_requests: +17208 stage: -> patch review pull_request: https://github.com/python/cpython/pull/17775 ___ Python tracker ___

[issue37032] Add CodeType.replace() method

2019-12-31 Thread Anthony Sottile
Change by Anthony Sottile : -- pull_requests: +17209 pull_request: https://github.com/python/cpython/pull/17776 ___ Python tracker ___

[issue39175] Funkness with issubset

2019-12-31 Thread Justin Hodder
Justin Hodder added the comment: This works: $ diff PythonDoesntWorks.py HowCanYouPayMana.v3.py 60c60 < if x2.issubset(set(avalMana.keys())): --- > if x2.issubset(set(list(avalMana.keys(: 62a63 > this doesn't work: $ diff PythonDoesntWorks.py HowCanYouPayMana.v3.py 60c60 <

[issue39176] Syntax error message uses strange term: "named assignment"

2019-12-31 Thread Ned Batchelder
Change by Ned Batchelder : -- keywords: +patch pull_requests: +17210 stage: -> patch review pull_request: https://github.com/python/cpython/pull/1 ___ Python tracker ___

[issue39175] Funkness with issubset

2019-12-31 Thread Raymond Hettinger
Raymond Hettinger added the comment: The error is in line 51 which should be: x3=tuple(sorted(x)) That will make sure you always get {('A', 'B')} instead of {('B', 'A')}. -- nosy: +rhettinger resolution: -> not a bug stage: -> resolved status: open -> closed

[issue39142] logging.config.dictConfig will convert namedtuple to ConvertingTuple

2019-12-31 Thread Vinay Sajip
Change by Vinay Sajip : -- keywords: +patch pull_requests: +17206 stage: -> patch review pull_request: https://github.com/python/cpython/pull/17773 ___ Python tracker ___

[issue29778] _Py_CheckPython3 uses uninitialized dllpath when embedder sets module path with Py_SetPath

2019-12-31 Thread Anthony Wee
Anthony Wee added the comment: It looks like there has been a regression in the fix for this issue. The commit below introduced a NULL check which causes a call to _PyPathConfig_Init() to be skipped if _Py_dll_path == NULL. It seems like the check should be "if (_Py_dll_path != NULL)"?

[issue39171] Missing default root in tkinter simpledialog.py

2019-12-31 Thread Dominic Mayers
Dominic Mayers added the comment: Just to add that I realize now that tkinter is designed for applications with a root window, the "application window". That's why little attention is given to a possible missing root. In fact, it's interesting that we have this code in simpledialog.py:

[issue39168] Generic type subscription is a huge toll on Python performance

2019-12-31 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: OK, here is the original issue https://github.com/python/typing/issues/681. I asked the author to open an issue here instead, but likely they didn't open one. -- ___ Python tracker

[issue39168] Generic type subscription is a huge toll on Python performance

2019-12-31 Thread Ruslan Dautkhanov
Ruslan Dautkhanov added the comment: Thank you Guido and Ivan -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue39165] Completeness and symmetry in RE, avoid `findall(...)[0]`

2019-12-31 Thread Raymond Hettinger
Raymond Hettinger added the comment: -1 I think the module is better-off without this function. There are already more functions than most people know or remember. For most cases, re.search() or re.finditer() will suffice. Also, I don't recall having seen findall(...)[0]. If it does

[issue39176] Syntax error message uses strange term: "named assignment"

2019-12-31 Thread Ned Batchelder
New submission from Ned Batchelder : I know this is not allowed: >>> ((a, b, c) := (1, 2, 3)) File "", line 1 SyntaxError: cannot use named assignment with tuple But what is "named assignment", and why is this SyntaxError talking about it? Shouldn't it say "cannot use assignment

[issue39173] _AttributeHolder of argparse should support the sort function or not?

2019-12-31 Thread hai shi
hai shi added the comment: Users or developers interact with program by cli(argparse), so attributes' output order affect users' interaction. -- ___ Python tracker ___

[issue39165] Completeness and symmetry in RE, avoid `findall(...)[0]`

2019-12-31 Thread Raymond Hettinger
Change by Raymond Hettinger : -- Removed message: https://bugs.python.org/msg359133 ___ Python tracker ___ ___ Python-bugs-list

[issue39176] Syntax error message uses strange term: "named assignment"

2019-12-31 Thread Raymond Hettinger
Raymond Hettinger added the comment: New changeset 37143a8e3b2e9245d52f4ddebbdd1c6121c96884 by Raymond Hettinger (Ned Batchelder) in branch 'master': bpo-39176: Improve error message for 'named assignment' (GH-1)

[issue39176] Syntax error message uses strange term: "named assignment"

2019-12-31 Thread miss-islington
Change by miss-islington : -- pull_requests: +17211 pull_request: https://github.com/python/cpython/pull/17778 ___ Python tracker ___

[issue39176] Syntax error message uses strange term: "named assignment"

2019-12-31 Thread Raymond Hettinger
Raymond Hettinger added the comment: New changeset 6c004955aceb8a0cd8e14afbc608ebfdf7c8aa4a by Raymond Hettinger (Miss Islington (bot)) in branch '3.8': bpo-39176: Improve error message for 'named assignment' (GH-1) (GH-17778)

[issue11105] Compiling evil ast crashes interpreter

2019-12-31 Thread ppperry
ppperry added the comment: What about indirect cycles like below: >>> e = ast.UnaryOp(op=ast.Not(), lineno=0, col_offset=0) >>> f = ast.UnaryOp(op=ast.Not(), lineno=0, col_offset=0) >>> e.operand = f >>> f.operand = e >>> compile(ast.Expression(e), "", "eval") (I tested, this also crashes)

[issue27973] urllib.urlretrieve() fails on second ftp transfer

2019-12-31 Thread Senthil Kumaran
Senthil Kumaran added the comment: Hi Pablo, Is there a way for us to test https://github.com/python/cpython/pull/17774 on a Windows Builder which displayed the post-commit failure? The CI custom-builders seem to be broken for a different reason:

[issue39175] Funkness with issubset

2019-12-31 Thread Justin Hodder
New submission from Justin Hodder : line 59,"print(x2,"avalMana",set(avalMana.keys()))" prints:"{('A', 'B')} avalMana {'A', ('A', 'B'), ('A', 'C')}" line 60,"if x2.issubset(set(avalMana.keys())):" is False change line 60 to "if x2.issubset(set(list(avalMana.keys(:" and it

[issue39168] Generic type subscription is a huge toll on Python performance

2019-12-31 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: This issue came up few times before (although I can't find an issue here on b.p.o., maybe it was on typing-sig list). Although in micro-benchmarks the impact may seem big, in vast majority of applications it is rarely more that a percent or so. On the

[issue39174] unicodedata.normalize failing with NFD and NFKD for some characters in Python3

2019-12-31 Thread Lee Collins
Lee Collins added the comment: On further investigation, it appears that the problem is the interaction between Python3 and the MacOS terminal. unicodedata.normalize() produces the correct sequence u'a\u0300' but when printed it comes out as U+00E0 --

[issue39173] _AttributeHolder of argparse should support the sort function or not?

2019-12-31 Thread Raymond Hettinger
Change by Raymond Hettinger : -- assignee: -> rhettinger nosy: +rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing

[issue39171] Missing default root in tkinter simpledialog.py

2019-12-31 Thread Dominic Mayers
Change by Dominic Mayers : -- versions: +Python 3.9 -Python 3.7 ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue39175] Funkness with issubset

2019-12-31 Thread Justin Hodder
Justin Hodder added the comment: oh I'm using Python 3.8.1 (32-bit) 3.8.1150.0 on win10 -- ___ Python tracker ___ ___

[issue39176] Syntax error message uses strange term: "named assignment"

2019-12-31 Thread Raymond Hettinger
Raymond Hettinger added the comment: Thanks for the patch. -- components: +Interpreter Core resolution: -> fixed stage: patch review -> resolved status: open -> closed type: -> behavior versions: +Python 3.8, Python 3.9 ___ Python tracker

[issue39177] In tkinter, simple dialogs, askstrings, etc. with flexible coordinates and no viewable parent.

2019-12-31 Thread Dominic Mayers
New submission from Dominic Mayers : Currently, it's not possible to center or change the coordinates in anyway of an askstring, askfloat or askinteger dialog in simpledialog.py. One can see this by looking at the code: if parent.winfo_viewable(): self.transient(parent)

[issue39174] unicodedata.normalize failing with NFD and NFKD for some characters in Python3

2019-12-31 Thread Lee Collins
New submission from Lee Collins : A script that works in 2.7.17 is now failing for some Unicode characters in 3.7.5 on MacOS 10.14.6. For example unicodedata.normalize('NFD', 'à') used to return the correct decomposition u'a\u0300', but in 3.7 it returns the single composed character U+00E0.

[issue39173] _AttributeHolder of argparse should support the sort function or not?

2019-12-31 Thread SilentGhost
SilentGhost added the comment: What is the use-case for this? Why would anyone care in which order arguments are represented in the object repr? -- nosy: +SilentGhost ___ Python tracker

[issue39168] Generic type subscription is a huge toll on Python performance

2019-12-31 Thread Guido van Rossum
Guido van Rossum added the comment: If that solves the perf issue I am fine with it. -- ___ Python tracker ___ ___

[issue27973] urllib.urlretrieve() fails on second ftp transfer

2019-12-31 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: This PR1040 is failing in several 2.7 buildbots: Tests result: FAILURE then FAILURE test test_urllibnet failed -- Traceback (most recent call last): File "D:\cygwin\home\db3l\buildarea\2.7.bolen-windows7\build\lib\test\test_urllibnet.py", line 232,

[issue27973] urllib.urlretrieve() fails on second ftp transfer

2019-12-31 Thread Senthil Kumaran
Senthil Kumaran added the comment: Thanks for the note, Pablo. I am going to check if this patch https://github.com/python/cpython/pull/17774 will solve the Windows buildbot issues. -- stage: patch review -> resolved ___ Python tracker

[issue27973] urllib.urlretrieve() fails on second ftp transfer

2019-12-31 Thread Senthil Kumaran
Change by Senthil Kumaran : -- pull_requests: +17207 stage: resolved -> patch review pull_request: https://github.com/python/cpython/pull/17774 ___ Python tracker ___

[issue39171] Missing default root in tkinter simpledialog.py

2019-12-31 Thread Dominic Mayers
Dominic Mayers added the comment: Again, I just spent a few minutes looking at this, but in the ttk module, in a similar situation, they do: if master is None: if tkinter._support_default_root: master = tkinter._default_root or tkinter.Tk() else:

[issue37032] Add CodeType.replace() method

2019-12-31 Thread miss-islington
Change by miss-islington : -- pull_requests: +17212 pull_request: https://github.com/python/cpython/pull/17779 ___ Python tracker ___

[issue39142] logging.config.dictConfig will convert namedtuple to ConvertingTuple

2019-12-31 Thread Vinay Sajip
Change by Vinay Sajip : -- versions: +Python 3.8, Python 3.9 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39168] Generic type subscription is a huge toll on Python performance

2019-12-31 Thread Ruslan Dautkhanov
Ruslan Dautkhanov added the comment: Perhaps the check should only be done in some sort of Python development mode and off by default? -- ___ Python tracker ___

[issue39168] Generic type subscription is a huge toll on Python performance

2019-12-31 Thread Ruslan Dautkhanov
Ruslan Dautkhanov added the comment: Didn't see your last response before submitting an update. That's great you have a plan how to resolve this! Thanks again -- ___ Python tracker