www.cendio.com
Bug 4245 - our python modules shouldn't replace the system ones
: our python modules shouldn't replace the system ones
Status: NEW
: ThinLinc
Other
: 3.2.0
: PC Unknown
: P2 Normal
: MediumPrio
Assigned To:
:
:
:
:
  Show dependency treegraph
 
Reported: 2012-03-29 16:17 by
Modified: 2012-12-07 10:11 (History)
Acceptance Criteria:


Attachments


Note

You need to log in before you can comment on or make changes to this bug.


Description From cendio 2012-03-29 16:17:34
Currently we put our python path as the first one in sys.path. This has several
problems:

 a) We override the system modules, providing a different implementation than
the system expects. This will eventually cause crashes.

 b) The module actually loaded is unpredictable. If the module gets loaded
before we modify sys.path, then we get the system version. If it gets loaded
later then we get our version. Since we don't know what other imports will
load, the module actually loaded is somewhat random.


Putting our path at the end would mostly solve these issues. A portion of b)
still remains though:

 c) Our code can't be sure we loaded our version of a module.

Solving this is non-trivial though...
------- Comment #1 From cendio 2012-12-07 10:11:03 -------
The best idea so far is to move everything into a new namespace (e.g. under the
"thinlinc" module). This will allow us to load our versions without conflicting
with the system ones.

One potential problem though is that complex modules (e.g. Cheetah) do internal
imports. We need to check that these work properly if we start moving things
around.