Fix NumPy 2.0 compatibility and modernize build config#662
Open
dhruvildarji wants to merge 1 commit intoFarama-Foundation:masterfrom
Open
Fix NumPy 2.0 compatibility and modernize build config#662dhruvildarji wants to merge 1 commit intoFarama-Foundation:masterfrom
dhruvildarji wants to merge 1 commit intoFarama-Foundation:masterfrom
Conversation
- Add [build-system] section (PEP 517/518) for proper build isolation - Bump minimum numpy from 1.21.0 to 1.23.0 for NumPy 2.0 compatibility - Drop EOL Python 3.8 from requires-python and classifiers - Add Python 3.13 to classifiers and CI test matrix - Update GitHub Actions to latest versions (checkout@v4, setup-python@v5) Fixes Farama-Foundation#617 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #617
This PR addresses the NumPy 2.0 compatibility issue reported in #617 by modernizing the build configuration:
[build-system]section (PEP 517/518): Ensures proper build isolation withsetuptools>=64, preventing compiled module version mismatches between NumPy 1.x and 2.x>=1.21.0to>=1.23.0: NumPy 1.23 is the earliest version that includes forward-compatibility improvements for the NumPy 2.0 transitionrequires-pythonand classifiers accordinglyactions/checkout@v2->@v4,actions/setup-python@v1->@v5Context
The error in #617 ("A module compiled using NumPy 1.x cannot be run in NumPy 2.0.2") occurs when pip resolves dependencies without proper build isolation. Adding the
[build-system]table ensures pip uses an isolated build environment with compatible NumPy versions, preventing the compiled module mismatch.Test plan
pip install .works in a fresh environment with NumPy 2.ximport highway_envworks without NumPy version errors