I had a co-worker make the oft-heard – at least by me – gripe today about why didn’t Python make it easier to reference some other script file somewhere outside the current directory for that one function (for which they didn’t want to make a package)? They did the usual “dump everything into a directory” solution which unblocked them, but they lamented wanting something better.
After explaining why Python’s import system doesn’t use file paths, I realized this could be solved from a packaging perspective now that we have inline script metadata. If we had a way to specify a dependency on a script by file path then tools that use inline metadata can pull the file(s) into the virtual environment for running by just copying the file or symlinking it in. I don’t know if making URL dependencies somehow work for file paths is a good idea, doing something new, or this whole idea is just bad, but since I get this whole “I want to reference modules by file path” complaint semi-regularly I wanted to at least surface the idea that packaging could potentially help solve it.