weasdown / GMAT-Python-simple

An extra wrapper for the GMAT Python API to simplify setting up mission simulations.
MIT License
10 stars 2 forks source link

need to specify python's compatible version #5

Closed Quantum-dogdog closed 1 month ago

Quantum-dogdog commented 1 month ago

first of all, great project!

it seems like you are using python3.10,

my python version is 3.9.6,so it shows:

     TypeError: unsupported operand type(s) for |: 'type' and 'type'

i have to modify gmat_py_simple\executive.py line231 to

     if isinstance(com, (gpy.BranchCommand,gmat.BranchCommand)):

& commands.py has the same bug.

then i can run Tut01 & Tut02 success.

weasdown commented 1 month ago

Hi, thanks for the useful issue and the compliment! I mostly used Python 3.11 for development but you're right that the code uses some features that aren't available in Python <3.10. I would prefer to not actively support Python 3.9 though, as it feels too old. For example, scientific-python.org suggests that "Support for Python versions be dropped 3 years after their initial release". Python 3.9 was released in October 2020, so is well past the three year mark. As another example, numpy's latest version (2.10) has dropped support for Python 3.9.

Python 3.9 is still receiving security updates, and will do until October 2025, but I think for now I'll just specify in the documentation that at least 3.10 is needed. You're welcome to try convincing me otherwise though!

weasdown commented 1 month ago

I've added a warning about Python versions to README.md. @Quantum-dogdog, is that the sort of version specifying you're looking for?

Quantum-dogdog commented 1 month ago

That's nice!