Update events handling documentation to work with Python 3. #6354

Merged
merged 1 commit into from May 1, 2016

Conversation

Projects
None yet
4 participants
Contributor

pganssle commented Apr 30, 2016 edited

Event handling documentation has a lot of Python 2-style print statements, so I have updated them here. I ran the code snippets in Python 3 and they all work. The only difference is that for the Python 3 version, the outputs look like this:

'event contains', (7.0, 0.0)

And for Python 2 they look like this now:

('event contains', (7.0, 0.0))

They used to not have parens around the outputs, but they do now because of the parens required to make it polyglot code. The old behavior can return if you prepend from __future__ import print_function, but I don't really think that's necessary.

@pganssle pganssle Update events handling documentation to work with Python 3.
e50038d

mdboom added the needs_review label Apr 30, 2016

Owner

tacaswell commented Apr 30, 2016

👍 It looks like the docs failure is due to poor version checking in the link checker.

tacaswell added this to the 2.1 (next point release) milestone Apr 30, 2016

tacaswell closed this May 1, 2016

tacaswell reopened this May 1, 2016

@tacaswell tacaswell added needs_review and removed needs_review labels May 1, 2016

Contributor

pganssle commented May 1, 2016

Is the coverage failure messed up? It's talking about changes in coverage that didn't have anything to do with what I changed.

@tacaswell tacaswell merged commit 3b8c094 into matplotlib:master May 1, 2016

1 of 3 checks passed

coverage/coveralls Coverage decreased (-0.007%) to 69.652%
Details
continuous-integration/appveyor/pr Waiting for AppVeyor build to complete
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

tacaswell removed the needs_review label May 1, 2016

@tacaswell tacaswell added a commit that referenced this pull request May 1, 2016

@tacaswell tacaswell Merge pull request #6354 from pganssle/event_doc_py3
DOC: Update events handling documentation to work with Python 3.
520d1a1
Owner

tacaswell commented May 1, 2016

backported to v1.5.1-doc as 520d1a1

Owner

tacaswell commented May 2, 2016

I closed and re-opened to re-trigger the builds. I do not know what it's base line is, but it might be looking at the first time it ran this PR vs the second time it ran this PR against a different master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment