[issue36205] Python 3.7 and 3.8 process_time is not reported correctly when built on older macOS versions

2019-08-27 Thread STINNER Victor
STINNER Victor added the comment: On PR 12287, Ned Deily wrote: > I still think it would be better to have a test for this case since the > problem embarrassingly went undetected for quite some time. But I'll let some > one else deal with it if they care to. test_time already contains a func

[issue36205] Python 3.7 and 3.8 process_time is not reported correctly when built on older macOS versions

2019-08-27 Thread Ronald Oussoren
Ronald Oussoren added the comment: @raymond, as to your question in msg350586: The release installers are generally build on the oldest release of the OS targeted by the installer. That's to ensure that the binaries actually work there. It should be possible to build on newer releases, but t

[issue36205] Python 3.7 and 3.8 process_time is not reported correctly when built on older macOS versions

2019-08-26 Thread STINNER Victor
STINNER Victor added the comment: Oh, nicely spotted Rajiv Vijayakumar and thanks for the fix! > instead of computing the total time as utime+stime, the code performs > utime+utime, which explains the doubling observed. Ooops, stupid me :-) I introduced the bug in: commit c29b585fd4b5a

[issue36205] Python 3.7 and 3.8 process_time is not reported correctly when built on older macOS versions

2019-08-26 Thread Ned Deily
Ned Deily added the comment: Thanks once again, Rajiv! Fix merged for release in 3.8.0b4 and 3.7.5. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue36205] Python 3.7 and 3.8 process_time is not reported correctly when built on older macOS versions

2019-08-26 Thread miss-islington
miss-islington added the comment: New changeset 91020fade6ca0f22eef2d338be1380b17385e715 by Miss Islington (bot) in branch '3.8': bpo-36205: Fix the rusage implementation of time.process_time() (GH-15538) https://github.com/python/cpython/commit/91020fade6ca0f22eef2d338be1380b17385e715

[issue36205] Python 3.7 and 3.8 process_time is not reported correctly when built on older macOS versions

2019-08-26 Thread miss-islington
miss-islington added the comment: New changeset 1bf672f53a83c471e6fc4599d2d5149fd6842ff2 by Miss Islington (bot) in branch '3.7': bpo-36205: Fix the rusage implementation of time.process_time() (GH-15538) https://github.com/python/cpython/commit/1bf672f53a83c471e6fc4599d2d5149fd6842ff2

[issue36205] Python 3.7 and 3.8 process_time is not reported correctly when built on older macOS versions

2019-08-26 Thread miss-islington
Change by miss-islington : -- pull_requests: +15218 pull_request: https://github.com/python/cpython/pull/15540 ___ Python tracker ___ __

[issue36205] Python 3.7 and 3.8 process_time is not reported correctly when built on older macOS versions

2019-08-26 Thread miss-islington
Change by miss-islington : -- pull_requests: +15217 stage: commit review -> patch review pull_request: https://github.com/python/cpython/pull/15539 ___ Python tracker ___ _

[issue36205] Python 3.7 and 3.8 process_time is not reported correctly when built on older macOS versions

2019-08-26 Thread Ned Deily
Ned Deily added the comment: New changeset 8bf5fef8737fdd12724b9340d76a4ed391c4ad8a by Ned Deily (vrajivk) in branch 'master': bpo-36205: Fix the rusage implementation of time.process_time() (GH-15538) https://github.com/python/cpython/commit/8bf5fef8737fdd12724b9340d76a4ed391c4ad8a ---

[issue36205] Python 3.7 and 3.8 process_time is not reported correctly when built on older macOS versions

2019-08-26 Thread Raymond Hettinger
Raymond Hettinger added the comment: Looks like the regression happened 2017-11-02 in commit c29b585fd4b -- ___ Python tracker ___

[issue36205] Python 3.7 and 3.8 process_time is not reported correctly when built on older macOS versions

2019-08-26 Thread Ned Deily
Ned Deily added the comment: Thanks, Rajiv, your diagnosis and fix in PR 15538 is indeed correct. -- assignee: vstinner -> ned.deily stage: patch review -> commit review ___ Python tracker __

[issue36205] Python 3.7 and 3.8 process_time is not reported correctly when built on older macOS versions

2019-08-26 Thread Rajiv Vijayakumar
Rajiv Vijayakumar added the comment: I think I have found the root cause - there appears to be a typo in the rusage implementation - instead of computing the total time as utime+stime, the code performs utime+utime, which explains the doubling observed. I have create a PR with the fix. My M

[issue36205] Python 3.7 and 3.8 process_time is not reported correctly when built on older macOS versions

2019-08-26 Thread Rajiv Vijayakumar
Change by Rajiv Vijayakumar : -- pull_requests: +15215 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/15538 ___ Python tracker ___

[issue36205] Python 3.7 and 3.8 process_time is not reported correctly when built on older macOS versions

2019-08-26 Thread Raymond Hettinger
Raymond Hettinger added the comment: I'm unclear on why our production release being built on macoS 10.11.x+ or earlier and why it using Clang 6.0 (clang-600.0.57). For me, Python builds fine (and does have this issue) on Mojave 10.14.6 using Clang 10.0.1 (clang-1001.0.46.4). ISTM that usi

