- 
          
- 
                Notifications
    You must be signed in to change notification settings 
- Fork 33.3k
gh-96348: Deprecate the 3-arg signature of coroutine.throw, generator.throw and agen.athrow #96428
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
      
      
            iritkatriel
  merged 30 commits into
  python:main
from
ofey404:ofey404/deprecate-get-throw
  
      
      
   
  Sep 30, 2022 
      
    
  
     Merged
                    Changes from all commits
      Commits
    
    
            Show all changes
          
          
            30 commits
          
        
        Select commit
          Hold shift + click to select a range
      
      b388f9a
              
                feat: Deprecate gen.throw(typ, val, tb)
              
              
                ofey404 713d77a
              
                Update Objects/genobject.c
              
              
                ofey404 fcfb65e
              
                fix clear cases
              
              
                ofey404 073aa62
              
                Update Misc/NEWS.d/next/Core and Builtins/2022-08-31-18-46-13.gh-issu…
              
              
                ofey404 1c6ed30
              
                Filter remaining warnings.
              
              
                ofey404 4881855
              
                Add deprecated info in documentation.
              
              
                ofey404 0158816
              
                Use versionchanged instead of deprecated.
              
              
                ofey404 8152b7c
              
                Update Doc/reference/expressions.rst
              
              
                ofey404 670d8f8
              
                more docs and what's new entry
              
              
                ofey404 0c20b35
              
                Edit what's new.
              
              
                ofey404 ba9a87c
              
                Update Objects/genobject.c
              
              
                ofey404 7f1dd7f
              
                Update Objects/genobject.c
              
              
                ofey404 0b16455
              
                Update Lib/test/test_generators.py
              
              
                ofey404 e204cc6
              
                Update Objects/genobject.c
              
              
                ofey404 0873dc3
              
                Reversed agen.athrow() documentation, and what's new with method link.
              
              
                ofey404 4a1539c
              
                Apply suggestions from code review
              
              
                ofey404 85b67cb
              
                Add DeprecationWarning, doc and what's new to agen.athrow
              
              
                ofey404 22bb65b
              
                Update acks, and doc of anextawaitable_throw
              
              
                ofey404 7b786e4
              
                Add test_async_gen_3_arg_deprecation_warning.
              
              
                ofey404 198645a
              
                Apply formatting suggestions from code review
              
              
                ofey404 528031c
              
                patchcheck.py passed
              
              
                ofey404 53c74db
              
                Merge branch 'main' into ofey404/deprecate-get-throw
              
              
                ofey404 93db966
              
                Update Misc/NEWS.d/next/Core and Builtins/2022-08-31-18-46-13.gh-issu…
              
              
                ofey404 0e56eb9
              
                assert that deprecation warning is emitted
              
              
                iritkatriel 8738273
              
                stage, exploring how to capture deprecation warning rather than supre…
              
              
                ofey404 31b2e9f
              
                Revert "stage, exploring how to capture deprecation warning rather th…
              
              
                ofey404 8b701d6
              
                Merge pull request #6 from iritkatriel/pr96428
              
              
                ofey404 70e1f28
              
                Merge branch 'main' into ofey404/deprecate-get-throw
              
              
                iritkatriel ed2e83a
              
                fix test
              
              
                iritkatriel 03fc6e0
              
                Add a warning in FutureIter_throw
              
              
                ofey404 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
    
  
  
    
              
  
    
      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
    
  
  
    
              
  
    
      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
    
  
  
    
              
        
          
          
            2 changes: 2 additions & 0 deletions
          
          2 
        
  Misc/NEWS.d/next/Core and Builtins/2022-08-31-18-46-13.gh-issue-96348.xzCoTP.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 @@ | ||
| Emit a DeprecationWarning when :meth:`~generator.throw`, :meth:`~coroutine.throw` or :meth:`~agen.athrow` | ||
| are called with more than one argument. | 
  
    
      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
    
  
  
    
              
  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.
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.
For future PRs, not that code should generally be marked up like