Commit 1f6f31cd authored by Kirill Smelkov's avatar Kirill Smelkov
Browse files

gpython: Preimport golang and gevent from exactly the same place as std python would do

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.
parent 51925488
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment