GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — gh-134160: Start "Extending and embedding" with a Diataxis-style tutorial by encukou · Pull Request #142314 · python/cpython Conversation
|
| first-extension-module.rst | ||
| extending.rst | ||
| newtypes_tutorial.rst | ||
| newtypes.rst | ||
| building.rst | ||
| windows.rst | ||
| embedding.rst |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
| first-extension-module.rst | |
| extending.rst | |
| newtypes_tutorial.rst | |
| newtypes.rst | |
| building.rst | |
| windows.rst | |
| embedding.rst | |
| first-extension-module | |
| extending | |
| newtypes_tutorial | |
| newtypes | |
| building | |
| windows | |
| embedding |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Why change this? All of CPython's toctrees have the .rst suffixes.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
It’s not required, so is a little cleaner (like we don’t have to do import './module.py'), but maybe Sphinx didn’t support that when it was first created and now that’s the style we have.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Oh. Makes sense!
But I think the first such change should be its own PR, so it's easily revertable if anything goes wrong. This PR is big enough on its own.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Co-authored-by: Stan Ulbrych <[email protected]> Co-authored-by: Éric <[email protected]>
|
I've changed things so the first compilation is after adding |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
The “now run your build tool” section stood out as the most no-tutorial-i part of the tutorial, so I tried the tools from the PyPA recommendation list and chose the most straightforward one: I put notes on using other tools in an appendix. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
As a big proponent of meson-python IMO it's a great choice for this. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| .. tip:: | ||
|
|
||
| If you don't have ``pip`` installed, run ``python -m ensurepip``, | ||
| preferably in a :mod:`virtual environment <venv>`. |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Do people actually need to run ensurepip if they have run python -m venv .venv ?
This tutorial could show the venv commands directly (and avoid ensurepip step) instead of referring to them.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
I added “You need to be able to install Python packages” to the intro, leaving exact steps for setting that up out of scope here.
Does that work?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
With a link to ensurepip docs, or Python setup and usage (if that includes notes about venv/pip)?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| preferably in a :mod:`virtual environment <venv>`. | ||
| You can also use another tool that can build and install | ||
| ``pyproject.toml``-based projects, like | ||
| `uv <https://docs.astral.sh/uv/>`_ (``uv pip install .``). |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
This note seems to contradict the intent of not providing options in a tutorial 🙂
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
This is partly setup you're expected to have before starting, and part troubleshooting advice.
I added it to the introduction, and made this note smaller. Does that work?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Will check!
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Yay, thanks for doing this! I'm excited to finally see a better tutorial.
I tried to avoid being overly nitpicky in my review.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Co-authored-by: Daniele Nicolodi <[email protected]> Co-authored-by: Peter Bierma <[email protected]>
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Mostly just typos left. I left a few minor wording suggestions, so feel free to reject those if you want to.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
| extension. | ||
| Unlike Python, C has an explicit compilation step. |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
These two sentences feel very related.
| extension. | |
| Unlike Python, C has an explicit compilation step. | |
| extension, because unlike Python, C has an explicit compilation step. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Juxtaposition is a valid construct! 🙂
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Co-authored-by: Peter Bierma <[email protected]>
|
Thank you for those! I must admit I'm blind to typos at this point... I'll merge soon, but I'm happy to take more suggestions. Docs are never done :) |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
I don't have any more complaints, LGTM!
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
…e tutorial (pythonGH-142314) Co-authored-by: Stan Ulbrych <[email protected]> Co-authored-by: Éric <[email protected]> Co-authored-by: Daniele Nicolodi <[email protected]> Co-authored-by: Peter Bierma <[email protected]>
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.