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
infernix has quit [Ping timeout: 265 seconds]
infernix has joined #pypy
Atque has quit [Quit: ...]
Atque has joined #pypy
Atque has quit [Quit: ...]
Atque has joined #pypy
Atque has quit [Ping timeout: 255 seconds]
Atque has joined #pypy
jcea has quit [Ping timeout: 256 seconds]
derpydoo has quit [Quit: derpydoo]
otisolsen70 has joined #pypy
xcm has joined #pypy
jinsun__ has joined #pypy
jinsun has quit [Killed (calcium.libera.chat (Nickname regained by services))]
jinsun__ is now known as jinsun
dmalcolm__ has joined #pypy
dustinm- has joined #pypy
infernix has quit [*.net *.split]
dustinm has quit [*.net *.split]
dmalcolm_ has quit [*.net *.split]
xcm_ has quit [*.net *.split]
idnar has quit [*.net *.split]
infernix has joined #pypy
idnar has joined #pypy
otisolsen70 has quit [Quit: Leaving]
otisolsen70 has joined #pypy
greedom has joined #pypy
<quotemstr> Wow
mjacob_ has quit [Read error: Connection reset by peer]
mjacob has joined #pypy
Atque has quit [Ping timeout: 255 seconds]
Atque has joined #pypy
lritter has joined #pypy
greedom has quit [Ping timeout: 246 seconds]
derpydoo has joined #pypy
jcea has joined #pypy
jcea has quit [Ping timeout: 256 seconds]
<mgorny> tox-4.0.0 can no longer be tested under pypy3 (but pypy3 inside tox will work) because they've started using time-machine
<mgorny> time-machine is apparently "optimized" replacement for freezegun that mangles cpython internals (sic!)
<mgorny> the author isn't going to add pypy support but they're open to PRs, if someone wants to work on it: https://github.com/adamchainz/time-machine/issues/305#issuecomment-1333666441
jcea has joined #pypy
<mattip> that is a bit harsh. Maybe the issue should be raised with tox
<mattip> ahh, this is just a few tests that mock the time module. Maybe tox could install time-machine for testing only on CPython, and skip tests that require it
Atque has quit [Quit: ...]
<mgorny> they've stopped testing on pypy entirely
<mgorny> apparently because they kept finding bugs in pypy, not tox
<mgorny> the post previous to last
<mgorny> no clue how to get # link
<Alex_Gaynor> Does tox4 still support pypy3 test envs?
<mgorny> yes
<Alex_Gaynor> 👍
jinsun__ has joined #pypy
jinsun is now known as Guest9413
Guest9413 has quit [Killed (cadmium.libera.chat (Nickname regained by services))]
jinsun__ is now known as jinsun
anonwastaken has joined #pypy
<anonwastaken> Hi, I have issues with pypy, I was meme on 4chan with math equation so I wrote simple code to solve it, code:
<anonwastaken> import math
<anonwastaken> for i in range(2, 7): sumarize += math.pow(8/3+13/2-25/6, math.sqrt(4))-math.pow(2, i)
<anonwastaken> sumarize = 0
<anonwastaken> print(sumarize)
<anonwastaken> pypy returns -44 and python 1 (0.999999...), the correct solution is 1
anonwastaken has quit [Quit: leaving]
anonwastaken has joined #pypy
lritter has quit [Ping timeout: 252 seconds]
<anonwastaken> I found bug with math in pypy, code: https://termbin.com/2td77 pypy prints -44 and python prints 1 (0.999...), the correct answer is 1, also want to say that you are doing amazing job
anonwastaken has quit [Quit: Reconnecting]
anonwastaken has joined #pypy
anonwastaken has quit [Client Quit]
<cfbolz> anonwastaken: you are comparing CPython3 with PyPy2
<cfbolz> pypy2 and cpython2 both give -44; pypy3 and cpython3 both give 0.999...
<cfbolz> this is due to the change in behavior of the / operator, which went from being floor division on ints, to true division = giving float results
eamanu has quit []
eamanu has joined #pypy
<jinsun> hello, I see weird import problems in pypy, seems like I can't import any extension modules from inside a venv
<jinsun> for example import sqlite3 tries to load _sqlite3_cffi and then failes with ImportError: The specified module could not be found, but there is a _sqlite3_cffi.pypy39-pp73-win_amd64.pyd in sys.path and that is loaded when I use the "system" interpreter instead of the venv
otisolsen70 has quit [Quit: Leaving]
<jinsun> hmm, and it actually works fine with the binary downloaded from pypy.org, I was trying using the conda-forge pypy 3.9 before
<mattip> jinsun: could you record your steps in a new issue in the issue tracker?
<mattip> or a pastebin
<mattip> so I can try to reproduce?
<jinsun> mattip: is this okay? https://bpa.st/PHSA, you might also need windows to reproduce
<jinsun> hmm it may also be some stupid thing with conda, let me see if I can make a new conda env and then reproduce
<mattip> maybe something like not being able to load sqlite.dll which _sqlite3_cffi needs?
<jinsun> mattip: okay new conda environment didn't change anything, new paste with the conda/mamba steps also, https://bpa.st/BWFA
<jinsun> there is sqlite3.dll inside pypy39/Library/bin, not inside pypy39/Lib where _sqlite3_cffi is, but it loads fine if I don't use venv, so not sure if that really matters
<mattip> yup, it mattters. Try os.add_dll_directory('path/to/pypy39/Library/bin') before "import sqlite3" and now it doesn't fail
<mattip> in the venv
<jinsun> mattip: ah yes it works after that
<jinsun> in the pypy.org download, the dll is inside /Lib instead of /Library/bin so that is why it works there I guess
<mattip> cython has a whole startup thing to make this work
<mattip> somehow it got broken for venvs
<mattip> doing "set CONDA_DLL_SEARCH_MODIFICATION_DEBUG=1" and comparing cpython vs pypy shows the problem
<mattip> pypy is adding the search directories from the venv (wrong), cpython adds search directories from the base python (correct)
<jinsun> ah cool
<jinsun> so it should be as simple as using sys.base_prefix there instead of sys.prefix I guess
<mattip> maybe. I filed an issue
<jinsun> thanks
<mattip> thanks for the report! Please add a comment about sys.base_prefix, indeed that seems like the correct fix
<mattip> unfortunately that code is compile into the pypy executable, so it is not so simple to try out a fix
derpydoo has quit [Ping timeout: 260 seconds]
epony has quit [Quit: QUIT]