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

pyproject: fix classifiers #353

Merged
merged 1 commit into from
Aug 18, 2022
Merged

pyproject: fix classifiers #353

merged 1 commit into from
Aug 18, 2022

Conversation

claui
Copy link
Contributor

@claui claui commented Aug 18, 2022

PR #337 introduced new classifiers, some of which cause the build to abort:

$ python -m flit build --format wheel
Fetching list of valid trove classifiers                                   I-flit.validate
Unrecognised classifier: 'Programming Language :: Python :: 3 :: 3.10'     E-flit.validate
Unrecognised classifier: 'Programming Language :: Python :: 3 :: 3.7'      E-flit.validate
Unrecognised classifier: 'Programming Language :: Python :: 3 :: 3.8'      E-flit.validate
Unrecognised classifier: 'Programming Language :: Python :: 3 :: 3.9'      E-flit.validate
Config error: Invalid config values (see log)

Looking at PyPI’s list of valid classifiers confirms that minor version classifiers have no intermediate 3 element.

I think the reason that the CI never caught this issue is that because the Makefile seems not to use Flit.

This PR removes the intermediate elements of affected classifiers.

btw:
Shoutout to @woodruffw and others for your amazing work!

PR #337 (9d098f3) introduced new classifiers, some of which cause
the build to abort:

```
$ python -m flit build --format wheel
Fetching list of valid trove classifiers                                   I-flit.validate
Unrecognised classifier: 'Programming Language :: Python :: 3 :: 3.10'     E-flit.validate
Unrecognised classifier: 'Programming Language :: Python :: 3 :: 3.7'      E-flit.validate
Unrecognised classifier: 'Programming Language :: Python :: 3 :: 3.8'      E-flit.validate
Unrecognised classifier: 'Programming Language :: Python :: 3 :: 3.9'      E-flit.validate
Config error: Invalid config values (see log)
```

Looking at PyPI’s list of valid classifiers [1] confirms that minor
version classifiers have no intermediate `3` element.

Remove the intermediate elements of affected classifiers.

[1]: https://pypi.org/pypi?%3Aaction=list_classifiers

CC: William Woodruff <[email protected]>
@CLAassistant
Copy link

CLAassistant commented Aug 18, 2022

CLA assistant check
All committers have signed the CLA.

@woodruffw
Copy link
Member

woodruffw commented Aug 18, 2022 via email

@di di enabled auto-merge August 18, 2022 14:31
@woodruffw woodruffw self-assigned this Aug 18, 2022
@woodruffw woodruffw added the bug Something isn't working label Aug 18, 2022
@di
Copy link
Sponsor Member

di commented Aug 18, 2022

Not sure what happened to the CI pipeline here, opening/closing in an attempt to reset it.

@di di closed this Aug 18, 2022
auto-merge was automatically disabled August 18, 2022 21:19

Pull request was closed

@di di reopened this Aug 18, 2022
@di di enabled auto-merge August 18, 2022 21:19
@woodruffw
Copy link
Member

Not sure what happened to the CI pipeline here, opening/closing in an attempt to reset it.

Yeah, looks like it was this: https://www.githubstatus.com/incidents/8gpymn7rystj

@di di merged commit 0ea49c4 into pypa:main Aug 18, 2022
@woodruffw
Copy link
Member

I think the reason that the CI never caught this issue is that because the Makefile seems not to use Flit.

This is strange -- the Makefile should be using Flit via its standard build APIs, since that's what python -m build is invoking under the hood and we have no other build system configured.

I wonder if it's a discrepancy between python -m flit build and python -m build with the Flit backend?

@di
Copy link
Sponsor Member

di commented Aug 18, 2022

It also doesn't make sense to me -- would be worthwhile to try to get to the bottom of it.

@woodruffw
Copy link
Member

I think it's because flit_core isn't doing that kind of metadata validation.

Locally, python -m flit build fails for me (with the same error @claui saw):

$ python -m flit build
Fetching list of valid trove classifiers  I-flit.validate
Unrecognised classifier: 'Programming Language :: Python :: 3 :: 3.10'  E-flit.validate
Unrecognised classifier: 'Programming Language :: Python :: 3 :: 3.7'  E-flit.validate
Unrecognised classifier: 'Programming Language :: Python :: 3 :: 3.8'  E-flit.validate
Unrecognised classifier: 'Programming Language :: Python :: 3 :: 3.9'  E-flit.validate
Config error: Invalid config values (see log)

But python -m build works, despite definitely using flit_core:

$ python -m build
* Creating venv isolated environment...
* Installing packages in isolated environment... (flit_core >=3.2,<4)
* Getting dependencies for sdist...
* Building sdist...
* Building wheel from sdist
* Creating venv isolated environment...
* Installing packages in isolated environment... (flit_core >=3.2,<4)
* Getting dependencies for wheel...
* Building wheel...
Successfully built pip_audit-2.4.3.tar.gz and pip_audit-2.4.3-py3-none-any.whl

I'll investigate further.

@woodruffw
Copy link
Member

Specifically, it looks like the error happens in flit.validate, which is not part of flit_core. Maybe it should be?

@woodruffw
Copy link
Member

Ref: pypa/flit#580

@claui claui deleted the classifiers branch August 19, 2022 08:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants