In my previous article, I wrote that os.listdir(str) ignored silently undecodable filenames in Python 3.0 and that lying on the real content of a directory looks like a very bad idea.
Martin v. Löwis found a very smart solution to this problem: the surrogateescape error handler.
This …
Ten years ago, when Python 3.0 final was released, os.listdir(str) ignored silently undecodable filenames:
$ python3.0
>>> os.mkdir(b'x')
>>> open(b'x/nonascii\xff', 'w').close()
>>> os.listdir('x')
[]
You had to use bytes to see all filenames:
>>> os.listdir(b'x') [b'nonascii\xff']
If the locale is POSIX …
It took me 4 years to fix a nasty bug in the famous Python GIL (Global Interpreter Lock), one of the most critical part of Python. I had to dig the Git history to find a change made 26 years ago by Guido van Rossum: at this time, threads were …
Thanks to my latest change on time.perf_counter(), all Python 3.7 clocks now use nanoseconds as integer internally. It became possible to propose again my old idea of getting time as nanoseconds at Python level and so I wrote a new PEP 564 "Add new time functions with nanosecond …
Since 2012, I have been trying to convert all Python clocks to use internally nanoseconds. The last clock which still used floating point internally was time.perf_counter(). INADA Naoki's new importtime tool was an opportunity for me to have a new look on a tricky integer overflow issue.
My contributions to CPython during 2017 Q3 (july, august, september), Part 3 (funny bugs).
Previous report: My contributions to CPython during 2017 Q3: Part 2 (dangling threads).
Summary:
My contributions to CPython during 2017 Q3 (july, august, september), Part 2: "Dangling threads".
Previous report: My contributions to CPython during 2017 Q3: Part 1.
Next reports:
Summary:
My contributions to CPython during 2017 Q3 (july, august, september), Part 1.
Previous report: My contributions to CPython during 2017 Q2 (part1).
Next reports:
Summary:
I am working on the Python security for years, but I never wrote anything about that. Let's fix this!
I am part of the Python Security Response Team (PSRT): I get emails sent to security@python.org. I try to analyze each report to validate that the bug is …
I am currently at a CPython sprint 2017 at Facebook. We are discussing my idea of writing a new C API for CPython hiding implementation details and replacing macros with function calls.
This article tries to explain why the CPython C API needs to evolve.
© Victor Stinner 2016
Powered by Pelican