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-106948: Docs: Disable links for C standard library functions, OS utility functions and system calls by erlend-aasland · Pull Request #107062 · python/cpython

Conversation

@erlend-aasland

@erlend-aasland erlend-aasland commented Jul 22, 2023 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Contributor

📚 Documentation preview 📚: https://cpython-previews--107062.org.readthedocs.build/

Sorry, something went wrong.

Uh oh!

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

All reactions
@erlend-aasland
Docs: Disable links for _weakref and C stdlib functions
e8bff92
Disable links for C functions [mcr]alloc and free
@erlend-aasland erlend-aasland added skip issue skip news needs backport to 3.11 only security fixes needs backport to 3.12 only security fixes labels Jul 22, 2023
@erlend-aasland
erlend-aasland requested a review from serhiy-storchaka July 22, 2023 19:15
@bedevere-bot bedevere-bot added awaiting core review docs Documentation in the Doc dir labels Jul 22, 2023
@erlend-aasland
erlend-aasland marked this pull request as draft July 22, 2023 19:31
@bedevere-bot bedevere-bot removed the awaiting core review label Jul 22, 2023
@serhiy-storchaka

serhiy-storchaka commented Jul 22, 2023

Copy link
Copy Markdown
Member

malloc, realloc and free are referred in many different files. Maybe add them in nitpick_ignore? And calloc for complete.

All reactions

Sorry, something went wrong.

Uh oh!

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

@erlend-aasland

erlend-aasland commented Jul 22, 2023

Copy link
Copy Markdown
Contributor Author

malloc, realloc and free are referred in many different files. Maybe add them in nitpick_ignore? And calloc for complete.

Yes, I noticed. I'll add them, and I'll remove the _weakref since it does not belong to this PR really.

All reactions

Sorry, something went wrong.

Uh oh!

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

@erlend-aasland erlend-aasland changed the title Docs: Disable links for _weakref and C stdlib functions Docs: Disable links for some C stdlib functions Jul 22, 2023
@erlend-aasland
Revert "Docs: Disable links for _weakref and C stdlib functions"
2378c10
This reverts commit e8bff92.
@serhiy-storchaka

serhiy-storchaka commented Jul 22, 2023

Copy link
Copy Markdown
Member

The most referred functions:

      3 :c:func:`!addstr`
      3 :c:func:`calloc`
      3 :c:func:`exec`
      3 :c:func:`function__entry`
      3 :c:func:`printf`
      3 :c:func:`sigaction`
      3 :c:func:`signal`
      3 :c:func:`sprintf`
      3 :c:func:`strerror`
      4 :c:func:`devpoll`
      4 :c:func:`lockf`
      4 :c:func:`main`
      4 :c:func:`snprintf`
      4 :c:func:`stat`
      4 :c:func:`system`
      4 :c:func:`vsnprintf`
      5 :c:func:`dlopen`
      5 :c:func:`fcntl`
      5 :c:func:`flock`
      5 :c:func:`!getopt`
      5 :c:func:`!scanf`
      6 :c:func:`realloc`
      8 :c:func:`select`
      9 :c:func:`poll`
     11 :c:func:`gmtime`
     11 :c:func:`localtime`
     18 :c:func:`fork`
     21 :c:func:`free`
     34 :c:func:`malloc`

Some of them, like getopt are only referred in one file.

erlend-aasland reacted with hooray emoji
All reactions
  • 🎉 1 reaction

Sorry, something went wrong.

Uh oh!

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

erlend-aasland added 3 commits July 22, 2023 21:42
@erlend-aasland
Add malloc and friends to nitpick_ignore instead
e22e4ba
@erlend-aasland
Sort
f35d193
@erlend-aasland
Add more functions
52c6e50
@erlend-aasland erlend-aasland changed the title Docs: Disable links for some C stdlib functions Docs: Disable links for C standard library functions, OS utility functions and system calls Jul 22, 2023
@erlend-aasland
erlend-aasland marked this pull request as ready for review July 22, 2023 19:50
@bedevere-bot bedevere-bot added the awaiting core review label Jul 22, 2023
erlend-aasland added 2 commits July 22, 2023 23:35
@erlend-aasland
Pull in main
9ebaba5
@erlend-aasland
Remove Doc/howto/instrumentation.rst from .nitignore
d886570
@serhiy-storchaka serhiy-storchaka changed the title Docs: Disable links for C standard library functions, OS utility functions and system calls gh-106948: Docs: Disable links for C standard library functions, OS utility functions and system calls Jul 23, 2023
@serhiy-storchaka serhiy-storchaka linked an issue Jul 23, 2023 that may be closed by this pull request
Docs: add standard external names to nitpick_ignore #106948
Closed
@serhiy-storchaka serhiy-storchaka removed a link to an issue Jul 23, 2023
Docs: add standard external names to nitpick_ignore #106948
Closed
@serhiy-storchaka

