Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

catch overflow error on 32bit platforms #300

Closed
dirkmueller opened this issue Mar 24, 2022 · 0 comments · Fixed by #299
Closed

catch overflow error on 32bit platforms #300

dirkmueller opened this issue Mar 24, 2022 · 0 comments · Fixed by #299
Milestone

Comments

@dirkmueller
Copy link
Contributor

on 32bit platforms the test on large timestamps fails like the following:

 itsdangerous/timed.py:128: in unsign
  ts_dt = self.timestamp_to_datetime(ts_int)
timed.py:47: in timestamp_to_datetime
  return datetime.fromtimestamp(ts, tz=timezone.utc)
 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
 
 cls = <class 'freezegun.api.FakeDatetime'>, t = 21959264258072993
 tz = datetime.timezone.utc
 
     @classmethod
     def fromtimestamp(cls, t, tz=None):
         if tz is None:
             return real_datetime.fromtimestamp(
                     t, tz=dateutil.tz.tzoffset("freezegun", cls._tz_offset())
                 ).replace(tzinfo=None)
 >       return datetime_to_fakedatetime(real_datetime.fromtimestamp(t, tz))
 E       OverflowError: timestamp out of range for platform time_t
 
 /usr/lib/python3.9/site-packages/freezegun/api.py:375: OverflowError

Environment:

  • Python version: 3.9 / 32bit
  • ItsDangerous version: 2.1.1
@davidism davidism added this to the 2.1.2 milestone Mar 24, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 8, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants