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

Re: r6347 - in packages/python-recaptcha/trunk/debian (control)



Le mercredi 27 août 2008 à 19:21 +0200, Vincent Bernat a écrit :
> OoO Peu  avant le début de  l'après-midi du mercredi 27  août 2008, vers
> 13:12, Josselin Mouette <joss@debian.org> disait :
> 
> >> > import sys,new,os; p = os.path.join(sys._getframe(1).f_locals['sitedir'], *('recaptcha',)); ie = os.path.exists(os.path.join(p,'__init__.py')); m = not ie and sys.modules.setdefault('recaptcha',new.module('recaptcha')); mp = (m or []) and m.__dict__.setdefault('__path__',[]); (p not in mp) and mp.append(p)
> >> > /var/lib/python-support/python2.5/import sys,new,os; p = os.path.join(sys._getframe(1).f_locals['sitedir'], *('recaptcha',)); ie = os.path.exists(os.path.join(p,'__init__.py')); m = not ie and sys.modules.setdefault('recaptcha',new.module('recaptcha')); mp = (m or []) and m.__dict__.setdefault('__path__',[]); (p not in mp) and mp.append(p)
> 
> > This one should be nominated for the OMGWTF python package of the day.
> 
> It is generated by setuptools in  fact. And a missing new line render it
> unusable.

Could you please test the python-support package at
http://malsain.org/~joss/debian/ to see whether it handles this case
correctly?

BTW, it is a VERY bad idea to do something like this: this way, all
python scripts will execute this code at startup, which can have a
performance impact or, even worse, render python unusable on the system.

> >> BTW, while searching a bit about this problem, I have found this bug:
> >> http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=475440
> >> 
> >> Is it a bug in python-support?
> 
> > This looks like just another design flaw in setuptools.
> 
> > Please, think of the kittens. Don’t use setuptools.
> 
> Well,   people   use   setuptools    and   it   does   not   work   with
> python-support.  What should  we do?  Move  the egg  by hand  in a  more
> correct location?  Or maybe python-support could  put it by  itself in a
> correct location?

The egg IS already installed in a correct location: there is a symlink
in /var/lib/python-support/python2.x which is in sys.path. From my
understanding of http://bugs.python.org/setuptools/issue17, the problem
is in easy_install, but most contributors to this bug did not even check
that the symlink was here.

Cheers,
-- 
 .''`.
: :' :      We are debian.org. Lower your prices, surrender your code.
`. `'       We will add your hardware and software distinctiveness to
  `-        our own. Resistance is futile.

Attachment: signature.asc
Description: Ceci est une partie de message =?ISO-8859-1?Q?num=E9riquement?= =?ISO-8859-1?Q?_sign=E9e?=


Reply to: