Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 832782 - distutils-r1.eclass: missing min tomli version
Summary: distutils-r1.eclass: missing min tomli version
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Python Gentoo Team
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks:
 
Reported: 2022-02-06 07:54 UTC by SpanKY
Modified: 2022-02-09 09:39 UTC (History)
1 user (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 SpanKY gentoo-dev 2022-02-06 07:54:55 UTC
distutils-r1.eclass allows any version of tomli, but at least tomli-1.0.4 + python3.8 doesn't work with the tomli processing logic in the eclass due to its use of bytes

>>> Compiling source in /var/tmp/portage/dev-python/flit_core-3.6.0-r2/work/flit_core-3.6.0 ...
 * python3_8: running distutils-r1_run_phase distutils-r1_python_compile
Traceback (most recent call last):
  File "<string>", line 2, in <module>
  File "/usr/lib/python3.8/site-packages/tomli/_parser.py", line 67, in load
    return loads(s, parse_float=parse_float)
  File "/usr/lib/python3.8/site-packages/tomli/_parser.py", line 75, in loads
    src = s.replace("\r\n", "\n")
TypeError: a bytes-like object is required, not 'str'
 * ERROR: dev-python/flit_core-3.6.0-r2::gentoo failed (compile phase):
 *   Unable to obtain build-backend from pyproject.toml

simply upgrading to tomli-1.2.3 makes it work with the current eclass.
Comment 1 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2022-02-06 09:17:25 UTC
I've added this to my long batch of changes that I'll probably send for review today.
Comment 2 Larry the Git Cow gentoo-dev 2022-02-09 09:39:30 UTC
The bug has been closed via the following commit(s):

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

commit 02f047d7808fcba9c5d118edd9f7ba8b05ffe2e5
Author:     Michał Górny <mgorny@gentoo.org>
AuthorDate: 2022-02-06 09:16:49 +0000
Commit:     Michał Górny <mgorny@gentoo.org>
CommitDate: 2022-02-09 08:43:58 +0000

    distutils-r1.eclass: Add min version to tomli dep
    
    Closes: https://bugs.gentoo.org/832782
    Signed-off-by: Michał Górny <mgorny@gentoo.org>

 eclass/distutils-r1.eclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)