Skip to content

Invoke pyroma through the command line#9669

Closed
radarhere wants to merge 1 commit into
python-pillow:mainfrom
radarhere:pyroma
Closed

Invoke pyroma through the command line#9669
radarhere wants to merge 1 commit into
python-pillow:mainfrom
radarhere:pyroma

Conversation

@radarhere

@radarhere radarhere commented Jun 12, 2026

Copy link
Copy Markdown
Member

Resolves #9668

The maintainer of pyroma has declared that it is a command line tool, not a library. This PR updates test_pyroma.py to use subprocess to call it, rather than using the import.

You will notice that I have also removed our code handling rc versions (I don't think we've used this since 3.1.0.rc1) and relaxed the pyroma version requirement (now that the changes from #9116 are gone).

@freakboy3742

freakboy3742 commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Using subprocess isn't an option for iOS, as Python doesn't support the subprocess module (the same will be true for Android or Emacripten).

If this is the approach that is adopted, the test will need to be skipped - subprocess. _can_fork_exec can be used for a property check.

However, I feel a better approach would be to do this outside the scope of pytest, and run it as a separate post-build check of wheels, rather than try to analyze a wheel while running code in (or adjacent to) that wheel.

@radarhere

Copy link
Copy Markdown
Member Author

I attempted to run it outside of pytest, but it still triggered a subprocess error on iOS.

@hugovk

hugovk commented Jun 12, 2026

Copy link
Copy Markdown
Member

Do we need to run it on all platforms as part of the test suite?

Can we instead put it in tox as part of the lint env?

For example: #9670.

@radarhere radarhere closed this Jun 13, 2026
@radarhere radarhere deleted the pyroma branch June 13, 2026 12:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Refactor Pyroma test to be non-runtime

3 participants