GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — gh-99767: update PyTypeObject docs for type watchers by carljm · Pull Request #99928 · python/cpython

Conversation

@carljm

@carljm carljm commented Dec 1, 2022 •
edited by bedevere-bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member
  • Issue: DOC: tp_watch was added to PyTypeObject but is not documented #99767

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@carljm
pythongh-99767: update PyTypeObject docs for type watchers
970b03e
@bedevere-bot bedevere-bot mentioned this pull request Dec 1, 2022
DOC: tp_watch was added to PyTypeObject but is not documented #99767
Closed
@bedevere-bot bedevere-bot added the awaiting review label Dec 1, 2022
@carljm carljm added skip news docs Documentation in the Doc dir labels Dec 1, 2022
@carljm
carljm requested a review from markshannon December 13, 2022 22:45
markshannon
markshannon reviewed Dec 14, 2022
View reviewed changes
Comment thread Doc/c-api/typeobj.rst
.. versionadded:: 3.9 (the field exists since 3.8 but it's only used since 3.9)


.. c:member:: char PyTypeObject.tp_watched

@markshannon markshannon Dec 14, 2022

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

I would rather the docs say "Internal. Do not use."

TBH, I would like the whole of the type struct to be "do not use", but let's not make things any worse.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

carljm reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

@carljm carljm Dec 14, 2022

Copy link
Copy Markdown
Member Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Are you wanting the existing text removed and replaced so it says only "Internal, do not use"? Or do you want to add "Internal, do not use" but also keep the description of what it is?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@carljm carljm Dec 14, 2022

Copy link
Copy Markdown
Member Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Pushed a version that removes the existing text, but I can easily re-add it.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
carljm added 2 commits December 14, 2022 11:20
@carljm
Merge branch 'main' into typedocs
53d33a1
* main: (103 commits)
  pythongh-100248: Add missing `ssl_shutdown_timeout` parameter in `asyncio` docs (python#100249)
  Assorted minor fixes for specialization stats. (pythonGH-100219)
  pythongh-100176: venv: Remove redundant compat code for Python <= 3.2 (python#100177)
  pythonGH-100222: Redefine _Py_CODEUNIT as a union to clarify structure of code unit. (pythonGH-100223)
  pythongh-99955: undef ERROR and SUCCESS before redefining (fixes sanitizer warning) (python#100215)
  pythonGH-100206: use versionadded for the addition of sysconfig.get_default_scheme (python#100207)
  pythongh-81057: Move _Py_RefTotal to the "Ignored Globals" List (pythongh-100203)
  pythongh-81057: Move Signal-Related Globals to _PyRuntimeState (pythongh-100085)
  pythongh-81057: Move faulthandler Globals to _PyRuntimeState (pythongh-100152)
  pythongh-81057: Move tracemalloc Globals to _PyRuntimeState (pythongh-100151)
  pythonGH-100143: Improve collecting pystats for parts of runs (pythonGH-100144)
  pythongh-99955: standardize return values of functions in compiler's code-gen (python#100010)
  pythongh-79218: Define `MS_WIN64` macro for Mingw-w64 64bit on Windows (pythonGH-100137)
  Fix: typo (Indention) (pythonGH-99904)
  pythongh-96715 Remove redundant NULL check in `profile_trampoline` function (python#96716)
  pythongh-100176: remove incorrect version compatibility check from argument clinic (python#100190)
  clarify the 4300-digit limit on int-str conversion (python#100175)
  pythongh-70393: Clarify mention of "middle" scope (python#98839)
  pythongh-99688: Fix outdated tests in test_unary (python#99712)
  pythongh-100174: [Enum] Correct PowersOfThree example. (pythonGH-100178)
  ...
@carljm
Remove description of tp_watched, just say its internal
b1a1157
@netlify

netlify Bot commented Dec 14, 2022 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

✅ Deploy Preview for python-cpython-preview ready!

Name Link
🔨 Latest commit b1a1157
🔍 Latest deploy log https://app.netlify.com/sites/python-cpython-preview/deploys/639a22c72ed03a00089ae616
😎 Deploy Preview https://deploy-preview-99928--python-cpython-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@markshannon

markshannon commented Dec 15, 2022

Copy link
Copy Markdown
Member

That looks good. Better to document it as "do not use", than have folks try to figure out how to (mis)use it.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@markshannon
markshannon merged commit b7e4f1d into python:main Dec 15, 2022
@bedevere-bot bedevere-bot removed the awaiting review label Dec 15, 2022
mattip
mattip reviewed Dec 15, 2022
View reviewed changes
Comment thread Doc/c-api/typeobj.rst
| :c:member:`~PyTypeObject.tp_vectorcall` | :c:type:`vectorcallfunc` | | | | | |
+------------------------------------------------+-----------------------------------+-------------------+---+---+---+---+
| :c:member:`~PyTypeObject.tp_watched` | char | | | | | |
+------------------------------------------------+-----------------------------------+-------------------+---+---+---+---+

@mattip mattip Dec 15, 2022

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

If this slot is internal, it should be in square brackets like tp_version_tag

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

carljm reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

@carljm carljm Dec 15, 2022

Copy link
Copy Markdown
Member Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Thanks, sorry I missed this. Added in #100271

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@mattip mattip Dec 15, 2022

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Thanks

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@carljm
carljm deleted the typedocs branch December 15, 2022 15:25
@carljm carljm mentioned this pull request Dec 15, 2022
gh-99767: mark PyTypeObject.tp_watched as internal use only in table #100271
Merged
carljm added a commit to carljm/cpython that referenced this pull request Dec 16, 2022
@carljm
Merge branch 'main' into fastmock
2260a54
* main:
  Improve stats presentation for calls. (pythonGH-100274)
  Better stats for `LOAD_ATTR` and `STORE_ATTR` (pythonGH-100295)
  pythongh-81057: Move the Cached Parser Dummy Name to _PyRuntimeState (python#100277)
  Document that zipfile's pwd parameter is a `bytes` object (python#100209)
  pythongh-99767: mark `PyTypeObject.tp_watched` as internal use only in table (python#100271)
  Fix typo in introduction.rst (python#100266)
  pythongh-78997: AttributeError if loading fails in LibraryLoader.__getattr__
  pythonGH-100234: Set a default value for random.expovariate() (pythonGH-100235)
  Remove uninformative itertools recipe (pythonGH-100253)
  pythonGH-99767: update PyTypeObject docs for type watchers (pythonGH-99928)
  Move stats for the method cache into the `Py_STAT` machinery (pythonGH-100255)
  pythonGH-100222: fix typo _py_set_opocde -> _py_set_opcode (pythonGH-100259)
  pythonGH-100000: Cleanup and polish various watchers code (pythonGH-99998)
  pythongh-90111: Minor Cleanup for Runtime-Global Objects (pythongh-100254)
@fuzzard fuzzard mentioned this pull request Jul 13, 2023
PythonBindings: TypeInfo: add initialization of tp_watched for PyTypeObject xbmc/xbmc#23508
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@markshannon markshannon markshannon left review comments
+1 more reviewer
@mattip mattip mattip left review comments
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

docs Documentation in the Doc dir skip news

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

4 participants

@carljm @markshannon @mattip @bedevere-bot
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.