[issue36205] Python 3.7 and 3.8 process_time is not reported correctly when built on older macOS versions

2019-08-26 Thread STINNER Victor
STINNER Victor added the comment: > process_time: namespace(adjustable=False, > implementation='clock_gettime(CLOCK_PROCESS_CPUTIME_ID)', monotonic=True, > resolution=1.0002e-06) Using CLOCK_PROCESS_CPUTIME_ID clock for time.process_time() looks good to me. I don't know why depe

[issue36205] Python 3.7 and 3.8 process_time is not reported correctly when built on older macOS versions

2019-08-25 Thread Ned Deily
Ned Deily added the comment: Raynmond: > Something in the release build process is triggering this behavior (perhaps > PGO). The difference is explained in msg33731. When 3.7+ is built on macoS 10.11.x+ and earlier, clock_gettime is not available and the PEP 564 refactored code falls back

[issue36205] Python 3.7 and 3.8 process_time is not reported correctly when built on older macOS versions

2019-08-24 Thread Raymond Hettinger
Raymond Hettinger added the comment: If it matters, I'm on Mojave 10.14.6 -- ___ Python tracker ___ ___ Python-bugs-list mailing li

[issue36205] Python 3.7 and 3.8 process_time is not reported correctly when built on older macOS versions

2019-08-24 Thread Raymond Hettinger
Raymond Hettinger added the comment: Something in the release build process is triggering this behavior (perhaps PGO). I observe the bug on the python.org official 3.8b3 release, official 3.7 release, but not in the official 3.6 release: $ python3.8 ~/time_compare.py Python ('v3.8.0b3:43362

[issue36205] Python 3.7 and 3.8 process_time is not reported correctly when built on older macOS versions

2019-08-23 Thread Łukasz Langa
Łukasz Langa added the comment: This is marked as a release blocker. The last beta is scheduled for Monday. Please decide how to proceed ASAP. -- priority: deferred blocker -> release blocker ___ Python tracker

[issue36205] Python 3.7 and 3.8 process_time is not reported correctly when built on older macOS versions

2019-03-25 Thread Łukasz Langa
Łukasz Langa added the comment: Looks like this will have to be broken for 3.8.0a3, too. I will mark this as a release blocker for a4 though. -- nosy: +lukasz.langa ___ Python tracker ___

[issue36205] Python 3.7 and 3.8 process_time is not reported correctly when built on older macOS versions

2019-03-24 Thread Ned Deily
Ned Deily added the comment: @vstinner, ping -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail

[issue36205] Python 3.7 and 3.8 process_time is not reported correctly when built on older macOS versions

2019-03-12 Thread Ned Deily
Ned Deily added the comment: *** tip of master built on current macOS 10.14 - correct results: 3.8.0a2+ (heads/master:f45813df52, Mar 12 2019, 12:25:58) [Clang 10.0.0 (clang-1000.11.45.5)] macOS-10.14.3-x86_64-i386-64bit monotonic: namespace(adjustable=False, implementation='ma

[issue36205] Python 3.7 and 3.8 process_time is not reported correctly when built on older macOS versions

2019-03-12 Thread STINNER Victor
STINNER Victor added the comment: Ah, or maybe use test.pythoninfo: $ ./python -m test.pythoninfo|grep -E '^(platform|time)' platform.architecture: 64bit ELF platform.libc_ver: glibc 2.28 platform.platform: Linux-4.20.13-200.fc29.x86_64-x86_64-with-glibc2.28 platform.python_implementation: CPy

[issue36205] Python 3.7 and 3.8 process_time is not reported correctly when built on older macOS versions

2019-03-12 Thread STINNER Victor
STINNER Victor added the comment: Sorry, I don't understand the problem. Can someone please give the result of these commands on Python 3.6 and 3.7 on macOS? Example on Linux (Fedora 29): $ python3 >>> import platform, time >>> platform.platform() 'Linux-4.20.13-200.fc29.x86_64-x86_64-with-

[issue36205] Python 3.7 and 3.8 process_time is not reported correctly when built on older macOS versions

2019-03-12 Thread Ned Deily
Ned Deily added the comment: Further investigation shows that several time related functions were added to macOS at 10.12 including clock_gettime. For older systems, timemodule.c falls back to using getrusage. With Python 3.6.x, that fallbacks correctly but it appears that refactoring introd

[issue36205] Python 3.7 and 3.8 process_time is not reported correctly when built on older macOS versions

2019-03-12 Thread Ned Deily
Change by Ned Deily : -- keywords: +patch pull_requests: +12267 stage: needs patch -> patch review ___ Python tracker ___ ___ Python

[issue36205] Python 3.7 and 3.8 process_time is not reported correctly when built on older macOS versions

2019-03-05 Thread Ned Deily
Ned Deily added the comment: Thanks for your report. There does indeed seem to be a problem but, as can be seen if you run your test from SO (please attach it to this issue!) with a current python.org 3.6.x installer for macOS which uses the same build infrastructure as the 3.7 and 3.8 inst