Skip to content

Conversation

@colesbury
Copy link
Contributor

This makes a few small changes to PEP 703:

  • Replaces the proposed configure flag--without-gil with --disable-gil per Inada Naoki's suggestion
  • Adds two "rejected ideas" to clarify questions from the discussion
  • Expands on a possible timeline for unification of the build modes

Suggested by Inada Naoki.
 * Why Not Deprecate ``PyDict_GetItem`` in Favor of ``PyDict_FetchItem``?
 * Why Not Use PEP 683 Immortalization?
@colesbury colesbury requested a review from ambv as a code owner January 23, 2023 15:55
@ambv ambv merged commit d9503c0 into python:main Jan 23, 2023
----------------------------------------------------------------------

This PEP proposes a new API ``PyDict_FetchItem`` which behaves like
``PyDict_GetItem``, but returns a new reference instead of a borrowed
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's totally optional and at your discretion as the PEP author, but just FYI, you can cross-reference Python and C functions, classes/types, methods/members, etc., and they will be automatically linked to the Python docs. So, for example, you could use :c:func:`PyDict_GetItem` here to make this render as PyDict_GetItem, if you wanted.


This PEP proposes a new API ``PyDict_FetchItem`` which behaves like
``PyDict_GetItem``, but returns a new reference instead of a borrowed
reference. As described in `Borrowed References`_, some uses of
Copy link
Member

@CAM-Gerlach CAM-Gerlach Jan 24, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also just FYI, while it's likewise up to you as the PEP author, you might want to consider using explicit ref target labels and the :ref: role, i.e. :ref:`703-borrowed-refs` here and

.. _703-borrowed-refs:

Borrowed References
-------------------

above the section you want, instead of implicit hyperlinks. They auto-update rather than silently breaking (with no programmatic or visual indication) if you ever move or change the section name, warn if you make a typo or accidentally delete the label, work across files and even other docs sites, make it explicit that you're linking to an internal location instead of an external URL, and allow linking to any block of text, not just section headings.

JelleZijlstra pushed a commit to JelleZijlstra/peps that referenced this pull request Jan 24, 2023
* Rename `--without-gil` to `--disable-gil`.

Suggested by Inada Naoki.

* Add two sections to "Rejected Ideas":

 - Why Not Deprecate ``PyDict_GetItem`` in Favor of ``PyDict_FetchItem``?
 - Why Not Use PEP 683 Immortalization?

* Expand on Python build modes
@colesbury colesbury deleted the 703-edits branch April 24, 2023 15:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants