My contributions to Python

Python Enhancement Proposals (PEP)

Lisf of my PEPs and PEPs I co-wrote.

Accepted PEPs

PEP Python Status Title
PEP 564 3.7 Final Add new time functions with nanosecond resolution (ex: time.time_ns())
PEP 546 2.7 Accepted Backport ssl.MemoryBIO and ssl.SSLObject to Python 2.7 – co-written with Cory Benfield
PEP 545 Final Python Documentation Translations – co-written with Juliend Palard and Naoki IANADA
PEP 524 3.6 Final Make os.urandom() blocking on Linux
PEP 509 3.6 Final Add a private version to dict
PEP 475 3.5 Final Retry system calls failing with EINTR – co-written with Charles-François Natali
PEP 454 3.4 Final Add a new tracemalloc module to trace Python memory allocations
PEP 446 3.4 Final Make newly created file descriptors non-inheritable
PEP 445 3.4 Final Add new APIs to customize Python memory allocators
PEP 418 3.3 Final Add monotonic time, performance counter, and process time functions

Draft PEPs

PEP Python Status Title
PEP 540 3.7 Draft Add a new UTF-8 mode

Rejected PEPs

PEP Python Status Title
PEP 511 3.6 Rejected API for code transformers
PEP 510 3.6 Rejected Specialize functions with guards
PEP 490 3.6 Rejected Chain exceptions at C level
PEP 433 3.x Superseded Easier suppression of file descriptor inheritance – supersed by my accepted PEP 446
PEP 416 3.3 Rejected Add a frozendict builtin type
PEP 410 3.3 Rejected Use decimal.Decimal type for timestamps
PEP 400 3.3 Deferred Deprecate codecs.StreamReader and codecs.StreamWriter

Other contributions to PEPs

  • PEP 460: I wrote the first version of the PEP 460 (bytes % args), then rewritten by Antoine Pitrou, to be later superseeded by the PEP 461 written by Ethan Furman.
  • PEP 471 (os.scandir): I helped Ben Hoyt to implement, test and benchmark his PEP 471

Major work

  • Python 3.6:
  • Python 3.5:
    • I added the following functions: os.get_blocking(fd) and os.set_blocking(fd). See issue #22054: Add os.get_blocking() and os.set_blocking() functions. I added these functions because it’s a common pattern in applications and signal.set_wakeup_fd() now raises an exception if the fd is blocking (I also added this check).
    • I worked with Charles-François Natali to implement the PEP 475: “Retry system calls failing with EINTR”. The implementation was much more complex than expected, like the implementation of socket.connect() which requires many syscalls (I refactored Modules/socketmodule.c for that).
    • I wrote the first version of the PEP 460 (bytes % args), then rewritten by Antoine Pitrou, to be later superseeded by the PEP 461 written by Ethan Furman.
    • I helped Ben Hoyt to implement, test and benchmark his PEP 471 (os.scandir)
    • On Windows, signal.set_wakeup_fd() now also supports socket handles.
    • The time.monotonic() function is now always available.
    • New API for C memory allocators to support also calloc()
    • The __name__ attribute of generator is now set from the function name, instead of being set from the code name. Use gen.gi_code.co_name to retrieve the code name. Generators also have a new __qualname__ attribute, the qualified name, which is now used for the representation of a generator (repr(gen)).
    • New private _PyTime API to handle timestamps with a resolution of 1 nanosecond.
    • os.urandom() now uses getrandom() on Linux 3.17 and newer, and getentropy() on OpenBSD 5.6 and newer.
    • New private _Py_CheckFunctionResult() function to ensure that the C API is used correctly when calling a C function.
    • Enhance Py_FatalError()
      • Display the current Python stack if an exception was raised but the exception has no traceback
      • Disable faulthandler if an exception was raised (before it was only disabled if no exception was raised)
      • To display the current Python stack, call PyGILState_GetThisThreadState() which works even if the GIL was released
      • Try to flush stdout and stderr.
    • Issue #23353: complex bug related to exception handling with generators
  • Python 3.4:
  • Python 3.3:
    • new faulthandler module
    • new time functions: time.monotonic, time.perf_counter, time.process_time (PEP 418)
  • Unicode support: most work done during development of Python 3.1-3.3
  • Early work on Unicode before Python 3 in the “Python 3000” branch
  • Fuzzing

Old contributions to Python

Accepted patches:

Pending patches: