Sander Bollen added the comment:
Thanks for looking into this so swiftly!
As a user, I have found PEP515 to be worded a little ambiguously with regards
to formatting using underscores as thousands separators. While it enumerates a
collection of types as far as the constructor is concerned
New submission from Sander Bollen :
Hello,
It appears that Decimal does not support PEP-515 style formatting with
underscores as thousands separators.
```
>>> from decimal import Decimal
>>> f"{Decimal('5000'):,}"
'5,000'
>>> f"
Sander added the comment:
OK. What would be a solution from/for Python to get the correct available space
on a MacOS system?
In SABnzbd we implemented a workaround with a direct call to MacOS C lib's
statfs(). See
https://github.com/sabnzbd/sabnzbd/blob/develop/sabnzbd/filesystem.py
Sander added the comment:
Correction on typo in original post / to be clear:
>From the "df -m /Volumes/Frank/", Available is 19435615 in unity of 1MB
>blocks, so 19435615 MB. Which is 18.5 TB. All correctly reported by "df -m"
New submission from Sander :
MacOS BigSur (and older), python 3.9.2 (and older)
For disks >4TB, os.statvfs() shows a wrong value for available space: too low,
and always rollover at each 4TB.
As 4TB = 2^42, hypothesis: rollover in 32bit counter (with 10bit blocksize)
Example:
"df
New submission from Sander van Rijn :
The docs for the `timeit` CLI
(https://docs.python.org/3/library/timeit.html#cmdoption-timeit-h) still
mention that successive powers of 10 are tried. However, as this also uses the
`timeit.Timer.autorange()` function, it uses the new sequence 1, 2, 5
New submission from Sander Land :
The multiprocessing Queue uses a thread to pickle and send the object after a
call to put. When pickling fails (e.g. due to recursion depth) the exception is
not returned to the caller to .put but instead dumped on the screen, leaving
any multiprocessing
Michael Sander added the comment:
Couldn't this be fixed in a backwards compatible way by clearing the cache when
this type of error occurs? We can do this by wrapping the offending line with a
try/except, then checking to see if the cache is corrupted. If it is, then we
clear the cach
Sander Vrijders added the comment:
Okay, a bit conflicted about the following though. The changelog refers to
PEP7. This document indeed states that Python versions greater than or equal to
3.6 use C89 with several select C99 features, such as C++-style line comments.
But then below that it
New submission from Sander Vrijders:
I am writing C90 compliant code and am wrapping my C headers with SWIG, which
includes python3.6m/pyport.h. I've told my compiler to report all warnings as
errors. Compilation fails with the following error:
```
/usr/include/python3.6m/pyport.h:40:1:
New submission from Sander Steffann:
The "class shelve.Shelf(dict, protocol=None, writeback=False,
keyencoding='utf-8')" section still says "By default, version 0 pickles are
used to serialize values.". This is incorrect. The default version has been
11 matches
Mail list logo