Skip to content
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

Make all classes new-style. #3662

Merged
merged 1 commit into from Oct 18, 2014
Merged

Conversation

switham
Copy link
Contributor

@switham switham commented Oct 17, 2014

The theory is, the code already worked in Python 3 where all classes are new-style.

Changed class definitions in *.py (only) in the whole tree, including

examples
lib/matplotlib/testing
lib/matplotlib/tests
lib/mpl_toolkits

Take it away, Travis.

@tacaswell tacaswell added this to the v1.5.x milestone Oct 17, 2014
@jenshnielsen
Copy link
Member

The failures are not related. The 2.6 ones are fixed by #3661 and the other one is a random one.

@mdboom
Copy link
Member

mdboom commented Oct 17, 2014

👍 If we rebase on master and give Travis another go...

@tacaswell
Copy link
Member

Sorry, I merged #3661 which apparently conflicts with this..

@switham
Copy link
Contributor Author

switham commented Oct 17, 2014

Does that mean I need to merge matplotlib/master into my branch to get Travis to rerun?

@jenshnielsen
Copy link
Member

Not that it is so important but it must be #3635 that conflicts with this one.

@tacaswell
Copy link
Member

We prefer that you do a re-base rather than merge master into your branch. This is done via

cd your/mpl/checkout
git remote update
git checkout your_branch
git rebase upstream/master

and follow the on-screen directions. 'upstream' is what ever name you have given to the 'matplotlbi/matplotlib' repository.

The conflicts are in example/units/evans_test.py

@jenshnielsen That makes more sense.

@tacaswell
Copy link
Member

sorry, forgot the last step, after you have cleaned up the conflicts and merged everything

git push --force your_repo classes_new_style:classes_new_style

@switham
Copy link
Contributor Author

switham commented Oct 17, 2014

I had to

  • resolve the change
  • git add
  • git rebase --continue
  • resolve the same change
  • git add
  • git rebase --continue

And then it told me, can't --continue, there's nothing to resolve, so I did

  • git rebase --skip
  • git push --force origin classes_new_style:classes_new_style

The two changed lines that git considered in conflict because they were adjacent, are now both in their changed (better) states in switham/matplotlib.

Maybe the weird middle part was because I had done a git commit --amend before the original pull request, so I had to re-merge the two duplicate commits again. I saved a screen log in case anyone's interested.

Also, I don't see github proceeding to run Travis after I did this:
$ git push --force origin classes_new_style:classes_new_style
Counting objects: 338, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (158/158), done.
Writing objects: 100% (196/196), 18.29 KiB, done.
Total 196 (delta 183), reused 49 (delta 38)
To https://github.com/switham/matplotlib.git
+ e0a9377...f4e9c6c classes_new_style -> classes_new_style (forced update)
$

(This has been edited, I mistakenly wrote "git commit --continue" instead of "git rebase --continue" before. Another edit later.)

tacaswell added a commit that referenced this pull request Oct 18, 2014
MNT : Make all classes new-style.
@tacaswell tacaswell merged commit 6204ca8 into matplotlib:master Oct 18, 2014
@tacaswell
Copy link
Member

@switham Thanks! Is this your first contribution to mpl?

@switham
Copy link
Contributor Author

switham commented Oct 18, 2014

This one and #3628 are my first two, yay!

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.

None yet

4 participants