rs-station / matchmaps

https://rs-station.github.io/matchmaps/
Other
2 stars 0 forks source link

type hinting not supported in python 3.8 and earlier #51

Closed dennisbrookner closed 2 months ago

dennisbrookner commented 3 months ago

The issue

Certain kinds of type hinting were only introduced in python 3.9, and are not supported in python 3.8 and earlier. Notably, the style used here:

https://github.com/rs-station/matchmaps/blob/6c8d884152ff206932d044a0b0884cd49ff3b966/src/matchmaps/_compute_realspace_diff.py#L49

and the equivalent line in _compute_mr_diff.py throws an error in python 3.8 and earlier.

Potential solutions

  1. Drop support for python 3.8 and earlier
  2. Remove the offending type hints such that python 3.8 will work.
  3. Find some other clever workaround that has been used for similar issues.

I lean towards (1), but I will dig around on the internet to see what the current standards are.

dennisbrookner commented 3 months ago

As per here: https://devguide.python.org/versions/ python 3.8 is scheduled to reach end-of-life in October 2024. I think it's reasonable to drop it a little early.