[issue45708] PEP 515-style formatting with underscores does not seem to work for Decimal

2021-11-05 Thread Sander Bollen
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

[issue45708] PEP 515-style formatting with underscores does not seem to work for Decimal

2021-11-04 Thread Sander Bollen
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"{Decimal('5000'):_}&

[issue43638] MacOS os.statvfs() has rollover for >4TB disks at each 4TB (32bit counter overflow?)

2021-03-29 Thread Sander
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#L948

[issue43638] MacOS os.statvfs() has rollover for >4TB disks at each 4TB (32bit counter overflow?)

2021-03-27 Thread Sander
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"

[issue43638] MacOS os.statvfs() has rollover for >4TB disks at each 4TB (32bit counter overflow?)

2021-03-27 Thread Sander
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

[issue40419] timeit CLI docs still mention old power sequence

2020-04-28 Thread Sander van Rijn
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

[issue40195] multiprocessing.Queue.put can fail silently due to pickle errors

2020-04-05 Thread Sander Land
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

[issue23885] urllib.quote horribly mishandles unicode as second parameter

2019-08-14 Thread Michael Sander
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 cache

[issue29215] pyport.h uses non C90-style comment

2017-01-09 Thread Sander Vrijders
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

[issue29215] pyport.h uses non C90-style comment

2017-01-09 Thread Sander Vrijders
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: error

[issue27431] Shelve pickle version error

2016-07-01 Thread Sander Steffann
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 3 since