<div dir="auto">Hi,<div dir="auto"><br></div><div dir="auto">I had a look at libimport2, but I found out it was a bit buggy and I couldnt extend it as I had hoped.</div><div dir="auto"><br></div><div dir="auto">The custom importer I m working on basically extends PathFinder, FileFinder and SourceFileLoader, and I wanted to have the same implementation for py2 and py3, so I ended up reimplementing the parts of importlib I needed in order to be able to extend from them, from py2 or py3, without any version specific code.</div><div dir="auto"><br></div><div dir="auto">Now I m trying to find the best way to test it to make sure py2 + filefinder2 behaves like py3 as much as possible, so any insight would be helpful :-)</div><div dir="auto"><br></div><div dir="auto">Thanks !</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Jul 14, 2017 9:19 PM, "Nick Coghlan" <<a href="mailto:ncoghlan@gmail.com">ncoghlan@gmail.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 14 July 2017 at 12:12, Asmodehn Shade <<a href="mailto:asmodehn@gmail.com">asmodehn@gmail.com</a>> wrote:<br>
> Hi everyone,<br>
><br>
> I m very new around here, I just wanted to let you know that while writing a<br>
> custom importer for py2 and py3, I ended up backporting some python3<br>
> libimport code to python2.<br>
><br>
> The code is over there : <a href="https://github.com/asmodehn/filefinder2" rel="noreferrer" target="_blank">https://github.com/asmodehn/<wbr>filefinder2</a><br>
> This way I now support importing packages without __init__.py in python2.<br>
> It was simpler for my usecase than using pkg_resources or pkgutil.<br>
<br>
Nice!<br>
<br>
While it's more intrusive (since it essentially replaces the entire<br>
Python 2 import system with the Python 3 one), you may also find<br>
<a href="https://pypi.python.org/pypi/importlib2" rel="noreferrer" target="_blank">https://pypi.python.org/pypi/<wbr>importlib2</a> of interest.<br>
<br>
Cheers,<br>
Nick.<br>
<br>
--<br>
Nick Coghlan | <a href="mailto:ncoghlan@gmail.com">ncoghlan@gmail.com</a> | Brisbane, Australia<br>
</blockquote></div></div>