[Enthought-dev] rcParams and validation

I added enthought debug to our list of enthought packages a few days
back when I was having install troubles. I think this was back when
the traits 3 stuff was creeping into our traits 2 installs, and I was
getting error messages about not having debug installed. That may
have all gone away now with your recent work, and it is probably a
residual hack in our install instructions.

The following, however, gives me a broken install:

  sudo rm -rf /usr/local/lib/python2.5/site-packages/enthought*
  sudo easy_install -f
http://code.enthought.com/enstaller/eggs/source/unstable
"enthought.traits < 3.0a"

eg, with the file

    class C(HasTraits):
        x = Array('d', (3,3))

    c = C()
    c.x = [[1,0,0], [0,1,0], [0,0,1]]

I get the traceback:

ImportError: No module named resource.api

But if I add the resource explcitly,

   sudo rm -rf /usr/local/lib/python2.5/site-packages/enthought*
   sudo easy_install -f
http://code.enthought.com/enstaller/eggs/source/unstable
"enthought.resource <3.0a" "enthought.traits < 3.0a"

I get a working traits install, so maybe a simple dependency is
missing somewhere. And I don't get all the extra stuff that comes
along with debug (my fault Darren):

c-67-176-251-149:~> ls /usr/local/lib/python2.5/site-packages/ent*
  enthought.etsconfig-2.0b1.dev_r12810-py2.5.egg:
  enthought.resource-2.0b1.dev_r12810-py2.5.egg:
  enthought.traits-2.0b2.dev_r12847-py2.5-macosx-10.3-ppc.egg:
  enthought.util-2.0b2.dev_r12810-py2.5.egg:

JDH

···

On 7/22/07, Dave Peterson <dpeterson@...492...> wrote:

Hmm, why did you choose to install enthought.debug? The current source
for enthought.traits requires only enthought.etsconfig (which has no
other dependencies) and enthought.util (which, without extras, requires
only enthought.traits.)

Just an additional data point, with traits 3 from the trunk. Running this:

import enthought.traits.api as T

class C(HasTraits):
x = Array('d', (3,3))

c = C\(\)
c\.x = \[\[1,0,0\], \[0,1,0\], \[0,0,1\]\]

yeilds:

Traceback (most recent call last):
[...]
File "/usr/lib/python2.5/site-packages/enthought.traits-3.0.0b1-py2.5-linux-i686.egg/enthought/traits/has_traits.py",
line 289, in _check_trait
    trait = trait()
  
File "/usr/lib/python2.5/site-packages/enthought.traits-3.0.0b1-py2.5-linux-i686.egg/enthought/traits/ui/ui_traits.py",
line 125, in __init__
    super( Image, self ).__init__( convert_image( value ), **metadata )
  
File "/usr/lib/python2.5/site-packages/enthought.traits-3.0.0b1-py2.5-linux-i686.egg/enthought/traits/ui/ui_traits.py",
line 86, in convert_image
    from enthought.pyface.image_resource import ImageResource
ImportError: No module named pyface.image_resource

···

On Sunday 22 July 2007 12:46:50 pm John Hunter wrote:

The following, however, gives me a broken install:

  sudo rm -rf /usr/local/lib/python2.5/site-packages/enthought*
  sudo easy_install -f
http://code.enthought.com/enstaller/eggs/source/unstable
"enthought.traits < 3.0a"

eg, with the file

    class C(HasTraits):
        x = Array('d', (3,3))

    c = C()
    c.x = [[1,0,0], [0,1,0], [0,0,1]]

I get the traceback:

ImportError: No module named resource.api

John Hunter wrote:

  

Hmm, why did you choose to install enthought.debug? The current source
for enthought.traits requires only enthought.etsconfig (which has no
other dependencies) and enthought.util (which, without extras, requires
only enthought.traits.)
    
I added enthought debug to our list of enthought packages a few days
back when I was having install troubles. I think this was back when
the traits 3 stuff was creeping into our traits 2 installs, and I was
getting error messages about not having debug installed. That may
have all gone away now with your recent work, and it is probably a
residual hack in our install instructions.

The following, however, gives me a broken install:

  sudo rm -rf /usr/local/lib/python2.5/site-packages/enthought*
  sudo easy_install -f
http://code.enthought.com/enstaller/eggs/source/unstable
"enthought.traits < 3.0a"

eg, with the file

    class C(HasTraits):
        x = Array('d', (3,3))

    c = C()
    c.x = [[1,0,0], [0,1,0], [0,0,1]]

I get the traceback:

ImportError: No module named resource.api

But if I add the resource explcitly,

   sudo rm -rf /usr/local/lib/python2.5/site-packages/enthought*
   sudo easy_install -f
http://code.enthought.com/enstaller/eggs/source/unstable
"enthought.resource <3.0a" "enthought.traits < 3.0a"

I get a working traits install, so maybe a simple dependency is
missing somewhere.
  
It does look like one of the dependencies in enthought.traits is wrong then. In particular, it was thought that enthought.resource was only required if you actually *used* Traits UI features. I just looked at the code and the only import, in traits, of a package from enthought.resource is in the tree_node.py file which is imported as part of the enthought.traits.ui.api namespace -- which means it happens *alot*. I'll look at avoiding that import, or handling it in a try...except, or update the dependencies and check the changes in as soon as I can get to it. (I'm in the middle of something else currently.)

(Thanks to Darren Dale for providing the full traceback btw.)

-- Dave

···

On 7/22/07, Dave Peterson <dpeterson@...492...> wrote:

Dave Peterson wrote:

It does look like one of the dependencies in enthought.traits is wrong then. In particular, it was thought that enthought.resource was only required if you actually *used* Traits UI features. I just looked at the code and the only import, in traits, of a package from enthought.resource is in the tree_node.py file which is imported as part of the enthought.traits.ui.api namespace -- which means it happens *alot*. I'll look at avoiding that import, or handling it in a try...except, or update the dependencies and check the changes in as soon as I can get to it. (I'm in the middle of something else currently.)
  
Just uploaded a new source tarball that I believe should have this fixed so that you don't need to install enthought.resource. Basically, I moved the import from enthought.resource such that it is only executed if you're actually using Traits UI tree node features. I also wrapped it with a try...except so that if you don't have enthought.resource installed, you just don't find some of the tree node images instead of getting a hard failure.

It is svn revision 12960.

-- Dave

Bingo, I am now getting a working install with

sudo easy_install -f
http://code.enthought.com/enstaller/eggs/source/unstable
"enthought.traits < 3.0a"

which brings in only etsconfig, util and traits. Thanks for tracking this down.

···

On 7/22/07, Dave Peterson <dpeterson@...492...> wrote:

Just uploaded a new source tarball that I believe should have this fixed
so that you don't need to install enthought.resource. Basically, I

I just ran that command myself (9:45 EST, July 23), and it installed:

enthought.debug-2.0b2.dev_r12984-py2.5.egg/
enthought.developer-2.0b2.dev_r12984-py2.5.egg/
enthought.envisage-2.0b2.dev_r12984-py2.5.egg/
enthought.etsconfig-2.0b1.dev_r12883-py2.5.egg/
enthought.help-2.0b2.dev_r12984-py2.5.egg/
enthought.io-2.0b1.dev_r12810-py2.5.egg/
enthought.logger-2.0b2.dev_r12984-py2.5.egg/
enthought.naming-2.0b2.dev_r12810-py2.5.egg/
enthought.plugins.text_editor-2.0b2.dev_r12984-py2.5.egg/
enthought.pyface-2.0b2.dev_r12984-py2.5.egg/
enthought.resource-2.0b1.dev_r12810-py2.5.egg/
enthought.sweet_pickle-2.0b2.dev_r12810-py2.5.egg/
enthought.traits-2.0b2.dev_r12984-py2.5-linux-x86_64.egg/
enthought.traits.ui.wx-2.0b2.dev_r12984-py2.5.egg/
enthought.type_manager-2.0b1.dev_r12810-py2.5.egg/
enthought.units-2.0b2.dev_r12984-py2.5.egg/
enthought.util-2.0b2.dev_r12981-py2.5.egg/

Darren

···

On Sunday 22 July 2007 02:10:50 pm John Hunter wrote:

On 7/22/07, Dave Peterson <dpeterson@...492...> wrote:
> Just uploaded a new source tarball that I believe should have this fixed
> so that you don't need to install enthought.resource. Basically, I

Bingo, I am now getting a working install with

sudo easy_install -f
http://code.enthought.com/enstaller/eggs/source/unstable
"enthought.traits < 3.0a"

which brings in only etsconfig, util and traits. Thanks for tracking this
down.

Replying to this, even though I replied to a later message to enthought-dev, since this one is also cc'd to matplotlib-devel....

Darren Dale wrote:

···

On Sunday 22 July 2007 02:10:50 pm John Hunter wrote:
  

On 7/22/07, Dave Peterson <dpeterson@...492...> wrote:
    

Just uploaded a new source tarball that I believe should have this fixed
so that you don't need to install enthought.resource. Basically, I
      

Bingo, I am now getting a working install with

sudo easy_install -f
http://code.enthought.com/enstaller/eggs/source/unstable
"enthought.traits < 3.0a"

which brings in only etsconfig, util and traits. Thanks for tracking this
down.
    
I just ran that command myself (9:45 EST, July 23), and it installed:

enthought.debug-2.0b2.dev_r12984-py2.5.egg/
enthought.developer-2.0b2.dev_r12984-py2.5.egg/
enthought.envisage-2.0b2.dev_r12984-py2.5.egg/
enthought.etsconfig-2.0b1.dev_r12883-py2.5.egg/
enthought.help-2.0b2.dev_r12984-py2.5.egg/
enthought.io-2.0b1.dev_r12810-py2.5.egg/
enthought.logger-2.0b2.dev_r12984-py2.5.egg/
enthought.naming-2.0b2.dev_r12810-py2.5.egg/
enthought.plugins.text_editor-2.0b2.dev_r12984-py2.5.egg/
enthought.pyface-2.0b2.dev_r12984-py2.5.egg/
enthought.resource-2.0b1.dev_r12810-py2.5.egg/
enthought.sweet_pickle-2.0b2.dev_r12810-py2.5.egg/
enthought.traits-2.0b2.dev_r12984-py2.5-linux-x86_64.egg/
enthought.traits.ui.wx-2.0b2.dev_r12984-py2.5.egg/
enthought.type_manager-2.0b1.dev_r12810-py2.5.egg/
enthought.units-2.0b2.dev_r12984-py2.5.egg/
enthought.util-2.0b2.dev_r12981-py2.5.egg/
  
:frowning: I validated that this is indeed the current state of things as a result of my adding in extras to the dependencies that previously existed. Looks like we'll have to delay our release to spend more time minimizing these dependencies.

-- Dave