[issue22117] Rewrite pytime.h to work on nanoseconds

2019-07-04 Thread Jeroen Demeyer
Change by Jeroen Demeyer : -- pull_requests: +14405 pull_request: https://github.com/python/cpython/pull/11636 ___ Python tracker ___

[issue22117] Rewrite pytime.h to work on nanoseconds

2019-06-05 Thread STINNER Victor
STINNER Victor added the comment: > Right, but my question was very specifically about a test added for this > issue. This issue is about nanoseconds. I looked again and I found the commit https://hg.python.org/cpython/rev/b0b4c4d365b1 related to this issue. So to reply to your question,

[issue22117] Rewrite pytime.h to work on nanoseconds

2019-06-05 Thread Jeroen Demeyer
Jeroen Demeyer added the comment: Right, but my question was very specifically about a test added for this issue. So asking it here first made sense to me. If nobody would reply, I could still ask somewhere else. In the end, Petr solved the problem anyway, so the question is irrelevant now.

[issue22117] Rewrite pytime.h to work on nanoseconds

2019-06-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Because this reduces the number of people which can notice your comment. Active core developers receive too much messages. Currently I have 473 unread messages from b.p.o (out of 22425) and 299 unread messages from GitHub (out of 20476). And this is only

[issue22117] Rewrite pytime.h to work on nanoseconds

2019-06-05 Thread Jeroen Demeyer
Jeroen Demeyer added the comment: > Commenting closed issues is not the most efficient way to get an answer ;-) Serious question: why is that? I got an email from bugs.python.org with your comment, so why should commenting on closed issues be any worse than commenting on open issues?

[issue22117] Rewrite pytime.h to work on nanoseconds

2019-06-05 Thread STINNER Victor
STINNER Victor added the comment: @Jeroen Demeyer: Both mentionned PRs are merged, so I understand that you found your answer. Commenting closed issues is not the most efficient way to get an answer ;-) -- ___ Python tracker

[issue22117] Rewrite pytime.h to work on nanoseconds

2019-05-29 Thread Jeroen Demeyer
Jeroen Demeyer added the comment: Petr claims to have a fix, https://github.com/python/cpython/pull/13665 -- ___ Python tracker ___

[issue22117] Rewrite pytime.h to work on nanoseconds

2019-05-29 Thread Jeroen Demeyer
Jeroen Demeyer added the comment: Can somebody here explain the meaning of the comment in test_gdb.py # Tested function must not be defined with METH_NOARGS or METH_O, # otherwise call_function() doesn't call PyCFunction_Call() This test is breaking with PEP 590, see

[issue22117] Rewrite pytime.h to work on nanoseconds

2018-12-17 Thread miss-islington
miss-islington added the comment: New changeset c367d52a74781b2c9ffd9e29722fbdfc0234408c by Miss Islington (bot) in branch '3.7': bpo-23451: Update time.monotonic() documentation (GH-11190) https://github.com/python/cpython/commit/c367d52a74781b2c9ffd9e29722fbdfc0234408c -- nosy:

[issue22117] Rewrite pytime.h to work on nanoseconds

2018-12-17 Thread miss-islington
Change by miss-islington : -- pull_requests: +10431 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue22117] Rewrite pytime.h to work on nanoseconds

2018-12-17 Thread STINNER Victor
STINNER Victor added the comment: New changeset 3ab064e80a9be1e6e9c62437fffb92bde9c5e1fb by Victor Stinner in branch 'master': bpo-23451: Update time.monotonic() documentation (GH-11190) https://github.com/python/cpython/commit/3ab064e80a9be1e6e9c62437fffb92bde9c5e1fb --

[issue22117] Rewrite pytime.h to work on nanoseconds

2018-12-17 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +10429 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue22117] Rewrite pytime.h to work on nanoseconds

2017-04-13 Thread Benjamin Peterson
Changes by Benjamin Peterson : -- pull_requests: +1245 ___ Python tracker ___ ___

[issue22117] Rewrite pytime.h to work on nanoseconds