serhiy-storchaka commented Jul 23, 2023

Copy link
Copy Markdown
Member
  1. I am not sure that all functions referred at least 3 times should be added in nitpick_ignore. Many of them are only referred in one file (excluding NEWS entries). Memory management functions malloc, realloc and free are obvious candidates for inclusion. calloc can also be included besides it is only referred 3 times. gmtime and localtime are referred several times in two related modules, they also can be included. fork is referred in multiple files. poll is only referred in select.rst, but multiple times, it is questionable. Etc, etc. On other side, addstr is only mentioned in curses.rst, and in all three cases already with !. To me, it is an obvious candidate for not inclusion. function__entry is a strange thing, is it even a standard name?

  2. I did not differentiate between C, Posix and Windows types, Posix and Windows environment variables. It is tiresome to find where exactly the name is defined (and some are defined on multiple platforms), and it does not really matter. I only grouped by the role.

It is my thoughts. If you disagree, go ahead, but may be some of them can be useful to you.

erlend-aasland reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

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

@erlend-aasland

erlend-aasland commented Jul 23, 2023 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Contributor Author

Thanks for your input. I think it makes sense to remove functions which are only mentioned a few times, and instead use ! to mark them up. I'll return to this later today.

All reactions

Sorry, something went wrong.

Uh oh!

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

erlend-aasland added 2 commits July 23, 2023 21:49
@erlend-aasland
Pull in main
97c46ce
@erlend-aasland
Prune the list for seldomly referenced functions
126513b
@erlend-aasland
erlend-aasland requested a review from a team as a code owner July 23, 2023 20:10
serhiy-storchaka
serhiy-storchaka approved these changes Jul 23, 2023
View reviewed changes
@bedevere-bot bedevere-bot added awaiting merge and removed awaiting core review labels Jul 23, 2023
@erlend-aasland

erlend-aasland commented Jul 23, 2023

Copy link
Copy Markdown
Contributor Author

Thanks for the review and insight, Serhiy. Highly appreciated!

All reactions

Sorry, something went wrong.

Uh oh!

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

@erlend-aasland
erlend-aasland merged commit b447e19 into python:main Jul 23, 2023
@miss-islington

miss-islington commented Jul 23, 2023

Copy link
Copy Markdown
Contributor

Thanks @erlend-aasland for the PR 🌮🎉.. I'm working now to backport this PR to: 3.11, 3.12.
🐍🍒⛏🤖

All reactions

Sorry, something went wrong.

Uh oh!

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

@bedevere-bot bedevere-bot removed the awaiting merge label Jul 23, 2023
@erlend-aasland
erlend-aasland deleted the docs/fix-targets branch July 23, 2023 20:57
@miss-islington

miss-islington commented Jul 23, 2023

Copy link
Copy Markdown
Contributor

Sorry, @erlend-aasland, I could not cleanly backport this to 3.11 due to a conflict.
Please backport using cherry_picker on command line.
cherry_picker b447e19e720e6781025432a40eb72b1cc93ac944 3.11

All reactions

Sorry, something went wrong.

Uh oh!

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

@miss-islington miss-islington assigned erlend-aasland Jul 23, 2023
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jul 23, 2023
@erlend-aasland @serhiy-storchaka @miss-islington
pythongh-106948: Docs: Disable links for C standard library functions…
01d4280
…, OS utility functions and system calls (pythonGH-107062)

(cherry picked from commit b447e19)

Co-authored-by: Erlend E. Aasland <[email protected]>
Co-authored-by: Serhiy Storchaka <[email protected]>
@bedevere-bot

