Defer Traits import in ipy_traits_completer

Bug #416174 reported by Robert Kern
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
IPython
Fix Committed
Undecided
Unassigned

Bug Description

Importing Traits can be expensive. Enabling the ipy_traits_completer at startup can be undesirable because of this. The attached patch delays the import of Traits until it encounters an object that looks like it subclasses from HasTraits. It then imports Traits and does the actual isinstance() check.

Revision history for this message
Robert Kern (robert-kern) wrote :
Revision history for this message
Robert Kern (robert-kern) wrote :
Revision history for this message
Fernando Perez (fdo.perez) wrote :

Pushed:

- trunk, r1245.
- 0.10.1, r1227. (oops, forgot the --author flag here, sorry, I put it right in the trunk commit).

Note, this completer got moved by Brian into 'deathrow' after the refactoring. We need to check it and update it if necessary to move it back into the mainline.

Changed in ipython:
status: New → Fix Committed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.