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
jacob22 has quit [Read error: Connection reset by peer]
<Hodgestar>
I created https://foss.heptapod.net/pypy/pypy/-/merge_requests/779 because I wanted to fix a tiny bug in cpyext. I wrote a test (that I expect to fail -- the fix is still commented out in the branch) but I'm not sure how to trigger a test run on a buildbot.
<mattip>
http://buildbot.pypy.org/builders -> Force Selected Builds, choose a bot or two (own-linux-x86-64 and/or pypy-c-jit-linux-x86-64 are good places to start)
<mattip>
then fill in Your name: and Branch: and click Force Build
<Hodgestar>
antocuni: How can I retrieve exception classes like "FileExistsError" that are not on the space from the space (e.g. I can get StopIteration with space.w_StopIteration, but there is no space.w_FileExistsError).
<antocuni>
Hodgestar: yes, either what pjenvey says, or you can probably fish it directly from pypy.module.exceptions.interp_exceptions
<Hodgestar>
pjenvey, antocuni: Thanks!
<antocuni>
Hodgestar: wait... pypy.module.exceptions.interp_exceptions.W_StopIteration is "obviously" different that space.w_StopIteration
<Hodgestar>
I have been playing with space.getbuiltinmodule and space.getattr, but in tests they will happily return fakes for pretty much any value (e.g. space.getbuiltinmodule("xxx") returns a W_MyMod and space.getattr(w_mod, space.newtext("meep")) likewise returns a W_MyObject.
<antocuni>
weird
<antocuni>
let me look
<antocuni>
Hodgestar: in which context do you get W_MyMod?
<antocuni>
ah, it's for test_ztranslation
<antocuni>
you are using the fake objspace
<Hodgestar>
Yep.
<antocuni>
but in normal test, you get a "real" objspace where space.getbuiltinmodules work
<antocuni>
so you can just use space.getbuiltinmodule('__exceptions__')
<antocuni>
forget about the fake objspace, unless you are trying to fix test_ztranslation (but I don't think you are there yet, are you?)
<Hodgestar>
I am currently trying to fix test_ztranslation.
<Hodgestar>
But for now I am just trying to get test_ztranslation to load the new ctx.