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

Use Python 3 in scripts/lint.py #5617

Merged
merged 1 commit into from
Jan 22, 2025
Merged

Conversation

yerke
Copy link
Contributor

@yerke yerke commented Jan 18, 2025

  • I have followed the instructions in the PR template

Changes

  • Use Python 3 in scripts/lint.py.

Why

Some modern OS and distributions do not provide Python 2 by default. This includes recent macOS versions.
I see that scripts/generate_changelog.py already uses Python 3, so I don't think this change should be controversial.
Without this change, I am unable to run ./scripts/check.sh on macOS 15.2 without installing Python 2 or adding alias for python executable.

@yerke yerke changed the title use Python 3 in scripts/lint.py Use Python 3 in scripts/lint.py Jan 18, 2025
@YgorSouza
Copy link
Contributor

Without this change, I am unable to run ./scripts/check.sh on macOS 15.2 without installing Python 2 or adding alias for python executable.

The script doesn't actually work on Python 2 though, does it? It uses string interpolation, for example, which was not a thing before 3.6. It just assumes you already have python mapped to python3 by now, which is the case in a lot of systems, but I guess not all of them.

Copy link

Preview available at https://egui-pr-preview.github.io/pr/5617-use-python3-for-lint-py
Note that it might take a couple seconds for the update to show up after the preview_build workflow has completed.

@emilk emilk merged commit 7129418 into emilk:master Jan 22, 2025
27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants