-
-
Notifications
You must be signed in to change notification settings - Fork 33.2k
gh-126072: do not add None
to co_consts
if no docstring
#126101
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 10 commits
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
b6d9943
Merge branch 'python:main' into main
xuantengh 92d4470
Merge branch 'python:main' into main
xuantengh b6aee70
Merge branch 'python:main' into main
xuantengh 7fbd458
Merge branch 'python:main' into main
xuantengh f6f52bc
Merge branch 'python:main' into main
xuantengh 70a1313
Merge branch 'python:main' into main
xuantengh 257d58e
add `CO_HAS_DOCSTRING` flag
xuantengh b6edafd
do not add `None` to `co_consts` if no docstring
xuantengh 7ceaaee
update doc
xuantengh 1674f83
add news
xuantengh 52334c4
Merge branch 'main' into main
xuantengh 099a765
calculate ste_has_docstring in symtable.c
xuantengh 436b2cf
update __doc__ for function object
xuantengh f92f180
fix test inspect
xuantengh 63a40e0
fix potential bugs
xuantengh b34076a
fix async func
xuantengh be4cffe
fix tests
xuantengh 0450f96
add doc string co tests
xuantengh 4fb24e6
rebase main to resolve conflicts
xuantengh 96085e1
fix test
xuantengh 7b37e1f
fix more tests
xuantengh 67f893e
remove issue number comments
xuantengh 6ebadd6
take advises
xuantengh 0edf4fc
update inspect doc
xuantengh 4879a5d
update doc
xuantengh 49944b6
update inspect.py comment
xuantengh File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
Misc/NEWS.d/next/Core_and_Builtins/2024-10-29-10-37-39.gh-issue-126072.XLKlxv.rst
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
Add a new attribute in :attr:`~codeobject.co_flags` to indicate whether the | ||
first item in :attr:`~codeobject.co_consts` is the docstring. If a code | ||
object has no docstring, ``None`` will **NOT** be inserted. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.