[issue40174] HAVE_CLOCK_GETTIME not repected in pytime.c

2022-02-06 Thread Irit Katriel


Change by Irit Katriel :


--
stage: patch review -> resolved
status: pending -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40174] HAVE_CLOCK_GETTIME not repected in pytime.c

2022-01-30 Thread Irit Katriel


Irit Katriel  added the comment:

I'll close this in a week if there is no response. 

(It seems to have been abandoned by the OP after a minor code review 
disagreement if I understand their last comment.)

--
status: open -> pending

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40174] HAVE_CLOCK_GETTIME not repected in pytime.c

2022-01-29 Thread Irit Katriel


Irit Katriel  added the comment:

> For my information, is there a kind of committee or someone taking these 
> kinds of decisions or at least expressing rules as to the spirit in which 
> they should be made?


You can bring this up on the python-ideas mailing list if you want to pull in 
additional core developers into the discussion.

--
nosy: +iritkatriel

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40174] HAVE_CLOCK_GETTIME not repected in pytime.c

2020-04-05 Thread pmp-p


Change by pmp-p :


--
nosy: +pmpp

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40174] HAVE_CLOCK_GETTIME not repected in pytime.c

2020-04-05 Thread Jérôme

Jérôme  added the comment:

Yes, I get your meaning, and I totally agree with it, I was wondering what was 
the best way to do it, stay close to the cause, which would allow to more 
easily go along with changes, or put it in the configure file and warn the user 
as soon as possible... It was kind of a flip a coin decision in the end.

For my information, is there a kind of committee or someone taking these kinds 
of decisions or at least expressing rules as to the spirit in which they should 
be made?

On the same track, how can I find why someone wrote "
/* Various compilers have only certain posix functions */
/* XXX Gosh I wish these were all moved into pyconfig.h */
" in posixmodule.c? Is it just because no-one had the opportunity to do it and 
it is OK for me to do it?

"Fetchez la vache"

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40174] HAVE_CLOCK_GETTIME not repected in pytime.c

2020-04-05 Thread Roundup Robot


Change by Roundup Robot :


--
pull_requests: +18748
pull_request: https://github.com/python/cpython/pull/19385

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40174] HAVE_CLOCK_GETTIME not repected in pytime.c

2020-04-04 Thread STINNER Victor


STINNER Victor  added the comment:

Usually, what I did to use #error in the C code. Something like:

#ifdef MS_WINDOWS
...
#elif defined(...)
...
#else
#  error "your platform doesn't support monotonic clock"
#endif

I dislike relying on configure for that, it's too far from the actual 
implementation (like pymonotonic()).

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40174] HAVE_CLOCK_GETTIME not repected in pytime.c

2020-04-04 Thread Jérôme

Jérôme  added the comment:

Hi,

I think it is nice to inform the user that clock_gettime is mandatory (just 
like pthreads, see PR). Can be nice for someone trying to port it to a new 
platform.

"It's no particularly silly, is it?"

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40174] HAVE_CLOCK_GETTIME not repected in pytime.c

2020-04-04 Thread Roundup Robot


Change by Roundup Robot :


--
keywords: +patch
nosy: +python-dev
nosy_count: 3.0 -> 4.0
pull_requests: +18736
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/19374

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40174] HAVE_CLOCK_GETTIME not repected in pytime.c

2020-04-04 Thread STINNER Victor


STINNER Victor  added the comment:

Python has a long history (30 years). time.time() had multiple implementations. 
When I added time.monotonic() in Python 3.3, it was optional. I changed that in 
Python 3.5: time.monotonic() is now always available.
https://docs.python.org/dev/library/time.html#time.monotonic

time.monotonic() has multiple implementations:

* Windows: GetTickCount64()
* macOS (Darwin): mach_absolute_time()
* HP-UX: gethrtime()
* Solaris: clock_gettime(CLOCK_HIGHRES)
* Otherwise: clock_gettime(CLOCK_MONOTONIC)

So far (since Python 3.5), no one complained about build error on any platform. 
It looks safe in practice to expect clock_gettime() to be available.

I suggest to close this issue, and only change the code is Python fails to 
build on a specific platform.

By the way, glibc 2.31 release notes: "We plan to remove the obsolete function 
ftime, and the header , in a future version of glibc."

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40174] HAVE_CLOCK_GETTIME not repected in pytime.c

2020-04-04 Thread Jérôme

Jérôme  added the comment:

Hi, 
OK, I was looking at the wrong line numbers, the problem is still there and as 
follows.
You might call me a perfectionist, but if HAVE_CLOCK_GETTIME is not defined, 
the function pytime_fromtimespec is taken out by the preprocessor, but still 
called  by the function pymonotonic, so python does not compile.
I'm thinking of two ways to go, either stop configure if HAVE_CLOCK_GETTIME is 
not defined, or rewrite the function differently (I don't know how badly a 
truly monotonic clock is needed).
It does feel strange to me to partially only honor HAVE_CLOCK_GETTIME.

"With government backing, I could make it very silly"

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40174] HAVE_CLOCK_GETTIME not repected in pytime.c

2020-04-04 Thread Jérôme

Jérôme  added the comment:

Hold on, this was the case with Python 3.8.2, but I just checked Github and the 
code is different! I'll have to check again with HEAD, and sorry if it was 
fixed!

"Drop your panties sir William, I cannot wait till lunchtime".

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40174] HAVE_CLOCK_GETTIME not repected in pytime.c

2020-04-03 Thread STINNER Victor


Change by STINNER Victor :


--
nosy: +vstinner

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40174] HAVE_CLOCK_GETTIME not repected in pytime.c

2020-04-03 Thread Benjamin Peterson


Benjamin Peterson  added the comment:

Does this cause a problem? At this point, it might be preferable to just assume 
clock_gettime exists on POSIX systems.

--
nosy: +benjamin.peterson

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40174] HAVE_CLOCK_GETTIME not repected in pytime.c

2020-04-03 Thread Jérôme

New submission from Jérôme :

Hi,

In the file Python/pytime.c (line 886 and others), functions and constants that 
I infer should be declared by HAVE_CLOCK_GETTIME are called without #ifdef.

Best regards,
Jérôme.

--
components: Interpreter Core
messages: 365703
nosy: jerome.hamm
priority: normal
severity: normal
status: open
title: HAVE_CLOCK_GETTIME not repected in pytime.c
type: compile error
versions: Python 3.8

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com