Skip to content

DEP: allow running python helper scripts with any Python 3.12.x patch version#410

Open
neutrinoceros wants to merge 1 commit into
OpenAstronomy:mainfrom
neutrinoceros:dep/relax-requires-python
Open

DEP: allow running python helper scripts with any Python 3.12.x patch version#410
neutrinoceros wants to merge 1 commit into
OpenAstronomy:mainfrom
neutrinoceros:dep/relax-requires-python

Conversation

@neutrinoceros

@neutrinoceros neutrinoceros commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

pinning 3.12 exactly leads to issues with the latest versions of pipx, presumably since version 1.15.1 (ubuntu-latest currently ships 1.16.0)

close #409

xref: pypa/pipx#1953

@neutrinoceros

Copy link
Copy Markdown
Contributor Author

validated at astropy/astropy#20122

@neutrinoceros
neutrinoceros marked this pull request as ready for review July 24, 2026 14:04
@neutrinoceros

Copy link
Copy Markdown
Contributor Author

unrelated linting issues are addressed at #411

@neutrinoceros

Copy link
Copy Markdown
Contributor Author

Alternatively, we could also pin the version installed through actions/setup-python. Let me know if that's preferred !

@zacharyburnett

Copy link
Copy Markdown
Contributor

this started failing for us as well yesterday afternoon, good to know there's a fix. Are we concerned about the virtualenv tox tests failing?

@zacharyburnett zacharyburnett left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

if the tests pass this should be good

@neutrinoceros

Copy link
Copy Markdown
Contributor Author

I think the remaining failures are part stylistic (#411) and part due to a an unpinned version of coverage. I can probably address the latter in another PR too

@neutrinoceros

Copy link
Copy Markdown
Contributor Author

I couldn't figure out the coverage issue yet. It's definitely unrelated though. I suggest merging and releasing what's already fixed if possible.

@zacharyburnett

zacharyburnett commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

@braingram brought up a good point, shouldn't this patch version specifier be ~=3.12.0 or >=3.12,==3.12.*?

the docs at https://packaging.python.org/en/latest/specifications/version-specifiers/#compatible-release suggest that ~=3.12 would be equivalent to >=3.12,==3.*

@neutrinoceros

Copy link
Copy Markdown
Contributor Author

Thank you ! In that case I think I'd rather pin Python itself

@neutrinoceros

Copy link
Copy Markdown
Contributor Author

... though I would also need to change these lines, in a similar way, so scratch that

@neutrinoceros
neutrinoceros force-pushed the dep/relax-requires-python branch from f1843c7 to f0ea02c Compare July 24, 2026 19:21
@neutrinoceros

Copy link
Copy Markdown
Contributor Author

and to avoid any confusion around the meaning of ~= (which clearly wasn't obvious to me), I switched to an explicit interval.

@neutrinoceros
neutrinoceros force-pushed the dep/relax-requires-python branch from f0ea02c to 09bee04 Compare July 24, 2026 19:22
@zacharyburnett

Copy link
Copy Markdown
Contributor

and to avoid any confusion around the meaning of ~= (which clearly wasn't obvious to me), I switched to an explicit interval.

don't worry, I also thought it worked like that until brett brought it up lol

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.

publish workflow failing with pipx error

3 participants