Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork33.7k
Closed
Description
Bug report
Bug description:
On Windows 10,f_lineno is 1. On WSL (Ubuntu 20), it is 611. I don't see any mention of cross-platform differences called out in thebdb docs, so I'm wondering if this is a bug.
importbdbf= {}classareplDebug(bdb.Bdb):# overridedefuser_line(self,frame):globalff=frameb=areplDebug()b.run('x=1+5',{},{})print('frame lineno is '+str(f.f_lineno))# 611 on Linux, 1 on Windowsimportlinecacheline=linecache.getline(f.f_code.co_filename,f.f_lineno)print('frame file is: '+f.f_code.co_filename)# '/home/almenon/.pyenv/versions/3.12.7/lib/python3.12/bdb.py' on Linux, `<string>` on windowsprint('frame line is: '+line)# ' sys.settrace(None)\n' on Linux, None on Windows
It's not a WSL-specific issue because I'm getting the same error in Github CI. Seehttps://github.com/Almenon/AREPL-backend/actions/runs/11316437382/job/31468723754?pr=193
Reproduction:
Checkouthttps://github.com/Almenon/AREPL-backend/tree/8aab53e834be9ec4c1a41de08831107446051bc5. Then:
cd AREPL-backend/pythonpython -m pip install -r requirements.txtpytestCPython versions tested on:
3.12
Operating systems tested on:
Linux