[issue13882] PEP 410: Use decimal.Decimal type for timestamps

2012-03-02 Thread STINNER Victor

STINNER Victor victor.stin...@gmail.com added the comment:

The PEP has been rejected, so I close the issue.

--
resolution:  - wont fix
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13882
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13882] PEP 410: Use decimal.Decimal type for timestamps

2012-02-17 Thread STINNER Victor

STINNER Victor victor.stin...@gmail.com added the comment:

TODO:
 - the conversion from Decimal to _PyTime_t does still use a cast to
float and so lose precision
 - the PEP must be accepted :-)

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13882
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13882] PEP 410: Use decimal.Decimal type for timestamps

2012-02-16 Thread STINNER Victor

STINNER Victor victor.stin...@gmail.com added the comment:

Patch version 18:
 - Fix a loss of precision in _PyTime_SetDenominator()
 - Add more tests on integer overflow

I also updated the patch adding datetime.datetime support because some people 
are interested by the type, even I don't think that it is interesting to add 
it. datetime.datetime is only usable with time.time(), os.*stat() and 
time.clock_gettime(), whereas it is incompatible with all other functions.

--
Added file: http://bugs.python.org/file24538/time_decimal-18.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13882
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13882] PEP 410: Use decimal.Decimal type for timestamps

2012-02-16 Thread STINNER Victor

Changes by STINNER Victor victor.stin...@gmail.com:


Removed file: http://bugs.python.org/file24505/time_decimal-17.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13882
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13882] PEP 410: Use decimal.Decimal type for timestamps

2012-02-16 Thread STINNER Victor

Changes by STINNER Victor victor.stin...@gmail.com:


Added file: http://bugs.python.org/file24539/timestamp_datetime-2.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13882
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13882] PEP 410: Use decimal.Decimal type for timestamps

2012-02-16 Thread STINNER Victor

Changes by STINNER Victor victor.stin...@gmail.com:


Removed file: http://bugs.python.org/file24414/timestamp_datetime.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13882
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13882] PEP 410: Use decimal.Decimal type for timestamps

2012-02-12 Thread STINNER Victor

STINNER Victor victor.stin...@haypocalc.com added the comment:

Patch version 15:
 - round correctly
 - datetime.date.fromtimestamp() and datetime.datetime.fromtimestamp() reuses 
_PyTime_t API to support decimal.Decimal without loss of precision
 - add more tests

--
Added file: http://bugs.python.org/file24495/time_decimal-15.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13882
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13882] PEP 410: Use decimal.Decimal type for timestamps

2012-02-12 Thread STINNER Victor

Changes by STINNER Victor victor.stin...@haypocalc.com:


Removed file: http://bugs.python.org/file24495/time_decimal-15.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13882
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13882] PEP 410: Use decimal.Decimal type for timestamps

2012-02-12 Thread STINNER Victor

STINNER Victor victor.stin...@haypocalc.com added the comment:

(Oops, I attached the wrong patch.)

--
Added file: http://bugs.python.org/file24496/time_decimal-15.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13882
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13882] PEP 410: Use decimal.Decimal type for timestamps

2012-02-12 Thread STINNER Victor

Changes by STINNER Victor victor.stin...@haypocalc.com:


Removed file: http://bugs.python.org/file24496/time_decimal-15.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13882
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13882] PEP 410: Use decimal.Decimal type for timestamps

2012-02-12 Thread STINNER Victor

STINNER Victor victor.stin...@haypocalc.com added the comment:

New try, set the version to 16 to avoid the confusion.

test_time is failing on Windows.

--
Added file: http://bugs.python.org/file24497/time_decimal-16.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13882
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13882] PEP 410: Use decimal.Decimal type for timestamps

2012-02-12 Thread STINNER Victor

STINNER Victor victor.stin...@gmail.com added the comment:

Here is the version 17 of my patch. This version is mostly complete and so can 
be reviewed. Summary of the patch:

 - Add a _PyTime_t structure to store any timestamp in any resolution, 
universal structure used by all functions manipulating timestamps instead of C 
double to avoid loss of precision
 - Add many functions to create timestamp (set _PyTime_t structure) or to get a 
