[issue44570] 3.10.0b3 doesn't trace line events for return in some cases

2021-07-13 Thread Mark Shannon


Change by Mark Shannon :


--
pull_requests:  -25653

___
Python tracker 

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



[issue44570] 3.10.0b3 doesn't trace line events for return in some cases

2021-07-13 Thread Mark Shannon


Change by Mark Shannon :


--
pull_requests: +25653
pull_request: https://github.com/python/cpython/pull/27109

___
Python tracker 

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



[issue44570] 3.10.0b3 doesn't trace line events for return in some cases

2021-07-08 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
priority: release blocker -> 
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



[issue44570] 3.10.0b3 doesn't trace line events for return in some cases

2021-07-08 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Awesome, thanks a lot for the quick resolution, Mark!

--

___
Python tracker 

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



[issue44570] 3.10.0b3 doesn't trace line events for return in some cases

2021-07-08 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset da6414f0acf5ec9ea3b07e4b3907bc49c2a61e2f by Mark Shannon in 
branch 'main':
bpo-44570: Fix line tracing for forwards jumps to duplicated tails (GH-27068)
https://github.com/python/cpython/commit/da6414f0acf5ec9ea3b07e4b3907bc49c2a61e2f


--

___
Python tracker 

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



[issue44570] 3.10.0b3 doesn't trace line events for return in some cases

2021-07-08 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset 9f2c63b258846a95393b556fee5e1090173ea717 by Mark Shannon in 
branch '3.10':
bpo-44570: Fix line tracing for forward jumps to duplicated tails (GH-27067)
https://github.com/python/cpython/commit/9f2c63b258846a95393b556fee5e1090173ea717


--

___
Python tracker 

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



[issue44570] 3.10.0b3 doesn't trace line events for return in some cases

2021-07-08 Thread Ned Batchelder


Ned Batchelder  added the comment:

I can confirm that those two pull requests fix the problem reported here.

--

___
Python tracker 

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



[issue44570] 3.10.0b3 doesn't trace line events for return in some cases

2021-07-08 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Ned, 

I am reviewing today PR 27068 and PR 27067 but it would be a great help if you 
can confirm that **both** work for your cases and don't break anything else

--

___
Python tracker 

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



[issue44570] 3.10.0b3 doesn't trace line events for return in some cases

2021-07-08 Thread Mark Shannon


Change by Mark Shannon :


--
pull_requests: +25621
pull_request: https://github.com/python/cpython/pull/27068

___
Python tracker 

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



[issue44570] 3.10.0b3 doesn't trace line events for return in some cases

2021-07-08 Thread Mark Shannon


Change by Mark Shannon :


--
pull_requests: +25620
pull_request: https://github.com/python/cpython/pull/27067

___
Python tracker 

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



[issue44570] 3.10.0b3 doesn't trace line events for return in some cases

2021-07-08 Thread Sergey B Kirpichev


Sergey B Kirpichev  added the comment:

Pablo, it seems: the 3.10 branch as for 
https://github.com/nedbat/coveragepy/issues/1184#issuecomment-873506523 still 
has this issue - I can reproduce one.

--

___
Python tracker 

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



[issue44570] 3.10.0b3 doesn't trace line events for return in some cases

2021-07-08 Thread Mark Shannon


Change by Mark Shannon :


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

___
Python tracker 

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



[issue44570] 3.10.0b3 doesn't trace line events for return in some cases

2021-07-08 Thread Mark Shannon


Change by Mark Shannon :


--
assignee:  -> Mark.Shannon

___
Python tracker 

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



[issue44570] 3.10.0b3 doesn't trace line events for return in some cases

2021-07-08 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Gentle ping as beta 4 is in 2 days

--

___
Python tracker 

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



[issue44570] 3.10.0b3 doesn't trace line events for return in some cases

2021-07-07 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Mark, please take a look as beta4 is this week

--

___
Python tracker 

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



[issue44570] 3.10.0b3 doesn't trace line events for return in some cases

2021-07-07 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
nosy: +pablogsal
priority: normal -> release blocker

___
Python tracker 

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



[issue44570] 3.10.0b3 doesn't trace line events for return in some cases

2021-07-05 Thread Sergey B Kirpichev


Change by Sergey B Kirpichev :


--
nosy: +Sergey.Kirpichev

___
Python tracker 

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



[issue44570] 3.10.0b3 doesn't trace line events for return in some cases

2021-07-05 Thread Ned Batchelder


New submission from Ned Batchelder :

(from https://github.com/nedbat/coveragepy/issues/1184)

This code runs the return statement on line 17 twice.  The second time, there 
is a "line" event and then a "return" event for that line.  But the first time, 
there is only a "return" event:

--- 8< ---
import linecache, sys

def trace(frame, event, arg):
# The weird globals here is to avoid a NameError on shutdown...
if frame.f_code.co_filename == globals().get("__file__"):
lineno = frame.f_lineno
print("{} {}: {}".format(event[:4], lineno, linecache.getline(__file__, 
lineno).rstrip()))
return trace

def foo(x):
if x:
try:
1/(x - 1)
except ZeroDivisionError:
pass

return x

def test_foo():
for i in range(2):
foo(i)

print(sys.version)
sys.settrace(trace)
test_foo()
-

I get this output with 3.10.0b3:

3.10.0b3 (default, Jun 18 2021, 06:43:38) [Clang 12.0.0 (clang-1200.0.32.29)]
call 19: def test_foo():
line 20: for i in range(2):
line 21: foo(i)
call 10: def foo(x):
line 11: if x:
retu 17: return x
line 20: for i in range(2):
line 21: foo(i)
call 10: def foo(x):
line 11: if x:
line 12: try:
line 13: 1/(x - 1)
exce 13: 1/(x - 1)
line 14: except ZeroDivisionError:
line 15: pass
line 17: return x
retu 17: return x
line 20: for i in range(2):
retu 20: for i in range(2):


Shouldn't there be a "line" event for both invocations?

--
components: Interpreter Core
keywords: 3.10regression
messages: 397024
nosy: Mark.Shannon, nedbat
priority: normal
severity: normal
status: open
title: 3.10.0b3 doesn't trace line events for return in some cases
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