Skip to content

use python 3.12 in build action #38

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

Merged
merged 1 commit into from
May 7, 2025
Merged

Conversation

FoamyGuy
Copy link
Contributor

@FoamyGuy FoamyGuy commented May 6, 2025

This resolves an issue that I'm facing during the docs build for a new library: https://github.com/adafruit/Adafruit_CircuitPython_Argv_File/actions/runs/14862174307/job/41729654249#step:2:1072

I'm not entirely certain the root cause of the issue but it seems that something inside of python 3.11 is unappy trying to parse the line of code return f"{file_location}.{path.absolute().replace("/", "_")}.argv"

The line of code works fine on a CircuitPython device, I tested inside of local containers and on python 3.12 and 3.13 the docs do build successfully. They got built successfully inside of RTD as well which uses 3.13. The issue building seems to be specifically inside github build action where it uses python 3.11.

Copy link
Member

@tannewt tannewt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fine with me. Thanks!

@tannewt tannewt merged commit 3413c80 into adafruit:main May 7, 2025
1 check passed
@FoamyGuy
Copy link
Contributor Author

I didn't realize it at the time because I was working on newly cookie-cut libraries with ruff, but this change actually breaks our non-ruff library pre-commit runs because pylint versions < 3.0 are unsupported on python 3.12 and we use 2.17.4 currently.

I am thinking the easiest path is to adabot patch all repos that still use pylint to update them to use pylint v3, while we continue working to migrate them to ruff. But if we wanted instead we could take a more "rip the bandaid" approach and take the opportunity to just swap the remaining pylint ones to ruff.

@tannewt
Copy link
Member

tannewt commented May 12, 2025

I didn't realize it at the time because I was working on newly cookie-cut libraries with ruff, but this change actually breaks our non-ruff library pre-commit runs because pylint versions < 3.0 are unsupported on python 3.12 and we use 2.17.4 currently.

I am thinking the easiest path is to adabot patch all repos that still use pylint to update them to use pylint v3, while we continue working to migrate them to ruff. But if we wanted instead we could take a more "rip the bandaid" approach and take the opportunity to just swap the remaining pylint ones to ruff.

Any idea how many we've switched to ruff and have remaining?

@FoamyGuy
Copy link
Contributor Author

I do not know for sure. I would guess maybe 20-25% are on ruff and the remaining need moved still.

We discussed this a bit in the internal meeting and decided to work on switching them to ruff. I'm going to use the opportunity to get claude code setup locally in a container and get practice using it that way instead of the web UI. Hopefully it can smooth some of the tediousness of swapping, removing pylint disable comments, and updating code that gets flagged by ruff.

@tannewt
Copy link
Member

tannewt commented May 13, 2025

I do not know for sure. I would guess maybe 20-25% are on ruff and the remaining need moved still.

We discussed this a bit in the internal meeting and decided to work on switching them to ruff. I'm going to use the opportunity to get claude code setup locally in a container and get practice using it that way instead of the web UI. Hopefully it can smooth some of the tediousness of swapping, removing pylint disable comments, and updating code that gets flagged by ruff.

Perfect! That sounds like a great use of claude code. It loves fixing lint errors.

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