[issue44070] __file__ is now fully qualified in 3.8 and 3.9

Steve Dower report at bugs.python.org
Fri May 7 19:52:07 EDT 2021


Steve Dower <steve.dower at python.org> added the comment:

Yeah, you're probably right. That effect was not noticed when implementing it.

We should update the fix in 3.9 and 3.8 to limit it to .pyd's on Windows to protect against the security risks, but leave other import types loaded with relative paths.

I think it's fine to leave the resolution in 3.10, as it's closer to the intended behaviour.

I also don't think that fixing this justifies an extra maintenance release of 3.8, which is now in security-fix only mode, but I'll leave that decision to the RM.

----------
keywords:  -3.10regression
nosy: +lukasz.langa
title: Regression with relative paths in sys.path in python 3.8.10 -> __file__ is now fully qualified in 3.8 and 3.9
versions:  -Python 3.10, Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44070>
_______________________________________


More information about the Python-bugs-list mailing list