Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 947528 - dev-python/attrs-24.3.0: TypeError: Field `project.license-files` must be a table
Summary: dev-python/attrs-24.3.0: TypeError: Field `project.license-files` must be a t...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Python Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-01-05 09:48 UTC by Alarig Le Lay
Modified: 2025-01-06 11:46 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alarig Le Lay 2025-01-05 09:48:12 UTC
Hello,

hatchling complains while installing dev-python/attrs-24.3.0

>>> Emerging (69 of 145) dev-python/attrs-24.3.0::gentoo
 * attrs-24.3.0.tar.gz BLAKE2B SHA512 size ;-) ...                                            [ ok ]
>>> Unpacking source...
>>> Unpacking attrs-24.3.0.tar.gz to /var/tmp/portage/dev-python/attrs-24.3.0/work
>>> Source unpacked in /var/tmp/portage/dev-python/attrs-24.3.0/work
>>> Preparing source in /var/tmp/portage/dev-python/attrs-24.3.0/work/attrs-24.3.0 ...
 * Build system packages:
 *   dev-python/gpep517            : 16
 *   dev-python/installer          : 0.7.0
 *   dev-python/hatchling          : 1.25.0
 *   dev-python/hatch-fancy-pypi-readme: 24.1.0
 *   dev-python/hatch-vcs          : 0.4.0
>>> Source prepared.
>>> Configuring source in /var/tmp/portage/dev-python/attrs-24.3.0/work/attrs-24.3.0 ...
>>> Source configured.
>>> Compiling source in /var/tmp/portage/dev-python/attrs-24.3.0/work/attrs-24.3.0 ...
 * python3_12: running distutils-r1_run_phase distutils-r1_python_compile
 *   Building the wheel for attrs-24.3.0 via hatchling.build
python3.12 -m gpep517 build-wheel --prefix=/usr --backend hatchling.build --output-fd 3 --wheel-dir /var/tmp/portage/dev-python/attrs-24.3.0/work/attrs-24.3.0-python3_12/wheel
2025-01-05 09:47:25,067 gpep517 INFO Building wheel via backend hatchling.build
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/usr/lib/python3.12/site-packages/gpep517/__main__.py", line 443, in <module>
    sys.exit(main())
             ^^^^^^
  File "/usr/lib/python3.12/site-packages/gpep517/__main__.py", line 439, in main
    return func(args)
           ^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/gpep517/__main__.py", line 229, in build_wheel
    print(build_wheel_impl(args, args.wheel_dir), file=out)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/gpep517/__main__.py", line 221, in build_wheel_impl
    wheel_name = backend.build_wheel(str(wheel_dir), args.config_json)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/hatchling/build.py", line 58, in build_wheel
    return os.path.basename(next(builder.build(directory=wheel_directory, versions=['standard'])))
                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/hatchling/builders/plugin/interface.py", line 90, in build
    self.metadata.validate_fields()
  File "/usr/lib/python3.12/site-packages/hatchling/metadata/core.py", line 266, in validate_fields
    self.core.validate_fields()
  File "/usr/lib/python3.12/site-packages/hatchling/metadata/core.py", line 1376, in validate_fields
    getattr(self, attribute)
  File "/usr/lib/python3.12/site-packages/hatchling/metadata/core.py", line 750, in license_files
    raise TypeError(message)
TypeError: Field `project.license-files` must be a table
 * ERROR: dev-python/attrs-24.3.0::gentoo failed (compile phase):
 *   Wheel build failed
 *
Comment 1 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2025-01-06 11:35:11 UTC
Isn't it great when build systems add more validation without caring about backwards compatibility?
Comment 2 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2025-01-06 11:42:13 UTC
Oh wait, it's the other way around.  Your version is severely outdated.
Comment 3 Alarig Le Lay 2025-01-06 11:45:17 UTC
Ah indeed, “fun” that portage didn’t try to update dev-python/hatchling before dev-python/attrs. Sorry for the noise :/
Comment 4 Larry the Git Cow gentoo-dev 2025-01-06 11:46:17 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a8b0603debde89961272f2c84f7eb2176868e714

commit a8b0603debde89961272f2c84f7eb2176868e714
Author:     Michał Górny <mgorny@gentoo.org>
AuthorDate: 2025-01-06 11:43:36 +0000
Commit:     Michał Górny <mgorny@gentoo.org>
CommitDate: 2025-01-06 11:46:13 +0000

    dev-python/attrs: Require newer hatchling
    
    Closes: https://bugs.gentoo.org/947528
    Signed-off-by: Michał Górny <mgorny@gentoo.org>

 dev-python/attrs/{attrs-24.3.0.ebuild => attrs-24.3.0-r1.ebuild} | 1 +
 1 file changed, 1 insertion(+)