Skip to content

2to3: Apply has_key fixer.#2140

Merged
takluyver merged 2 commits into
ipython:masterfrom
bfroehle:2to3_has_key
Jul 17, 2012
Merged

2to3: Apply has_key fixer.#2140
takluyver merged 2 commits into
ipython:masterfrom
bfroehle:2to3_has_key

Conversation

@bfroehle

Copy link
Copy Markdown
Contributor

Following #2095, #2100, and #2134, this pull request applies the has_key fixer which does:

  • dict.has_key(key) -> key in dict

The deathrow and quarantine folders were skipped.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe we patch 2.6 to allow assertIn here, do you want to make that change while you are at it?

Also, just noting that this will conflict with your own #2089, so it will need a tiny rebase after that goes in.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In IPython.testing.nose_assert_methods, we only add nt.assert_in and nt.assert_not_in.

I don't believe that we monkey patch unittest.TestCase to add assertIn, etc.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gotcha, never mind then.

@takluyver

Copy link
Copy Markdown
Member

Looks OK to me. Running the tests now.

@takluyver

Copy link
Copy Markdown
Member

(Not that there's any reason it should break anything)

@takluyver

Copy link
Copy Markdown
Member

Test results for commit 161b7d2 merged into master
Platform: linux2

  • python2.7: OK (libraries not available: oct2py rpy2)
  • python3.1: OK (libraries not available: cython matplotlib numpy oct2py pymongo qt rpy2 wx wx.aui zmq)
  • python3.2: OK (libraries not available: cython oct2py pymongo rpy2 wx wx.aui)

Not available for testing: python2.6

1 similar comment
@takluyver

Copy link
Copy Markdown
Member

Test results for commit 161b7d2 merged into master
Platform: linux2

  • python2.7: OK (libraries not available: oct2py rpy2)
  • python3.1: OK (libraries not available: cython matplotlib numpy oct2py pymongo qt rpy2 wx wx.aui zmq)
  • python3.2: OK (libraries not available: cython oct2py pymongo rpy2 wx wx.aui)

Not available for testing: python2.6

@takluyver

Copy link
Copy Markdown
Member

(Testing changes to the test_pr script - ignore the double post)

@takluyver takluyver mentioned this pull request Jul 16, 2012
@takluyver

Copy link
Copy Markdown
Member

OK, merging this one. Thanks for all these, @bfroehle .

takluyver added a commit that referenced this pull request Jul 17, 2012
@takluyver takluyver merged commit aed0492 into ipython:master Jul 17, 2012
@minrk

minrk commented Jul 18, 2012

Copy link
Copy Markdown
Member

Argh, I think this introduced conflicts in several PRs. We really should avoid merging the larger 'cleanup' fixes when we have lots of outstanding PRs, as they mainly give us more work to do, while not actually providing any immediate benefit.

@takluyver

Copy link
Copy Markdown
Member

Sorry about that. Unfortunately, I think we're going to have lots of outstanding PRs for the foreseeable future, so we can't afford to be too particular about this sort of thing, or we'll never be able to do it at all.

@minrk

minrk commented Jul 18, 2012

Copy link
Copy Markdown
Member

Probably true. I think we should just be a little careful with the larger ones while there are non-stale PRs older than it that are either A) large/complex and/or B) from novice users who may have difficulty rebasing. Rebasing generated PRs is a lot easier than rebasing real ones.

It's not a big deal, just that cleanup PRs make contributing to IPython a little more unpleasant.

mattvonrocketstein pushed a commit to mattvonrocketstein/ipython that referenced this pull request Nov 3, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants