[issue44450] Generator expressions trace differently on Windows than on Mac

2021-08-31 Thread Ned Batchelder


Ned Batchelder  added the comment:

Looks like this is fixed with 3.10.0rc1, thanks.

--

___
Python tracker 

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



[issue44450] Generator expressions trace differently on Windows than on Mac

2021-08-13 Thread Mark Shannon


Mark Shannon  added the comment:

Ned, is this still an issue with the release candidate of 3.10?

--

___
Python tracker 

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



[issue44450] Generator expressions trace differently on Windows than on Mac

2021-06-21 Thread Ned Batchelder


Ned Batchelder  added the comment:

This was with 3.10.0b3.  I haven't got a way (yet) to build with my own-built 
versions of CPython.

--

___
Python tracker 

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



[issue44450] Generator expressions trace differently on Windows than on Mac

2021-06-21 Thread Mark Shannon


Mark Shannon  added the comment:

Hmm, I'm a bit puzzled by that.

Did you test with 3.10b3 or the latest build from the 3.10 branch with the fix 
to https://bugs.python.org/issue44297 included?

--

___
Python tracker 

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



[issue44450] Generator expressions trace differently on Windows than on Mac

2021-06-21 Thread Ned Batchelder


Ned Batchelder  added the comment:

I tried adding that rewritten doit as a new test, and it does not show a   
mac/win difference on 3.9. In fact, it doesn't show a mac/win difference on 
3.10!

https://github.com/nedbat/coveragepy/actions/runs/956791631

--

___
Python tracker 

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



[issue44450] Generator expressions trace differently on Windows than on Mac

2021-06-21 Thread Mark Shannon


Mark Shannon  added the comment:

I think this is a combination of https://bugs.python.org/issue44297 and the 
PREDICT macros.

I don't have a  windows machine to confirm this on, but I suspect that if you 
rewrite `doit` as:

def doit():
o = ((1,2), (3,4))
o = (a for
 a in
 o)
for tup in o:
x = tup[0]
y = tup[1]

then you should be able to observe a difference between Windows and Mac on 3.9 
as well.

--

___
Python tracker 

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



[issue44450] Generator expressions trace differently on Windows than on Mac

2021-06-19 Thread STINNER Victor

Change by STINNER Victor :


Removed file: https://bugs.python.org/file50119/ខ្មែរសប់លក់ទំនិញគ្រប់ប្រភេទ

___
Python tracker 

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



[issue44450] Generator expressions trace differently on Windows than on Mac

2021-06-19 Thread E. Paine

Change by E. Paine :


--
components:  -2to3 (2.x to 3.x conversion tool), Argument Clinic, Build, C API, 
Cross-Build, Demos and Tools, Distutils, Documentation, Extension Modules, 
FreeBSD, IDLE, IO, Installation, Library (Lib), Parser, Regular Expressions, 
SSL, Subinterpreters, Tests, Tkinter, Unicode, Windows, XML, asyncio, ctypes, 
email, macOS
nosy:  -Alex.Willmer, asvetlov, barry, dstufft, eric.araujo, ezio.melotti, 
habrecord22, koobs, larry, lys.nikolaou, mrabarnett, ned.deily, pablogsal, 
paul.moore, r.david.murray, ronaldoussoren, steve.dower, terry.reedy, 
tim.golden, vstinner, yselivanov, zach.ware
title: ខ្មែរសប់លក់ទំនិញ -> Generator expressions trace differently on Windows 
than on Mac
type: behavior -> 

___
Python tracker 

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



[issue44450] Generator expressions trace differently on Windows than on Mac

2021-06-19 Thread Ned Batchelder


Ned Batchelder  added the comment:

This happens with all the 3.10 betas, and does not happen in 3.9 and earlier:
https://github.com/nedbat/coveragepy/runs/2864611225
(Sorry, other failures with earlier 3.10 betas obscured the mac/win difference.)

--

___
Python tracker 

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



[issue44450] Generator expressions trace differently on Windows than on Mac

2021-06-19 Thread Mark Shannon


Mark Shannon  added the comment:

Ned, is this a regression (does 3.9 do the right thing on Windows) or an 
inconsistency between Mac and Windows?

I suspect this might have something to do with the PREDICT macros. If that the 
were the case 3.9 should show the same inconsistency between Windows and the 
Mac.

--
assignee:  -> Mark.Shannon

___
Python tracker 

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



[issue44450] Generator expressions trace differently on Windows than on Mac

2021-06-18 Thread Ned Batchelder


New submission from Ned Batchelder :

Here is a trace involving generator expressions.  Using 3.10.0b3 on Mac, there 
are "line" events within the expression.  Those events are missing on Windows.

--- 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 doit():
o = ((1,2), (3,4))
o = (a for a in o)
for tup in o:
x = tup[0]
y = tup[1]

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

When run on Mac, it produces this output:


3.10.0b3 (default, Jun 18 2021, 06:43:38) [Clang 12.0.0 (clang-1200.0.32.29)]
call 10: def doit():
line 11: o = ((1,2), (3,4))
line 12: o = (a for a in o)
line 13: for tup in o:
call 12: o = (a for a in o)
line 12: o = (a for a in o)
retu 12: o = (a for a in o)
line 14: x = tup[0]
line 15: y = tup[1]
line 13: for tup in o:
call 12: o = (a for a in o)
line 12: o = (a for a in o)
retu 12: o = (a for a in o)
line 14: x = tup[0]
line 15: y = tup[1]
line 13: for tup in o:
call 12: o = (a for a in o)
retu 12: o = (a for a in o)
retu 13: for tup in o:


When run on Windows, it produces this output:

3.10.0b3 (tags/v3.10.0b3:865714a, Jun 17 2021, 20:39:25) [MSC v.1929 64 bit 
(AMD64)]
call 10: def doit():
line 11: o = ((1,2), (3,4))
line 12: o = (a for a in o)
line 13: for tup in o:
call 12: o = (a for a in o)
retu 12: o = (a for a in o)
line 14: x = tup[0]
line 15: y = tup[1]
line 13: for tup in o:
call 12: o = (a for a in o)
retu 12: o = (a for a in o)
line 14: x = tup[0]
line 15: y = tup[1]
line 13: for tup in o:
call 12: o = (a for a in o)
retu 12: o = (a for a in o)
retu 13: for tup in o:

On Windows, the "line 12" events are missing.

--
components: Interpreter Core
keywords: 3.10regression
messages: 396050
nosy: Mark.Shannon, nedbat
priority: normal
severity: normal
status: open
title: Generator expressions trace differently on Windows than on Mac
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