Implement PEP 639
Issue Kind
Change in current behaviour
Description
See: https://peps.python.org/pep-0639
Additional context:
-
The full implementation, including the Core Metadata bump to 2.4, will require also the support on the side of PyPI first: https://github.com/pypi/warehouse/issues/16620
-
There's a plan to add validation data and parser to packaging: https://github.com/pypa/packaging/pull/799 + https://github.com/pypa/packaging/pull/828
Impact
poetry now uses the license field from the custom [tool.poetry] table - this will enable unification under the specified main [project] table of pyproject.toml and map to a new core metadata field.
This also brings in a standardized way of specifying the license files in the package metadata, which will help the downstream consumers locate them unambiguously.
Workarounds
poetry now includes both the license expression (as SPDX) and the license files in the distribution. This will just make the declarations and metadata unified across many packaging tools.
We will wait for packaging to support it and use their implementation.
This looks to be implemented in packaging 24.2.
https://github.com/pypa/packaging/releases/tag/24.2
Hi - we started getting the following error when trying to update ruff to the latest version 0.8.1 which was released very recently. Is there some work that needs to be done for poetry to support packages using the new metadata 2.4 version? I checked that we already have the latest version of poetry, and also packaging==24.2 is already a transitive dependency.
Unable to determine package info for path: /var/folders/j3/<snip>/ruff-0.8.1-py3-none-linux_armv6l.whl
Unknown metadata version: 2.4
We have the same problem
urllib3 2.3.0 released today uses metadata version 2.4.
urllib3 2.3.0 released today uses metadata version 2.4.
@andresdelfino what problem is that causing for you? and have you seen https://github.com/astral-sh/ruff/issues/14681#issuecomment-2512302023? It seems upgrading pkginfo fixes the metadata issues.
urllib3 2.3.0 released today uses metadata version 2.4.
@andresdelfino what problem is that causing for you? and have you seen astral-sh/ruff#14681 (comment)? It seems upgrading
pkginfofixes the metadata issues.
Sorry, I had a problem because I was using a Poetry installation made before the new pkginfo came out. Running a new installation of Poetry solved the problem.
I have hidden the off-topic comments. Please avoid commenting on matters not connected with implementing the new standard.
FYI: I started working on it in python-poetry/poetry-core#870. Actually, I think most of the work has been done. (See TODO list in the PR.)
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.