gh-124370: Add "howto" for free-threaded Python#124371
Conversation
This is a guide aimed at people writing Python code, as oppposed to the existing guide for C API extension authors.
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
gpshead
left a comment
There was a problem hiding this comment.
High level comments:
- Overall, great! I'm not reading it with an eye for what has been left out. But its a doc, I consider those "living" and future updates would deal with that.
- Perhaps include the word "experimental" in the top level title to help temper expectations?
- Consider adding a reference to PEP 703 to the doc for context for those interested in how this came to be and what the initial long term plan and expectations are.
- In the final Single-threaded performance section, I predict someone not aware of larger long term plans and PEP 703 and the earlier proof of concept work you built on top of a couple releases to freak out at the thought of a 40% slower interpreter. I'd go beyond the "This overhead is expected to be reduced in the Python 3.14." statement and indicate what level of free-threaded build performance delta we're ultimately aiming for in the future (without promising which version it happens in).
Sorry, something went wrong.
|
LGTM. +1 for @gpshead's comment about including some detail about what single-threaded performance delta we're ultimately shooting for. |
Sorry, something went wrong.
vstinner
left a comment
There was a problem hiding this comment.
LGTM. This HOWTO can be adjusted/elaborated later if needed.
Sorry, something went wrong.
nedbat
left a comment
There was a problem hiding this comment.
Thanks for doing this! I love that we are putting out information aimed at the users.
Sorry, something went wrong.
|
When you're done making the requested changes, leave the comment: |
Sorry, something went wrong.
Co-authored-by: mpage <mpage@cs.stanford.edu>
willingc
left a comment
There was a problem hiding this comment.
Looking good @colesbury. I made some wording suggestions that should add clarity for Ned and others.
Sorry, something went wrong.
Co-authored-by: Carol Willing <carolcode@willingconsulting.com>
willingc
left a comment
There was a problem hiding this comment.
Love the updates @colesbury. This how to is a nice addition 😄
Sorry, something went wrong.
|
@nedbat If you are good with today's change, please approve and merge. Nice work by @colesbury and everyone who gave feedback. Let's get this out in the wild and we can fine tune if/when needed. 🎉 |
Sorry, something went wrong.
* main: (69 commits) Add "annotate" SET_FUNCTION_ATTRIBUTE bit to dis. (python#124566) pythongh-124412: Add helpers for converting annotations to source format (python#124551) pythongh-119180: Disallow instantiation of ConstEvaluator objects (python#124561) For-else deserves its own section in the tutorial (python#123946) Add 3.13 as a version option to the crash issue template (python#124560) pythongh-123242: Note that type.__annotations__ may not exist (python#124557) pythongh-119180: Make FORWARDREF format look at __annotations__ first (python#124479) pythonGH-58058: Add quick reference for `ArgumentParser` to argparse docs (pythongh-124227) pythongh-41431: Add `datetime.time.strptime()` and `datetime.date.strptime()` (python#120752) pythongh-102450: Add ISO-8601 alternative for midnight to `fromisoformat()` calls. (python#105856) pythongh-124370: Add "howto" for free-threaded Python (python#124371) pythongh-121277: Allow `.. versionadded:: next` in docs (pythonGH-121278) pythongh-119400: make_ssl_certs: update reference test data automatically, pass in expiration dates as parameters python#119400 (pythonGH-119401) pythongh-119180: Avoid going through AST and eval() when possible in annotationlib (python#124337) pythongh-124448: Update Windows builds to use Tcl/Tk 8.6.15 (pythonGH-124449) pythongh-123884 Tee of tee was not producing n independent iterators (pythongh-124490) pythongh-124378: Update test_ttk for Tcl/Tk 8.6.15 (pythonGH-124542) pythongh-124513: Check args in framelocalsproxy_new() (python#124515) pythongh-101100: Add a table of class attributes to the "Custom classes" section of the data model docs (python#124480) Doc: Use ``major.minor`` for documentation distribution archive filenames (python#124489) ...
Thanks for writing down this guide @colesbury! It will be very valuable :-) |
Sorry, something went wrong.
|
Thanks @colesbury for the PR, and @nedbat for merging it 🌮🎉.. I'm working now to backport this PR to: 3.13. |
Sorry, something went wrong.
* pythongh-124370: Add "howto" for free-threaded Python This is a guide aimed at people writing Python code, as oppposed to the existing guide for C API extension authors. * Add missing new line * Update Doc/howto/free-threading-python.rst Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com> * interned -> immortalized * Apply suggestions from code review Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> * Update Doc/howto/free-threading-python.rst Co-authored-by: mpage <mpage@cs.stanford.edu> * Update docs * Apply suggestions from code review Co-authored-by: Carol Willing <carolcode@willingconsulting.com> * A few more updates * Additional comment on immortal objects * Mention specializing adaptive interpreter * Remove trailing whitespace * Remove mention of C macro --------- (cherry picked from commit 68e384c) Co-authored-by: Sam Gross <colesbury@gmail.com> Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com> Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Co-authored-by: mpage <mpage@cs.stanford.edu> Co-authored-by: Carol Willing <carolcode@willingconsulting.com>
…124860) gh-124370: Add "howto" for free-threaded Python (GH-124371) (cherry picked from commit 68e384c) Co-authored-by: Sam Gross <colesbury@gmail.com> Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com> Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Co-authored-by: mpage <mpage@cs.stanford.edu> Co-authored-by: Carol Willing <carolcode@willingconsulting.com>
This is a guide aimed at people writing Python code, as oppposed to the existing guide for C API extension authors.
📚 Documentation preview 📚: https://cpython-previews--124371.org.readthedocs.build/en/124371/howto/free-threading-python.html