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
Rhy0lite has quit [Quit: This computer has gone to sleep]
<mattip>
building with /RCTu instead of /O2: now tests do not hang and I don't get rpython errors. There must be another bug lurking somewhere
<mattip>
at least one :)
_aegis_ has quit [Ping timeout: 258 seconds]
_aegis_ has joined #pypy
CountryNerd has joined #pypy
CountryNerd has quit [Quit: CountryNerd]
forgottenone has joined #pypy
todda7 has quit [Ping timeout: 264 seconds]
<arigo>
uh I just found out why an obscure Python 3 syntax feature is actually a bad idea
<arigo>
try:
<arigo>
...
<arigo>
except ImportError as e:
<arigo>
def test_xxx():
<arigo>
pytest.skip(str(e))
<arigo>
can you see what's wrong with this code in Python 3 specifically?
todda7 has joined #pypy
todda7 has quit [Ping timeout: 256 seconds]
<tos9_>
is this a "py3 does a crazy delete instead of introducing a scope" issue
rubdos has quit [Ping timeout: 256 seconds]
<arigo>
tos9_: yes
<mattip>
so /O2 turns on /Og /Oi /Ot /Oy /Ob2 /GF /Gy.
<mattip>
If I use only /Og /Oy-
<mattip>
I still get a crash.
<mattip>
on the + side, installing JOM, I can recompile in ~5 minutes
todda7 has joined #pypy
<antocuni>
arigo: not sure to understand what's the problem with the code snippet you pasted?
<tos9_>
antocuni: py3 does dumb things with variables in certain places in an attempt not to "leak" them, instead choosing to make stuff like that not work
<tos9_>
antocuni: specifically, it will delete `e` from the scope at the bottom of that, so by the time the function runs, there's no `e` to `str`
<antocuni>
ouch, I see
<antocuni>
so I suppose you can work around by doing "def test_xxx(e=e): ..." ?
<tos9_>
yes
<tos9_>
you do fun old abuse function parameters
<tos9_>
or you can also just bind it again and then it will stay
<tos9_>
`exception = e`, or probably `e = e` also works
<antocuni>
"e = e" does not seem to work (I suppose python just deletes e anyway, no matter what)
<tos9_>
Ah. K. I feel like I intentionally made myself forget that part of this saga at some point
Rhy0lite has joined #pypy
<pmp-p>
it just deletes any name passed with "as" at the end of execept block
<arigo>
it's strange both on semantics (like the consequence above), and on implementation (it's done with adding opcodes that really do a literal extra "try: del e; except: pass" at the end of the block)