New submission from Dominic Littlewood <11dlittlew...@gmail.com>:

modulefinder currently will detect modules imported by a script dynamically by 
running the script, and to do this it has to open the script as a file.

This would also fix what appears to be a bug where modulefinder failed to open 
files in bytes mode sometimes, causing it to fail for some modules (like 
functools) if the wrong encoding is used. I say "appears to be", because the 
structure of the module seems to imply this was intended behaviour, but I can't 
think why anyone would want this.

This is similar to two other issues I'm posting, but they're in different 
modules, so different bugs.

----------
components: Library (Lib)
messages: 356143
nosy: plokmijnuhby
priority: normal
severity: normal
status: open
title: modulefinder should use io.open_code() instead of open()
type: security
versions: Python 3.9

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue38721>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to