Defer Traits import in ipy_traits_completer

Bug #416174 reported by Robert Kern on 2009-08-19
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fix Committed

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.

Robert Kern (robert-kern) wrote :
Robert Kern (robert-kern) wrote :
Fernando Perez (fdo.perez) wrote :


- 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  Edit
Everyone can see this information.

Other bug subscribers