timestamp in a specific format (int, float, Decimal, timeval or timespec 
structure, in milliseconds, etc.)
 - Round to nearest with ties going away from zero (rounding method called 
ROUND_HALF_UP in Decimal)
 - Functions creating timestamps get a new optional timestamp argument to 
specify the requested return type, e.g. time.time(timestamp=int) returns an int
 - Functions getting timestamps argument now also support decimal.Decimal
 - Raise an OverflowError instead of a ValueError if a timestamp cannot be 
stored in a C time_t type

The patch is huge, but as I wrote before, I will split it into smaller parts:

 - Add _PyTime_t API
 - Use the new API in the time module
 - Use the new API in the os module
 - etc.

Changes in the version 17 of my patch:

 - tested on Linux 32/64 bits, OpenBSD 64 bits, FreeBSD 64 bits, Windows 64 bits
 - fix portability issues (for various time_t and C long sizes)

--
Added file: http://bugs.python.org/file24505/time_decimal-17.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13882
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13882] PEP 410: Use decimal.Decimal type for timestamps

2012-02-12 Thread STINNER Victor

Changes by STINNER Victor victor.stin...@gmail.com:


Removed file: http://bugs.python.org/file24473/time_decimal-14.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13882
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13882] PEP 410: Use decimal.Decimal type for timestamps

2012-02-12 Thread STINNER Victor

Changes by STINNER Victor victor.stin...@gmail.com:


Removed file: http://bugs.python.org/file24497/time_decimal-16.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13882
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13882] PEP 410: Use decimal.Decimal type for timestamps

2012-02-09 Thread STINNER Victor

STINNER Victor victor.stin...@haypocalc.com added the comment:

Patch version 14:

 - rewrite the conversion from float to _PyTime_t: use base 2 with high 
precision and then simplify the fraction. The conversion from decimal.Decimal 
uses base 10 and do also simplify the fraction.
 - write tests on functions converting _PyTime_t using _testcapi
 - add timestamp argument to signal.getitimer(), signal.setitimer(), 
resource.getrusage()
 - signal.sigtimedwait() uses _PyTime_t and now expects a number and no more a 
tuple (function added to Python 3.3, so no backward compatibility issue). See 
also the issue #13964
 - time.sleep() uses _PyTime_t. See also the issue #13981 (use nanosleep())
 - datetime.datetime.now() and datetime.datetime.utcnow() uses _PyTime_t
 - catch integer overflow on _PyTime_AsTimeval(), _PyTime_AsTimespec() and more

This patch gives you an overview of the whole PEP 410 implementation, but it 
should not be applied in one shot. It would be better to commit it step by step:

 - add _PyTime_t API
 - use _PyTime_t for the time module
 - use _PyTime_t for the os module
 - use _PyTime_t for the more modules
 - etc.

We can start by adding the API and use it in the time module, and then 
rediscuss changes on other modules.

--
Added file: http://bugs.python.org/file24473/time_decimal-14.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13882
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13882] PEP 410: Use decimal.Decimal type for timestamps

2012-02-09 Thread STINNER Victor

Changes by STINNER Victor victor.stin...@haypocalc.com:


Removed file: http://bugs.python.org/file24461/time_decimal-13.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13882
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13882] PEP 410: Use decimal.Decimal type for timestamps

2012-02-08 Thread STINNER Victor

STINNER Victor victor.stin...@haypocalc.com added the comment:

Patch version 13:
 - os.utime(path) sets the access and modification time using the currenet time 
with a subsecond resolution (e.g. microsecond resolution on Linux)
 - os.*utime*() functions uses _PyTime_t type and functions
 - add many functions to manipulate timeval, timespec and FILETIME types with 
_PyTime_t, add _PyTime_SetDenominator() function for that
 - coding style: follow PEP 7 rules for braces

So more functions (including os.*utime*()) accept Decimal, but using an 
implicit conversion to float.

--
Added file: http://bugs.python.org/file24461/time_decimal-13.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13882
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13882] PEP 410: Use decimal.Decimal type for timestamps

2012-02-08 Thread STINNER Victor

Changes by STINNER Victor victor.stin...@haypocalc.com:


Removed file: http://bugs.python.org/file24445/time_decimal-11.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13882
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13882] PEP 410: Use decimal.Decimal type for timestamps

2012-02-08 Thread STINNER Victor

Changes by STINNER Victor victor.stin...@haypocalc.com:


Removed file: http://bugs.python.org/file24448/time_decimal-12.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13882
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13882] PEP 410: Use decimal.Decimal type for timestamps

2012-02-07 Thread STINNER Victor

STINNER Victor victor.stin...@haypocalc.com added the comment:

Updated patch (version 11).

--
Added file: http://bugs.python.org/file24445/time_decimal-11.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13882
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13882] PEP 410: Use decimal.Decimal type for timestamps

2012-02-07 Thread STINNER Victor

Changes by STINNER Victor victor.stin...@haypocalc.com:


Removed file: http://bugs.python.org/file24404/time_decimal-9.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13882
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13882] PEP 410: Use decimal.Decimal type for timestamps

2012-02-07 Thread STINNER Victor

Changes by STINNER Victor victor.stin...@haypocalc.com:


Removed file: http://bugs.python.org/file24407/time_decimal-10.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13882
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13882] PEP 410: Use decimal.Decimal type for timestamps

2012-02-07 Thread STINNER Victor

STINNER Victor victor.stin...@haypocalc.com added the comment:

os.stat().st_birthtime should depend on the timestamp argument.

A timestamp optional argument should also be added to os.wait3() and os.wait4() 
for the utime and stime fields of the rusage tuple.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13882
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13882] PEP 410: Use decimal.Decimal type for timestamps

2012-02-07 Thread STINNER Victor

STINNER Victor victor.stin...@haypocalc.com added the comment:

I created the issue #13964 to cleanup the API of os.*utime*() functions.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13882
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13882] PEP 410: Use decimal.Decimal type for timestamps

2012-02-07 Thread STINNER Victor

STINNER Victor victor.stin...@haypocalc.com added the comment:

fill_time() should use denominator=1 if the OS doesn't support timestamp with a 
subsecond resolution. See also issue #13964.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13882
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13882] PEP 410: Use decimal.Decimal type for timestamps

2012-02-07 Thread STINNER Victor

STINNER Victor victor.stin...@haypocalc.com added the comment:

Patch version 12:

 * os.stat().st_birthtime uses also the timestamp argument
 * Add an optional timestamp argument to os.wait3() and os.wait4(): change type 
of utime and stime attributes of the resource usage
 * os.stat() changes the timestamp resolution depending if nanosecond 
resolution is available or not

I realized that resource.getrusage() should also be modified. I will maybe do 
that in another version of the patch, or maybe change resource usage in another 
patch.

--
Added file: http://bugs.python.org/file24448/time_decimal-12.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13882
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13882] PEP 410: Use decimal.Decimal type for timestamps

2012-02-06 Thread STINNER Victor

STINNER Victor victor.stin...@haypocalc.com added the comment:

Hum, time_decimal-10.patch contains a debug message:

+print(la)

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13882
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13882] PEP 410: Use decimal.Decimal type for timestamps

2012-02-06 Thread STINNER Victor

STINNER Victor victor.stin...@haypocalc.com added the comment:

-return posix_do_stat(self, args, O:stat, STAT, U:stat, win32_stat_w);
+return posix_do_stat(self, args, kw, O|O:stat, STAT, U:stat, 
win32_stat_w);

The second format string should also be updated to U|O:stat.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13882
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13882] PEP 410: Use decimal.Decimal type for timestamps

2012-02-03 Thread STINNER Victor

STINNER Victor victor.stin...@haypocalc.com added the comment:

Patch version 10:
 - deprecate os.stat_float_times()
 - fix docstring of os.*stat() functions
 - add a reference to the PEP
 - add a comment to indicate that _PyTime_gettimeofday() ignores
integer overflow

--
Added file: http://bugs.python.org/file24407/time_decimal-10.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13882
___diff --git a/Doc/library/os.rst b/Doc/library/os.rst
--- a/Doc/library/os.rst
+++ b/Doc/library/os.rst
@@ -808,13 +808,16 @@ as internal buffering of data.
Availability: Unix.
 
 
-.. function:: fstat(fd)
+.. function:: fstat(fd, timestamp=None)
 
Return status for file descriptor *fd*, like :func:`~os.stat`.
 
Availability: Unix, Windows.
 
-.. function:: fstatat(dirfd, path, flags=0)
+   .. versionchanged:: 3.3
+  Added the *timestamp* argument.
+
+.. function:: fstatat(dirfd, path, flags=0, timestamp=float)
 
Like :func:`stat` but if *path* is relative, it is taken as relative to 
*dirfd*.
*flags* is optional and may be 0 or :data:`AT_SYMLINK_NOFOLLOW`.
@@ -1696,7 +1699,7 @@ Files and Directories
.. versionadded:: 3.3
 
 
-.. function:: lstat(path)
+.. function:: lstat(path, timestamp=None)
 
Perform the equivalent of an :c:func:`lstat` system call on the given path.
Similar to :func:`~os.stat`, but does not follow symbolic links.  On
@@ -1706,6 +1709,9 @@ Files and Directories
.. versionchanged:: 3.2
   Added support for Windows 6.0 (Vista) symbolic links.
 
+   .. versionchanged:: 3.3
+  The *timestamp* argument was added.
+
 
 .. function:: lutimes(path[, times])
 
@@ -1969,7 +1975,7 @@ Files and Directories
.. versionadded:: 3.3
 
 
-.. function:: stat(path)
+.. function:: stat(path, timestamp=None)
 
Perform the equivalent of a :c:func:`stat` system call on the given path.
(This function follows symlinks; to stat a symlink use :func:`lstat`.)
@@ -1989,6 +1995,11 @@ Files and Directories
* :attr:`st_ctime` - platform dependent; time of most recent metadata 
change on
  Unix, or the time of creation on Windows)
 
+   :attr:`st_atime`, :attr:`st_mtime` and :attr:`st_ctime` are :class:`float`
+   by default, or :class:`int` if :func:`os.stat_float_times` is ``False``. Set
+   the *timestamp* argument to get another :ref:`timestamp type
+   timestamp-types`.
+
On some Unix systems (such as Linux), the following attributes may also be
available:
 
@@ -2044,6 +2055,9 @@ Files and Directories
 
Availability: Unix, Windows.
 
+   .. versionchanged:: 3.3
+  Added the *timestamp* argument.
+
 
 .. function:: stat_float_times([newvalue])
 
@@ -2069,6 +2083,9 @@ Files and Directories
are processed, this application should turn the feature off until the 
library
has been corrected.
 
+   .. deprecated:: 3.3
+  Use *timestamp* argument of stat functions instead.
+
 
 .. function:: statvfs(path)
 
diff --git a/Doc/library/time.rst b/Doc/library/time.rst
--- a/Doc/library/time.rst
+++ b/Doc/library/time.rst
@@ -95,6 +95,14 @@ An explanation of some terminology and c
   | local time  | |
 |
   
+-+-+-+
 
+.. _timestamp-types:
+
+* Python supports the following timestamp types:
+
+  * :class:`int`
+  * :class:`float`
+  * :class:`decimal.Decimal`
+
 
 The module defines the following functions and data items:
 
@@ -119,7 +127,7 @@ The module defines the following functio
   trailing newline.
 
 
-.. function:: clock()
+.. function:: clock(timestamp=float)
 
.. index::
   single: CPU time
@@ -136,16 +144,27 @@ The module defines the following functio
:c:func:`QueryPerformanceCounter`. The resolution is typically better than 
one
microsecond.
 
+   Return as a floating point number by default, set the *timestamp* argument
+   to get another :ref:`timestamp type timestamp-types`.
 
-.. function:: clock_getres(clk_id)
+   .. versionchanged:: 3.3
+  Added the *timestamp* argument.
+
+
+.. function:: clock_getres(clk_id, timestamp=float)
 
Return the resolution (precision) of the specified clock *clk_id*.
+   Return a floating point number by default, set the *timestamp* argument to
+   get another :ref:`timestamp type timestamp-types`.
+
 
.. versionadded:: 3.3
 
-.. function:: clock_gettime(clk_id)
+.. function:: clock_gettime(clk_id, timestamp=float)
 
Return the time of the specified clock *clk_id*.
+   Return a floating point number by default, set the *timestamp* argument to
+   get another :ref:`timestamp type timestamp-types`.
 
.. versionadded:: 3.3
 
@@ -214,12 +233,15 @@ The module defines the following functio
flag is set to ``1`` when DST applies to the given time.
 
 
-.. function:: mktime(t)
+.. function:: mktime(t, timestamp=float)
 
This is 

[issue13882] PEP 410: Use decimal.Decimal type for timestamps

2012-02-03 Thread STINNER Victor

STINNER Victor victor.stin...@haypocalc.com added the comment:

Even if some people dislike the idea of adding datetime.datetime type, here is 
a patch implementing it (it requires time_decimal-XX.patch). The patch is at 
least a proof-of-concept that it is possible to change the internal structure 
without touching the public API.

Example:

$ ./python
 import datetime, os, time
 open(x, wb).close(); print(datetime.datetime.now())
2012-02-04 01:17:27.593834  

 print(os.stat(x, timestamp=datetime.datetime).st_ctime)   
  
2012-02-04 00:17:27.592284+00:00

 print(time.time(timestamp=datetime.datetime))   
 
2012-02-04 00:18:21.329012+00:00
 time.clock(timestamp=datetime.datetime)
ValueError: clock has an unspecified starting point
 print(time.clock_gettime(time.CLOCK_REALTIME, timestamp=datetime.datetime))
2012-02-04 00:21:37.815663+00:00
 print(time.clock_gettime(time.CLOCK_MONOTONIC, timestamp=datetime.datetime))
ValueError: clock has an unspecified starting point

As you can see: conversion to datetime.datetime fails with ValueError('clock 
has an unspecified starting point') for some functions, sometimes depending on 
the function argument (clock_gettime).

--
Added file: http://bugs.python.org/file24414/timestamp_datetime.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13882
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13882] PEP 410: Use decimal.Decimal type for timestamps

2012-02-02 Thread STINNER Victor

STINNER Victor victor.stin...@haypocalc.com added the comment:

As expected, size_t is too small on Windows 32 bits.

Patch version 8: _PyTime_t uses Py_LONG_LONG if available, instead of size_t, 
for numerator and denominator.

--
title: Add format argument for time.time(), time.clock(), ... to get a 
timestamp as a Decimal object - PEP 410: Use decimal.Decimal type for 
timestamps
Added file: http://bugs.python.org/file24402/time_decimal-8.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13882
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13882] PEP 410: Use decimal.Decimal type for timestamps

2012-02-02 Thread STINNER Victor

Changes by STINNER Victor victor.stin...@haypocalc.com:


Removed file: http://bugs.python.org/file24372/time_decimal-5.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13882
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13882] PEP 410: Use decimal.Decimal type for timestamps

2012-02-02 Thread STINNER Victor

Changes by STINNER Victor victor.stin...@haypocalc.com:


Removed file: http://bugs.python.org/file24396/time_decimal-7.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13882
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13882] PEP 410: Use decimal.Decimal type for timestamps

2012-02-02 Thread STINNER Victor

Changes by STINNER Victor victor.stin...@haypocalc.com:


Removed file: http://bugs.python.org/file24378/time_decimal-6.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13882
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13882] PEP 410: Use decimal.Decimal type for timestamps

2012-02-02 Thread STINNER Victor

STINNER Victor victor.stin...@haypocalc.com added the comment:

(Resend patch version 8 without the git diff format to support review on 
Rietveld.)

--
Added file: http://bugs.python.org/file24403/time_decimal-8.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13882
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13882] PEP 410: Use decimal.Decimal type for timestamps

2012-02-02 Thread STINNER Victor

Changes by STINNER Victor victor.stin...@haypocalc.com:


Removed file: http://bugs.python.org/file24403/time_decimal-8.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13882
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13882] PEP 410: Use decimal.Decimal type for timestamps

2012-02-02 Thread STINNER Victor

Changes by STINNER Victor victor.stin...@haypocalc.com:


Removed file: http://bugs.python.org/file24402/time_decimal-8.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13882
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13882] PEP 410: Use decimal.Decimal type for timestamps

2012-02-02 Thread STINNER Victor

STINNER Victor victor.stin...@haypocalc.com added the comment:

Oops, win32_pyclock() was disabled (for tests) in patch version 8. Fixed in 
version 9.

--
Added file: http://bugs.python.org/file24404/time_decimal-9.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13882
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com