model-writtenrun 1426 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Peter Eisentraut proposed four PL/Python cleanup patches as preparation for future thread-safety work, separating global initialization in _PG_init() from module initialization in PyInit_plpy() and removing obsolete code and redundant references #1.
- Chao Li endorsed the series but questioned plural error wording, while Matheus Alcantara approved three patches and requested clarification of exception reference ownership #2 #3.
- Peter submitted a revised series explaining that PyModule_AddObject() steals a reference and that returning the exception requires another reference, also fixing the error wording; Matheus then agreed the explanation and code were correct #4 #5 #6.
- Carol reviewed the revised series and suggested checking the dictionary-insertion return value directly, while Kirill Reshke approved its first three patches and questioned why initialization retained a local main_dict variable #7 #8.
- The first three patches from #4 landed with identical code diffs as the obsolete-code removal 8cb95a0645, reference-handling cleanup 34d8111c3a, and duplicate-module-creation removal 3263a893fb.
- The initialization patch from #4 landed as da265a8717 with direct dictionary-insertion error checking, a main_dict null check, revised error messages, and later main_mod release; Peter announced that all patches were committed and explained his adaptation of Carol's suggestion #9.
- Peter closed the discussion by retaining main_dict locally until construction finished, explaining that this avoids exposing partial state and makes the transition from a borrowed reference to an owned global reference explicit; all four patches had landed #10.