Re: Bug#382252: Python PATH problem

2007-01-06 Thread Neil Schemenauer
Lars Wirzenius <[EMAIL PROTECTED]> wrote: > While we're listing personal preferences, I'm firmly in the camp that > belives Python should create .py[co] files only when explicitly asked, > never implicitly just by running programs. That way, whenever someone > explicitly has the created, they're al

Re: Bug#382252: Python PATH problem

2007-01-03 Thread Vincent Danjean
Steve Langasek a écrit : > On Wed, Jan 03, 2007 at 01:04:37PM +0100, Pierre Habouzit wrote: >> he does not needs to, having run hg as root is enough to produce the >> *.pyc if your package (even against the previous policy) did not managed >> them. > > Um, isn't this only the case if the user wa

Re: Bug#382252: Python PATH problem

2007-01-03 Thread Steve Langasek
severity 382252 important thanks On Wed, Jan 03, 2007 at 01:04:37PM +0100, Pierre Habouzit wrote: > # sorry pal but mishandling *.pyc files is a policy violation. > severity 382252 serious > thanks > > > $ ls -l /usr/lib/python*/site-packages/mercurial/ > > [.. lots of *.pyc ..] > > > Can you

Re: Bug#382252: Python PATH problem

2007-01-03 Thread Wouter van Heyst
On Wed, Jan 03, 2007 at 07:29:24PM +0200, Lars Wirzenius wrote: > On ke, 2007-01-03 at 18:14 +0100, Wouter van Heyst wrote: > > Pierre already mentioned that is not the problem, but I'd like to > > explicitly state that that would make it impossible to run applications > > if you only have the .pyc

Re: Bug#382252: Python PATH problem

2007-01-03 Thread Lars Wirzenius
On ke, 2007-01-03 at 18:14 +0100, Wouter van Heyst wrote: > Pierre already mentioned that is not the problem, but I'd like to > explicitly state that that would make it impossible to run applications > if you only have the .pyc files, a valid use-case, although not > something that will arise from

Re: Bug#382252: Python PATH problem

2007-01-03 Thread Wouter van Heyst
On Wed, Jan 03, 2007 at 01:10:42PM +, Sam Morris wrote: > Josselin Mouette wrote: > > mdiff.py does "import bdiff" which looks for bdiff.so in the same > > directory. On your system, mdiff.py is is > > in /var/lib/python-support/python2.4/mercurial/ which is the correct > > place for packages h

Re: Bug#382252: Python PATH problem

2007-01-03 Thread Sam Morris
On Wed, 03 Jan 2007 14:19:21 +0100, Pierre Habouzit wrote: >> This is #397111 cropping up again. Python really shouldn't import modules >> from .pyc and .pyo files unless the original .py file still exists >> alongside them. > > that's not really it. The thing is python should not build .pyc/.py

Re: Bug#382252: Python PATH problem

2007-01-03 Thread Vincent Danjean
Wouter Cloetens a écrit : > On Wed, Jan 03, 2007 at 01:04:37PM +0100, Pierre Habouzit wrote: >> To Wouter: to resolve your problem, just rm -rf >> /usr/lib/python*/site-packages/mercurial. You can do that safely, >> that'll solve your problem. > > Success! Many thanks! You need to remove /usr/lib

Re: Bug#382252: Python PATH problem

2007-01-03 Thread Pierre Habouzit
On Wed, Jan 03, 2007 at 01:10:42PM +, Sam Morris wrote: > Josselin Mouette wrote: > > mdiff.py does "import bdiff" which looks for bdiff.so in the same > > directory. On your system, mdiff.py is is > > in /var/lib/python-support/python2.4/mercurial/ which is the correct > > place for packages h

Re: Bug#382252: Python PATH problem

2007-01-03 Thread Sam Morris
Josselin Mouette wrote: > mdiff.py does "import bdiff" which looks for bdiff.so in the same > directory. On your system, mdiff.py is is > in /var/lib/python-support/python2.4/mercurial/ which is the correct > place for packages handled by python-support, while on the user's system > it is in /usr/l

Re: Bug#382252: Python PATH problem

2007-01-03 Thread Wouter Cloetens
On Wed, Jan 03, 2007 at 01:04:37PM +0100, Pierre Habouzit wrote: > To Wouter: to resolve your problem, just rm -rf > /usr/lib/python*/site-packages/mercurial. You can do that safely, > that'll solve your problem. Success! Many thanks! signature.asc Description: Digital signature

Re: Bug#382252: Python PATH problem

2007-01-03 Thread Pierre Habouzit
# sorry pal but mishandling *.pyc files is a policy violation. severity 382252 serious thanks > > $ ls -l /usr/lib/python*/site-packages/mercurial/ > [.. lots of *.pyc ..] > > Can you also tell me if you have installed mercurial from upstream > > sources ? he does not needs to, having run h

Re: Bug#382252: Python PATH problem

2007-01-03 Thread Wouter Cloetens
On Wed, Jan 03, 2007 at 10:25:07AM +0100, Pierre Habouzit wrote: > so my guess, but I may be wrong, is that there is old byte compiled > things from your package before the new policy, and that when > /usr/bin/hg does `from mercurial import mdiff` it finds the mdiff.pyc > from /usr/lib/python2.4/

Re: Bug#382252: Python PATH problem

2007-01-03 Thread Wouter Cloetens
On Wed, Jan 03, 2007 at 11:18:49AM +0100, Vincent Danjean wrote: > $ dpkg -S mercurial mercurial: /usr/share/mercurial/templates/gitweb/tags.tmpl mercurial: /usr/share/mercurial/templates/filelog.tmpl mercurial: /usr/share/python-support/mercurial/mercurial/remoterepo.py mercurial: /usr/share/doc/

Re: Python PATH problem

2007-01-03 Thread Vincent Danjean
Josselin Mouette a écrit : > mdiff.py does "import bdiff" which looks for bdiff.so in the same > directory. On your system, mdiff.py is is > in /var/lib/python-support/python2.4/mercurial/ which is the correct > place for packages handled by python-support, while on the user's system > it is in /us

Re: Python PATH problem

2007-01-03 Thread Josselin Mouette
By the way I also noticed there is a direct symbolic link in /var/lib/python-support to your templates directory, while support for such links in /usr/share/python-support was added (on your request :) in 0.4.3. Last but not least, you should use python instead of python2.4, now that 2.4 is the de

Re: Python PATH problem

2007-01-03 Thread Pierre Habouzit
On Wed, Jan 03, 2007 at 09:58:53AM +0100, Vincent Danjean wrote: > Hi, > > I'm the maintainer of mercurial. At least one of the users has a > problem with loading python modules. > Can someone look at bug #382252 ? > > In short, > echo 'import sys; print sys.path; from mercurial import bd

Re: Python PATH problem

2007-01-03 Thread Josselin Mouette
Le mercredi 03 janvier 2007 à 09:58 +0100, Vincent Danjean a écrit : > Hi, > > I'm the maintainer of mercurial. At least one of the users has a > problem with loading python modules. > Can someone look at bug #382252 ? > > In short, > echo 'import sys; print sys.path; from mercurial impor

Python PATH problem

2007-01-03 Thread Vincent Danjean
Hi, I'm the maintainer of mercurial. At least one of the users has a problem with loading python modules. Can someone look at bug #382252 ? In short, echo 'import sys; print sys.path; from mercurial import bdiff' | python2.4 works on my system, but not on its one. Both have '/var/lib/pyth