Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Stop relying on 2to3 and usesix.py for compatibility instead#2226

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
mdboom merged 3 commits intomatplotlib:masterfrommdboom:six
Sep 3, 2013

Conversation

@mdboom
Copy link
Member

This is a significant amount of work, but will pay off (primarily in shorter build times) in the end.

@pelson
Copy link
Member

primarily in shorter build times

And the fact that we would have a single code base which users of Python3 can actually contribute against...

@ghostghost assignedmdboomAug 13, 2013
@mdboom
Copy link
MemberAuthor

Well, I'm not sure that usingsix vs.2to3 requires any less knowledge of the differences between Python 2 and 3 to be effective at it, unfortunately. As I work through this, it certainly doesn't result in "cleaner" code.

@mdboom
Copy link
MemberAuthor

Ok -- here it is. This is going to make some merges harder, unfortunately. Also, we should probably get#2281 (which is against 1.3.x) finished and merged with this before finalizing this. Some of these changes may be surprising, and I'll try to notate them here in this PR.

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

My thinking here is to always include this in every file to make moving code around easier. The things it has are "core" enough that they should probably be considered "built-ins".

@efiring
Copy link
Member

Mike,
Your explanations arevery helpful. I think it would be a good idea to include them in the code as comments rather than leaving them only as comments in the PR. The things you are explaining are the sorts of things a person might trip over when working with the code later, so they are exactly the sort of thing for which in-code comments are needed. This will also be helpful to others, including myself, when trying to migrate other code from 2-only to single codebase 2-or-3.
Putting these examples and explanations in a file of some sort that becomes part of the documentation (not necessarily sphinxified--could be just a plain text file) would also be helpful.

@mdboom
Copy link
MemberAuthor

For some of these, there are many instances of them, and I wouldn't want to comment them in each place. But perhaps a "writing portable code" document in the developer docs is in order.

@WeatherGod
Copy link
Member

And a reference to that document in the relevant source files for the most
tricky changes might also help bring that to the attention of any prying
eyes.

mdboom added a commit that referenced this pull requestSep 3, 2013
Stop relying on 2to3 and use `six.py` for compatibility instead
@mdboommdboom merged commit705fae3 intomatplotlib:masterSep 3, 2013
tacaswell added a commit to tacaswell/matplotlib that referenced this pull requestSep 24, 2013
…terstoo long according to pep8.  This bulk-fixes this by breakingthe import up into 4 seperate lines.
tacaswell added a commit to tacaswell/matplotlib that referenced this pull requestSep 25, 2013
…achterstoo long according to pep8.  This bulk-fixes every file in the library.
@mdboommdboom deleted the six branchAugust 7, 2014 13:54
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

@mdboommdboom

Labels

None yet

Projects

None yet

Milestone

v1.4.0

Development

Successfully merging this pull request may close these issues.

4 participants

@mdboom@pelson@efiring@WeatherGod

[8]ページ先頭

©2009-2025 Movatter.jp