• Kirill Smelkov's avatar
    gpython: Preimport golang and gevent from exactly the same place as std python would do · 1f6f31cd
    Kirill Smelkov authored
    GPython preimports golang and gevent, but until now, it was preimporting
    them before adjusting sys.path according to given -c/-m/file/... And
    this was leading to difference in behaviour with standard Python where
    e.g. `import golang` might result in different files loaded if e.g.
    golang/ is there on cwd and -c/-m was given.
    
    -> Rework gpython startup so that golang/gevent preimport happens after
    sys.path initialization.
    
    This fixes `tox -e py27-gevent` which was previously failing on
    test_defer_excchain_dump_pytest / test_defer_excchain_dump_ipython
    because dumped paths were different than expected ones.
    
    It, however, breaks test_defer_excchain_traceback on py27-gevent.  ->
    We'll do more fixups to sys.path handling in the next patch which will
    fix that failure as well.
    1f6f31cd
Name
Last commit
Last update
3rdparty/include/linux Loading commit data...
golang Loading commit data...
gpython Loading commit data...
.gitignore Loading commit data...
CHANGELOG.rst Loading commit data...
COPYING Loading commit data...
MANIFEST.in Loading commit data...
README.rst Loading commit data...
pyproject.toml Loading commit data...
setup.py Loading commit data...
tox.ini Loading commit data...
trun Loading commit data...