Expand compatibility to older Python/NumPy versions #16
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.
The existing version of Igor2 is only compatible with Python >V3.9 - the pyproject.toml file suggests V3.8 is permitted, but NumPy V1.25.1 enforces Python V3.9. Unfortunately, many high performance computers and Ubuntu releases come with older Python versions, making Igor2 and packages depending on it incompatible without requiring a Python update.
The incompatibility of Igor2 currently exists because older combinations of Python+NumPy do not automatically show the data type if the data type size equals the default size for that type on the operating system. I have modified the functionality of pprint.pformat in helper.py file such that the data type of every array is now printed automatically. The tests have been updated accordingly to specify the data type automatically everywhere.
I have performed the tests with Python V3.7+NumPy V1.21.5 as well as Python V3.10+NumPy V1.26.4, and the code passes all the tests for both version combinations. It would probably work for even older versions of Python, but I have not tested that.