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

Fix axes.set_prop_cycle to handle any generic iterable sequence. #5452

Merged
merged 2 commits into from Nov 10, 2015

Conversation

u55
Copy link
Contributor

@u55 u55 commented Nov 9, 2015

Closes issue #5368.

@cleanup
def test_invalid_input_forms():
fig, ax = plt.subplots()
with assert_raises((TypeError, ValueError)):
Copy link
Member

Choose a reason for hiding this comment

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

can't use assert_raises as a context manager if you want this to go into the 1.5.x branch. Nose doesn't provide that context manager for python 2.6 for some reason.

Copy link
Member

Choose a reason for hiding this comment

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

note, since this PR is set up to merge into master, it is ok to keep it this way. Just that the person who backports this has to convert it to the non context manager form.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

According to the what's new page, matplotlib 1.5 dropped support for python 2.6.

Copy link
Member

Choose a reason for hiding this comment

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

Right, sorry. That was a last minute change that went into 1.5 prior to
release. Carry on.

On Mon, Nov 9, 2015 at 4:44 PM, u55 notifications@github.com wrote:

In lib/matplotlib/tests/test_cycles.py
#5452 (comment):

  • ax.set_prop_cycle('linewidth', iter([1, 2]))
  • ax.set_prop_cycle('linewidth', np.array([1, 2]))
  • ax.set_prop_cycle('color', np.array([[1, 0, 0],
  •                                     [0, 1, 0],
    
  •                                     [0, 0, 1]]))
    
  • ax.set_prop_cycle(lw=[1, 2], color=['k', 'w'], ls=['-', '--'])
  • ax.set_prop_cycle(lw=np.array([1, 2]),
  •                  color=np.array(['k', 'w']),
    
  •                  ls=np.array(['-', '--']))
    
  • assert True

+@cleanup
+def test_invalid_input_forms():

  • fig, ax = plt.subplots()
  • with assert_raises((TypeError, ValueError)):

According to the what's new page
https://github.com/matplotlib/matplotlib/blob/838502e7ccf5e97e30e3f80db15e00eb124fe600/doc/users/whats_new.rst,
matplotlib 1.5 dropped support for python 2.6.


Reply to this email directly or view it on GitHub
https://github.com/matplotlib/matplotlib/pull/5452/files#r44336801.

Copy link
Member

Choose a reason for hiding this comment

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

I knew this was going to be confusing when we decided this awhile ago...

It is that official support for 2.6 ended for v1.5, but it seems that we still have Travis testing v1.5.x branch with python2.6. So, whoever backports this PR should be aware of that.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@WeatherGod
I only see Travis running tests for versions: 2.7, 3.4, 3.5, and the nightly build 3.6.0a0. Am I missing something?

Copy link
Member

Choose a reason for hiding this comment

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

https://github.com/matplotlib/matplotlib/blob/v1.5.x/.travis.yml
That is the way it is configured on the 1.5.x branch. Your PR is against master, which is configured differently. But don't worry about it. I will take care of it when I backport this PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ahh, I see. Thank you for the explanation.

@u55
Copy link
Contributor Author

u55 commented Nov 9, 2015

I understand why the pep8 Travis test failed, but I don't understand why the first Travis test, 9180.1, failed. Does anyone have an explanation?

@WeatherGod
Copy link
Member

We get spurious IO errors in Travis. They typically go away when retrying the test. Since you are going to push up a change to fix the PEP8 problems, we'll see if that test error goes away on its own.

@u55
Copy link
Contributor Author

u55 commented Nov 9, 2015

Do I need to rebase and/or create a separate pull request?

@WeatherGod
Copy link
Member

neither. Just update your branch with new commits and push that up to github. The PR tracks the branch, not the commit.

@WeatherGod WeatherGod added this to the Critical bugfix release (1.5.1) milestone Nov 9, 2015
WeatherGod added a commit that referenced this pull request Nov 10, 2015
Fix axes.set_prop_cycle to handle any generic iterable sequence.
@WeatherGod WeatherGod merged commit 595868a into matplotlib:master Nov 10, 2015
WeatherGod added a commit to WeatherGod/matplotlib that referenced this pull request Nov 10, 2015
Fix axes.set_prop_cycle to handle any generic iterable sequence.
@WeatherGod
Copy link
Member

Backporting PR is #5459

tacaswell added a commit that referenced this pull request Nov 11, 2015
@u55 u55 deleted the cycler_generic_iterator branch November 11, 2015 16:01
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

3 participants