cfbolz changed the topic of #pypy to: #pypy PyPy, the flexible snake https://pypy.org | IRC logs: https://quodlibet.duckdns.org/irc/pypy/latest.log.html#irc-end and https://libera.irclog.whitequark.org/pypy | the pypy angle is to shrug and copy the implementation of CPython as closely as possible, and staying out of design decisions
andrewsmedina has quit [Ping timeout: 268 seconds]
andrewsmedina has joined #pypy
andrewsmedina has quit [Ping timeout: 268 seconds]
andrewsmedina has joined #pypy
andrewsmedina has quit [Ping timeout: 246 seconds]
andrewsmedina has joined #pypy
andrewsmedina has quit [Ping timeout: 252 seconds]
andrewsmedina has joined #pypy
jcea has quit [Ping timeout: 268 seconds]
jcea has joined #pypy
jcea has quit [Ping timeout: 260 seconds]
jcea has joined #pypy
<agronholm> I'm debugging an issue in some old parts of setuptools where it loads a part of a .pyc file through marshal.load(). It works fine on CPython, but on PyPy, it seems to throw a fit, raising ValueError: bad marshal data (string is not ascii)
<agronholm> and this only happens on Windows; it runs fine on Linux and macOS
<agronholm> to repro, clone https://github.com/pypa/wheel.git, pip install -e .[test] and then run pytest (on Windows + PyPy3)
<agronholm> marshal.load() seems to be RPython code so I can't step into it to figure why this happens
<agronholm> an easier to repro is to go to the tests/testdata/unicode.dist directory and run "python setup.py bdist_egg"
ronan has quit [Ping timeout: 268 seconds]
ronan has joined #pypy
<agronholm> looks like there was another problem too, with zip file filename encoding
<agronholm> pypy couldn't properly decode file names in a zip file, while CPython could
<agronholm> this gets even stranger now – I tried encoding the file name back to bytes with utf-8, and got the same result as on CPython, but on the same console window, the displayed names look completely off on PyPy
<agronholm> sys.stdout.encoding returns the same value on both CPython and PyPy
<cfbolz> agronholm: it's a pyc file that was produced by pypy though, right?
<agronholm> yes
Julian has joined #pypy
<cfbolz> the "only on windows" part is very annoying :-(
<cfbolz> can't easily debug this, I fear
<agronholm> I tracked the latest problem down to a call to WindowsPath().chmod(...)
<agronholm> I got a Path object on a file, checked that the file exists with `.is_file()`, and then `.chmod()` raises FileNotFoundError on that
<agronholm> I'll try to produce a MWE
andrewsmedina has quit [Ping timeout: 252 seconds]
andrewsm1dina has joined #pypy
<cfbolz> thx
andrewsmedina has joined #pypy
andrewsm1dina has quit [Ping timeout: 252 seconds]
Julian has quit [Ping timeout: 264 seconds]
andrewsm1dina has joined #pypy
<agronholm> chmod() says "File not found" about the file it just found by iteration
<agronholm> also the file is created with the wrong file name; CPython works correctly here
andrewsmedina has quit [Ping timeout: 256 seconds]
<agronholm> the file names generated by pypy look like they used latin-1 encoding at some point
<agronholm> ignoring the system fs encoding
andrewsmedina has joined #pypy
andrewsm1dina has quit [Ping timeout: 260 seconds]
<cfbolz> agronholm: right, that sounds plausible
<cfbolz> agronholm: feel like filing an issue so we don't lose it?
<cfbolz> otherwise I can do it
<agronholm> mmm, I can do it
<cfbolz> agronholm: wonderful, thanks
Julian has joined #pypy
Julian has quit [Client Quit]
[Arfrever] has quit [Ping timeout: 268 seconds]
[Arfrever] has joined #pypy