Skip to content

tests fail in year 2038 #245

@bmwiedemann

Description

@bmwiedemann

BUG/PROBLEM REPORT / FEATURE REQUEST

What I did:

While working on reproducible builds for openSUSE, I found that
our python-ZEO 6.1 package fails tests when run after 2038-01-19
with qemu-kvm -rtc base=2038-01-20T12:00:00

What I expect to happen:

Tests should continue to work for 15+ years.

What actually happened:

 broken_non_current (ZEO.tests.test_cache) (0.002 s)
 cache_simul_properly_handles_load_miss_after_eviction_and_inval (ZEO.tests.test_cache)/usr/lib/python3.11/site-packages/zope/exceptions/exceptionformatter.py:184: ResourceWarning: unclosed file <_io.TextIOWrapper name='cache.lock' mode='a+' encoding='UTF-8'>
  if tb.tb_frame.f_locals.get('__exception_formatter__'):
ResourceWarning: Enable tracemalloc to get the object allocation traceback
/usr/lib/python3.11/site-packages/zope/exceptions/exceptionformatter.py:184: ResourceWarning: unclosed file <_io.BufferedRandom name='cache'>
  if tb.tb_frame.f_locals.get('__exception_formatter__'):
ResourceWarning: Enable tracemalloc to get the object allocation traceback
/usr/lib/python3.11/site-packages/zope/exceptions/exceptionformatter.py:184: ResourceWarning: unclosed file <_io.BufferedWriter name='cache.trace'>
  if tb.tb_frame.f_locals.get('__exception_formatter__'):
ResourceWarning: Enable tracemalloc to get the object allocation traceback
 (0.009 s)


Failure in test cache_simul_properly_handles_load_miss_after_eviction_and_inval (ZEO.tests.test_cache)
Failed doctest test for ZEO.tests.test_cache.cache_simul_properly_handles_load_miss_after_eviction_and_inval
  File "/home/abuild/rpmbuild/BUILD/python-ZEO-6.1-build/zeo-6.1/src/ZEO/tests/test_cache.py", line 1015, in cache_simul_properly_handles_load_miss_after_eviction_and_inval

----------------------------------------------------------------------
File "/home/abuild/rpmbuild/BUILD/python-ZEO-6.1-build/zeo-6.1/src/ZEO/tests/test_cache.py", line 1021, in ZEO.tests.test_cache.cache_simul_properly_handles_load_miss_after_eviction_and_inval
Failed example:
    cache = ZEO.cache.ClientCache('cache', 1<<21)
Exception raised:
    Traceback (most recent call last):
      File "/usr/lib64/python3.11/doctest.py", line 1355, in __run
        exec(compile(example.source, filename, "single",
      File "<doctest ZEO.tests.test_cache.cache_simul_properly_handles_load_miss_after_eviction_and_inval[1]>", line 1, in <module>
        cache = ZEO.cache.ClientCache('cache', 1<<21)
      File "/home/abuild/rpmbuild/BUILD/python-ZEO-6.1-build/zeo-6.1/src/ZEO/cache.py", line 239, in __init__
        self._setup_trace(path)
      File "/home/abuild/rpmbuild/BUILD/python-ZEO-6.1-build/zeo-6.1/src/ZEO/cache.py", line 823, in _setup_trace
        _trace(0x00)
      File "/home/abuild/rpmbuild/BUILD/python-ZEO-6.1-build/zeo-6.1/src/ZEO/cache.py", line 814, in _trace
        pack(">iiH8s8s",
    struct.error: 'i' format requires -2147483648 <= number <= 2147483647
----------------------------------------------------------------------
File "/home/abuild/rpmbuild/BUILD/python-ZEO-6.1-build/zeo-6.1/src/ZEO/tests/test_cache.py", line 1022, in ZEO.tests.test_cache.cache_simul_properly_handles_load_miss_after_eviction_and_inval
Failed example:
    cache.store(p64(1), p64(1), None, b'x')
Exception raised:
    Traceback (most recent call last):
      File "/usr/lib64/python3.11/doctest.py", line 1355, in __run
        exec(compile(example.source, filename, "single",
      File "<doctest ZEO.tests.test_cache.cache_simul_properly_handles_load_miss_after_eviction_and_inval[2]>", line 1, in <module>
        cache.store(p64(1), p64(1), None, b'x')
    NameError: name 'cache' is not defined
----------------------------------------------------------------------

What version of Python and Zope/Addons I am using:

  • openSUSE-Tumbleweed 20260112
  • python-3.13
  • ZODB-6.1
  • zope.interface-7.2
  • zope.testing-6.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions