Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork34k
gh-121035: Update logging flow chart to include lastResort#121036
gh-121035: Update logging flow chart to include lastResort#121036vsajip merged 1 commit intopython:mainfrom
Conversation
ghost commentedJun 26, 2024 • edited by ghost
Loading Uh oh!
There was an error while loading.Please reload this page.
edited by ghost
Uh oh!
There was an error while loading.Please reload this page.
Most changes to Pythonrequire a NEWS entry. Add one using theblurb_it web app or theblurb command-line tool. If this change has little impact on Python users, wait for a maintainer to apply the |
ae0d1dd toec93c98Comparevsajip commentedJun 27, 2024
Thanks for this, but what process have you used? I've been thinking about replacing (or perhaps augmenting) this PNG file with something that's more easily modifiable, such as an SVG. |
bessman commentedJun 27, 2024
I edited it in GIMP. Not the most convenient workflow, indeed. If you prefer, I could look into recreating the flowchart as SVG in Inkscape or Dia. It won't look exactly the same, of course, but I'm sure I can get it reasonably close. |
vsajip commentedJun 27, 2024
That would be great. I think it needs to be a bit "nicer", style-wise, than the current iteration, which looks pretty old-fashioned and out of step with the overall documentation that surrounds it. If you think that's too much work, I'll understand! |
bessman commentedJun 27, 2024
I'm not much of a graphic designer, so I can't really execute on this without further guidance. Do you have an example of an image in the style you would like? For now, I have replaced the PNG with an SVG in the same style. I'll experiment a bit with font size and background to make sure it's readable. |
bessman commentedJun 27, 2024
I'm working on embedding the SVG in the page HTML properly, so that the font is the same as the surrounding page text. |
vsajip commentedJun 27, 2024
Quick work, it's coming along nicely. Things that occurred to me:
|
efa0237 tofa836c7Comparebessman commentedJun 27, 2024
How about "lastResort handler"? My thinking is that for someone unfamiliar with the |
bessman commentedJun 27, 2024 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
One problem: The sphinx An alternative is to load the SVG with |
vsajip commentedJun 27, 2024 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Maybe leave that for a later refinement? Accessibility is probably more important than a light/dark mismatch. To react to the theme selector would probably need a bit of javaScript. |
81841f9 tob1ce092Comparebessman commentedJun 27, 2024
Then I think this is ready. |
vsajip commentedJun 27, 2024
Thank you very much for this! |
…handler. (pythonGH-121036)(cherry picked from commit237baf4)Co-authored-by: Alexander Bessman <bessman@users.noreply.github.com>
…handler. (pythonGH-121036)(cherry picked from commit237baf4)Co-authored-by: Alexander Bessman <bessman@users.noreply.github.com>
GH-121105 is a backport of this pull request to the3.12 branch. |
GH-121106 is a backport of this pull request to the3.13 branch. |
vsajip commentedJul 1, 2024
@bessman I made some changes to the SVG to tweak elements positions and styles. I want to export the changed version to PNG, but the PNG I export from Inkscape has a transparent background. What tool did you end up using to create the SVG and PNG (including precise versions, and on which OS)? I modified the SVG by hand as I couldn't find a suitable tool that would make minimal changes to the SVG you created. |
vsajip commentedJul 1, 2024
There's still a pending issue of syncing with the theme selector, but I think that will require changes in the pydoc theme to e.g. add a class to the |
bessman commentedJul 2, 2024
I made it in Dia (v0.97+git from Ubuntu 20.04). Perhaps the .dia file should also be added to the repo? To create the PNG, I used Dia's export feature. However, after some experimentation I've found a way to do the conversion with imagemagick (6.9.10-23 Q16 x86_64 20190101) which achieves better compression:
|
vsajip commentedJul 2, 2024
Thanks for the info.
I've not used Dia, is the BTW I think I've now addressed the theme selector issue in#121254. Feel free to try it out. It's merged in the main branch, but not yet backported to 3.12/3.13. |
bessman commentedJul 2, 2024
It's gzip'd XML. |
vsajip commentedJul 2, 2024
bessman commentedJul 2, 2024
Well, in case it's helpful, here is the .dia file:logging_flow.xml.gz I had to change the suffix to .xml.gz for github to accept it. |
vsajip commentedJul 2, 2024
Thanks very much. |

Uh oh!
There was an error while loading.Please reload this page.
📚 Documentation preview 📚:https://cpython-previews--121036.org.readthedocs.build/