cfbolz changed the topic of #pypy to: PyPy, the flexible snake (IRC logs: https://quodlibet.duckdns.org/irc/pypy/latest.log.html#irc-end ) | use cffi for calling C | if a pep adds a mere 25-30 [C-API] functions or so, it's a drop in the ocean (cough) - Armin
<Hodgestar>
Re updating the hpy branch to support the new universal module loading stub: Is being able to do "import pkg_resources" inside app-level test code a possibility, or completely crazy? If the former, where do I start?
<antocuni>
I think it's completely crazy
<antocuni>
the pypy applevel tests should load the .hpy.so file directly, bypassing setuptools/stubs/pkg_resources/whatever
<antocuni>
note that the pypy apptests already bypass the module-loading logic used by the main hpy test. See pypy/module/_hpy_universal/test/support.py:descr_make_module
<antocuni>
so, depending on what are your changes, things should still "just work" on pypy
<Hodgestar>
They do "just work" with only minor changes, but I was hoping to test that the stub works on pypy too.
<antocuni>
I think that the stub will be tested by the post-translation tests
<antocuni>
the buildbot run pypy-c ./pytest.py extra_tests/hpy_tests/, and these are using the same logic as the CPython ones
<antocuni>
but if you want to test it also before translation, I suggest to write a pypy-specific test, which will go to _hpy_universal/test/ instead of _hpy_universal/test/_vendored
<antocuni>
how to write such a test, I don't know :). It might be that import pkg_resources just work (it will be slow, but if it's just a single test it's probably fine), or it might be that you need to specify more "usemodules" in spaceconfig
<Hodgestar>
I did not know about the extra tests. Woot.
<Hodgestar>
I think just runing the extra tests is fine.
<antocuni>
maybe it's worth checking manually that they are really using the stub, but I think so
<Hodgestar>
It loads ExtensionCompiler directly from _vendored/support.py and doesn't even copy any files above that (e.g. pypy's special support.py) into the test folder, so I can't see what else it would be usinf.
<antocuni>
ok
<Hodgestar>
I wrote an implementation of HPy_FatalError for pypy. Hopefully that can be tested by the extra tests too?
<antocuni>
yes
<Hodgestar>
Woot.
<antocuni>
basically, extra_test/hpy_tests should be completely equivalent to running the tests on cpython