bedevere-bot commented Jul 23, 2023

Copy link
Copy Markdown

GH-107154 is a backport of this pull request to the 3.12 branch.

All reactions

Sorry, something went wrong.

Uh oh!

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

@bedevere-bot bedevere-bot removed the needs backport to 3.12 only security fixes label Jul 23, 2023
erlend-aasland added a commit that referenced this pull request Jul 23, 2023
@miss-islington @erlend-aasland @serhiy-storchaka
[3.12] gh-106948: Docs: Disable links for C standard library function…
40a337f
…s, OS utility functions and system calls (GH-107062) (#107154)

(cherry picked from commit b447e19)

Co-authored-by: Erlend E. Aasland <[email protected]>
Co-authored-by: Serhiy Storchaka <[email protected]>
@bedevere-bot

bedevere-bot commented Jul 23, 2023

Copy link
Copy Markdown

GH-107157 is a backport of this pull request to the 3.11 branch.

All reactions

Sorry, something went wrong.

Uh oh!

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

@bedevere-bot bedevere-bot removed the needs backport to 3.11 only security fixes label Jul 23, 2023
erlend-aasland added a commit that referenced this pull request Jul 23, 2023
@erlend-aasland @serhiy-storchaka
[3.11] gh-106948: Docs: Disable links for C standard library function…
b3e600a
…s, OS utility functions and system calls (#107062) (#107157)

(cherry picked from commit b447e19)

Co-authored-by: Serhiy Storchaka <[email protected]>
@erlend-aasland erlend-aasland mentioned this pull request Jul 23, 2023
Fix Sphinx warnings on unknown targets #107164
Closed
mementum pushed a commit to mementum/cpython that referenced this pull request Jul 23, 2023
@erlend-aasland @serhiy-storchaka @mementum
pythongh-106948: Docs: Disable links for C standard library functions…
9115c45
…, OS utility functions and system calls (python#107062)

Co-authored-by: Serhiy Storchaka <[email protected]>
carljm added a commit to carljm/cpython that referenced this pull request Jul 24, 2023
@carljm
Merge branch 'main' into superfix
9a6bdfa
* main: (73 commits)
  Thoroughly refactor the cases generator (python#107151)
  Docs: Add missing markup to Argument Clinic docs (python#106876)
  pythongh-107162: Document errcode.h usage in its comment (python#107177)
  pythongh-106320: Remove private _PyDict C API (python#107145)
  Fix PyVectorcall_Function doc versionadded (python#107140)
  Docs: Remove duplicate word in Argument Clinic howto heading (python#107169)
  pythongh-107017: Change Chapter Strings to Texts in the Introduction chapter. (python#107104)
  pythongh-106320: Remove private _PyObject C API (python#107159)
  Docs: fix typo in os.pwrite docstring (python#107087)
  pythongh-105291: Add link to migration guide for distutils (python#107130)
  pythongh-106948: Docs: Disable links for C standard library functions, OS utility functions and system calls (python#107062)
  pythongh-106320: Remove _PyBytes_Join() C API (python#107144)
  pythongh-106320: Remove private _PyObject C API (python#107147)
  pythongh-106320: Remove _PyTuple_MaybeUntrack() C API (python#107143)
  pythongh-106320: Remove _PyIsSelectable_fd() C API (python#107142)
  Remove superflous whitespaces in `layout.html`. (pythonGH-107067)
  pythongh-107122: Update what's news for dbm.*dbm.clear() method (pythongh-107135)
  pythongh-107122: Add clear method to dbm.ndbm module (pythongh-107126)
  pythongh-62519: Make pgettext search plurals when translation is not found (python#107118)
  pythongh-107122: Add clear method to dbm.gdbm.module (pythongh-107127)
  ...
This was referenced Jul 26, 2023
gh-106948: Doc config ignores more standard C functions #107301
Closed
Fix Sphinx warnings in the C API documentation #107298
Closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@serhiy-storchaka serhiy-storchaka serhiy-storchaka approved these changes

Uh oh!

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

Assignees

@erlend-aasland erlend-aasland

Labels

docs Documentation in the Doc dir skip issue 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

@erlend-aasland @serhiy-storchaka @miss-islington @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.