Skip to content

Conversation

@Lee-W
Copy link

@Lee-W Lee-W commented Sep 7, 2025

@bedevere-app
Copy link

bedevere-app bot commented Sep 7, 2025

Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool.

If this change has little impact on Python users, wait for a maintainer to apply the skip news label instead.

@Lee-W Lee-W changed the title refactor(Lib/_pyio): use explicit exception for open function gh-59518: get rid of bar except usage for Lib/_pyio.py Sep 7, 2025
@picnixz
Copy link
Member

picnixz commented Sep 7, 2025

  1. This is not related to IDLE.
  2. Those bare excepts seemcorrect as we're reraising the exceptions. I think we already took care of this in avoid bare except: in stdlib #125522

@picnixz picnixz added the pending The issue will be closed if no feedback is provided label Sep 7, 2025
@picnixz picnixz changed the title gh-59518: get rid of bar except usage for Lib/_pyio.py gh-125522: remove bare except usage in Lib/_pyio.py Sep 7, 2025
@Lee-W Lee-W closed this Sep 7, 2025
@Lee-W
Copy link
Author

Lee-W commented Sep 7, 2025

Got it. Thanks! I thought we were supposed to eliminate all these occurrences. Thanks for the reminder!

@Lee-W Lee-W deleted the gh-59518-get-rid-of-bare-except-for-_pyio branch September 7, 2025 16:35
@picnixz
Copy link
Member

picnixz commented Sep 7, 2025

No worries. There are some occurrences that need to be eliminated but others can be legitimate.

@Lee-W
Copy link
Author

Lee-W commented Sep 9, 2025

No worries. There are some occurrences that need to be eliminated but others can be legitimate.

btw, Should we try except Exception or except BaseException for this? If not, I will start looking into the IDLE ones. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pending The issue will be closed if no feedback is provided skip news

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants