Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Bug reporting impossible

Reply
Thread Tools

Bug reporting impossible

 
 
Nick Maclaren
Guest
Posts: n/a
 
      06-29-2006

Currently logins are disabled to sourceforge.net, and (despite the
comments) it won't let me report a bug anonymously. Does anyone
know whether this is short or long term? I have a bug in 2.5 to
report - which has been there for a while and isn't overwhelmingly
critical and has been there for a while.

Create a file called '<stdin>' in your current directory containing
'print "Oh, yeah?\n"' and then import a module that doesn't exist.
Don't include the single quotes.


Regards,
Nick Maclaren.
 
Reply With Quote
 
 
 
 
Georg Brandl
Guest
Posts: n/a
 
      06-29-2006
Nick Maclaren wrote:
> Currently logins are disabled to sourceforge.net, and (despite the
> comments) it won't let me report a bug anonymously. Does anyone
> know whether this is short or long term? I have a bug in 2.5 to
> report - which has been there for a while and isn't overwhelmingly
> critical and has been there for a while.
>
> Create a file called '<stdin>' in your current directory containing
> 'print "Oh, yeah?\n"' and then import a module that doesn't exist.
> Don't include the single quotes.


You should have said what the bug is.
To save others reproducing this: you get a traceback akin to

$ python
Python 2.4.3 (#1, May 8 2006, 18:29:03)
[GCC 3.4.6 (Gentoo 3.4.6-r1, ssp-3.4.5-1.0, pie-8.7.9)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import xyzzy

Traceback (most recent call last):
File "<stdin>", line 1, in ?
print "Oh, yeah?\n"
ImportError: No module named xyzzy
>>>


The problem is that Python does not know whether a file name is bogus
or an actual file. So it was assumed that names like "<stdin>" or "<string>"
are safe enough to use them as subsitutes.

I don't know whether this is worth fixing.

Geor
 
Reply With Quote
 
 
 
 
Simon Forman
Guest
Posts: n/a
 
      06-29-2006
Nick Maclaren wrote:
....
> Create a file called '<stdin>' in your current directory containing
> 'print "Oh, yeah?\n"' and then import a module that doesn't exist.
> Don't include the single quotes.



Why would you have a file named '<stdin>' in your current directory?

~Simon

 
Reply With Quote
 
Grant Edwards
Guest
Posts: n/a
 
      06-29-2006
On 2006-06-29, Nick Maclaren <(E-Mail Removed)> wrote:

> Currently logins are disabled to sourceforge.net, and (despite the
> comments) it won't let me report a bug anonymously. Does anyone
> know whether this is short or long term? I have a bug in 2.5 to
> report - which has been there for a while and isn't overwhelmingly
> critical and has been there for a while.
>
> Create a file called '<stdin>' in your current directory containing
> 'print "Oh, yeah?\n"' and then import a module that doesn't exist.
> Don't include the single quotes.


Cute.

2.4 has the same bug I'm guessing:

$ echo "Oh, yeah?" >\<stdin\>

$ python
Python 2.4.2 (#1, Feb 17 2006, 12:02:16)
[GCC 3.4.4 (Gentoo 3.4.4-r1, ssp-3.4.4-1.0, pie-8.7.] on linux2
Type "help", "copyright", "credits" or "license" for more
information.
>>> import asdfasdf

Traceback (most recent call last):
File "<stdin>", line 1, in ?
Oh, yeah?
ImportError: No module named asdfasdf
>>>


--
Grant Edwards grante Yow! Hello. I know
at the divorce rate among
visi.com unmarried Catholic Alaskan
females!!
 
Reply With Quote
 
Grant Edwards
Guest
Posts: n/a
 
      06-29-2006
On 2006-06-29, Simon Forman <(E-Mail Removed)> wrote:
> Nick Maclaren wrote:
> ...
>> Create a file called '<stdin>' in your current directory
>> containing 'print "Oh, yeah?\n"' and then import a module that
>> doesn't exist. Don't include the single quotes.

>
> Why would you have a file named '<stdin>' in your current directory?


Why shouldn't you?

--
Grant Edwards grante Yow! Uh-oh!! I forgot
at to submit to COMPULSORY
visi.com URINALYSIS!
 
Reply With Quote
 
Nick Maclaren
Guest
Posts: n/a
 
      06-29-2006

In article <(E-Mail Removed) .com>,
"Simon Forman" <(E-Mail Removed)> writes:
|> Nick Maclaren wrote:
|> ...
|> > Create a file called '<stdin>' in your current directory containing
|> > 'print "Oh, yeah?\n"' and then import a module that doesn't exist.
|> > Don't include the single quotes.
|>
|> Why would you have a file named '<stdin>' in your current directory?

Why would Python search for one?

In both cases, the normal answer is "Someone made a mistake" but, if
you have a script that creates a files of the same names specified in
the current directory, what name should it use if you specify stdin?
It is one of the standard conventions, which is (after all) why Python
is searching for it.

Anyway, I have now reported the bug - but this bug is more amusing than
serious.


Regards,
Nick Maclaren.
 
Reply With Quote
 
Nick Maclaren
Guest
Posts: n/a
 
      06-29-2006

In article <e804cs$ppb$(E-Mail Removed)>,
Georg Brandl <(E-Mail Removed)> writes:
|>
|> You should have said what the bug is.

Well, maybe, but it is more amusing than serious. I have now reported it
properly, as Sourceforge is back up.

|> The problem is that Python does not know whether a file name is bogus
|> or an actual file. So it was assumed that names like "<stdin>" or "<string>"
|> are safe enough to use them as subsitutes.

That is no justification for spuriously executing a file called '<stdin>'
when attempting to produce a diagnostic for one called 'fred'. strace
or equivalent shows up clearly what the bug is.

|> I don't know whether this is worth fixing.

It's definitely worth fixing, but not as a high priority. Invoking a
file spuriously is potentially serious, with very low probability.


Regards,
Nick Maclaren.
 
Reply With Quote
 
Fredrik Lundh
Guest
Posts: n/a
 
      06-29-2006
Nick Maclaren wrote:

> It's definitely worth fixing, but not as a high priority. Invoking a
> file spuriously is potentially serious, with very low probability.


the traceback printer is reading the file (using a very robust reader),
it's not "invoking" it.

</F>

 
Reply With Quote
 
Simon Forman
Guest
Posts: n/a
 
      06-29-2006
Nick Maclaren wrote:
> In article <(E-Mail Removed) .com>,
> "Simon Forman" <(E-Mail Removed)> writes:
> |> Nick Maclaren wrote:
> |> ...
> |> > Create a file called '<stdin>' in your current directory containing
> |> > 'print "Oh, yeah?\n"' and then import a module that doesn't exist.
> |> > Don't include the single quotes.
> |>
> |> Why would you have a file named '<stdin>' in your current directory?
>
> Why would Python search for one?


Fair enough.. : )

> In both cases, the normal answer is "Someone made a mistake" but, if
> you have a script that creates a files of the same names specified in
> the current directory, what name should it use if you specify stdin?
> It is one of the standard conventions, which is (after all) why Python
> is searching for it.
>
> Anyway, I have now reported the bug - but this bug is more amusing than
> serious.
>
>
> Regards,
> Nick Maclaren.


I usually refrain from posting if I don't have anything to add to the
discussion, but that struck me as perverse and I was curious.
I certainly have no objection to having that bug fixed. : )

Peace,
~Simon

 
Reply With Quote
 
Nick Maclaren
Guest
Posts: n/a
 
      06-29-2006

In article <(E-Mail Removed)>,
Fredrik Lundh <(E-Mail Removed)> writes:
|> Nick Maclaren wrote:
|>
|> > It's definitely worth fixing, but not as a high priority. Invoking a
|> > file spuriously is potentially serious, with very low probability.
|>
|> the traceback printer is reading the file (using a very robust reader),
|> it's not "invoking" it.

Boggle! Upon checking, that is indeed the case. All right - that drops
the importance of the bug another notch. It's still an issue on systems
with 'active' files, but that makes the chances of serious trouble even
less likely than before.


Regards,
Nick Maclaren.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
impossible to delete file because it is impossible to take ownership Devvie Nuis Computer Support 21 04-20-2009 02:07 AM
Massive Geolocalisation good, but impossible to ignore if bug fgperso@gmail.com Digital Photography 0 07-12-2007 03:58 PM
*bug* *bug* *bug* David Raleigh Arnold Firefox 12 04-02-2007 03:13 AM
Making the simple impossible and the impossible unthinkable... xfx.publishing@gmail.com Perl Misc 5 06-30-2006 11:50 AM
BUG REPORTING Sadun Sevingen ASP .Net 4 08-12-2004 02:51 PM



Advertisments