[issue35702] clock_gettime: Add new identifier CLOCK_UPTIME_RAW for Darwin

2019-01-09 Thread Ricardo F


New submission from Ricardo F :

Finally since the release of OSX 10.12 the equivalent from the FreeBSD and 
OpenBSD "CLOCK_UPTIME" is available on Darwin under the name "CLOCK_UPTIME_RAW":

CLOCK_UPTIME FreeBSD [1]:
Starts at zero when the kernel boots and increments monotonically in SI seconds 
while the machine is running.

CLOCK_UPTIME OpenBSD [2]:
Time whose absolute value is the time the system has been running and not 
suspended, providing accurate uptime measurement, both absolute and interval

CLOCK_UPTIME_RAW Darwin [3]:
Clock that increments monotonically, tracking the time since an arbitrary 
point, unaffected by frequency or time adjustments and not increment while the 
system is asleep.


It would be useful to have it available on time module [4] for this platform.

As the behaviour is equivalent, maybe it can be assigned to the existing 
time.CLOCK_UPTIME funtion.




Thanks,



[1] - https://www.freebsd.org/cgi/man.cgi?query=clock_gettime
[2] - https://man.openbsd.org/clock_gettime.2
[3] - http://www.manpagez.com/man/3/clock_gettime_nsec_np/
[4] - https://docs.python.org/3/library/time.htm

--
components: macOS
messages: 66
nosy: ned.deily, rfrail3, ronaldoussoren
priority: normal
severity: normal
status: open
title: clock_gettime: Add new identifier CLOCK_UPTIME_RAW for Darwin
type: enhancement

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



[issue18378] locale.getdefaultlocale() fails on Mac OS X with default language set to English

2019-01-10 Thread Ricardo F


Ricardo F  added the comment:

I still have this issue on MacOS Mojave 10.14

Python 3.7.2 (default, Dec 27 2018, 07:35:06)
[Clang 10.0.0 (clang-1000.11.45.5)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import locale
>>> locale.getdefaultlocale()
Traceback (most recent call last):
  File "", line 1, in 
  File 
"/usr/local/Cellar/python/3.7.2/Frameworks/Python.framework/Versions/3.7/lib/python3.7/locale.py",
 line 568, in getdefaultlocale
return _parse_localename(localename)
  File 
"/usr/local/Cellar/python/3.7.2/Frameworks/Python.framework/Versions/3.7/lib/python3.7/locale.py",
 line 495, in _parse_localename
raise ValueError('unknown locale: %s' % localename)
ValueError: unknown locale: UTF-8
>>>

$ locale
LANG=
LC_COLLATE="C"
LC_CTYPE="UTF-8"
LC_MESSAGES="C"
LC_MONETARY="C"
LC_NUMERIC="C"
LC_TIME="C"
LC_ALL=

--
nosy: +rfrail3

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