Dominic Littlewood <11dlittlew...@gmail.com> added the comment:
In regards to the "unnecessary refactoring", here's a full list of what I've changed. 1. Previously, the module revolved around passing files and file descriptors around. Now, it uses specs. This means all the functions that used file descriptors have to be updated. 2. Due to the previous issue, several functions had to change their call signatures. The functions that called them had to change to react. 3. Packages work differently now. They do not have to have an __init__ submodule any more, so there's no need for a load_package function - it's integrated with load_module. 4. determine_parent was having trouble finding where the relative imports were relative to. I changed it to use _calc___package__, same as the import system. Half of determine_parent was deleted, because I couldn't understand how it worked and eventually worked out that there was literally no way it could ever run, so it didn't matter. 5. Modules with no __path__ attribute are not packages. Modules with a __path__ attribute of None *are* packages. Code had to be changed to reflect that. Looking back, this is possibly a pedantic enough point that these changes could be removed and hopefully nothing will go wrong. 6. fix_sys was used to update sys.path (although I have since changed it so it does not) and sys.modules. Code had to be changed to make use of it. 7. The only other thing I can think of is that I changed which modules were imported in the first few lines of modulefinder, since some had become unnecessary. (In fact types and warnings were already unnecessary, but never mind about that.) ---------- _______________________________________ 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