2015-04-20 Thread koobs
Changes by koobs koobs.free...@gmail.com: -- nosy: +koobs ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22117 ___ ___ Python-bugs-list mailing

[issue22117] Rewrite pytime.h to work on nanoseconds

2015-04-06 Thread Roundup Robot
Roundup Robot added the comment: New changeset af664f48b9b8 by Victor Stinner in branch 'default': Issue #22117: Fix sock_call_ex() for non-blocking socket https://hg.python.org/cpython/rev/af664f48b9b8 -- ___ Python tracker rep...@bugs.python.org

[issue22117] Rewrite pytime.h to work on nanoseconds

2015-04-03 Thread Roundup Robot
Roundup Robot added the comment: New changeset d976683671ba by Victor Stinner in branch 'default': Issue #22117: Add a new _PyTime_FromSeconds() function https://hg.python.org/cpython/rev/d976683671ba -- ___ Python tracker rep...@bugs.python.org

[issue22117] Rewrite pytime.h to work on nanoseconds

2015-04-01 Thread Roundup Robot
Roundup Robot added the comment: New changeset 65ac8e587bb0 by Victor Stinner in branch 'default': Issue #22117, issue #23485: Fix _PyTime_AsMilliseconds() and https://hg.python.org/cpython/rev/65ac8e587bb0 -- ___ Python tracker

[issue22117] Rewrite pytime.h to work on nanoseconds

2015-03-31 Thread Roundup Robot
Roundup Robot added the comment: New changeset dbc92a254173 by Victor Stinner in branch 'default': Issue #22117: Fix integer overflow check in socket_parse_timeout() on Windows https://hg.python.org/cpython/rev/dbc92a254173 -- ___ Python tracker

[issue22117] Rewrite pytime.h to work on nanoseconds

2015-03-30 Thread STINNER Victor
STINNER Victor added the comment: Serhiy Storchaka added the comment: May be rename _PyTime_AsTimeval_impl() to _PyTime_AsTimeval_noraise() and check a result to raise an exception in _PyTime_AsTimeval()? Ah yes correct, can you modify directly the code please? --

[issue22117] Rewrite pytime.h to work on nanoseconds

2015-03-30 Thread Roundup Robot
Roundup Robot added the comment: New changeset e00b581a65ec by Victor Stinner in branch 'default': Issue #22117: Try to fix rounding in conversion from Python double to _PyTime_t https://hg.python.org/cpython/rev/e00b581a65ec -- ___ Python tracker

[issue22117] Rewrite pytime.h to work on nanoseconds

2015-03-30 Thread STINNER Victor
STINNER Victor added the comment: Hum, conversion from Python float to _PyTime_t is not rounded as expected on x86 Ubuntu Shared 3.x. Example: http://buildbot.python.org/all/builders/x86%20Ubuntu%20Shared%203.x/builds/11426/steps/test/logs/stdio

[issue22117] Rewrite pytime.h to work on nanoseconds

2015-03-30 Thread STINNER Victor
STINNER Victor added the comment: Oh, test_time now pass on x86 Ubuntu Shared 3.x. It looks like the volatile keyword was enough to fix rounding issues, cool :-) -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org

[issue22117] Rewrite pytime.h to work on nanoseconds

2015-03-29 Thread Roundup Robot
Roundup Robot added the comment: New changeset f6b41566ca28 by Victor Stinner in branch 'default': Issue #22117: Add _PyTime_ROUND_CEILING rounding method for timestamps https://hg.python.org/cpython/rev/f6b41566ca28 New changeset 0a8015a4ff97 by Victor Stinner in branch 'default': Issue

[issue22117] Rewrite pytime.h to work on nanoseconds

2015-03-29 Thread STINNER Victor
STINNER Victor added the comment: I rewrite the implementation of this issue 2 or 3 times. At the end, I decided to rewrite it again with a more incremental approach: add the new API, use the new API, and then drop slowly the old API. I was used to rewrite the implementation multiple times to

[issue22117] Rewrite pytime.h to work on nanoseconds

