Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#30264 closed Bug (fixed)

"OverflowError: timestamp out of range for platform time_t" test failure on 32-bit platforms

Reported by: Chris Lamb Owned by: Mariusz Felisiak
Component: Core (Other) Version: 2.2
Severity: Release blocker Keywords: overflow
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

In Debian we are seeing the following test failure on 32-bit platforms (not on 64-bit):

======================================================================
ERROR: test_parsing_year_less_than_70 (utils_tests.test_http.HttpDateProcessingTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3.7/unittest/case.py", line 59, in testPartExecutor
    yield
  File "/usr/lib/python3.7/unittest/case.py", line 615, in run
    testMethod()
  File "/build/python-django-2.2~beta1/tests/utils_tests/test_http.py", line 301, in test_parsing_year_less_than_70
    self.assertEqual(datetime.utcfromtimestamp(parsed), datetime(2050, 11, 6, 8, 49, 37))
OverflowError: timestamp out of range for platform time_t

This affects (at least) 2.2 beta 1 and was added in https://github.com/django/django/commit/6b7f1c2530784ed6c6c1826688faaa08e3f786d9.

Original filed by Andreas Beckmann at https://bugs.debian.org/924784

Change History (6)

comment:1 by Tim Graham, 5 years ago

Component: Testing frameworkCore (Other)
Severity: NormalRelease blocker
Triage Stage: UnreviewedAccepted
Version: master2.2

We should either skip the test on 32-bit or pick a smaller value.

comment:2 by Mariusz Felisiak, 5 years ago

Owner: changed from nobody to Mariusz Felisiak
Status: newassigned

comment:3 by Mariusz Felisiak, 5 years ago

Has patch: set

comment:4 by Simon Charette, 5 years ago

Triage Stage: AcceptedReady for checkin

comment:5 by GitHub <noreply@…>, 5 years ago

Resolution: fixed
Status: assignedclosed

In c9888bc8:

Fixed #30264 -- Fixed crash of test_parsing_year_less_than_70() on 32-bit systems.

Thanks Andreas Beckmann and Chris Lamb for the report.

comment:6 by Mariusz Felisiak <felisiak.mariusz@…>, 5 years ago

In 505785a:

[2.2.x] Fixed #30264 -- Fixed crash of test_parsing_year_less_than_70() on 32-bit systems.

Thanks Andreas Beckmann and Chris Lamb for the report.
Backport of c9888bc8ecb8943ef08090e3325dcbdac825eafc from master

Note: See TracTickets for help on using tickets.
Back to Top