Skip to content

Support python 3.12 in test suite runner#1518

Merged
randomPoison merged 1 commit into
masterfrom
legare/python3.12
Dec 16, 2025
Merged

Support python 3.12 in test suite runner#1518
randomPoison merged 1 commit into
masterfrom
legare/python3.12

Conversation

@randomPoison
Copy link
Copy Markdown
Contributor

The Generator class takes 3 type arguments, but in python 3.13 it became possible to just specify the first one and the other 2 would default to None. Explicitly adding the None arguments allows this to also work on python 3.12.

One of my work machines is on a version of Ubuntu that has 3.12 installed and it looks like it'd be mildly painful to install 3.13. Seems like it'd be reasonable to support 3.12 here, unless there's some reason that'd be a bad idea.

The `Generator` class takes 3 type arguments, but in python 3.13 it became possible to just specify the first one and the other 2 would default to `None`. Explicitly adding the `None` arguments allows this to also work on python 3.12.
@randomPoison randomPoison requested a review from kkysen December 16, 2025 18:39
Copy link
Copy Markdown
Contributor

@kkysen kkysen left a comment

Choose a reason for hiding this comment

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

Hmm, I guess this is fine, just annoying/ugly. I'd personally rather just upgrade Python (which is quite easy with uv), but this is okay, too, if that's preferable to others.

@randomPoison
Copy link
Copy Markdown
Contributor Author

Yeah I agree it's uglier. Is the test suite setup with uv? idk how any of that works, but if it's easy enough to setup a venv or whatever with uv where I can locally setup 3.13 then I can also try that.

@thedataking
Copy link
Copy Markdown
Contributor

I bumped us down to Python 3.12 over here immunant/c2rust-testsuite@593f753 after we discussed it on Slack.

Please land with 3.12 support as Khyber approved rather spending more time on this matter.

@kkysen
Copy link
Copy Markdown
Contributor

kkysen commented Dec 16, 2025

Is the test suite setup with uv?

Yes.

if it's easy enough to setup a venv or whatever with uv where I can locally setup 3.13 then I can also try that.

If you increase the version in project.toml, go to that directory it's in, rm -rf .venv/, and uv python install, I think it should do it automatically. Might need an extra uv sync as well.

@randomPoison randomPoison merged commit f6c5a1b into master Dec 16, 2025
6 checks passed
@randomPoison randomPoison deleted the legare/python3.12 branch December 16, 2025 19:33
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.

3 participants