Skip to content

Conversation

@mattip
Copy link
Contributor

@mattip mattip commented Nov 18, 2024

We are working on PyPy3.11. It requires some adjustments here:

  • Finally implemented PyThreadState_GetInterpreter and PyGC_Collect.
  • I will argue that the managed dict strategy is an implementation detail. I excluded PyPy3.11 from the test of it, and will make creating a PyTypeObject with that flag enabled an error.
  • Currently _PyObject_GetDictPtr returns NULL on PyPy. That is probably a bug. In any case, the test should not segfault by dereferencing a NULL pointer so I added a check.

import argparse
import os.path
import shutil
import subprocess
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

stray import?

if os.path.exists("build"):
shutil.rmtree("build")
cmd = [sys.executable, "setup.py", "build"]
cmd = [sys.executable, "setup.py", "build", "--debug"]
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

although runtests.py runs tests in a subprocess, I could debug my segfaults by running

gdb --args pypy3.11 tests/test_pythoncapi_compat.py -v

Using a debug build makes it easier

@mattip
Copy link
Contributor Author

mattip commented Nov 18, 2024

Is the windows 3.6 debug failure on me? I don't think it is related...

LINK : fatal error LNK1104: cannot open file 'python36_d.lib'

@vstinner vstinner merged commit 0f1d42a into python:main Nov 19, 2024
21 checks passed
@vstinner
Copy link
Member

Merged, thanks.


Please create a separated PR to add --debug. I reverted the change since it caused a build failure on Windows.

@mattip
Copy link
Contributor Author

mattip commented Nov 19, 2024

Thanks!. I will use --debug locally if needed rather than make a new PR.

@vstinner
Copy link
Member

Thanks!. I will use --debug locally if needed rather than make a new PR.

Ok, I'm also fine with that :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants