Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix importing newly-created modules on Python 3
Python 3's import mechanism caches the contents of a directory containing modules (such as comtypes.gen) and relies on the "modified time" (mtime) attribute to determine if it needs to reload that directory. In Windows, the mtime is sometimes not updated very often when creating modules in quick succession, which means that the mtime stays identical, which then appears in comtype's case as random module import failures when using a new COM object for the first time.
- Loading branch information