This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author neonene
Recipients brett.cannon, eryksun, gregory.p.smith, neonene, orsenthil, paul.moore, smunday, steve.dower, tim.golden, zach.ware
Date 2021-06-14.06:28:27
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1623652107.78.0.841813952324.issue43105@roundup.psfhosted.org>
In-reply-to
Content
After this contribution, when using module at the root dir (maybe bad manners), the followings are expected behaviors?

(1) relative drive in sys.path -> bytecode is not put in __pycache__ folder.

>>> import sys
>>> sys.path.append('F:')  # flash device, etc...
>>> import foo
>>> foo.__file__
'F:foo.py'
>>> foo.__cached__
'F:foo.cpython-311.pyc'


(2) absolute drive in sys.path -> __pycache__ is under current dir, not absolute.

>>> import sys
>>> sys.path.append('F:\\')
>>> import foo
>>> foo.__file__
'F:\\foo.py'
>>> foo.__cached__
'F:__pycache__\\foo.cpython-311.pyc'
History
Date User Action Args
2021-06-14 06:28:27neonenesetrecipients: + neonene, brett.cannon, gregory.p.smith, paul.moore, orsenthil, tim.golden, zach.ware, eryksun, steve.dower, smunday
2021-06-14 06:28:27neonenesetmessageid: <1623652107.78.0.841813952324.issue43105@roundup.psfhosted.org>
2021-06-14 06:28:27neonenelinkissue43105 messages
2021-06-14 06:28:27neonenecreate