[issue43143] Allow multiple assignment (i.e. tuple on LHS) in walrus operator

2021-02-06 Thread Paul Sokolovsky
New submission from Paul Sokolovsky : Currently (CPython 3.10.0a4) having a tuple on left-hand side of assignment expression/operator (aka walrus operator) is not allowed: >>> ((a, b) := (1, 2)) File "", line 1 ((a, b) := (1, 2)) ^ SyntaxError: cannot use assignment expressions with

[issue43071] IDLE: Windows 7 - Trackpad two-finger vertical scrolling is not recognized

2021-02-06 Thread Terry J. Reedy
Terry J. Reedy added the comment: Python has nothing to do with interpreting finger movements. -- resolution: -> third party stage: -> resolved status: open -> closed versions: -Python 3.7 ___ Python tracker

[issue43111] webbrowser.py triggers unwanted XQuartz startup

2021-02-06 Thread Terry J. Reedy
Terry J. Reedy added the comment: 3.7 is a few years old and only gets security fixes. Can you either test on current releases or whether code is still same? -- nosy: +terry.reedy ___ Python tracker __

[issue43127] Unable to install Python 3.9.1 - Windows 10

2021-02-06 Thread Terry J. Reedy
Change by Terry J. Reedy : -- components: +Installation, Windows nosy: +paul.moore, steve.dower, tim.golden, zach.ware ___ Python tracker ___ __

[issue43144] test_unicodedata: test_normalization uses network but doesn't depend on network resource

2021-02-06 Thread Arkadiusz Miśkiewicz
New submission from Arkadiusz Miśkiewicz : Hello. test_normalization uses network but doesn't depend on network resource, so it tries to run even when network is disabled when running tests (-u-network) FAIL: test_normalization (test.test_unicodedata.NormalizationTest) socket.gaierror: [Errno -

[issue43144] test_unicodedata: test_normalization uses network but doesn't depend on network resource

2021-02-06 Thread Arkadiusz Miśkiewicz
Change by Arkadiusz Miśkiewicz : -- keywords: +patch Added file: https://bugs.python.org/file49792/unicodedata-no-network.patch ___ Python tracker ___ __

[issue43111] webbrowser.py triggers unwanted XQuartz startup

2021-02-06 Thread Ronald Oussoren
Ronald Oussoren added the comment: The same code is present in trunk. I'm in favour of disabling usage of X11 browsers of macOS, that's almost certainly not what users want. I no longer have XQuartz installed on my machine, but when I did I only used it for running X11 GUIs on remote Linux

[issue43135] Can't input Japanese on idle (MacOS).

2021-02-06 Thread Ronald Oussoren
Ronald Oussoren added the comment: As the issue is gone with the 3.10 universal2 installer it should also be gone with the 3.9.1 universal installer. I'd expect that the difference is in the use of a newer version of Tcl/Tk. We haven't used the newer versions of Tcl/Tk with the regular 3.9

[issue43111] webbrowser.py triggers unwanted XQuartz startup

2021-02-06 Thread hans.meine
hans.meine added the comment: I was trying to be very honest, because I am still running 3.7 for production. However, I have carefully checked and the webbrowser.py has only seen (clearly) unrelated changes. -- ___ Python tracker

[issue43145] Leak of locks in a subprocess

2021-02-06 Thread Boris Staletic
New submission from Boris Staletic : The following C code leaks 7 locks allocated with PyThread_allocate_lock: #include int main() { Py_Initialize(); PyObject* multiprocessing = PyImport_ImportModule("multiprocessing"); PyObject* Process = PyObject_GetAttrString(multip

[issue43145] Leak of locks in a subprocess

2021-02-06 Thread Boris Staletic
Boris Staletic added the comment: Slightly simpler C example: #include int main() { Py_Initialize(); PyObject* multiprocessing = PyImport_ImportModule("multiprocessing"); PyObject* Process = PyObject_GetAttrString(multiprocessing, "Process"); PyObject* p = Py

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

2021-02-06 Thread Ronald Oussoren
Ronald Oussoren added the comment: @terrygreeniaus: Are you running macOS 11 on your MacBook Pro? If so, could you verify the hardware address of the iBridge interface? I've checked to libc sources on opensource.apple.com and those don't seem to contain code to treat the iBridge interface s

[issue43071] IDLE: Windows 7 - Trackpad two-finger vertical scrolling is not recognized

2021-02-06 Thread Greg
Greg added the comment: That wasn't the case with https://bugs.python.org/issue34047 Was it not clear that I'm having this issue in (and only in) IDLE? Given that it's the interpreter bundled with python, it seems like it has *something* to do with it. -- __

[issue43146] 3.10a5 regression: AttributeError: 'NoneType' object has no attribute '__suppress_context__' in traceback.py

2021-02-06 Thread Florian Bruhin
New submission from Florian Bruhin : After upgrading to 3.10a5, calling logging.exception("test") results in: --- Logging error --- Traceback (most recent call last): File "/usr/lib/python3.10/logging/__init__.py", line 1094, in emit msg = self.format(record) File "/

[issue43146] 3.10a5 regression: AttributeError: 'NoneType' object has no attribute '__suppress_context__' in traceback.py

2021-02-06 Thread Irit Katriel
Irit Katriel added the comment: Thanks, I’ll add the None check. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubsc

[issue43143] Allow multiple assignment (i.e. tuple on LHS) in walrus operator

2021-02-06 Thread Raymond Hettinger
Raymond Hettinger added the comment: +0 I think this is with worth considering. Whenever the use case arises, the workaround is awkward. Code would be clearer if assignment expressions were liberalized to allow unpacking. The PEP aspired to avoid complex lvalues that might be hard to read

[issue43071] IDLE: Windows 7 - Trackpad two-finger vertical scrolling is not recognized

2021-02-06 Thread Terry J. Reedy
Terry J. Reedy added the comment: This issue appears to be quite different from #34047. The latter partly involved two then recent tcl/tk versions known to still be buggy on Mac. It then determined to be directly a matter of how IDLE was interpreting the delta attribute of tk mousewheel ev

[issue43071] IDLE: Windows 7 - Trackpad two-finger vertical scrolling is not recognized

2021-02-06 Thread Greg
Greg added the comment: I tested out tk_scroll.py (and tk_scroll2.py, for kicks) and I couldn't get that to scroll either. I tried both with and without the ttk line commented. To my shame, it looks like that means you're spot on, and that it's an issue between my machine and tcl/tk. Thanks

[issue43147] Remove mention of "subcontrary mean" from the docs

2021-02-06 Thread Raymond Hettinger
New submission from Raymond Hettinger : Let's improve the readability of the docs by removing the archaic term "subcontrary mean". That is a bit saying that capacitors are sometimes called condensers. I checked with a stats professor and he had never heard of the term. Likewise, there was

[issue43147] Remove mention of "subcontrary mean" from the docs

2021-02-06 Thread Raymond Hettinger
Change by Raymond Hettinger : -- keywords: +patch pull_requests: +23260 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24462 ___ Python tracker __

[issue43146] 3.10a5 regression: AttributeError: 'NoneType' object has no attribute '__suppress_context__' in traceback.py

2021-02-06 Thread Irit Katriel
Irit Katriel added the comment: There's another such issue due to PR 22610 // issue 26389: >>> traceback.format_exception(None) Traceback (most recent call last): File "", line 1, in File "C:\Users\User\src\cpython-dev\lib\traceback.py", line 128, in format_exception value, tb = _par

[issue43146] 3.10a5 regression: AttributeError: 'NoneType' object has no attribute '__suppress_context__' in traceback.py

2021-02-06 Thread Irit Katriel
Change by Irit Katriel : -- nosy: +ZackerySpytz, pablogsal ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: ht

[issue43148] Call sys.unraisablehook in the REPL when sys.excepthook is broken

