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

regenerate cpp files with cython for Python 3.11 #80

Merged
merged 2 commits into from
Sep 27, 2022

Conversation

lucidfrontier45
Copy link
Contributor

@lucidfrontier45 lucidfrontier45 commented Sep 27, 2022

The current cpp codes are incompatible with Python 3.11 due to Cython's bug.
cython/cython#4461

build fails as follows.

src/agent.cpp:198:12: fatal error: longintrepr.h: No such file or directory
  198 |   #include "longintrepr.h"
      |            ^~~~~~~~~~~~~~~
compilation terminated.
error: command '/usr/bin/gcc' failed with exit code 1

Luckly the latest Cython has already fixed this issue. I just regenerated cpp files with latest Cython 0.29.32.

I tested the newly generated cpp files against python 3.8-3.11rc2. All builds it without any error and unittest also passed.

I also added -3 option to remove warnings. If Python 2.7 support is must, I'll regenerate without this option.

@BoboTiG
Copy link
Contributor

BoboTiG commented Sep 27, 2022

Thanks for the patch @lucidfrontier45 !

Let's move forward, and remove unsupported Python versions from setup.py :)

It will:

@BoboTiG
Copy link
Contributor

BoboTiG commented Sep 27, 2022

No sorry, actually, let's keep Python 2.7 compatibility. Cython is still supporting that, and it doesn't hurt to do the same here.

@lucidfrontier45
Copy link
Contributor Author

@BoboTiG

OK, I regenerated with "-2" option. Since in next major version of Cython, the default language level will change to 3, I also add explicit "-2" option in the update_cpp.sh .

@BoboTiG
Copy link
Contributor

BoboTiG commented Sep 27, 2022

Perfect, thanks!

@BoboTiG BoboTiG merged commit 5b7377e into pytries:master Sep 27, 2022
@BoboTiG BoboTiG mentioned this pull request Oct 3, 2022
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