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

Python 3.13 compatibility #795

Closed
xylar opened this issue Sep 3, 2024 · 5 comments
Closed

Python 3.13 compatibility #795

xylar opened this issue Sep 3, 2024 · 5 comments

Comments

@xylar
Copy link

xylar commented Sep 3, 2024

Based on the attempt to build with python 3.13 on conda-forge, it seems like some work may be needed before python-igraph is compatible. We're seeing failures in a lot of tests with messages like the following:

======================================================================
ERROR: testAdjacency (tests.test_basic.BasicTests.testAdjacency)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/conda/feedstock_root/build_artifacts/python-igraph_1725317163812/test_tmp/tests/test_basic.py", line 350, in testAdjacency
    self.assertTrue(g.get_adjlist(IN) == [[2], [0], [1], [2]])
                    ~~~~~~~~~~~~~^^^^
  File "/home/conda/feedstock_root/build_artifacts/python-igraph_1725317163812/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pl/lib/python3.13/site-packages/igraph/adjacency.py", line 135, in _get_adjlist
    return [self.neighbors(idx, mode) for idx in range(self.vcount())]
            ~~~~~~~~~~~~~~^^^^^^^^^^^
SystemError: <method 'neighbors' of 'igraph._igraph.GraphBase' objects> returned NULL without setting an exception

======================================================================
ERROR: testEdgeIncidence (tests.test_basic.BasicTests.testEdgeIncidence)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/conda/feedstock_root/build_artifacts/python-igraph_1725317163812/test_tmp/tests/test_basic.py", line 356, in testEdgeIncidence
    self.assertTrue(g.incident(2, IN) == [1])
                    ~~~~~~~~~~^^^^^^^
SystemError: <method 'incident' of 'igraph._igraph.GraphBase' objects> returned NULL without setting an exception

See conda-forge/python-igraph-feedstock#91

Also likely relevant:

@ntamas
Copy link
Member

ntamas commented Sep 3, 2024

I've noticed this in CI but haven't had time to deal with it yet, especially because it seems to be related to Linux only; I can't reproduce it with macOS (M1) and Python 3.13.0rc1. I'll try on Linux soon.

@ntamas
Copy link
Member

ntamas commented Sep 3, 2024

8abba79 might be a fix for this issue; let's see how it fares in CI.

@xylar
Copy link
Author

xylar commented Sep 3, 2024

@ntamas, thanks for responding so quickly! Fingers crossed.

@ntamas
Copy link
Member

ntamas commented Sep 3, 2024

CI passed. I'm aiming for a new patch release soon(ish), in the next few days. You can apply 8abba79 manually if you can't wait for the next patch release.

@ntamas ntamas closed this as completed Sep 3, 2024
@xylar
Copy link
Author

xylar commented Sep 3, 2024

@ntamas, Thanks for adding this support so quickly! I'll take your suggestion and patch for now.

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

2 participants