Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 795792 - dev-python/diskcache-5.2.1 fails tests
Summary: dev-python/diskcache-5.2.1 fails tests
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Python Gentoo Team
URL:
Whiteboard:
Keywords: TESTFAILURE
Depends on:
Blocks:
 
Reported: 2021-06-13 21:59 UTC by Jonathan Lovelace
Modified: 2021-06-14 10:06 UTC (History)
3 users (show)

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


Attachments
dev-python:diskcache-5.2.1:20210613-022722.log (dev-python:diskcache-5.2.1:20210613-022722.log,37.62 KB, text/x-log)
2021-06-13 21:59 UTC, Jonathan Lovelace
Details
emerge-info.txt (emerge-info.txt,7.74 KB, text/plain)
2021-06-13 21:59 UTC, Jonathan Lovelace
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Lovelace 2021-06-13 21:59:01 UTC
Created attachment 715779 [details]
dev-python:diskcache-5.2.1:20210613-022722.log

=dev-python/diskcache-5.2.1 fails two tests when I try to rebuild it for Python 3.9, DiskCacheTests.test_get_or_set_callable_returning_none and DiskCacheTests.test_pickle. Here's the section of the build log (full log attached) with the stack traces:

========================================================== FAILURES ==========================================================
___________________________________ DiskCacheTests.test_get_or_set_callable_returning_none ___________________________________

self = <tests.test_djangocache.DiskCacheTests testMethod=test_get_or_set_callable_returning_none>

    def test_get_or_set_callable_returning_none(self):
        self.assertIsNone(cache.get_or_set('mykey', lambda: None))
        # Previous get_or_set() doesn't store None in the cache.
>       self.assertEqual(cache.get('mykey', 'default'), 'default')
E       AssertionError: None != 'default'

self       = <tests.test_djangocache.DiskCacheTests testMethod=test_get_or_set_callable_returning_none>

tests/test_djangocache.py:884: AssertionError
_________________________________________________ DiskCacheTests.test_pickle _________________________________________________

self = <tests.test_djangocache.DiskCacheTests testMethod=test_pickle>

    def test_pickle(self):
        letters = 'abcde'
        cache.clear()
    
        for num, val in enumerate(letters):
            cache.set(val, num)
    
>       data = pickle.dumps(cache)
E       TypeError: cannot pickle '_thread.RLock' object

letters    = 'abcde'
num        = 4
self       = <tests.test_djangocache.DiskCacheTests testMethod=test_pickle>
val        = 'e'

tests/test_djangocache.py:1036: TypeError
Comment 1 Jonathan Lovelace 2021-06-13 21:59:28 UTC
Created attachment 715782 [details]
emerge-info.txt
Comment 2 Larry the Git Cow gentoo-dev 2021-06-14 10:06:06 UTC
The bug has been closed via the following commit(s):

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

commit 221fc15c943883c49dde3ab712918cf345ec47e5
Author:     Michał Górny <mgorny@gentoo.org>
AuthorDate: 2021-06-14 10:04:53 +0000
Commit:     Michał Górny <mgorny@gentoo.org>
CommitDate: 2021-06-14 10:06:03 +0000

    dev-python/diskcache: Require django<3.2 for tests
    
    Closes: https://bugs.gentoo.org/795792
    Signed-off-by: Michał Górny <mgorny@gentoo.org>

 dev-python/diskcache/diskcache-5.2.1.ebuild | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)