Closed brl0 closed 5 years ago
I didn't look too much further after finding a solution that worked. I thought that the approach I used was a bit closer to a drop in replacement and would therefore require the least overall code changes. But again, I did not spend a lot of time once I found a workable solution, so there may very well be better solutions available.
The recipe in the linked docs assumes a .py
extension, which is why it doesn't work as-is. Found this answer, which is needed to make the recipe work correctly in this particular case. Also had to add an assert
to make MyPy happy.
The solution was actually simpler. See https://github.com/sloria/konch/pull/109 . Thanks for your initial work on this.
Is there a reason you didn't use this approach from the docs: https://docs.python.org/3.7/library/importlib.html#importing-a-source-file-directly ?