473,386 Members | 1,823 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Bug reporting impossible


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.
Jun 29 '06 #1
13 1117
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
Jun 29 '06 #2
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

Jun 29 '06 #3
On 2006-06-29, Nick Maclaren <nm**@cus.cam.ac.uk> 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.8)] 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!!
Jun 29 '06 #4
On 2006-06-29, Simon Forman <ro*********@yahoo.com> 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!
Jun 29 '06 #5

In article <11**********************@x69g2000cwx.googlegroups .com>,
"Simon Forman" <ro*********@yahoo.com> 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.
Jun 29 '06 #6

In article <e8**********@news.albasani.net>,
Georg Brandl <g.*************@gmx.net> 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.
Jun 29 '06 #7
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>

Jun 29 '06 #8
Nick Maclaren wrote:
In article <11**********************@x69g2000cwx.googlegroups .com>,
"Simon Forman" <ro*********@yahoo.com> 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

Jun 29 '06 #9

In article <ma***************************************@python. org>,
Fredrik Lundh <fr*****@pythonware.com> 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.
Jun 29 '06 #10

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. : )

If you find that sort of perversity strangely exciting, I would like to
refer you to pages 67-69 of the Unix Hater's Handbook:

http://www.simson.net/ref/ugh.pdf

Jun 29 '06 #11
On 2006-06-29, Fredrik Lundh <fr*****@pythonware.com> wrote:
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.


If you make <stdin> a fifo and pipe something into it, it's
sort of fun:

$ mkfifo \<stdin\>
$ while true; do yow >\<stdin\>; done
$ 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.8)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
print a Traceback (most recent call last):
File "<stdin>", line 1, in ?
Yow! Bo Derek ruined my life!
NameError: name 'a' is not defined
print a Traceback (most recent call last):
while File "<stdin>", line 1, in ?
Yow! YOU!! Give me the CUTEST, PINKEST, most charming little VICTORIAN DOLLHOUSE you can find!! An make it SNAPPY!!
NameError: name 'a' is not defined
print a Traceback (most recent call last):
File "<stdin>", line 1, in ?
Yow! I will establish the first SHOPPING MALL in NUTLEY, New Jersey...
NameError: name 'a' is not defined
import foo

Traceback (most recent call last):
File "<stdin>", line 1, in ?
Yow! Is this where people are HOT and NICE and they give you TOAST for FREE??
File "foo.py", line 4, in ?
p('set out')
NameError: name 'p' is not defined
OK, so not everybody finds things like that amusing...

--
Grant Edwards grante Yow! My LIBRARY CARD
at expired...
visi.com
Jun 29 '06 #12
Nick Maclaren wrote:
|> 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?
given that "<stdin>" is an invalid filename on some platforms, why would any
serious programmer use "<stdin>" for an external file ?
It is one of the standard conventions, which is (after all) why Python
is searching for it.


the only reason Python's searching for it is that the CLI implementation passes
"<stdin>" as the second argument to compile:

http://pyref.infogami.com/compile

</F>

Jun 30 '06 #13

In article <ma***************************************@python. org>,
"Fredrik Lundh" <fr*****@pythonware.com> writes:
|>
|> > |> 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?
|>
|> given that "<stdin>" is an invalid filename on some platforms, why would any
|> serious programmer use "<stdin>" for an external file ?

You can't be serious, surely?

Firstly, why does Python? Well, I can answer that :-)

Secondly, EVERY string is an invalid filename on some platforms, without
exception! As every single (not system-specific) language has done since
languages imported the concept of filenames, Python says that the set of
strings that are valid filenames is implementation-dependent or perhaps
implementation-defined.

Thirdly, I had better explain what a LOT of programs and scripts actually
do. You have a command 'fred' that takes filenames as arguments and, if
there are none, uses stdin; as part of its function, it needs to create a
file of the same name as those in its arguments, in the current directory.
What filename should it use for stdin?

I sincerely HOPE that you are not proposing to use the null filename
(which could and probably still can be created on some systems), as it is
a gibbering nightmare to handle thereafter, and a poor sod of an ordinary
user has little hope of cleaning up the mess. Been there - done that for
them :-)

It can't use 'stdin', as that is a possible file name, so it uses an
obvious derivation that is unlikely to be created by accident. '<stdin>'
is one of the standard conventions - I am one of perhaps a few hundred
(perhaps more) people who invented it independently, 20 years back, but
doubt that I was even close to the first. It is quite a good name for
Unix, as you can't easily create it by accident in any normal shell.

|> > It is one of the standard conventions, which is (after all) why Python
|> > is searching for it.
|>
|> the only reason Python's searching for it is that the CLI implementation passes
|> "<stdin>" as the second argument to compile:
|>
|> http://pyref.infogami.com/compile

And the reason that it does that is because it is using one of the standard
conventions for naming stdin. Python didn't INVENT that convention, you
know.

The bug isn't in passing an information string "<stdin>" but in using
that string (which is not meant to represent a real file) to perform a
file search.
Regards,
Nick Maclaren.
Jun 30 '06 #14

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Joe Powell | last post by:
What are the best tools/apps for creating spreadsheet reports generated using an Oracle database? Considerations include cost, simplicity of use, flexibility and reuseability of output (XML?),...
3
by: Jonathan | last post by:
We have a production database, but due to the crippling load of some reporting tools, we are looking to have a separate reporting database. Due to it's nature, the reporting database doesn't need...
3
by: jez123456 | last post by:
Hi My users, use ms access for querying and reporting on a backend database, however they need to replace ms access with a new reporting tool. I’m thinking of developing my own reporting...
8
by: Woody Splawn | last post by:
I am asking this question here because I asked this question in the Reporting Services Newsgroup and did not get an answer. Does anyone know if Reporting Services is intended to work in a...
2
by: Brad Pears | last post by:
Has anyone used SQL Server Reporting Services to develop reports with using vb .net ?? We are wondering whether or not to stick with Crystal (hence purhcase the pro version of .net) or go with the...
1
by: rmk | last post by:
How can I get the 2000 and 2005 versions of SQL Server Reporting Services both working on my development laptop ????? I have ASP.NET 1.1 and 2.0 installed on my laptop. I have Visual Studio...
0
by: YellowFin Announcements | last post by:
Whitepaper: "Yellowfin Reporting" enables Embedded Business Intelligence -------------------------------------------------------------------------------- Embedded reports are a standard...
2
by: petermichaux | last post by:
Hi, It seems like determining element position in a web page is a difficult task. In the position reporting source code I've looked at there are special fixes for at least some versions of...
5
by: Joel DaBona | last post by:
Hello, Most reporting components that I'm aware of do not like object graphs with simple C# objects. (like Order - OrderItems). Instead they require me to transform the structure into...
0
by: JTP PR | last post by:
Business Intelligence software company, Yellowfin today announced its successful foray into the Asia Pacific telecommunications sector through its expanding partner network. Two organisations,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.