amyreese / fissix

backport of lib2to3, with enhancements
Other
45 stars 22 forks source link

except fixer: Make sure to actually check against the value of a node Fixes #42 #43

Closed dgrant closed 2 years ago

dgrant commented 3 years ago

Description

In the except fixer, in PR #40 I tried to make it not think a change was made when there really was no change made. This didn't actually work, as I somehow didn't compare with the .value of the node, probably due to me dropping it during refactoring.

Fixes: #42

chriselion commented 3 years ago

@jreese Could you take a look at this fix? I think I'm hitting this issue in the wild (using v21.6.6)

graingert commented 3 years ago

@dgrant could you write a test case for this?

chriselion commented 3 years ago

Not sure what the procedure for this is. I added a unit test that fails on current main but passes with dgrant:fix-pr-40. I made a PR targeting @dgrant's branch: https://github.com/dgrant/fissix/pull/1 Commit on my fork is here https://github.com/chriselion/fissix/commit/816c33157e6ffc69edbb719771d7264efcfdb24b

Feel free to just copy-paste if that's easier.

dgrant commented 3 years ago

Thanks @chriselion

dgrant commented 3 years ago

I'll grab it and push.

dgrant commented 3 years ago

FWIW, I add your repo as a remote, then cherry-picked that commit, then pushed. @chriselion

chriselion commented 3 years ago

Sounds good! Since I'm not a maintainer on this repo, I assumed I couldn't push to your branch.

dgrant commented 3 years ago

Can this be merged and a new fissix release created? Right now I'm installing git+https://github.com/dgrant/fissix.git@d5537fd6165de9d2ced3e1de378a7ec83a7bd50d#fissix and that takes forever as it does a git clone of fissix, which does a git submodule clone of cpython which takes forever for me (maybe it's because I'm going over a work VPN)...This happens once in a while when I update my Docker image.

dgrant commented 2 years ago

Can this be merged?

amyreese commented 2 years ago

Sorry for missing this, I'll get a release cut soon.

amyreese commented 2 years ago

v21.11.13 should be available from pypi now.