2015-03-29 Thread STINNER Victor
STINNER Victor added the comment: Ok, I'm quite API with the new API and I have what I need to rework the select module for the PEP 475, so I close this issue. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org

[issue22117] Rewrite pytime.h to work on nanoseconds

2015-03-29 Thread Roundup Robot
Roundup Robot added the comment: New changeset d938533b43f7 by Victor Stinner in branch 'default': Issue #22117: Fix usage of _PyTime_AsTimeval() https://hg.python.org/cpython/rev/d938533b43f7 New changeset 49d3ff81f31f by Victor Stinner in branch 'default': Issue #22117: Add assertions to

[issue22117] Rewrite pytime.h to work on nanoseconds

2015-03-29 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: May be rename _PyTime_AsTimeval_impl() to _PyTime_AsTimeval_noraise() and check a result to raise an exception in _PyTime_AsTimeval()? -- nosy: +serhiy.storchaka ___ Python tracker rep...@bugs.python.org

[issue22117] Rewrite pytime.h to work on nanoseconds

2015-03-29 Thread Roundup Robot
Roundup Robot added the comment: New changeset e93eeadef0c3 by Victor Stinner in branch 'default': Issue #22117: Use the _PyTime_t API in _datetime.datetime() constructor https://hg.python.org/cpython/rev/e93eeadef0c3 New changeset b16fc95b66e4 by Victor Stinner in branch 'default': Issue

[issue22117] Rewrite pytime.h to work on nanoseconds

2015-03-29 Thread Roundup Robot
Roundup Robot added the comment: New changeset 626575d756da by Victor Stinner in branch 'default': Issue #22117: Fix rounding and implement _PyTime_ROUND_FLOOR in: https://hg.python.org/cpython/rev/626575d756da New changeset c26b4b85dfc4 by Victor Stinner in branch 'default': Issue #22117: Fix

[issue22117] Rewrite pytime.h to work on nanoseconds

2015-03-29 Thread Roundup Robot
Roundup Robot added the comment: New changeset 6bae19f4e7b2 by Victor Stinner in branch 'default': Issue #22117: Fix rounding of fromtimestamp() methods of datetime.datetime and https://hg.python.org/cpython/rev/6bae19f4e7b2 -- ___ Python tracker

[issue22117] Rewrite pytime.h to work on nanoseconds

2015-03-27 Thread Roundup Robot
Roundup Robot added the comment: New changeset 2309597e7a00 by Victor Stinner in branch 'default': Issue #22117: Add a new Python timestamp format _PyTime_t to pytime.h https://hg.python.org/cpython/rev/2309597e7a00 -- nosy: +python-dev ___ Python

[issue22117] Rewrite pytime.h to work on nanoseconds

2015-03-27 Thread Roundup Robot
Roundup Robot added the comment: New changeset f64d0b99d405 by Victor Stinner in branch 'default': Issue #23451, #22117: Python 3.5 now requires Windows Vista or newer, so https://hg.python.org/cpython/rev/f64d0b99d405 -- ___ Python tracker

[issue22117] Rewrite pytime.h to work on nanoseconds

2015-03-27 Thread Roundup Robot
Roundup Robot added the comment: New changeset b0b4c4d365b1 by Victor Stinner in branch 'default': Issue #22117: Fix test_gdb for the new time.sleep() https://hg.python.org/cpython/rev/b0b4c4d365b1 -- ___ Python tracker rep...@bugs.python.org

[issue22117] Rewrite pytime.h to work on nanoseconds

2015-03-27 Thread Roundup Robot
Roundup Robot added the comment: New changeset 0378c10ba164 by Victor Stinner in branch 'default': Issue #22117: Fix rounding in _PyTime_FromSecondsObject() https://hg.python.org/cpython/rev/0378c10ba164 -- ___ Python tracker rep...@bugs.python.org

[issue22117] Rewrite pytime.h to work on nanoseconds

2015-03-27 Thread Roundup Robot
Roundup Robot added the comment: New changeset 45d9093d259d by Victor Stinner in branch 'default': Issue #22117: time.monotonic() now uses the new _PyTime_t API https://hg.python.org/cpython/rev/45d9093d259d New changeset a88735cbeb50 by Victor Stinner in branch 'default': Issue #22117:

[issue22117] Rewrite pytime.h to work on nanoseconds

2015-03-27 Thread Roundup Robot
Roundup Robot added the comment: New changeset f841d3bc30ee by Victor Stinner in branch 'default': Issue #23618, #22117: refactor socketmodule.c https://hg.python.org/cpython/rev/f841d3bc30ee New changeset ae551abe398d by Victor Stinner in branch 'default': Issue #22117: Write unit tests for

[issue22117] Rewrite pytime.h to work on nanoseconds

2015-03-27 Thread Roundup Robot
Roundup Robot added the comment: New changeset adbc9e6162fe by Victor Stinner in branch 'default': Issue #22117: The thread module uses the new _PyTime_t timestamp API https://hg.python.org/cpython/rev/adbc9e6162fe -- ___ Python tracker

[issue22117] Rewrite pytime.h to work on nanoseconds

2015-03-27 Thread Roundup Robot
Roundup Robot added the comment: New changeset 7605d9d262ca by Victor Stinner in branch 'default': Issue #22117: remove _PyTime_INTERVAL() macro https://hg.python.org/cpython/rev/7605d9d262ca New changeset d1ef5ff79125 by Victor Stinner in branch 'default': Issue #22117: Fix ssl to use

[issue22117] Rewrite pytime.h to work on nanoseconds

2015-03-27 Thread Roundup Robot
Roundup Robot added the comment: New changeset 930be74bbae5 by Victor Stinner in branch 'default': Issue #22117: Use the new _PyTime_t API in the select module https://hg.python.org/cpython/rev/930be74bbae5 New changeset 5aa39b88bd55 by Victor Stinner in branch 'default': Issue #22117: Use the

[issue22117] Rewrite pytime.h to work on nanoseconds

2015-03-27 Thread Roundup Robot
Roundup Robot added the comment: New changeset 0850452048ec by Victor Stinner in branch 'default': Issue #22117: Fix _PyTime_GetMonotonicClock() and https://hg.python.org/cpython/rev/0850452048ec -- ___ Python tracker rep...@bugs.python.org

[issue22117] Rewrite pytime.h to work on nanoseconds

2014-09-04 Thread STINNER Victor
STINNER Victor added the comment: And now, something completly different. nanosec-wip.patch is a work-in-progress patch to use a unified (64 bits) integer type to store a timestamp: _PyTime_t. The type is written to be opaque, the unit is undefined, you must use functions to convert from and

[issue22117] Rewrite pytime.h to work on nanoseconds

2014-08-31 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@gmail.com: Added file: http://bugs.python.org/file36512/pymonotonic-4.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22117 ___

[issue22117] Rewrite pytime.h to work on nanoseconds

2014-08-31 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@gmail.com: Removed file: http://bugs.python.org/file36512/pymonotonic-4.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22117 ___

[issue22117] Rewrite pytime.h to work on nanoseconds

2014-08-26 Thread Antoine Pitrou
Antoine Pitrou added the comment: Instead of a complex structure, we can use a 64-bit signed integer to store a number of nanoseconds. Do we have 64-bit integers on all architectures? -- nosy: +pitrou ___ Python tracker rep...@bugs.python.org

[issue22117] Rewrite pytime.h to work on nanoseconds

2014-08-26 Thread Martin v . Löwis
Martin v. Löwis added the comment: Am 26.08.14 15:32, schrieb Antoine Pitrou: Antoine Pitrou added the comment: Instead of a complex structure, we can use a 64-bit signed integer to store a number of nanoseconds. Do we have 64-bit integers on all architectures? On all supported

[issue22117] Rewrite pytime.h to work on nanoseconds

2014-08-26 Thread STINNER Victor
STINNER Victor added the comment: Do we have 64-bit integers on all architectures? That's a good question! Visual Studio provides __int64. GCC provides long long (64 bit on 32 bit platform). I guess that ICC also supports int64_t. It would be a shame to not support 64-bit integers in 2014,

