-
-
Notifications
You must be signed in to change notification settings - Fork 30.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gh-121035: Update logging flow chart to include lastResort #121036
Conversation
Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool. If this change has little impact on Python users, wait for a maintainer to apply the |
ae0d1dd
to
ec93c98
Compare
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. |
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. |
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! |
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. |
I'm working on embedding the SVG in the page HTML properly, so that the font is the same as the surrounding page text. |
Quick work, it's coming along nicely. Things that occurred to me:
|
efa0237
to
fa836c7
Compare
How about "lastResort handler"? My thinking is that for someone unfamiliar with the |
One problem: The sphinx An alternative is to load the SVG with |
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
to
b1ce092
Compare
Then I think this is ready. |
Thank you very much for this! |
…handler. (pythonGH-121036) (cherry picked from commit 237baf4) Co-authored-by: Alexander Bessman <bessman@users.noreply.github.com>
…handler. (pythonGH-121036) (cherry picked from commit 237baf4) Co-authored-by: Alexander Bessman <bessman@users.noreply.github.com>
GH-121105 is a backport of this pull request to the 3.12 branch. |
GH-121106 is a backport of this pull request to the 3.13 branch. |
@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. |
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 |
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:
|
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. |
It's gzip'd XML. |
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. |
Thanks very much. |
📚 Documentation preview 📚: https://cpython-previews--121036.org.readthedocs.build/