Python Version compatibility
tomdmason opened this issue · 1 comments
tomdmason commented
I think this statement in the README is incorrect:
Python-mlb-statsapi written in python 3.7+
I was trying to run with v3.8.x but getting this error:
File "<my dir>/.local/lib/python3.8/site-packages/mlbstatsapi/models/people/__init__.py", line 2, in <module>
from .people import Player, Coach, Person, Batter, Pitcher, DraftPick
File "<my dir>/.local/lib/python3.8/site-packages/mlbstatsapi/models/people/people.py", line 170, in <module>
@dataclass(kw_only=True, repr=False)
TypeError: dataclass() got an unexpected keyword argument 'kw_only'
KW_ONLY appears to be 3.10+
So that would make 3.10 the minimum python version.
Unless I'm mistaken! Not exactly a python expert here 😆
Ref: https://stackoverflow.com/questions/73732521/how-to-use-dataclass-kw-only-correctly
KCNilssen commented
@tomdmason, thank you for bringing this to our attention. You are correct in your assumption! We'll get that changed and updated.
Thanks for the heads up!