Issue2035
Created on 2013-03-26.06:20:34 by cht, last changed 2018-03-07.19:04:35 by jeff.allen.
msg7982 (view) |
Author: cht (cht) |
Date: 2013-03-26.06:20:34 |
|
In Python, "datetime.date.fromtimestamp(None)" raises TypeError, but in Jython, it returns as if "datetime.date.fromtimestamp(time.time())" was called.
|
msg7985 (view) |
Author: Santoso Wijaya (santa4nt) |
Date: 2013-04-01.02:26:22 |
|
It seems like the prototype module Lib/datetime.py no longer exists in CPython 2.7. `import datetime` loads specifically from a C module `lib-dynload/datetime.so`.
|
msg8670 (view) |
Author: Jim Baker (zyasoft) |
Date: 2014-06-18.17:46:57 |
|
Still present in trunk, with the different behavior reported
|
msg8671 (view) |
Author: Jim Baker (zyasoft) |
Date: 2014-06-18.17:47:20 |
|
Target beta 4
|
msg8678 (view) |
Author: Santoso Wijaya (santa4nt) |
Date: 2014-06-18.18:41:03 |
|
For reference:
Python 2.7.6 (default, Mar 22 2014, 22:59:56)
[GCC 4.8.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import datetime
>>> datetime
<module 'datetime' from '/usr/lib/python2.7/lib-dynload/datetime.x86_64-linux-gnu.so'>
>>> datetime.fromtimestamp(None)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute 'fromtimestamp'
|
msg8679 (view) |
Author: Santoso Wijaya (santa4nt) |
Date: 2014-06-18.18:42:40 |
|
Oops.
Python 2.7.6 (default, Mar 22 2014, 22:59:56)
[GCC 4.8.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import datetime
>>> datetime
<module 'datetime' from '/usr/lib/python2.7/lib-dynload/datetime.x86_64-linux-gnu.so'>
>>> datetime.date.fromtimestamp(None)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: a float is required
|
msg9112 (view) |
Author: Jim Baker (zyasoft) |
Date: 2014-10-06.13:46:55 |
|
This issue may be fixed in PyPy, so consider resyncing
|
msg9508 (view) |
Author: Jim Baker (zyasoft) |
Date: 2015-02-08.06:28:19 |
|
Not fixed in datetime from PyPy, which was synced as of https://hg.python.org/jython/rev/daa6bf9a14d5
|
msg9912 (view) |
Author: Jim Baker (zyasoft) |
Date: 2015-04-20.20:56:38 |
|
Need to look into this some more, especially given PyPy's divergence. Feature? or bug? ;)
|
|
Date |
User |
Action |
Args |
2018-03-07 19:04:35 | jeff.allen | set | milestone: Jython 2.7.2 -> |
2015-12-29 23:48:34 | zyasoft | set | milestone: Jython 2.7.1 -> Jython 2.7.2 |
2015-04-20 20:56:38 | zyasoft | set | messages:
+ msg9912 milestone: Jython 2.7.1 |
2015-02-08 06:28:19 | zyasoft | set | messages:
+ msg9508 |
2014-10-06 13:46:55 | zyasoft | set | messages:
+ msg9112 |
2014-10-06 12:39:40 | zyasoft | set | priority: high |
2014-06-18 18:42:40 | santa4nt | set | messages:
+ msg8679 title: datetime.date.fromtimestamp(None) should raise AttributeError -> datetime.date.fromtimestamp(None) should raise TypeError |
2014-06-18 18:41:04 | santa4nt | set | messages:
+ msg8678 title: datetime.date.fromtimestamp(None) should raise TypeError -> datetime.date.fromtimestamp(None) should raise AttributeError |
2014-06-18 17:47:20 | zyasoft | set | messages:
+ msg8671 |
2014-06-18 17:46:57 | zyasoft | set | resolution: accepted messages:
+ msg8670 nosy:
+ zyasoft |
2013-04-08 17:32:18 | fwierzbicki | set | nosy:
+ fwierzbicki |
2013-04-01 02:26:22 | santa4nt | set | type: behaviour messages:
+ msg7985 nosy:
+ santa4nt components:
+ Library, - None versions:
+ Jython 2.7, - Jython 2.5 |
2013-03-26 06:20:34 | cht | create | |
|