2021-02-06 Thread Julian Berman
New submission from Julian Berman : At the REPL, when sys.excepthook is broken (below by setting it to a non-callable), one sees: ``` ⊙ python3.9

[issue43148] Call sys.unraisablehook in the REPL when sys.excepthook is broken

2021-02-06 Thread Carl Friedrich Bolz-Tereick
Change by Carl Friedrich Bolz-Tereick : -- nosy: +Carl.Friedrich.Bolz ___ Python tracker ___ ___ Python-bugs-list mailing list Unsub

[issue43146] 3.10a5 regression: AttributeError: 'NoneType' object has no attribute '__suppress_context__' in traceback.py

2021-02-06 Thread Irit Katriel
Change by Irit Katriel : -- keywords: +patch pull_requests: +23261 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24463 ___ Python tracker ___ ___

[issue43149] Misleading error message for except with missing parens (3.10.a5)

2021-02-06 Thread Andre Roberge
New submission from Andre Roberge : The following: try: pass except ValueError, NameError as err: pass results in: except ValueError, NameError as err: ^ SyntaxError: expected ':' However, what is missing here are some parentheses surrounding the exception t

[issue43145] Leak of locks in a subprocess

2021-02-06 Thread Yannick Jadoul
Change by Yannick Jadoul : -- nosy: +YannickJadoul ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://ma

[issue43149] Misleading error message for except with missing parens (3.10.a5)

2021-02-06 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +lys.nikolaou, pablogsal ___ Python tracker ___ ___ Python-bugs-list mailing list Unsu

[issue43150] Last empty string not removed in a list

2021-02-06 Thread Kumar Makala
New submission from Kumar Makala : # Last empty string not removed from the list str_list = ["Emma", "Jon", "", "Kelly","Eric", "", "","KXN",""] for item in str_list: if len(item) == 0: str_list.remove(item) print(len(str_list[-1])) #Output ['Emma', 'Jon', 'Kelly', 'Eric', 'KXN',

[issue43150] Last empty string not removed in a list

2021-02-06 Thread Steven D'Aprano
Steven D'Aprano added the comment: This is not a language bug, it is a bug in your code: you are modifying the list as you iterate over it. There are lots of ways to do that task correctly, perhaps the easiest is with a filter: str_list = list(filter(bool, str_list)) or a list comprehe

[issue43150] Last empty string not removed in a list

2021-02-06 Thread Steven D'Aprano
Steven D'Aprano added the comment: The problem here is that you are shortening the list as you walk along it, which means you skip items. You expected to visit: "Emma", "Jon", "", "Kelly","Eric", "", "", "KXN", "" in that order, but after visiting Emma, Jon and the first empty string, yo

[issue43149] Misleading error message for except with missing parens (3.10.a5)

2021-02-06 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- keywords: +patch pull_requests: +23262 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24467 ___ Python tracker __

[issue43150] Last empty string not removed in a list

2021-02-06 Thread Kumar Makala
Kumar Makala added the comment: Thanks Steven! -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://ma

[issue16781] execfile/exec execution in other than global scope uses locals(), leading to undefined behavior

2021-02-06 Thread Terry J. Reedy
Change by Terry J. Reedy : -- keywords: +patch pull_requests: +23263 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/24469 ___ Python tracker __

[issue43151] is with literals in 3.8 release

2021-02-06 Thread Gary Litvin
New submission from Gary Litvin : >>> x = 'a' >>> x is 'a' True >>> if x is 'a': print(x) SyntaxError: "is" with a literal. Did you mean "=="? How come? -- messages: 386575 nosy: garylitvin priority: normal severity: normal status: open title: is with literals in 3.8 release v

[issue16781] execfile/exec execution in other than global scope uses locals(), leading to undefined behavior

2021-02-06 Thread Terry J. Reedy
Terry J. Reedy added the comment: New changeset 0ec57e25c918b859b9f8d464e34e0ac859c2f8b3 by Terry Jan Reedy in branch 'master': bpo-16781: In 'exec' doc, add 'nonlocal' to 'yield' and 'return' (GH-2446) https://github.com/python/cpython/commit/0ec57e25c918b859b9f8d464e34e0ac859c2f8b3 --

[issue16781] execfile/exec execution in other than global scope uses locals(), leading to undefined behavior

2021-02-06 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 6.0 -> 7.0 pull_requests: +23264 pull_request: https://github.com/python/cpython/pull/24470 ___ Python tracker _

[issue16781] execfile/exec execution in other than global scope uses locals(), leading to undefined behavior

2021-02-06 Thread miss-islington
Change by miss-islington : -- pull_requests: +23265 pull_request: https://github.com/python/cpython/pull/24471 ___ Python tracker ___ __

[issue16781] execfile/exec execution in other than global scope uses locals(), leading to undefined behavior

2021-02-06 Thread Terry J. Reedy
Terry J. Reedy added the comment: PR is based on 'Note:...' directly above. I am still thinking about a patch for the namespace paragraph. -- nosy: -miss-islington stage: patch review -> needs patch ___ Python tracker

[issue16781] execfile/exec execution in other than global scope uses locals(), leading to undefined behavior

2021-02-06 Thread miss-islington
miss-islington added the comment: New changeset 920bf6a3a656e329c2bcbb761eb8c13c46c8cd05 by Miss Islington (bot) in branch '3.8': bpo-16781: In 'exec' doc, add 'nonlocal' to 'yield' and 'return' (GH-2446) https://github.com/python/cpython/commit/920bf6a3a656e329c2bcbb761eb8c13c46c8cd05

[issue43151] is with literals in 3.8 release

2021-02-06 Thread Dennis Sweeney
Dennis Sweeney added the comment: This was a very intentional change from the commit 3bcbedc9f1471d957a30a90f9d1251516b422416 It's not safe to check `x is y` when x and y are strings. You should always use `x == y` for strings instead. In CPython, if the names x and y both refer to the same u

[issue43151] is with literals in 3.8 release

2021-02-06 Thread Raymond Hettinger
Raymond Hettinger added the comment: As Dennis says, this is an intentional behavior and will help you avoid bugs. -- nosy: +rhettinger resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker

[issue43151] is with literals in 3.8 release

2021-02-06 Thread Gary Litvin
Gary Litvin added the comment: Thank you for your responses. I understand the difference between == and "is" and the intentional change in 3.8. My question is about what seems to be inconsistent treatment in x is 'a' and if a is 'a': ... At 12:49 AM 2/7/2021, Raymond Hettinger wrote: >Raymo

[issue43144] test_unicodedata: test_normalization uses network but doesn't depend on network resource

2021-02-06 Thread Dong-hee Na
Dong-hee Na added the comment: @arekm Would you like to submit the patch through Github? -- nosy: +corona10 ___ Python tracker ___ ___

[issue43144] test_unicodedata: test_normalization uses network but doesn't depend on network resource

2021-02-06 Thread Dong-hee Na
Change by Dong-hee Na : -- versions: +Python 3.10, Python 3.8 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue43152] warning: unused variable 'code'

2021-02-06 Thread Dong-hee Na
New submission from Dong-hee Na : Python/ceval.c:4747:19: warning: unused variable 'code' [-Wunused-variable] PyCodeObject *code = (PyCodeObject *)_co; Very nit compiler warning but should be fixed ;) -- components: Interpreter Core messages: 386583 nosy: Mark.Shannon, corona10 pr

[issue43152] warning: unused variable 'code'

2021-02-06 Thread Dong-hee Na
Change by Dong-hee Na : -- keywords: +patch pull_requests: +23266 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24473 ___ Python tracker ___

[issue43151] is with literals in 3.8 release

2021-02-06 Thread Steven D'Aprano
Steven D'Aprano added the comment: Gary, I cannot replicate that inconsistency in 3.9.0. >>> x = "abc" >>> x is "abc" :1: SyntaxWarning: "is" with a literal. Did you mean "=="? True >>> if x is "abc": pass ... :1: SyntaxWarning: "is" with a literal. Did you mean "=="? I don't believe that