Weekly Report, November 1 - 7

Python 3.9.8 got released this week! At this point in the 3.9 lifecycle this should be a relatively uneventful release. Instead, it took us a few days of work to get it out of the door. I still managed to squeeze in 51 closed PRs and even organized a meeting between the core developers and Daan Leijen, the author of mimalloc.

Week in Numbers

  • issues: 6 closed
  • PRs: 3 authored, 51 closed, 6 reviewed
  • Python releases done: 1
  • meetings organized: 1

Highlights

macOS + Tcl/Tk

macOS builds of Python can either be regular POSIX-style builds or Framework builds. If you use CPython on macOS from Python.org installers or Homebrew or MacPorts, you use Framework builds. You can recognize them by using those byzantine directory structures:

So why do we need Framework builds for Python? Well, they enable us to start windowed applications, i.e. GUI applications. For my particular purpose, it enables me to run ttk_guionly tests that otherwise get conveniently skipped. I wanted to run them locally to investigate a reference leak found by our Windows 8.1 buildbot:

1:18:14 load avg: 7.10 [354/425/1] test_ttk_guionly failed (reference leak) (54.8 sec) -- running: test_tarfile (5 min 22 sec), test_multiprocessing_spawn (18 min 52 sec), test_unittest (34.2 sec)
beginning 6 repetitions
123456
......
test_ttk_guionly leaked [76, 76, 76] references, sum=228
test_ttk_guionly leaked [35, 35, 35] memory blocks, sum=105

Once I started running the GUI tests, it turned out that five of those downright fail on macOS, not just leak references. It took me a while to fix them which was later further improved by Serhiy as he likes to do with my code 😅. Having tests green allowed me to focus on the reference leak which I subsequently fixed too. Details in the PR about the root cause.

At the moment I’m working on macOS 10.15 Catalina on my 2018 Intel-powered 15” Macbook Pro. Since it recently suffered an "Up" key failure, I intend to convert it to an Intel Mac buildbot for CPython once I receive my new M1 Max-powered 14” Macbook Pro mid-December. I will then also be able to address other GUI-related issues we seem to still have on Monterey. Once those are addressed, our M1 Mac Mini buildbot donated by Cory Benfield will be flipped to run GUI tests, too. Can’t wait!

While I was fighting failing tests and reference leaks, it just so happens that Ned Deily with help from Marc Culler of the Tk project were fighting a different issue: Tcl/Tk 8.6.11 file dialogs were crashing on the newly released macOS 12 Monterey with any Python version. Happily, Python 3.9.8 and 3.11.0a2 both ship with a fix. The 3.10.0 macOS installer was also updated to bundle a fixed Tcl/Tk.

Meeting On Adopting mimalloc for CPython Between Core Devs and Daan Leijen

This week I also organized a meeting between the author of mimalloc and ten core developers about a potential adoption of mimalloc by Python. I haven’t gathered the meeting notes yet but there’s not much to report so far anyway.

In any case, mimalloc is a very interesting project, I highly recommend reading its Technical Report (pdf) as there’s quite a few surprises there.

Detailed Log

Monday

National holiday in Poland, working Saturday instead.

Tuesday

Issues:

PRs:

Wednesday

PRs:

Thursday

Issues:

PRs:

Friday

Python 3.9.8 released! Also: mimalloc meeting took place.

Issues:

PRs:

Saturday

Issues:

PRs:

#Python/Developer-in-Residence