nutti / fake-bpy-module

Fake Blender Python API module collection for the code completion.
MIT License
1.37k stars 97 forks source link

Update Python Version for local gen_module #208

Closed UuuNyaa closed 4 months ago

UuuNyaa commented 4 months ago

Purpose of the pull request

Due to the update of the Python version from 3.8 to 3.9 in GitHub Actions dependencies in commit 782a482d4eb5e48ab932cc0e3d60fcbbcb435a72, we need to update the Python version locally to align with the GitHub Actions environment.

Description about the pull request

nutti commented 4 months ago

@JonathanPlasse

This PR fixes the Python version. Should we wait your WIP PR #207? I think your PR may change the supported Python version.

JonathanPlasse commented 4 months ago

Pyi files should be compatible for all Python version, as they are never executed. The PR already use Python 3.10 features in the Pyi files, but the CI passes as expected.

nutti commented 4 months ago

@JonathanPlasse

Hmm... I'm not sure why CI passes even if you use Python 3.10 feature.

I think we should update the requirement to use Python 3.10 from your PR. Actually, we try to use Python 3.10 feature for the type annotation for the generation code as well in future. Is it possible to update Python version to 3.10 in your PR?

nutti commented 4 months ago

@UuuNyaa

Thank you for your contribution again! Could you update your code to use Python 3.10 from above discussion?

JonathanPlasse commented 4 months ago

I will rebase my PR once this PR with Python 3.10 is merged.

JonathanPlasse commented 4 months ago

@JonathanPlasse

Hmm... I'm not sure why CI passes even if you use Python 3.10 feature.

Why would it not pass? The Python 3.10 features are only present in the generated code and not in the actual generation code.

I think we should update the requirement to use Python 3.10 from your PR. Actually, we try to use Python 3.10 feature for the type annotation for the generation code as well in future. Is it possible to update Python version to 3.10 in your PR?

nutti commented 4 months ago

@JonathanPlasse

Ah, I got it. Thank you for your explanation.

UuuNyaa commented 4 months ago

@nutti @JonathanPlasse Thanks for the comments and review!

I have confirmed that this change works correctly in my environment.

- FROM python:3.9-bullseye
+ FROM python:3.10-bullseye