Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support python 311 312 313 #102

Open
ovesh opened this issue Oct 16, 2024 · 2 comments
Open

support python 311 312 313 #102

ovesh opened this issue Oct 16, 2024 · 2 comments

Comments

@ovesh
Copy link
Contributor

ovesh commented Oct 16, 2024

Requires updating meta.yaml (on conda-forge, but only after local testing)

@ovesh
Copy link
Contributor Author

ovesh commented Oct 16, 2024

Started the work (including deprecation of py38 which lost support on conda-forge) but ran into multiple issues.

When py312 is included, conda mambabuild --croot ~/conda-bld -q --no-test conda-recipe eventually errors out with nothing provides _python_rc needed by python-3.12.0rc3-rc3_hab00c5b_1_cpython.

When just py311 is added, conda mambabuild --croot /tmp/conda-bld -t ~/conda-bld/*/*py311*.tar.bz2 --extra-deps python=3.11 (running the tests) fails with ModuleNotFoundError: No module named 'numpy'.

When creating a local py312 env, you get this error on importing gk: SystemError: type genome_kit._cxx.GenomeTrackBuilder has the Py_TPFLAGS_HAVE_GC flag but has no traverse function. Caused by this change in py311:

The PyType_Ready() function now raises an error if a type is defined with the Py_TPFLAGS_HAVE_GC flag set but has no traverse function (PyTypeObject.tp_traverse). (Contributed by Victor Stinner in bpo-44263.)

@ovesh
Copy link
Contributor Author

ovesh commented Nov 6, 2024

Got a segfault on exiting python in py312 and py313:

# python
Python 3.12.7 | packaged by conda-forge | (main, Oct  4 2024, 15:55:29) [Clang 17.0.6 ] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import genome_kit
>>> genome_kit.Genome('hg19').interval('chr1','+',0,1)
Interval("chr1", "+", 0, 1, "hg19")
>>>
zsh: segmentation fault  python

It happens when this static unordered map is deallocated, specifically when Py_XDECREF is called on the stored PyObject str.

Looked into it and it's likely a python bug, for now I created python/cpython#126508
If we can't get this bug fixed we'll need to work around it somehow.

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

No branches or pull requests

1 participant