TUDelft-CNS-ATM / bluesky

The open source air traffic simulator
GNU General Public License v3.0
365 stars 244 forks source link

Restore Python <3.9 compatibility #496

Closed juhannc closed 8 months ago

juhannc commented 8 months ago

https://github.com/TUDelft-CNS-ATM/bluesky/commit/dbaf8ad9c4f9ac18de54bb6edd0b1e46b5aca503 breaks compatibility for Python <3.9 by using annotation features only available in PEP 593.

Sadly, the aforementioned commit is already included in the most recent release, 2023.11.22. Thus, I'd urge to merge this PR and create a new release that really is compatible with 3.7 and 3.8 (as defined in setup.py).

jooste commented 8 months ago

Hi @juhannc!

Thanks for the suggestion. I'm interested to hear why you are interested in compatibility with python < 3.9? Version 3.9 has been around already for nearly four years already.

The revert you propose of course wouldn't be any problem, but we're considering using Python's typing.Annotated for improvements in the stack and aircraft state objects. This was only introduced in v3.9, so would also break compatibility with older versions.

juhannc commented 8 months ago

Hi @jooste,

thank you for getting back to me so quickly :)

Regarding Python <3.9, well, first and foremost, you still list this package as being compatible with Python 3.7 and 3.8, and that's currently not true. Also, Python 3.8 is not yet EOL, and as such I think there is reason to support it.

I'm always a big fan of Python code being annotated, don't get me wrong. And I can totally understand that you don't want to resort to typing_extensions.Annotated for Python >3.9 compatibility, but as stated above, you currently advertise Python 3.7 and 3.8 compatibility. And as such I think that the code should actually be Python 3.7 and 3.8 compatible

jooste commented 8 months ago

Ok, thanks. The reason I ask is that it could be that some platforms are still (somewhat) stuck with older versions. I know that some linux distros can lag behind, so this is useful information. I'll merge the pull request to conform with the currently stated 3.7 compatibility, and we'll see what we do with Annotated once we get there :)

juhannc commented 8 months ago

Thank you for merging so quickly :)

Ok, thanks. The reason I ask is that it could be that some platforms are still (somewhat) stuck with older versions. I know that some linux distros can lag behind, so this is useful information.

Yeah, I get that, Ubuntu 20.04 for example (still not EOL) is also relying on Python 3.8 and sadly a lot of folks I know still use 20.04.