Skip to content

Fix units examples under python3 - #3838

Merged
mdboom merged 2 commits into
matplotlib:masterfrom
jenshnielsen:units_examples_python3
Oct 20, 2015
Merged

mdboom merged 2 commits into
matplotlib:masterfrom
jenshnielsen:units_examples_python3

Conversation

@jenshnielsen

Copy link
Copy Markdown
Member

Seems like passing additional arguments to object.new is no longer supported. AFAIK these would previously just have been dropped anyway so I have removed them but I would like some input from someone who understands the python metaclasses better than me.

@jenshnielsen

Copy link
Copy Markdown
Member Author

Added a change to make sure the the whole multiplies of pi are rendered as integers in python3 as in python2 by doing integer division.

With this change the result of running the examples with python3 looks identical to what is in the current docs.

@tacaswell tacaswell added this to the v1.5.x milestone Nov 24, 2014
@tacaswell

Copy link
Copy Markdown
Member

Reading this I am not convinced that this is the proper use of overloading __new__ in any case.

@jenshnielsen
jenshnielsen force-pushed the units_examples_python3 branch from bef672b to 2121e2f Compare December 30, 2014 11:51
@tacaswell tacaswell modified the milestones: proposed next point release, next point release Feb 19, 2015
@tacaswell

Copy link
Copy Markdown
Member

@jenshnielsen How do you exercise the problem?

@jenshnielsen

Copy link
Copy Markdown
Member Author

I was trying to build the docs with python3. That mostly works apart from the unit examples and
an issue with loading saved data, which is not really a matplotlib issue but either a numpy or a python issue.

I agree that this is not really the right solution but I haven't had the time to dive into fixing this probably.

This is no worse off than it was in the latest release (docs build has never fully worked with python3 as far as I know) so I don't think it needs to be blocker for the next release.

@tacaswell tacaswell modified the milestones: next point release, proposed next point release Jul 17, 2015
mdboom added a commit that referenced this pull request Oct 20, 2015
@mdboom
mdboom merged commit a9a523f into matplotlib:master Oct 20, 2015
mdboom added a commit that referenced this pull request Oct 20, 2015
@mdboom

mdboom commented Oct 20, 2015

Copy link
Copy Markdown
Member

Backported to v1.5.x in 72c2503

@mdboom mdboom modified the milestones: next point release (1.5.0), proposed next point release (2.1) Oct 20, 2015
@jenshnielsen
jenshnielsen deleted the units_examples_python3 branch November 9, 2015 09:24
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