[pypy-issue] [issue1399] The datetime module appears to be old (and has some divergence from CPython)

Julian Berman tracker at bugs.pypy.org
Sun Feb 17 05:34:33 CET 2013


New submission from Julian Berman <Julian+PyPy at GrayVines.com>:

The following code performs differently on CPython and PyPy:

import decimal, datetime
datetime.datetime(decimal.Decimal(2012), 12, 12)

PyPy dies with a TypeError. It appears it's being overzealous with a type check 
in _check_time_fields.

More broadly though, the comment in lib_pypy/datetime.py seems to suggest that 
it's probably an old version copied from 2003 (it says "This was originally 
copied from the sandbox of the CPython CVS repository.
Thanks to Tim Peters for suggesting using it.") whereas as of 
http://bugs.python.org/issue7989 it seems that CPython now has a pure-python 
datetime library that could be used / backported to 2.7.

----------
messages: 5338
nosy: Julian, pypy-issue
priority: bug
status: unread
title: The datetime module appears to be old (and has some divergence from CPython)

________________________________________
PyPy bug tracker <tracker at bugs.pypy.org>
<https://bugs.pypy.org/issue1399>
________________________________________


More information about the pypy-issue mailing list