- 
          
- 
                Notifications
    You must be signed in to change notification settings 
- Fork 33.2k
gh-108512: Add and use new replacements for PySys_GetObject() #111035
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
      
        
      
            serhiy-storchaka
  merged 24 commits into
  python:main
from
serhiy-storchaka:capi-PySys_GetAttr
  
      
      
   
  May 28, 2025 
      
    
      
        
          +287
        
        
          −93
        
        
          
        
      
    
  
  
     Merged
                    Changes from all commits
      Commits
    
    
            Show all changes
          
          
            24 commits
          
        
        Select commit
          Hold shift + click to select a range
      
      4d0f508
              
                gh-108512: Add and use new replacements for PySys_GetObject()
              
              
                serhiy-storchaka eb42b39
              
                Update Misc/stable_abi.toml
              
              
                serhiy-storchaka 2d4588d
              
                Merge branch 'main' into capi-PySys_GetAttr
              
              
                serhiy-storchaka 2eb9533
              
                Add tests.
              
              
                serhiy-storchaka 9fc2f3d
              
                Apply suggestions from code review
              
              
                serhiy-storchaka 65713ce
              
                Address review comments.
              
              
                serhiy-storchaka e6ecf11
              
                Check that the name is a string.
              
              
                serhiy-storchaka 8a0f5f2
              
                Merge remote-tracking branch 'refs/remotes/origin/capi-PySys_GetAttr'…
              
              
                serhiy-storchaka 516829e
              
                Make the new C API not public.
              
              
                serhiy-storchaka 9503aaf
              
                Remove from Misc/stable_abi.toml.
              
              
                serhiy-storchaka e2857ef
              
                Merge branch 'main' into capi-PySys_GetAttr
              
              
                serhiy-storchaka dc26ec2
              
                Add to the limited C API.
              
              
                serhiy-storchaka 104dcc2
              
                Replace few new occurrences of PySys_GetObject().
              
              
                serhiy-storchaka cf75fc3
              
                Update the documentation.
              
              
                serhiy-storchaka 9434659
              
                Clean up.
              
              
                serhiy-storchaka 56639d8
              
                Fix a typo.
              
              
                serhiy-storchaka b40a665
              
                Merge branch 'main' into capi-PySys_GetAttr
              
              
                serhiy-storchaka 03b9c0a
              
                Merge branch 'main' into capi-PySys_GetAttr
              
              
                serhiy-storchaka 5d793c5
              
                Merge remote-tracking branch 'refs/remotes/origin/capi-PySys_GetAttr'…
              
              
                serhiy-storchaka 09869ed
              
                Merge branch 'main' into capi-PySys_GetAttr
              
              
                serhiy-storchaka 439bc3c
              
                Merge branch 'main' into capi-PySys_GetAttr
              
              
                serhiy-storchaka 93ab31b
              
                Move to 3.15.
              
              
                serhiy-storchaka 154a82a
              
                Address review comments.
              
              
                serhiy-storchaka 81c7605
              
                Improve tests.
              
              
                serhiy-storchaka 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
    
  
  
    
              Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
      
      Oops, something went wrong.
      
    
  
  
    
      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
    
  
  
    
              
              
  
    
      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
    
  
  
    
              Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
      
      Oops, something went wrong.
      
    
  
        
          
          
            2 changes: 2 additions & 0 deletions
          
          2 
        
  Misc/NEWS.d/next/C_API/2023-10-18-14-36-35.gh-issue-108512.fMZLfr.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,2 @@ | ||
| Add functions :c:func:`PySys_GetAttr`, :c:func:`PySys_GetAttrString`, | ||
| :c:func:`PySys_GetOptionalAttr` and :c:func:`PySys_GetOptionalAttrString`. | 
  
    
      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
    
  
  
    
              
  
    
      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.
        
    
  
      
      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.