Re: Packages whith “except” overwriting builtins

2012-05-28 Thread Jakub Wilk
Context: http://docs.python.org/whatsnew/2.6.html#pep-3110-exception-handling-changes * Paul Wise , 2010-08-03, 17:47: What about adding a lintian warning about this? Could file a bug about that? In the mean time, I implemented such check in lintian4python. Results for slightly out-of-date s

Re: Packages whith “except” overwriting builtins

2010-08-09 Thread Paul Wise
On Wed, Aug 4, 2010 at 12:20 PM, Jakub Wilk wrote: > I checked only for built-in exception names, which should cover most cases. > A simple regex like: Thanks. > Also, feel free to file a bug against lintian. :) Done (#592379). This will probably end up as a wishlist against pyflakes and a pyf

Re: Packages whith ???except??? overwriting builtins

2010-08-08 Thread Toni Mueller
Hi Jakub, thanks for taking the effort to tour the code! On Tue, 03.08.2010 at 19:18:27 +0200, Jakub Wilk wrote: > Toni Mueller >roundup should be fixed in 1.4.15-2, just uploaded. Kind regards, --Toni++ -- To UNSUBSCRIBE, email to debian-python-requ...@lists.debian.org with a subje

Re: Packages whith “except ” overwriting builtins

2010-08-04 Thread Jakub Wilk
* Tristan Seligmann , 2010-08-04, 04:50: You might be easily mislead into thinking that this code ... will catch both IOError and OSError exceptions. In fact, it will not, as it is more or less equivalent to: ... There are about 50 packages in the archive whose developers make this kind of mi

Re: Packages whith “except” overwriting builtins

2010-08-04 Thread Barry Warsaw
On Aug 04, 2010, at 03:21 PM, Jakub Wilk wrote: >* Paul Wise , 2010-08-04, 08:31: >>> There are pychecker, pyflakes, and pylint in Debian. >>> This specific case raises a warning in pylint, if I'm not mistaken. >> >>Thanks for the info, I've added these package names to the >>DebianMentorsNet wiki

Re: Packages whith “except ” overwriting builtins

2010-08-04 Thread Jakub Wilk
* Paul Wise , 2010-08-04, 08:31: There are pychecker, pyflakes, and pylint in Debian. This specific case raises a warning in pylint, if I'm not mistaken. Thanks for the info, I've added these package names to the DebianMentorsNet wiki page listing feature wishlists for mentors.debian.net/lintia

Re: Packages whith “except” overwriting builtins

2010-08-04 Thread Paul Wise
On Wed, Aug 4, 2010 at 3:43 AM, W. Martin Borgert wrote: > There are pychecker, pyflakes, and pylint in Debian. > This specific case raises a warning in pylint, if I'm not mistaken. Thanks for the info, I've added these package names to the DebianMentorsNet wiki page listing feature wishlists fo

Re: Packages whith “except” overwriting builtins

2010-08-04 Thread W. Martin Borgert
Quoting "Paul Wise" : Actually, is there any generalised syntax, language, deprecation and mistake checker for python? There are pychecker, pyflakes, and pylint in Debian. This specific case raises a warning in pylint, if I'm not mistaken. -- To UNSUBSCRIBE, email to debian-python-requ...@lis

Re: Packages whith “except” overwriting builtins

2010-08-03 Thread Paul Wise
On Tue, Aug 3, 2010 at 10:50 PM, Tristan Seligmann wrote: > How would you implement the warning? There's no way to easily tell > whether a given name is an existing class name or not. Using whatever method Jakub used to create his list, if it is implementable in perl that is. Actually, is there

Re: Packages whith “except” overwriting builtins

2010-08-03 Thread Tristan Seligmann
On Tue, Aug 3, 2010 at 11:47 PM, Paul Wise wrote: > 2010/8/3 Jakub Wilk : >> You might be easily mislead into thinking that this code > ... >> will catch both IOError and OSError exceptions. In fact, it will not, as it >> is more or less equivalent to: > ... >> There are about 50 packages in the a

Re: Packages whith “except” overwriting builtins

2010-08-03 Thread Paul Wise
2010/8/3 Jakub Wilk : > You might be easily mislead into thinking that this code ... > will catch both IOError and OSError exceptions. In fact, it will not, as it > is more or less equivalent to: ... > There are about 50 packages in the archive whose developers make this kind > of mistake. I have a

Re: Packages whith “except” overwriting builtins

2010-08-03 Thread Sandro Tosi
Hi Jakub, 2010/8/3 Jakub Wilk : > You might be easily mislead into thinking that this code > >   try: >      eggs() >   except IOError, OSError: >      pass > > will catch both IOError and OSError exceptions. In fact, it will not, as it > is more or less equivalent to: > >   try: >      eggs() >  

Re: Packages whith “except ” overwriting builtins

2010-08-03 Thread Yaroslav Halchenko
Thank you Jakub! I believe that quick resolution which could be recommended is instead of >except IOError, OSError: having then grouped in a tuple >except (IOError, OSError): -- .-. =-- /v\ = Kee

Packages whith “except ” overwriting builtins

2010-08-03 Thread Jakub Wilk
You might be easily mislead into thinking that this code try: eggs() except IOError, OSError: pass will catch both IOError and OSError exceptions. In fact, it will not, as it is more or less equivalent to: try: eggs() except IOError, ex: OSError = ex # Who