Use direct import if possible, otherwise use legacy import.#112
Use direct import if possible, otherwise use legacy import.#112da-h merged 2 commits intoda-h:masterfrom
Conversation
|
Hey there, thanks for tackling this. I am sure that removing the rather ugly random package ids would improve the user experience in the general used case. I am a bit puzzled by the missing github actions / unit tests for this PR. Do you see what's going on? |
|
Hey @da-h, I don’t know why they don’t show up here, but the actions are run at the forks location https://github.com/sbrodehl/miniflask/actions |
|
Hey there, sorry for the late response. ;) I very much like this approach, however, the tests are currently failing. Best, |
|
Hey @da-h , I'm happy to fix any upcoming issues, can you specify the failing tests? Anyway, happy to do more work here, if required! |
|
You are absolutely right. i was mistaken about the message in the line and only saw the failed tests from the commit before it. Sorry for the confusion and thanks a lot for the contribution! Best, |
Use direct import if possible, otherwise use legacy import.
This PR tries to import modules directly with the given module name/path if possible (assuming the module is a regular python module in the project).
Otherwise, the legacy code is run.
Description
Problem:
Previously, serializing code, where miniflask modules are used, resulted in errors, since the import paths and names of the modules are changed (randomly).
New Behavior:
Now, if mf modules are actual python modules, a direct import is used.
Check all before creating this PR: