[Python-modules-team] Bug#849652: Bug#849652: faker: FTBFS on 32-bit: ValueError: timestamp out of range for platform time_t
Brian May
bam at debian.org
Mon Jan 30 09:31:06 UTC 2017
To: debian-python mailing list
Help in fixing this RC bug would be appreciated. I have forwarded this
upstream, however need a quick fix for the Debian package (not sure but
suspect it might be too late for stretch).
Unfortunately, not sure where to start. I don't understand this
date_time_this_century() function that appears to be the cause of it.
Thanks
"Chris West (Faux)" <solo-debianbugs at goeswhere.com> writes:
> The package fails to build:
>
> FulROR: test_date_time_this_period (faker.tests.FactoryTestCase)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
> File "faker/tests/__init__.py", line 389, in test_date_time_this_period
> self.assertTrue(self._datetime_to_time(provider.date_time_this_century(before_now=False, after_now=True)) >= self._datetime_to_time(datetime.datetime.now()))
> File "faker/providers/date_time/__init__.py", line 403, in date_time_this_century
> return cls.date_time_between_dates(now, next_century_start, tzinfo)
> File "faker/providers/date_time/__init__.py", line 381, in date_time_between_dates
> datetime_to_timestamp(datetime_end),
> File "faker/providers/date_time/__init__.py", line 22, in datetime_to_timestamp
> return mktime(dt.timetuple())
> OverflowError: mktime argument out of range
>
> ======================================================================
> ERROR: test_date_time_this_period_with_tzinfo (faker.tests.FactoryTestCase)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
> File "faker/tests/__init__.py", line 418, in test_date_time_this_period_with_tzinfo
> provider.date_time_this_century(before_now=False, after_now=True, tzinfo=utc) >= datetime.datetime.now()
> File "faker/providers/date_time/__init__.py", line 403, in date_time_this_century
> return cls.date_time_between_dates(now, next_century_start, tzinfo)
> File "faker/providers/date_time/__init__.py", line 381, in date_time_between_dates
> datetime_to_timestamp(datetime_end),
> File "faker/providers/date_time/__init__.py", line 21, in datetime_to_timestamp
> dt = dt.astimezone(tzlocal())
> File "/usr/lib/python2.7/dist-packages/dateutil/tz/tz.py", line 99, in utcoffset
> if self._isdst(dt):
> File "/usr/lib/python2.7/dist-packages/dateutil/tz/tz.py", line 143, in _isdst
> return time.localtime(timestamp+time.timezone).tm_isdst
> ValueError: timestamp out of range for platform time_t
>
> ----------------------------------------------------------------------
> Ran 45 tests in 7.922s
>
> FAILED (errors=2)
> debian/rules:27: recipe for target 'override_dh_auto_test' failed
--
Brian May <bam at debian.org>
More information about the Python-modules-team
mailing list