[issue37757] TargetScopeError not raised for comprehension scope conflict

2019-08-25 Thread Nick Coghlan
Nick Coghlan added the comment: Merged for 3.8b4 after Emily's review. Thanks to all involved in the PEP update and change discussion! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue37757] TargetScopeError not raised for comprehension scope conflict

2019-08-25 Thread Nick Coghlan
Nick Coghlan added the comment: New changeset 6ca030765db49525f16b8fabff4153238148b58d by Nick Coghlan in branch '3.8': [3.8] bpo-37757: Disallow PEP 572 cases that expose implementation details (GH-15491) https://github.com/python/cpython/commit/6ca030765db49525f16b8fabff4153238148b58d

[issue37757] TargetScopeError not raised for comprehension scope conflict

2019-08-25 Thread Nick Coghlan
Change by Nick Coghlan : -- pull_requests: +15178 pull_request: https://github.com/python/cpython/pull/15491 ___ Python tracker ___

[issue37757] TargetScopeError not raised for comprehension scope conflict

2019-08-25 Thread Nick Coghlan
Nick Coghlan added the comment: New changeset 5dbe0f59b7a4f39c7c606b48056bc29e406ebf78 by Nick Coghlan in branch 'master': bpo-37757: Disallow PEP 572 cases that expose implementation details (GH-15131) https://github.com/python/cpython/commit/5dbe0f59b7a4f39c7c606b48056bc29e406ebf78

[issue37757] TargetScopeError not raised for comprehension scope conflict

2019-08-23 Thread Guido van Rossum
Guido van Rossum added the comment: The decision has been made to get rid of TargetScopeError and instead just use SyntaxError. PEP 572 was updated already. We're just waiting for someone (Serhiy?) to review Nick's patch, PR #15131. -- ___ Python

[issue37757] TargetScopeError not raised for comprehension scope conflict

2019-08-23 Thread Łukasz Langa
Łukasz Langa added the comment: This is marked as a release blocker. The last beta is scheduled for Monday. Please decide how to proceed ASAP. -- nosy: +lukasz.langa priority: deferred blocker -> release blocker ___ Python tracker

[issue37757] TargetScopeError not raised for comprehension scope conflict

2019-08-13 Thread Nick Coghlan
Nick Coghlan added the comment: The outcome of the python-dev discussion was that we agreed to switch to raising a plain SyntaxError, as that's what we do everywhere else that this kind of problem comes up (e.g. conflicts between global and nonlocal declarations, or between those and

[issue37757] TargetScopeError not raised for comprehension scope conflict

2019-08-06 Thread Guido van Rossum
Guido van Rossum added the comment: If you and Nick both feel strongly about this please take it to python-dev, I'm sure we'll get closure quickly there. -- ___ Python tracker

[issue37757] TargetScopeError not raised for comprehension scope conflict

2019-08-06 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: > OTOH This would require a PEP change, formal review, etc. It would be trivial though. There are only two references to TargetScopeError in the PEP. One talks about adding the exception and the other just mentions it almost in passing as a subclass of

[issue37757] TargetScopeError not raised for comprehension scope conflict

2019-08-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > We report all sorts of things found by the bytecode compiler as SyntaxError. Except of these which are reported with IndentationError or its subclass TabError. -- ___ Python tracker

[issue37757] TargetScopeError not raised for comprehension scope conflict

2019-08-05 Thread Guido van Rossum
Guido van Rossum added the comment: But we don't do that with any of the other (many) errors detected by later passes of the compiler. Those report dozens of SyntaxErrors, with good descriptive messages. Users can search the web for those messages too. Also, I doubt that many people will

[issue37757] TargetScopeError not raised for comprehension scope conflict

2019-08-05 Thread Nick Coghlan
Nick Coghlan added the comment: I believe our main motivation for separating it out was the fact that even though TargetScopeError is a compile-time error, the affected code is syntactically fine - there are just issues with unambiguously inferring the intended read/write location for the

[issue37757] TargetScopeError not raised for comprehension scope conflict

2019-08-05 Thread Guido van Rossum
Guido van Rossum added the comment: [Barry] > I know the PEP defines TargetScopeError as a subclass of SyntaxError, but it > doesn't really explain why a subclass is necessary. I think seeing > "TargetScopeError" will be a head scratcher. Why not just SyntaxError > without introducing a

[issue37757] TargetScopeError not raised for comprehension scope conflict

2019-08-05 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: I know the PEP defines TargetScopeError as a subclass of SyntaxError, but it doesn't really explain why a subclass is necessary. I think seeing "TargetScopeError" will be a head scratcher. Why not just SyntaxError without introducing a new exception?

[issue37757] TargetScopeError not raised for comprehension scope conflict

2019-08-05 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- nosy: +serhiy.storchaka ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue37757] TargetScopeError not raised for comprehension scope conflict

2019-08-05 Thread Nick Coghlan
Nick Coghlan added the comment: Added a PEP update as well: https://github.com/python/peps/pull/1140 -- ___ Python tracker ___ ___

[issue37757] TargetScopeError not raised for comprehension scope conflict

2019-08-04 Thread Guido van Rossum
Guido van Rossum added the comment: Thanks for being part of the village raising this child! -- nosy: +gvanrossum ___ Python tracker ___

[issue37757] TargetScopeError not raised for comprehension scope conflict

2019-08-04 Thread Nick Coghlan
Change by Nick Coghlan : -- keywords: +patch pull_requests: +14871 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/15131 ___ Python tracker

[issue37757] TargetScopeError not raised for comprehension scope conflict

2019-08-04 Thread Nick Coghlan
New submission from Nick Coghlan : While implementing PEP 572, Emily noted that the check for conflicts between assignment operators and comprehension iteration variables had not yet been implemented: https://bugs.python.org/issue35224#msg334331 Damien George came across this discrepancy