Skip to content

Add missing PyDoc_STR calls#109393

Merged
vstinner merged 2 commits into
python:mainfrom
sobolevn:pydocstr
Sep 15, 2023
Merged

Add missing PyDoc_STR calls#109393
vstinner merged 2 commits into
python:mainfrom
sobolevn:pydocstr

Conversation

@sobolevn

Copy link
Copy Markdown
Member

PR #108811 by @Gobot1234 made me curios to grep other possible places where this problem exists. I found some! 👍

@vstinner

Copy link
Copy Markdown
Member

Merged, thanks. I listed modified files in the commit message.

@Gobot1234

Copy link
Copy Markdown
Contributor

Sorry for only checking this now but it seems like some were still missed with PyMemberDefs e.g. here

cpython/Modules/_json.c

Lines 31 to 36 in 5eec58a

{"strict", Py_T_BOOL, offsetof(PyScannerObject, strict), Py_READONLY, "strict"},
{"object_hook", _Py_T_OBJECT, offsetof(PyScannerObject, object_hook), Py_READONLY, "object_hook"},
{"object_pairs_hook", _Py_T_OBJECT, offsetof(PyScannerObject, object_pairs_hook), Py_READONLY},
{"parse_float", _Py_T_OBJECT, offsetof(PyScannerObject, parse_float), Py_READONLY, "parse_float"},
{"parse_int", _Py_T_OBJECT, offsetof(PyScannerObject, parse_int), Py_READONLY, "parse_int"},
{"parse_constant", _Py_T_OBJECT, offsetof(PyScannerObject, parse_constant), Py_READONLY, "parse_constant"},
I can't see any that were missed on PyMethodDefs at a cursory glance but that might be worth looking through as well

@bedevere-bot

Copy link
Copy Markdown

⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️

Hi! The buildbot AMD64 Debian root 3.x has failed when building commit 47af188.

What do you need to do:

  1. Don't panic.
  2. Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. Go to the page of the buildbot that failed (https://buildbot.python.org/all/#builders/345/builds/5846) and take a look at the build logs.
  4. Check if the failure is related to this commit (47af188) or if it is a false positive.
  5. If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.

You can take a look at the buildbot page here:

https://buildbot.python.org/all/#builders/345/builds/5846

Failed tests:

  • test.test_multiprocessing_forkserver.test_processes

Summary of the results of the build (if available):

==

Click to see traceback logs
remote: Enumerating objects: 10, done.        
remote: Counting objects:  10% (1/10)        
remote: Counting objects:  20% (2/10)        
remote: Counting objects:  30% (3/10)        
remote: Counting objects:  40% (4/10)        
remote: Counting objects:  50% (5/10)        
remote: Counting objects:  60% (6/10)        
remote: Counting objects:  70% (7/10)        
remote: Counting objects:  80% (8/10)        
remote: Counting objects:  90% (9/10)        
remote: Counting objects: 100% (10/10)        
remote: Counting objects: 100% (10/10), done.        
remote: Compressing objects:  11% (1/9)        
remote: Compressing objects:  22% (2/9)        
remote: Compressing objects:  33% (3/9)        
remote: Compressing objects:  44% (4/9)        
remote: Compressing objects:  55% (5/9)        
remote: Compressing objects:  66% (6/9)        
remote: Compressing objects:  77% (7/9)        
remote: Compressing objects:  88% (8/9)        
remote: Compressing objects: 100% (9/9)        
remote: Compressing objects: 100% (9/9), done.        
remote: Total 10 (delta 1), reused 8 (delta 1), pack-reused 0        
From https://github.com/python/cpython
 * branch                  main       -> FETCH_HEAD
Note: switching to '47af18859385fd996bf7f8fa4b33600c59a6d626'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:

  git switch -c <new-branch-name>

Or undo this operation with:

  git switch -

Turn off this advice by setting config variable advice.detachedHead to false

HEAD is now at 47af188593 Add missing `PyDoc_STR` calls (#109393)
Switched to and reset branch 'main'

configure: WARNING: pkg-config is missing. Some dependencies may not be detected correctly.

Kill <WorkerThread #1 running test=test_compileall pid=2138611 time=13.6 sec> process group
make: *** [Makefile:2029: buildbottest] Error 5

@sobolevn

Copy link
Copy Markdown
Member Author

@Gobot1234 you are right once again:

>>> import json
>>> json.JSONDecoder().scan_once.__class__.object_hook.__doc__
'object_hook'

would you like to make a PR? :)

@Gobot1234 Gobot1234 mentioned this pull request Sep 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants