Re: common issue: setlocale handling?

2010-09-25 Thread Barry Warsaw
On Sep 25, 2010, at 01:22 PM, Paul Wise wrote: >On Mon, Aug 23, 2010 at 8:17 PM, Barry Warsaw wrote: > >> My guess is that you'd get a lot of push back from folks in >> python-dev.  Won't a change like this have the potential to produce >> confusing, wrong, or hard to track down bugs?  This kind

Re: common issue: setlocale handling?

2010-09-24 Thread Paul Wise
On Mon, Aug 23, 2010 at 8:17 PM, Barry Warsaw wrote: > My guess is that you'd get a lot of push back from folks in python-dev.  Won't > a change like this have the potential to produce confusing, wrong, or hard to > track down bugs?  This kind of implicit behavior change seems to run counter > to

Re: common issue: setlocale handling?

2010-09-02 Thread Vincent Bernat
OoO En ce début d'après-midi nuageux du mardi 31 août 2010, vers 14:56, "Giacomo A. Catenazzi" disait : >> I disagree, stuff written in C or Perl doesn't crash when the locale >> is not set properly and neither should stuff written in Python. > hmm. > In C it is because the POSIX application us

Re: common issue: setlocale handling?

2010-08-31 Thread Giacomo A. Catenazzi
On 22.08.2010 09:44, Paul Wise wrote: On Sun, Aug 22, 2010 at 3:40 PM, Jakub Wilk wrote: I don't think this is a bug at all. I'd rather say it's an user error. I disagree, stuff written in C or Perl doesn't crash when the locale is not set properly and neither should stuff written in Python.

Re: common issue: setlocale handling?

2010-08-23 Thread Barry Warsaw
On Aug 22, 2010, at 10:16 PM, Floris Bruynooghe wrote: >Using the standard warnings module this would only happen once for >each python script. This sounds like the more sensible behaviour, but >it sounds like it should be fixed upstream so that the unguarded >setlocale just shows this behaviour.

Re: common issue: setlocale handling?

2010-08-22 Thread Vincent Bernat
OoO La nuit ayant déjà recouvert d'encre ce jour du dimanche 22 août 2010, vers 23:16, Floris Bruynooghe disait : >> Perl spits out a lot of annoying warnings when using a non existing >> locale. And it does this for any perl script. >> >> perl: warning: Setting locale failed. >> perl:

Re: common issue: setlocale handling?

2010-08-22 Thread Floris Bruynooghe
On Sun, Aug 22, 2010 at 02:16:21PM +0200, Vincent Bernat wrote: > OoO En cette matinée ensoleillée du dimanche 22 août 2010, vers 09:44, > Paul Wise disait : > > >> I don't think this is a bug at all. I'd rather say it's an user error. > > > I disagree, stuff written in C or Perl doesn't crash

Re: common issue: setlocale handling?

2010-08-22 Thread Vincent Bernat
OoO En cette matinée ensoleillée du dimanche 22 août 2010, vers 09:44, Paul Wise disait : >> I don't think this is a bug at all. I'd rather say it's an user error. > I disagree, stuff written in C or Perl doesn't crash when the locale > is not set properly and neither should stuff written in P

Re: common issue: setlocale handling?

2010-08-22 Thread W. Martin Borgert
On 2010-08-22 12:38, Julian Andres Klode wrote: > Well, it does not really make sense to use invalid locales, so I see no > problems if applications exit with a failure. Users should fix their > environments instead. It would be nice, if applications would fall back to the "C" locale and warn abou

Re: common issue: setlocale handling?

2010-08-22 Thread Julian Andres Klode
On So, 2010-08-22 at 15:44 +0800, Paul Wise wrote: > On Sun, Aug 22, 2010 at 3:40 PM, Jakub Wilk wrote: > > > I don't think this is a bug at all. I'd rather say it's an user error. > > I disagree, stuff written in C or Perl doesn't crash when the locale > is not set properly and neither should s

Re: common issue: setlocale handling?

2010-08-22 Thread Paul Wise
On Sun, Aug 22, 2010 at 3:40 PM, Jakub Wilk wrote: > I don't think this is a bug at all. I'd rather say it's an user error. I disagree, stuff written in C or Perl doesn't crash when the locale is not set properly and neither should stuff written in Python. -- bye, pabs http://wiki.debian.org/

Re: common issue: setlocale handling?

2010-08-22 Thread Jakub Wilk
* Paul Wise , 2010-08-22, 15:06: I recently got a bug filed on iotop about its setlocale handling (#593846). The issue was unguarded code like: locale.setlocale(locale.LC_ALL, '') which fails with "locale.Error: unsupported locale setting" if user has LC_* set to invalid values in his enviro

common issue: setlocale handling?

2010-08-22 Thread Paul Wise
Hi all, I recently got a bug filed on iotop about its setlocale handling (#593846). With a quick grep of my system I can see code in the following packages that looks like they would probably have the same issue: python-xdg virt-manager virtinst iotop mercurial-common python-hachoir-metadata ink