[issue22117] Rewrite pytime.h to work on nanoseconds

2014-08-25 Thread STINNER Victor
STINNER Victor added the comment: The Linux kernel is going to use 64-bit integer even on 32-bit CPU to store timestamps, to simplify the code (to avoid the structure). Read this article: http://lwn.net/Articles/607741/ One of the first changes merged for 3.17 is to simply get rid of the

[issue22117] Rewrite pytime.h to work on nanoseconds

2014-08-24 Thread STINNER Victor
STINNER Victor added the comment: Instead of a complex structure, we can use a 64-bit signed integer to store a number of nanoseconds. For a UNIX epoch, nanoseconds since January 1st 1970, the min/max are: 1677-09-21 00:12:43.145224 2262-04-11 23:47:16.854776 The Linux kernel is going to use

[issue22117] Rewrite pytime.h to work on nanoseconds

2014-08-02 Thread Martin v . Löwis
Martin v. Löwis added the comment: What problem does this solve? -- nosy: +loewis ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22117 ___ ___

[issue22117] Rewrite pytime.h to work on nanoseconds

2014-08-02 Thread STINNER Victor
STINNER Victor added the comment: Tell me if you prefer to review shorter patches. I can try to only add new functions, then use new functions, and finally remove new functions. Oh, i should read what i wrote before pushing the submit button. The last part isremove the old functions...

[issue22117] Rewrite pytime.h to work on nanoseconds

2014-08-02 Thread STINNER Victor
STINNER Victor added the comment: Le samedi 2 août 2014, Martin v. Löwis rep...@bugs.python.org a écrit : What problem does this solve? My patch detects overflows which are not detected yet. Currently i guess that the behaviour on overflow is undefined. I should test each function. I also

[issue22117] Rewrite pytime.h to work on nanoseconds

2014-08-01 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@gmail.com: Added file: http://bugs.python.org/file36197/timespec-2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22117 ___

[issue22117] Rewrite pytime.h to work on nanoseconds

2014-08-01 Thread STINNER Victor
STINNER Victor added the comment: Here is a more complete patch (version 3). It uses _PyTimeSpec in more functions. I tested the patch on Linux, Windows, FreeBSD, OpenBSD. I was surprised to find bugs. For example, Windows has a time_t larger than long, whereas OpenBSD 5.4 (on 64 bit) has a

[issue22117] Rewrite pytime.h to work on nanoseconds

2014-08-01 Thread STINNER Victor
STINNER Victor added the comment: timespec-3.patch is quite large: Include/pyport.h | 14 + Include/pytime.h | 159 +++ Lib/test/test_time.py | 340 +++-- Modules/_datetimemodule.c | 40 ++ Modules/_ssl.c| 31 +-

[issue22117] Rewrite pytime.h to work on nanoseconds

2014-07-31 Thread STINNER Victor
New submission from STINNER Victor: To prepare Python to add support of monotonic clock in pytime.h, I propose to rewrite pytime.h to use a new _PyTimeSpec structure which has a resolution of 1 nanosecond on only work on integers. Currently, pytime.h uses a _PyTime_timeval structure which has

[issue22117] Rewrite pytime.h to work on nanoseconds

2014-07-31 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- type: - enhancement versions: +Python 3.5 -Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22117 ___

[issue22117] Rewrite pytime.h to work on nanoseconds

2014-07-31 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +belopolsky, tim.peters ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22117 ___ ___

[issue22117] Rewrite pytime.h to work on nanoseconds

2014-07-31 Thread STINNER Victor
STINNER Victor added the comment: Oh, I forgot to mention that the patch of the issue #22043 also changes _PyTimeSpec_get_time() to use clock_gettime(CLOCK_REALTIME) which has a resolution of 1 nanosecond. _PyTimeSpec_get_time() already uses GetSystemTimeAsFileTime() which has a resolution

[issue22117] Rewrite pytime.h to work on nanoseconds

2014-07-31 Thread STINNER Victor
STINNER Victor added the comment: The effective* resolution -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22117 ___ ___ Python-bugs-list