Opened 3 years ago

Closed 3 years ago

#8466 enhancement closed duplicate (duplicate)

Do not call sys.exc_clear() on Python 3 in bin

Reported by: Craig Rodrigues Owned by: Craig Rodrigues
Priority: normal Milestone: Python-3.x
Component: core Keywords:
Cc: Branch: 8466-rodrigc-exc_clear
branch-diff, diff-cov, branch-cov, buildbot


sys.exc_clear() is gone on Python 3:

We should not try to call it on Python 3.

Change History (5)

comment:1 Changed 3 years ago by Craig Rodrigues

Keywords: review added
Milestone: Python-3.x

comment:2 Changed 3 years ago by Cory Benfield

Keywords: review removed
Owner: set to Craig Rodrigues

Here's some review that applies not only to this but to #8465, #8467, #8468, and #8469: what the hell is exc_clear() even doing there? It seems to serve no purpose whatsoever. Glyph has suggested it has something to do with a Python 2.2 implementation detail, so I'm inclined to say this is crazy-talk.

I'm going to let this build run, but I'd like to see one of two things:

  • Either more aggressive patch that simply changes the except block to pass.
  • Or the most aggressive patch, which removes all of this nonsense and makes these all console_scripts, such that pip install -e '.[dev]' (the command we tell people to run for development anyway) makes those scripts available directly.

I'll happily accept either kind of patch, but we should definitely do one of them.

I'll apply this feedback to the other tickets as well. Feel free to ping me directly when you're ready for more review.

comment:3 Changed 3 years ago by Craig Rodrigues

Branch: 8466-rodrigc-exc_clear
Keywords: review added
Owner: changed from Craig Rodrigues to Cory Benfield

I removed sys.exc_clear() and created a branch

comment:4 Changed 3 years ago by Craig Rodrigues

Keywords: review removed
Owner: changed from Cory Benfield to Craig Rodrigues

Going in a different direction with this after talking to Lukasa

comment:5 Changed 3 years ago by Craig Rodrigues

Resolution: duplicate
Status: newclosed

This will be fixed in 8491

Note: See TracTickets for help on using tickets.