Re: double module loads

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

> The sys.path now contains both:
> site-packages
> site-packages/pyanaconda

> The problem is when you do
> import module
> and later:
> from pyanaconda import module

This should never ever happen.. until we had separate directory, this was ok, but now that we are part of site-packages structure, we should remove this from sys.path.

Anaconda itself will still be able to use "import module", because current directory has precedence over sys.path and everybody else should use pyanaconda.module anyways. So no big change will be needed. For subpackages we can use the new 2.6/3.0 syntax of "import ..iutil" where needed, it will force us to clean up the source dependencies a bit (which we need anyways).

Starting anaconda can then be acomplished using separate shell or python script in /usr/bin which can handle all updates (e.g. symlinking stuff to proper location or just adding updates dir to sys.path) and then importing pyanaconda and starting something like pyanaconda.run() or whatever.

I also think we should create pyanaconda directory in git and move all files into it, so we do not mix source code, documentation, tests and resource files together anymore. 

With the above properly done, we could use the third solution and it won't bite us now or in the future. We will also stop "redefining" some standard python libraries.

> 3) Remove all the offending
> from pyanaconda import ..
> lines and only use the old import style. This means the problem is
> going 
> to bite us later (or it's going to bite someone who imports anaconda 
> modules and then us).

Martin

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list

[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux