Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 912187

Summary: dev-python/cattrs-23.1.2: fails tests on 32 bits
Product: Gentoo Linux Reporter: Arthur Zamarin <arthurzam>
Component: Current packagesAssignee: Python Gentoo Team <python>
Status: RESOLVED FIXED    
Severity: normal CC: mgorny
Priority: Normal Keywords: TESTFAILURE
Version: unspecified   
Hardware: All   
OS: Linux   
See Also: https://github.com/python-attrs/cattrs/pull/415
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 907463, 909029, 910584    
Attachments: build.log

Description Arthur Zamarin archtester Gentoo Infrastructure gentoo-dev Security 2023-08-12 14:49:15 UTC
Created attachment 867720 [details]
build.log

This was captured on x86-testing (on amd64 devbox), but the type of bug looks similar to 2038 time bug, so I think it is relevant to all 32 bit arches.

> >   c.register_unstructure_hook(datetime, lambda d: d.timestamp())
> E   OverflowError: timestamp out of range for platform time_t
> E   Falsifying example: test_rename(
> E       cls_and_instance=(tests.typeddicts.HypTypedDict,
> E        {'a': 0, '_b': datetime.datetime(2039, 1, 1, 0, 0)}),
> E       detailed_validation=False,
> E   )
> 
> d          = datetime.datetime(2039, 1, 1, 0, 0)
> 
> tests/test_typeddicts.py:31: OverflowError
Comment 1 Larry the Git Cow gentoo-dev 2023-08-12 16:12:35 UTC
The bug has been closed via the following commit(s):

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

commit 092d354cb65458249ee780530456cd0263b28bc7
Author:     Michał Górny <mgorny@gentoo.org>
AuthorDate: 2023-08-12 16:08:59 +0000
Commit:     Michał Górny <mgorny@gentoo.org>
CommitDate: 2023-08-12 16:12:32 +0000

    dev-python/cattrs: Add a patch to fix tests on 32-bit systems
    
    Closes: https://bugs.gentoo.org/912187
    Signed-off-by: Michał Górny <mgorny@gentoo.org>

 dev-python/cattrs/cattrs-23.1.2.ebuild             |  5 +++
 .../cattrs/files/cattrs-23.1.2-32bit-time_t.patch  | 38 ++++++++++++++++++++++
 2 files changed, 43 insertions(+)