My contributions to Python

Python 3.9 Contributions

  • New math.nextafter() and math.ulp() functions.
  • New os.waitstatus_to_exitcode(): convert a waitpid wait status to an exit code.
  • New random.randbytes() function.
  • Add –with-platlibdir option to the configure script and add sys.platlibdir attribute: used by Fedora and OpenSUSE Linux distributions to install files in /usr/lib64 rather than /usr/lib.
  • Remove tons of deprecated features and deprecated a few more functions.
  • C API Changes: new functions to access structure members, private functions removed or moved o the internal C API. Many macros converted to static inline functions.

Python 3.8 Contributions

Mentoring, bug triage permission, core developers

I promoted the following developers as core devs:

I gave the bug triage permission to:

Python Enhancement Proposals (PEP)

Lisf of my PEPs and PEPs I co-wrote.

Draft PEPs

PEP Python Status Title
PEP 620 3.10 Draft Hide implementation details from the C API

Accepted PEPs

PEP Python Status Title
PEP 587 3.8 Final Python Initialization Configuration
PEP 564 3.7 Final Add new time functions with nanosecond resolution (ex: time.time_ns())
PEP 545 Final Python Documentation Translations – co-written with Juliend Palard and Naoki IANADA
PEP 540 3.7 Final Add a new UTF-8 mode
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

Rejected PEPs

PEP Python Status Title
PEP 8015 Rejected Organization of the Python community
PEP 608 3.9 Rejected Coordinated Python release
PEP 606 3.9 Rejected Python Compatibility Version
PEP 546 2.7 Rejected Backport ssl.MemoryBIO and ssl.SSLObject to Python 2.7 – co-written with Cory Benfield
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)
  • Python 3.0 - 3.2
    • Major work on Unicode support to handle all platforms and all corner cases

Old contributions to Python

Fuzzing on Python using my fuzzer “Fusil”.

Accepted patches:

Other patches (fixed as well):