Re: [Python-Dev] ImportWarning flood

2006-07-07 Thread Shane Hathaway
Anthony Baxter wrote: > On Saturday 01 July 2006 12:55, Guido van Rossum wrote: >> It's up to the release manager now to decide whether the pitchforks >> at Google or the pitchforks in the larger Python community are >> sharper. ;-) > > At this point, I think removing the warning code is the prude

Re: [Python-Dev] ImportWarning flood

2006-07-01 Thread Sergey A. Lipnevich
Martin v. Löwis wrote: > Sergey A. Lipnevich wrote: >> I tried to implement Jean-Paul Calderone's idea for the following patch, >> plagiarizing Ralf W. Grosse-Kunstleve's error text. It delays import ... > Please notice that there is also python.org/sf/1515361 > > I had no time to compare this wit

Re: [Python-Dev] ImportWarning flood

2006-07-01 Thread Martin v. Löwis
Sergey A. Lipnevich wrote: > I tried to implement Jean-Paul Calderone's idea for the following patch, > plagiarizing Ralf W. Grosse-Kunstleve's error text. It delays import > warning until end of search for modules, but remembers how many > potential modules (candidates without __init__.py) it didn

Re: [Python-Dev] ImportWarning flood

2006-07-01 Thread Aahz
On Sat, Jul 01, 2006, Sergey A. Lipnevich wrote: > > Please let me know if this would work and if anything needs to be done > for this patch to be accepted. The first thing you need to do for ANY patch to be considered is to post it so SourceForge (or at least post to python-dev explaining that yo

Re: [Python-Dev] ImportWarning flood

2006-07-01 Thread Sergey A. Lipnevich
All, I tried to implement Jean-Paul Calderone's idea for the following patch, plagiarizing Ralf W. Grosse-Kunstleve's error text. It delays import warning until end of search for modules, but remembers how many potential modules (candidates without __init__.py) it didn't import. I didn't really tr

Re: [Python-Dev] ImportWarning flood

2006-07-01 Thread Nick Coghlan
Guido van Rossum wrote: > It's up to the release manager now to decide whether the pitchforks at > Google or the pitchforks in the larger Python community are sharper. > ;-) > > --Guido (ducks) I vaguely recall one of the reasons we went with the warning approach was to find out whether or not d

Re: [Python-Dev] ImportWarning flood

2006-07-01 Thread Anthony Baxter
On Saturday 01 July 2006 12:55, Guido van Rossum wrote: > It's up to the release manager now to decide whether the pitchforks > at Google or the pitchforks in the larger Python community are > sharper. ;-) At this point, I think removing the warning code is the prudent course. If someone wanted t

Re: [Python-Dev] ImportWarning flood

2006-06-30 Thread Guido van Rossum
It's up to the release manager now to decide whether the pitchforks at Google or the pitchforks in the larger Python community are sharper. ;-) --Guido (ducks) On 6/30/06, Shane Hathaway <[EMAIL PROTECTED]> wrote: > Guido van Rossum wrote: > > On 6/30/06, Jean-Paul Calderone <[EMAIL PROTECTED]> w

Re: [Python-Dev] ImportWarning flood

2006-06-30 Thread Guido van Rossum
On 6/30/06, Jean-Paul Calderone <[EMAIL PROTECTED]> wrote: > On Sun, 25 Jun 2006 17:51:17 -0700, Guido van Rossum <[EMAIL PROTECTED]> > wrote: > >On 6/24/06, Jean-Paul Calderone <[EMAIL PROTECTED]> wrote: > >> >Actually, your application *was* pretty close to being broken a few > >> >weeks ago, wh

Re: [Python-Dev] ImportWarning flood

2006-06-30 Thread Jean-Paul Calderone
On Sun, 25 Jun 2006 17:51:17 -0700, Guido van Rossum <[EMAIL PROTECTED]> wrote: >On 6/24/06, Jean-Paul Calderone <[EMAIL PROTECTED]> wrote: >> >Actually, your application *was* pretty close to being broken a few >> >weeks ago, when Guido wanted to drop the requirement that a package >> >must contai

Re: [Python-Dev] ImportWarning flood

2006-06-28 Thread Aahz
On Wed, Jun 28, 2006, James Y Knight wrote: > > I just found another reason to dislike the warnings: my homedir on > one machine has a lot of random directories in it. One of them is > named "readline". Every time I run python 2.5, it now helpfully notes: >sys:1: ImportWarning: Not importin

Re: [Python-Dev] ImportWarning flood

2006-06-28 Thread James Y Knight
On Jun 25, 2006, at 9:47 PM, James Y Knight wrote: > > On Jun 24, 2006, at 1:29 PM, Ralf W. Grosse-Kunstleve wrote: > >> --- Jean-Paul Calderone <[EMAIL PROTECTED]> wrote: >>> I think it is safe to say that Twisted is more widely used than >>> anything >>> Google has yet released. Twisted also h

Re: [Python-Dev] ImportWarning flood

2006-06-28 Thread Martin v. Löwis
Ralf W. Grosse-Kunstleve wrote: >> There can be many reasons why an import could fail: there might be >> no read permission for the file, > > The warning in 2.5b1 doesn't fire in this case: Sure, but it would produce your "note", right? And the note would be essentially wrong. Instead, the Import

Re: [Python-Dev] ImportWarning flood

2006-06-28 Thread Ralf W. Grosse-Kunstleve
--- "Martin v. L�wis" <[EMAIL PROTECTED]> wrote: > Ralf W. Grosse-Kunstleve wrote: > > If there is a consenus, I'd create a new exception > ImportErrorNoModule(name) > > that is used consistently from all places. This would ensure uniformity of > the > > message in the future. > > A correction

Re: [Python-Dev] ImportWarning flood

2006-06-28 Thread Martin v. Löwis
Ralf W. Grosse-Kunstleve wrote: > If there is a consenus, I'd create a new exception ImportErrorNoModule(name) > that is used consistently from all places. This would ensure uniformity of the > message in the future. A correction proposal should only be given if it is likely correct. There can be

Re: [Python-Dev] ImportWarning flood

2006-06-27 Thread Steve Holden
Ralf W. Grosse-Kunstleve wrote: > --- Jean-Paul Calderone <[EMAIL PROTECTED]> wrote: > >>I think it is safe to say that Twisted is more widely used than anything >>Google has yet released. Twisted also has a reasonably plausible >>technical reason to dislike this change. Google has a bunch of en

Re: [Python-Dev] ImportWarning flood

2006-06-26 Thread Ralf W. Grosse-Kunstleve
--- "Delaney, Timothy (Tim)" <[EMAIL PROTECTED]> wrote: > Michael Hudson wrote: > > > Benji York <[EMAIL PROTECTED]> writes: > > > >> Nick Coghlan wrote: > >>> Perhaps ImportWarning should default to being ignored, the same way > >>> PendingDeprecationWarning does? > >>> > >>> Then -Wd would be

Re: [Python-Dev] ImportWarning flood

2006-06-26 Thread Delaney, Timothy (Tim)
Michael Hudson wrote: > Benji York <[EMAIL PROTECTED]> writes: > >> Nick Coghlan wrote: >>> Perhaps ImportWarning should default to being ignored, the same way >>> PendingDeprecationWarning does? >>> >>> Then -Wd would become 'the one obvious way' to debug import problems >> >> +1 > > I'm not

Re: [Python-Dev] ImportWarning flood

2006-06-26 Thread Benji York
Michael Hudson wrote: > Benji York <[EMAIL PROTECTED]> writes: > >>Nick Coghlan wrote: >> >>>Perhaps ImportWarning should default to being ignored, the same way >>>PendingDeprecationWarning does? >>> >>>Then -Wd would become 'the one obvious way' to debug import problems >> >>+1 > > I'm not sure

Re: [Python-Dev] ImportWarning flood

2006-06-26 Thread Michael Hudson
Benji York <[EMAIL PROTECTED]> writes: > Nick Coghlan wrote: >> Perhaps ImportWarning should default to being ignored, the same way >> PendingDeprecationWarning does? >> >> Then -Wd would become 'the one obvious way' to debug import problems > > +1 I'm not sure what this would achieve -- people

Re: [Python-Dev] ImportWarning flood

2006-06-26 Thread Nick Coghlan
A.M. Kuchling wrote: > On Mon, Jun 26, 2006 at 08:29:49AM +0200, "Martin v. Löwis" wrote: >> (read some email archives >> to find out what the original problem was). > > People at Google don't read manuals? The documentation of how imports actually work isn't that easy to find? Guido's package e

Re: [Python-Dev] ImportWarning flood

2006-06-26 Thread Benji York
Nick Coghlan wrote: > Perhaps ImportWarning should default to being ignored, the same way > PendingDeprecationWarning does? > > Then -Wd would become 'the one obvious way' to debug import problems +1 -- Benji York ___ Python-Dev mailing list Python-Dev

Re: [Python-Dev] ImportWarning flood

2006-06-26 Thread A.M. Kuchling
On Mon, Jun 26, 2006 at 08:29:49AM +0200, "Martin v. Löwis" wrote: > (read some email archives > to find out what the original problem was). People at Google don't read manuals? --amk ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.

Re: [Python-Dev] ImportWarning flood

2006-06-26 Thread Michael Hudson
James Y Knight <[EMAIL PROTECTED]> writes: > On Jun 24, 2006, at 1:29 PM, Ralf W. Grosse-Kunstleve wrote: > >> --- Jean-Paul Calderone <[EMAIL PROTECTED]> wrote: >>> I think it is safe to say that Twisted is more widely used than >>> anything >>> Google has yet released. Twisted also has a reas

Re: [Python-Dev] ImportWarning flood

2006-06-26 Thread Ralf W. Grosse-Kunstleve
--- "Martin v. L�wis" <[EMAIL PROTECTED]> wrote: > So spend some of the money to come up with an alternate solution for > 2.5b2. With a potential damage of a million dollars, it shouldn't be > too difficult to provide a patch by tomorrow, right? My share is only 10 man hours, payed for by the US

Re: [Python-Dev] ImportWarning flood

2006-06-26 Thread Nick Coghlan
Guido van Rossum wrote: > On 6/24/06, Jean-Paul Calderone <[EMAIL PROTECTED]> wrote: >>> Actually, your application *was* pretty close to being broken a few >>> weeks ago, when Guido wanted to drop the requirement that a package >>> must contain an __init__ file. In that case, "import math" would h

Re: [Python-Dev] ImportWarning flood

2006-06-25 Thread Martin v. Löwis
Ralf W. Grosse-Kunstleve wrote: > I can work around it, sure. Everybody can work around it, of course. But > consider that one hour of a professional person is at least $100 with benefits > etc. included. (If that sounds high, I know people charging much more than > that; also consider that the goi

Re: [Python-Dev] ImportWarning flood

2006-06-25 Thread Ralf W. Grosse-Kunstleve
--- Guido van Rossum <[EMAIL PROTECTED]> wrote: > On 6/25/06, Fred L. Drake, Jr. <[EMAIL PROTECTED]> wrote: > > On Sunday 25 June 2006 20:48, Greg Ewing wrote: > > > BTW, when that was being discussed, did anyone consider > > > allowing a directory to be given a .py suffix as an > > > alternati

Re: [Python-Dev] ImportWarning flood

2006-06-25 Thread James Y Knight
On Jun 24, 2006, at 1:29 PM, Ralf W. Grosse-Kunstleve wrote: > --- Jean-Paul Calderone <[EMAIL PROTECTED]> wrote: >> I think it is safe to say that Twisted is more widely used than >> anything >> Google has yet released. Twisted also has a reasonably plausible >> technical reason to dislike th

Re: [Python-Dev] ImportWarning flood

2006-06-25 Thread Guido van Rossum
On 6/25/06, Fred L. Drake, Jr. <[EMAIL PROTECTED]> wrote: > On Sunday 25 June 2006 20:48, Greg Ewing wrote: > > BTW, when that was being discussed, did anyone consider > > allowing a directory to be given a .py suffix as an > > alternative way to mark it as a package? > :-) > I'd certainly be a

Re: [Python-Dev] ImportWarning flood

2006-06-25 Thread Fred L. Drake, Jr.
On Sunday 25 June 2006 20:48, Greg Ewing wrote: > BTW, when that was being discussed, did anyone consider > allowing a directory to be given a .py suffix as an > alternative way to mark it as a package? I'd certainly be a lot happier with that than with the current behavior. Silly little warn

Re: [Python-Dev] ImportWarning flood

2006-06-25 Thread Guido van Rossum
On 6/24/06, Jean-Paul Calderone <[EMAIL PROTECTED]> wrote: > >Actually, your application *was* pretty close to being broken a few > >weeks ago, when Guido wanted to drop the requirement that a package > >must contain an __init__ file. In that case, "import math" would have > >imported the directory

Re: [Python-Dev] ImportWarning flood

2006-06-25 Thread Greg Ewing
Martin v. Löwis wrote: > Actually, your application *was* pretty close to being broken a few > weeks ago, when Guido wanted to drop the requirement that a package > must contain an __init__ file. BTW, when that was being discussed, did anyone consider allowing a directory to be given a .py suffix

Re: [Python-Dev] ImportWarning flood

2006-06-24 Thread Ralf W. Grosse-Kunstleve
--- Jean-Paul Calderone <[EMAIL PROTECTED]> wrote: > I think it is safe to say that Twisted is more widely used than anything > Google has yet released. Twisted also has a reasonably plausible > technical reason to dislike this change. Google has a bunch of engineers > who, apparently, cannot rem

Re: [Python-Dev] ImportWarning flood

2006-06-24 Thread Jean-Paul Calderone
On Sat, 24 Jun 2006 16:24:11 +0200, "\"Martin v. Löwis\"" <[EMAIL PROTECTED]> wrote: >Jean-Paul Calderone wrote: >> I am very unhappy that the burden of understanding Python's package >> structure is being pushed onto end users in this way. Several of my >> projects now emit three or four warning

Re: [Python-Dev] ImportWarning flood

2006-06-24 Thread Jean-Paul Calderone
On Sat, 24 Jun 2006 07:27:15 -0700, Aahz <[EMAIL PROTECTED]> wrote: >On Sat, Jun 24, 2006, Jean-Paul Calderone wrote: >> >> I am very unhappy that the burden of understanding Python's package >> structure is being pushed onto end users in this way. Several of my >> projects now emit three or four

Re: [Python-Dev] ImportWarning flood

2006-06-24 Thread Aahz
On Sat, Jun 24, 2006, Jean-Paul Calderone wrote: > > I am very unhappy that the burden of understanding Python's package > structure is being pushed onto end users in this way. Several of my > projects now emit three or four warnings on import now. > > The Twisted plugin system relies on the fact

Re: [Python-Dev] ImportWarning flood

2006-06-24 Thread Martin v. Löwis
Jean-Paul Calderone wrote: > I am very unhappy that the burden of understanding Python's package > structure is being pushed onto end users in this way. Several of my > projects now emit three or four warnings on import now. So are you requesting that the change is reverted? Regards, Martin

Re: [Python-Dev] ImportWarning flood

2006-06-24 Thread Jean-Paul Calderone
On Sat, 24 Jun 2006 11:47:19 +0200, "\"Martin v. Löwis\"" <[EMAIL PROTECTED]> wrote: >Ralf W. Grosse-Kunstleve wrote: >> --- "Martin v. Löwis" <[EMAIL PROTECTED]> wrote: >> >>> I don't know. Whether a warning is a problem is a matter of attitude, also. >> >> Our users will think our applications a

Re: [Python-Dev] ImportWarning flood

2006-06-24 Thread Martin v. Löwis
Ralf W. Grosse-Kunstleve wrote: > --- "Martin v. Löwis" <[EMAIL PROTECTED]> wrote: > >> I don't know. Whether a warning is a problem is a matter of attitude, also. > > Our users will think our applications are broken if they see warnings like > that. It is not professional. Actually, your applic

Re: [Python-Dev] ImportWarning flood

2006-06-24 Thread Ralf W. Grosse-Kunstleve
--- "Martin v. Löwis" <[EMAIL PROTECTED]> wrote: > I don't know. Whether a warning is a problem is a matter of attitude, also. Our users will think our applications are broken if they see warnings like that. It is not professional. __ Do You Yahoo

Re: [Python-Dev] ImportWarning flood

2006-06-24 Thread Martin v. Löwis
Ralf W. Grosse-Kunstleve wrote: >> This has nothing to do with beta1; the warnings module was introduced >> many releases ago, along with all the mechanics to disable warnings. > > Due to the new ImportWarning first introduced in 2.5b1 the question of > disabling warnings is becoming much more pre

Re: [Python-Dev] ImportWarning flood

2006-06-23 Thread Ralf W. Grosse-Kunstleve
--- "Martin v. L�wis" <[EMAIL PROTECTED]> wrote: > The specific question was > > "Is there a way to set the warning options via an environment variable?" > > This has nothing to do with beta1; the warnings module was introduced > many releases ago, along with all the mechanics to disable warni

Re: [Python-Dev] ImportWarning flood

2006-06-23 Thread Martin v. Löwis
Ralf W. Grosse-Kunstleve wrote: >>> Is there a way to set the warning options via an environment variable? >> This is off-topic for python-dev, > > What is the channel I should use? (I am testing a beta 1.) The specific question was "Is there a way to set the warning options via an environment v

Re: [Python-Dev] ImportWarning flood

2006-06-22 Thread A.M. Kuchling
On Wed, Jun 21, 2006 at 10:34:53PM -0700, Ralf W. Grosse-Kunstleve wrote: > But this doesn't: > python -W'ignore:Not importing directory:ImportWarning' This is a bug. I've filed bug #1510580 and assigned it to Brett. I think the problem was exposed by the new-style exception change, but the actu

Re: [Python-Dev] ImportWarning flood

2006-06-22 Thread Ralf W. Grosse-Kunstleve
--- "Martin v. Löwis" <[EMAIL PROTECTED]> wrote: > Ralf W. Grosse-Kunstleve wrote: > > Is there a way to set the warning options via an environment variable? > > This is off-topic for python-dev, What is the channel I should use? (I am testing a beta 1.) > but: why don't switch off the warnings

Re: [Python-Dev] ImportWarning flood

2006-06-21 Thread Martin v. Löwis
Ralf W. Grosse-Kunstleve wrote: > Is there a way to set the warning options via an environment variable? This is off-topic for python-dev, but: why don't switch off the warnings in the code? Regards, Martin ___ Python-Dev mailing list Python-Dev@python.

Re: [Python-Dev] ImportWarning flood

2006-06-21 Thread Ralf W. Grosse-Kunstleve
--- Guido van Rossum <[EMAIL PROTECTED]> wrote: > On 6/21/06, Ralf W. Grosse-Kunstleve <[EMAIL PROTECTED]> wrote: > > I am getting tons of "ImportWarning: Not importing directory". See below > for > > examples. It is impractical for me to reorganize our directory structure. > I'd > > be busy for a

Re: [Python-Dev] ImportWarning flood

2006-06-21 Thread Guido van Rossum
On 6/21/06, Ralf W. Grosse-Kunstleve <[EMAIL PROTECTED]> wrote: > I am getting tons of "ImportWarning: Not importing directory". See below for > examples. It is impractical for me to reorganize our directory structure. I'd > be busy for a week or more and people would probably scream at me because