You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using aiohttp on an embedded system (ARM v6) and this has a 32bit implementation of the unix time stamp in its libc. So the latest date to be calculated is 03:14:07 UTC on Tuesday, 19 January 2038 (see Y2K38 problem). cookiejar.py uses a date far in the future which is 1. January 2100 for MAX_TIME constant via time.mktime which depends on the underlying mktime from libc
As I don't see a reason for this far future 1. January of 2038 seems to be enough. Also using 2208985261.0 which is the result of time.mktime would do the same job.
Expected behaviour
Using aiohttp without OverflowError
Actual behaviour
Getting OverflowError on import aiohttp:
Python 3.5.2+ (default, Aug 30 2016, 19:08:42)
[GCC 6.1.1 20160802] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import aiohttp
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python3.5/dist-packages/aiohttp/__init__.py", line 11, in <module>
from .connector import * # noqa
File "/usr/local/lib/python3.5/dist-packages/aiohttp/connector.py", line 17, in <module>
from .client import ClientRequest
File "/usr/local/lib/python3.5/dist-packages/aiohttp/client.py", line 20, in <module>
from .cookiejar import CookieJar
File "/usr/local/lib/python3.5/dist-packages/aiohttp/cookiejar.py", line 14, in <module>
class CookieJar(AbstractCookieJar):
File "/usr/local/lib/python3.5/dist-packages/aiohttp/cookiejar.py", line 30, in CookieJar
MAX_TIME = time.mktime((2040, 1, 1, 1, 1, 1, 1, 1, 1,)) # so far in future
OverflowError: mktime argument out of range
Steps to reproduce
import aiohttp on a system with 32bit unix timestamp
Your environment
In the moment a raspberry pi with debian stretch.
The text was updated successfully, but these errors were encountered:
* Update cookiejar.py
Fixeing issue #1188 . mktime depends on the underlying mktime from libc and on some embedded systems it uses only a 32bit time stamp which is reaching only to year 2038.
* Update CONTRIBUTORS.txt
* Update cookiejar.py
Fixeing issue #1188 . mktime depends on the underlying mktime from libc and on some embedded systems it uses only a 32bit time stamp which is reaching only to year 2038.
* Update CONTRIBUTORS.txt
Long story short
I'm using aiohttp on an embedded system (ARM v6) and this has a 32bit implementation of the unix time stamp in its libc. So the latest date to be calculated is 03:14:07 UTC on Tuesday, 19 January 2038 (see Y2K38 problem). cookiejar.py uses a date far in the future which is 1. January 2100 for MAX_TIME constant via time.mktime which depends on the underlying mktime from libc
As I don't see a reason for this far future 1. January of 2038 seems to be enough. Also using 2208985261.0 which is the result of time.mktime would do the same job.
Expected behaviour
Using aiohttp without OverflowError
Actual behaviour
Getting OverflowError on import aiohttp:
Steps to reproduce
import aiohttp on a system with 32bit unix timestamp
Your environment
In the moment a raspberry pi with debian stretch.
The text was updated successfully, but these errors were encountered: