Ensure the latest version of Python 3.13 is installed in Travis CI or switch to another CI service like GitHub Actions if Travis CI does not support Python 3.13.
4. Run Tests in Python 3.13
Install Python 3.13 locally
If Python 3.13 is not yet available in your environment, install it using a package manager like pyenv:
bash
pyenv install 3.13.0
pyenv global 3.13.0
Run tests
Run your tests locally in Python 3.13 to ensure compatibility:
bash
pytest
tox -e py313
Verify that all tests pass successfully. If there are any compatibility issues, fix them. Common issues might involve:
Changes in Python C API affecting the C++ extension.
Updates to setuptools, cython, or numpy.
5. Verify C++ Code Compatibility
Python 3.13 may bring changes to the C API. Since this project involves C++ code, make sure the C++ extensions compile successfully. Specifically:
Check the extra_compile_args in setup.py for compatibility with Python 3.13.
Ensure the C++ code in primesieve/_primesieve.cpp and other compiled modules uses updated Python C API functions, if necessary.
You can use the following command to manually build the extension and check for errors:
bash
python3.13 setup.py build_ext --inplace
6. Update Documentation
Update the README and any related documentation to reflect Python 3.13 support. For example:
markdown
# Python 3.13 Support
This package now supports Python 3.13. Please ensure you have the latest version of pip, setuptools, numpy, and cython installed.
7. Release a New Version
After confirming compatibility, increment the version number in setup.py: