summaryrefslogtreecommitdiffstats
path: root/Misc
diff options
context:
space:
mode:
authorTim Peters <tim.peters@gmail.com>2004-06-20 02:50:16 (GMT)
committerTim Peters <tim.peters@gmail.com>2004-06-20 02:50:16 (GMT)
commit1b6f7a9057874ecd2793059f210de87837fe1911 (patch)
tree950e95d9866258870fc075706b99de3fcfbf2e72 /Misc
parent1c3fa18be76d1bcddb2de516913f46a32c5ed860 (diff)
downloadcpython-1b6f7a9057874ecd2793059f210de87837fe1911.zip
cpython-1b6f7a9057874ecd2793059f210de87837fe1911.tar.gz
cpython-1b6f7a9057874ecd2793059f210de87837fe1911.tar.bz2
Bug 975996: Add _PyTime_DoubleToTimet to C API
New include file timefuncs.h exports private API function _PyTime_DoubleToTimet() from timemodule.c. timemodule should export some other functions too (look for painful bits in datetimemodule.c). Added insane-argument checking to datetime's assorted fromtimestamp() and utcfromtimestamp() methods. Added insane-argument tests of these to test_datetime, and insane-argument tests for ctime(), localtime() and gmtime() to test_time.
Diffstat (limited to 'Misc')
-rw-r--r--Misc/NEWS15
1 files changed, 12 insertions, 3 deletions
diff --git a/Misc/NEWS b/Misc/NEWS
index b3096ca..f2b65e6 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -228,9 +228,13 @@ Core and builtins
Extension modules
-----------------
-- time module code that deals with time_t timestamps will now raise a
- ValueError if more than a second is lost in precision from time_t being less
- precise than a double. Closes bug #919012.
+- time module code that deals with input POSIX timestamps will now raise
+ ValueError if more than a second is lost in precision when the
+ timestamp is cast to the platform C time_t type. There's no chance
+ that the platform will do anything sensible with the result in such
+ cases. This includes ctime(), localtime() and gmtime(). Assorted
+ fromtimestamp() and utcfromtimestamp() methods in the datetime module
+ were also protected. Closes bugs #919012 and 975996.
- fcntl.ioctl now warns if the mutate flag is not specified.
@@ -555,6 +559,11 @@ Build
C API
-----
+- Private function _PyTime_DoubleToTimet added, to convert a Python
+ timestamp (C double) to platform time_t with some out-of-bounds
+ checking. Declared in new header file timefuncs.h. It would be
+ good to expose some other internal timemodule.c functions there.
+
- New public functions PyEval_EvaluateFrame and PyGen_New to expose
generator objects.