Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#7498 closed defect (fixed)

Do *not* import matplotlib at sage startup

Reported by: robertwb Owned by: was
Priority: major Milestone: sage-4.3
Component: graphics Keywords:
Cc: was Merged in: sage-4.3.alpha1
Authors: Robert Bradshaw, Mike Hansen Reviewers: Florent Hivert, Mike Hansen
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

Description

Despite the warning

## IMPORTANT: Do *not* import matplotlib at module scope.  It takes a
## surprisingly long time to initialize itself.  It's better if it is
## imported in functions, so it only gets started if it is actually
## going to be used.

it's gotten back in there again. There should be a test.

Attachments (2)

7498-no-matplotlib.patch (6.3 KB) - added by robertwb 12 years ago.
trac_7498-review.patch (1.3 KB) - added by mhansen 12 years ago.

Download all attachments as: .zip

Change History (10)

Changed 12 years ago by robertwb

comment:1 Changed 12 years ago by robertwb

  • Cc was added
  • Status changed from new to needs_review

comment:2 Changed 12 years ago by was

  • Status changed from needs_review to needs_work

This patch is weird. It has a 3-liner that does what this ticket is about, but then it also has a bunch of other complicated unrelated code. Hmm?

comment:3 Changed 12 years ago by robertwb

The diff is odd, try looking at before and after. There's a class that extends a class from matplotlib, which I moved to inside a function body so I didn't have to import it on startup.

comment:4 Changed 12 years ago by robertwb

  • Status changed from needs_work to needs_review

Changed 12 years ago by mhansen

comment:5 Changed 12 years ago by mhansen

  • Report Upstream set to N/A

Robert's changes look good, but it looks like we also need to make some changes in plot_field3d.py.

I've attached a patch for that.

comment:6 Changed 12 years ago by hivert

  • Status changed from needs_review to positive_review

Patch trac_7498-review.patch is ok => Positive review.

comment:7 Changed 12 years ago by mhansen

  • Authors set to Robert Bradshaw, Mike Hansen
  • Merged in set to sage-4.3.alpha1
  • Resolution set to fixed
  • Reviewers set to Florent Hivert, Mike Hansen
  • Status changed from positive_review to closed

comment:8 Changed 12 years ago by mvngu

  • Summary changed from Do *not* import matplotlib at sage startup. to Do *not* import matplotlib at sage startup
Note: See TracTickets for help on using tickets.