Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor gendynapi.py to make it more re-usable #11069

Merged
merged 2 commits into from
Oct 13, 2024

Conversation

madebr
Copy link
Contributor

@madebr madebr commented Oct 4, 2024

In a later stage, we should probably turn it into a python module that can be imported.
This would be useful for generating tbds and ymls for llvm-ifs.

Description

Existing Issue(s)

@madebr madebr merged commit b641c2a into libsdl-org:main Oct 13, 2024
38 checks passed
@madebr madebr deleted the dynapi-rework branch October 13, 2024 00:52
@sezero
Copy link
Contributor

sezero commented Dec 4, 2024

What is the minimum python3 version required after this?
My python3.7 fails with the following:

Traceback (most recent call last):
  File "./gendynapi.py", line 62, in <module>
    @dataclasses.dataclass(frozen=True)
  File "./gendynapi.py", line 66, in SdlProcedure
    parameter: list[str]
TypeError: 'type' object is not subscriptable

@madebr
Copy link
Contributor Author

madebr commented Dec 4, 2024

What is the minimum python3 version required after this? My python3.7 fails with the following:

3.9: array subscript https://mypy.readthedocs.io/en/stable/cheat_sheet_py3.html#useful-built-in-types

(3.9 is the oldest version not in EOL)

@madebr
Copy link
Contributor Author

madebr commented Dec 4, 2024

If you really need 3.7 support,
you can add the following at the the top

from typing import List

and replace all list[...] typing annotations with List[...].
And similarly for tuple and dict.

@sezero
Copy link
Contributor

sezero commented Dec 4, 2024

OK, I'll build a 3.9 version. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants