Steve Dower <steve.do...@python.org> added the comment:

> Even better would be official python/Microsoft support for a CLI version of 
> depends.exe like ldd on linux

The dumpbin.exe tool with /IMPORTS is a good start, and I've definitely wrapped 
it in Python before to do this kind of analysis (not reproducibly, yet...).

Doing this kind of analysis live is oddly tough, but there may be an ETW 
provider that a debug hook could enable to get more of a trace. Again, we're 
deep in third-party tool territory, not a change to core CPython.

Certainly if we can drop support for base Windows 7 we will document how to use 
more recent OS support via whatever we add. Though to a certain extent those 
hitting problems are going deep enough that reading the MSDN docs will have to 
be mandatory (at least for those who want to know "why"). I really don't want 
to have to reproduce those docs and make them guaranteed Python semantics.

> will annoy developers whose code base is full of `os.environ['PATH']` games. 
> Perhaps the solution should come with a deprecation warning when setting 
> `os.environ['PATH']`.

Yeah, this is the downside of changing anything at all, though of course since 
resolving DLLs via PATH is already broken, those developers are already annoyed 
;) And we can't add warning that wouldn't annoy those who legitimately modify 
PATH for process launches. So I think it's mostly about providing a supported 
path for those developers to be able to port their code when they discover it's 
broken.

----------

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

Reply via email to