[issue5756] idle pydoc et al removed from 3.1 without versioned replacements

2009-04-21 Thread Ronald Oussoren

Ronald Oussoren  added the comment:

Couldn't we just rename them in the repository? 

IIRC the name with a '3' suffix would be the official name for these tools 
in Python 3.x, which would make it more natural to change the name in the 
repository as well.

I don't know enough of svnmerge to know if renaming would be a problem for 
svnmerge.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5170] logging to file + encoding

2009-04-21 Thread shamilbi

shamilbi  added the comment:

>
> Can you retry with setting the "encoding" attribute of the file to
> "cp1251"? That should work and that should be the appropriate method to
> avoid the problem.
>
> test_logging.py in the Python distribution has a test which exercises
> Unicode functionality using cp1251, does that test work in your
> environment?

logging to file is OK (since 2.6.2), logging to console __was__ OK (2.6.1),
not now (2.6.2)

shamil

--
Added file: http://bugs.python.org/file13726/unnamed

___
Python tracker 

___Can you retry with setting the "encoding" attribute of the file 
to

"cp1251"? That should work and that should be the appropriate method 
to
avoid the problem.

test_logging.py in the Python distribution has a test which exercises
Unicode functionality using cp1251, does that test work in your 
environment? logging to file is OK (since 2.6.2), 
logging to console __was__ OK (2.6.1), not now (2.6.2)shamil

___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue672115] Assignment to __bases__ of direct object subclasses

2009-04-21 Thread Lars

Lars  added the comment:

in my project i need to be able to let the user dynamically make and
remove inheritance relationships between classes and in my testing i
think i have run into this issue assigning to __bases__. the

class object(object):
pass

trick seems to work, but i can't really oversee the consequenses. I also
saw another variation which might be the same issue:

A= type("A", (object,), {'one': 1})
B= type("B", (object,), {'two': 2})
C= type("C", (object,), {'three': 3})

A = type("A",(A,B),{})

print dir(A)
print A.__bases__
print '---'
A.__bases__ = (B,C)
print dir(A)
print A.__bases__
print '---'

no exceptions, but the second dir(A) shows that A has lost its attribute
'one'

if the class object(object) trick is not safe, is there a way to get the
dynamic inheritance behaviour in another way, e.g. through metaclasses?

--
nosy: +farcat

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5170] logging to file + encoding

2009-04-21 Thread Vinay Sajip

Vinay Sajip  added the comment:

Trunk and release26-maint were recently changed (r71657, r71658) to use
the following logic, which differs from the code snippet you posted.

if (isinstance(msg, unicode) and
getattr(stream, 'encoding', None)):
stream.write(fs.decode(stream.encoding) % msg)
else:
stream.write(fs % msg)

If the stream is stderr and you are passing a unicode msg, the else
branch will not be taken; as long as the stream has an encoding
attribute, it should output correctly.

The change was made when another, similar issue was posted by another
user (issue #5768).

Can you confirm what happens with the current code as it is in
release26-maint? спасибо!

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5775] marshal.c needs to be checked for out of memory errors

2009-04-21 Thread Eric Smith

Eric Smith  added the comment:

Fixed in r71783.

--
resolution:  -> fixed
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5796] test_posix, test_pty crash under Windows

2009-04-21 Thread R. David Murray

R. David Murray  added the comment:

Applied in r71785.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5805] Distutils (or py2exe) error with DistributionMetaData

2009-04-21 Thread Vah Rashim

New submission from Vah Rashim :

I'find issue http://bugs.python.org/issue708320. It's closed, but in 
python 2.6 this problem are yet exists.

I'm fix it, but don't know, is this good solution. 
quote this my message from above issue without changes^
"""
I'm running py2exe on python 2.6 and have this error, too. I'm look 
through distutils/dist.py and read following:

self.metadata = DistributionMetadata()
method_basenames = dir(self.metadata) + \
['fullname', 'contact', 'contact_email']

for basename in method_basenames:
method_name = "get_" + basename
setattr(self, method_name, getattr(self.metadata, method_name))

I'm printing dir(self.metadata) and get this lines:
['__doc__', '__init__', '__module__', 'author', 'author_email', 
'description', 'get_author', 'get_author_email', 'get_co
ntact', 'get_contact_email', 'get_description', 'get_fullname', 
'get_keywords', 'get_licence', 'get_long_description', '
get_maintainer', 'get_maintainer_email', 'get_name', 'get_platforms', 
'get_url', 'get_version', 'keywords', 'licence', '
long_description', 'maintainer', 'maintainer_email', 'name', 
'platforms', 'url', 'version', 'write_pkg_info']

code in dist.py trying add all methods from metadata to self, even 
'magic' and getters. I think, that's wrong, because no method like 
get___doc, get_get_contact and other.
I'm solve this problem by adding regexp for checking is this method 
allow for adding to self.

this is my (ugly, i think) code:
for basename in method_basenames:
if re.match(r'(__|get_|write_)\w+', basename) is None: #MY FIXES!
method_name = "get_" + basename
setattr(self, method_name, getattr(self.metadata, method_name))

With this change, all py2exe works work correctly (and i don't try 
distutils in other cases).
P.S. i don't know, is this python or py2exe problem: maybe py2exe 
replcae nature python distutils module.
"""

--
assignee: tarek
components: Distutils
messages: 86230
nosy: tarek, varash
severity: normal
status: open
title: Distutils (or py2exe) error with DistributionMetaData
versions: Python 2.6

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5806] MySQL crash on machine startup....

2009-04-21 Thread Dave Fliger

New submission from Dave Fliger :

I recently (in the last 5 days) downloaded and installed Python 2.6.x. 
Upon startup of this machine I noticed a Windows warning 
that "mysqld.exe could not start...". I really didn't pay attention to 
it until today since I had no plans to use MySQL or any other app that 
might use it.

I also use XAMPP, which does rely on MySQL. This morning when I started 
XAMPP, the MySQL server crashed on startup of XAMPP. I removed Python 
by uninstalling it, set XAMPP to start on startup and rebooted. 
Bingo No problem.

Seems like the install process does not check for other applications 
using MySQL and appropriates the db for itself. Is this correct? If 
that is correct, then the install process needs to be altered. 

Is this an issue? I don't know. You tell me.

--
components: Installation
messages: 86231
nosy: plattecoducks
severity: normal
status: open
title: MySQL crash on machine startup
type: crash
versions: Python 2.6

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5807] ConfigParser.RawConfigParser it's an "old-style" class

2009-04-21 Thread Vito De Tullio

New submission from Vito De Tullio :

RawConfigParser does not inherit from object, so using (to make an
example) super() it's impossible.

Python 2.6 (r26:66714, Feb  3 2009, 20:52:03)
[GCC 4.3.2 [gcc-4_3-branch revision 141291]] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from ConfigParser import RawConfigParser
>>> class MyConfigParser(RawConfigParser):
... def __init__(self):
... super(MyConfigParser, self).__init__()
...
>>> mcp = MyConfigParser()
Traceback (most recent call last):
  File "", line 1, in 
  File "", line 3, in __init__
TypeError: super() argument 1 must be type, not classobj
>>>

--
components: Library (Lib)
messages: 86232
nosy: ZeD
severity: normal
status: open
title: ConfigParser.RawConfigParser it's an "old-style" class
versions: Python 2.6

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5575] Add env vars for controlling building sqlite, hashlib and ssl

2009-04-21 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Are these environment variables Python-specific?

--
nosy: +pitrou

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1590864] import deadlocks when using PyObjC threads

2009-04-21 Thread ayal baron

ayal baron  added the comment:

Hi,
We have the same problem while running two threads where one is running
a subprocess command and the other is importing modules.  This will
cause a deadlock and this IS a bug!!!
This happens quite often on a slow machine (once every 2-3 runs).

--
nosy: +abaron

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5803] email/quoprimime: encode and decode are very slow on large messages

2009-04-21 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Do you have a patch?
Also, detailed timing examples are welcome (you can e.g. use the
"timeit" module from the command line).

--
nosy: +pitrou
versions: +Python 2.7, Python 3.1 -Python 2.6

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5803] email/quoprimime: encode and decode are very slow on large messages

2009-04-21 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
priority:  -> normal
stage:  -> needs patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5803] email/quoprimime: encode and decode are very slow on large messages

2009-04-21 Thread Dave Baggett

Dave Baggett  added the comment:

I can certainly generate a patch for you. What form would you like it
in, and against what source tree? Also, do you have a preference between
the use of array.array vs. standard arrays? (I don't know whether it's
good or bad to depend on "import array" in quoprimime.)

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5761] add file name to py3k IO objects repr()

2009-04-21 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Benjamin, do you think it can still be added after beta1?
(I ask that in case noone does it before)

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5803] email/quoprimime: encode and decode are very slow on large messages

2009-04-21 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

The patch must be against the SVN trunk, in standard unified diff ("svn
diff" does the trick).

What do you call standard arrays? Do you mean the builtin list type?
Storing one separate character per list element is a poor choice because
it will waste a lot of memory. The array.array type is more efficient
for this.

However, there are two other, more idiomatic ways of doing this:
- accumulate the chunks of encoded/decoded data into a list (but not
only 1-character strings...) and join() them at the end.
- or, use a StringIO object (from the cStringIO module)

Bonus points if you time all three possibilities and submit the fastest :-)

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5803] email/quoprimime: encode and decode are very slow on large messages

2009-04-21 Thread Dave Baggett

Dave Baggett  added the comment:

Yes, sorry, I meant "built-in list type" not "array". Your point about
using lists this way is valid, and is why I used array.array('c').
I will do as you suggest and try all three methods. I did time the
array.array approach vs. the one currently in the code and it was about
30 times faster.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5804] Add a "tail" argument to zlib.decompress

2009-04-21 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

As usual the patch should come with some unit tests.
Also, it seems you don't test the return value of
PyString_FromStringAndSize before building your tuple.

--
nosy: +pitrou
priority:  -> normal
stage:  -> patch review
versions: +Python 3.1

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5808] Subprocess.getstatusoutput Fails Executing 'dir' Command on Windows

2009-04-21 Thread Lawrence Allan Jones

New submission from Lawrence Allan Jones :

When attempting to use the subprocess.getstatusoutput() function on
Windows, I noticed an unusual error message:
"'{' is not recognized as an internal or external command, 
operable program or batch file."

When the output contained this message, the status was always 256.

>From the interactive prompt, I performed the following:
Python 3.0.1 (r301:69561, Feb 13 2009, 20:04:18) [MSC v.1500 32 bit
(Intel)] on
win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import subprocess
>>> cmdline = 'dir'
>>> (status, output) = subprocess.getstatusoutput(cmdline)
>>> status
256
>>> output
"'{' is not recognized as an internal or external command,\noperable
program or
batch file."
>>>

I think this is an error (but it is possible I misunderstand the
documentation for the function :) .)

--
messages: 86242
nosy: mrwizard82d1
severity: normal
status: open
title: Subprocess.getstatusoutput Fails Executing 'dir' Command on Windows

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5808] Subprocess.getstatusoutput Fails Executing 'dir' Command on Windows

2009-04-21 Thread Lawrence Allan Jones

Lawrence Allan Jones  added the comment:

Oops: user error. The manual states that subprocess.getstatusoutput() is
only open under Unix. Somehow :) I missed this note.

Sorry for wasting bandwidth.

--
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5804] Add a "tail" argument to zlib.decompress

2009-04-21 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

> It is not necessary to test the return value, it is done by 
> Py_BuildValue().

Sorry, it's ok then.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5809] "No such file or directory" with framework build under MacOS 10.4.11

2009-04-21 Thread Michael J. Fromberger

New submission from Michael J. Fromberger :

Checkout:


Configure:
env CFLAGS="-I/opt/local/include" LDFLAGS="-L/opt/local/lib" sh 
./configure --enable-framework --enable-shared --enable-readline

Build:
make

The configuration step completes successfully, and the build proceeds; 
however, the following error occurs:

gcc -L/opt/local/lib -u _PyMac_Error 
Python.framework/Versions/2.6/Python -o python.exe \
Modules/python.o \
-L. -lpython2.6 -ldl  

This appears to be a problem in the definition of the LINKFORSHARED 
variable in the Makefile, but I am not sure what the intended meaning of 
that variable is, so I'm not sure what the fix should be.

A complete make trace is attached.

--
components: Build
files: makedump.txt
messages: 86245
nosy: creachadair
severity: normal
status: open
title: "No such file or directory" with framework build under MacOS 10.4.11
type: compile error
versions: Python 2.6
Added file: http://bugs.python.org/file13728/makedump.txt

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5809] "No such file or directory" with framework build under MacOS 10.4.11

2009-04-21 Thread Michael J. Fromberger

Michael J. Fromberger  added the comment:

Sorry, I managed to not copy the error message.  It is:

i686-apple-darwin8-gcc-4.0.1: Python.framework/Versions/2.6/Python: No 
such file or directory
make: *** [python.exe] Error 1

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5806] MySQL crash on machine startup....

2009-04-21 Thread R. David Murray

R. David Murray  added the comment:

Python doesn't care about mysql.  You can use a third party library to
talk to mysql from python, but only if you install that third party
library. Otherwise, python isn't even aware of whether or not mysql is
installed. So whatever the problem is, it is very unlikely that it has
anything to do with your python install.

If your mysqld starts failing again after reinstalling python, then I'd
suggest posting to python-list and see if the community can help you
narrow down the problem.  If for some bizarre reason it does turn out to
be an issue with the python install, you can open a new ticket with more
information, or reopen this one.

--
nosy: +r.david.murray
resolution:  -> invalid
stage:  -> committed/rejected
status: open -> closed
type: crash -> 

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5806] MySQL crash on machine startup....

2009-04-21 Thread Dave Fliger

Dave Fliger  added the comment:

Thanks for the response. I wasn't sure what the deal was, and sort of 
intuitively knew it wasn't the problem. I wouldn't have mentioned it with the 
exception that uninstalling solved the problem. That's a bit odd, don't you 
think?
 
Dave Fliger
Webmaster
Rogers Sporting Goods
1760 N. Church Road
Liberty, MO 64068
(816) 781 9026
 


From: R. David Murray 
To: plattecountydu...@yahoo.com
Sent: Tuesday, April 21, 2009 11:29:23 AM
Subject: [issue5806] MySQL crash on machine startup

R. David Murray  added the comment:

Python doesn't care about mysql.  You can use a third party library to
talk to mysql from python, but only if you install that third party
library. Otherwise, python isn't even aware of whether or not mysql is
installed. So whatever the problem is, it is very unlikely that it has
anything to do with your python install.

If your mysqld starts failing again after reinstalling python, then I'd
suggest posting to python-list and see if the community can help you
narrow down the problem.  If for some bizarre reason it does turn out to
be an issue with the python install, you can open a new ticket with more
information, or reopen this one.

--
nosy: +r.david.murray
resolution:  -> invalid
stage:  -> committed/rejected
status: open -> closed
type: crash -> 

___
Python tracker 

___

--
Added file: http://bugs.python.org/file13730/unnamed

___
Python tracker 

___
Thanks for the response. I wasn't sure what the deal was, and sort of 
intuitively knew it wasn't the problem. I wouldn't have mentioned it with 
the exception that uninstalling solved the problem. That's a bit odd, don't you 
think? 
Dave Fliger
Webmaster
Rogers Sporting Goods
1760 N. Church Road
Liberty, MO 64068
(816) 781 9026
 
http://www.pintailwebdesigns.com/avatars/pwd_pintail.gif"; 
border=0>




From: R. David Murray 
To: plattecountydu...@yahoo.comSent: Tuesday, April 21, 2009 11:29:23 
AMSubject: [issue5806] MySQL 
crash on machine startupR. David Murray rdmur...@bitdance.com> added the 
comment:Python doesn't care about mysql.  You can use a third 
party library totalk to mysql from python, but only if you install that 
third partylibrary. Otherwise, python isn't even aware of whether or not 
mysql isinstalled. So whatever the problem is, it is very unlikely that it 
hasanything to do with your python install.If your mysqld starts 
failing again after reinstalling python, then
 I'dsuggest posting to python-list and see if the community can help 
younarrow down the problem.  If for some bizarre reason it does turn 
out tobe an issue with the python install, you can open a new ticket with 
moreinformation, or reopen this one.--nosy: 
+r.david.murrayresolution:  -> invalidstage:  -> 
committed/rejectedstatus: open -> closedtype: crash -> 
___Python tracker rep...@bugs.python.org>;___

  ___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5806] MySQL crash on machine startup....

2009-04-21 Thread R. David Murray

R. David Murray  added the comment:

Well, you mentioned that you also added something to your startup...so
it wasn't _only_ uninstalling python.  That's why I suggested
resinstalling it and seeing if things broke again...and then if it did
getting help to track down why, because as I said python doesn't touch
mysql.  (Doesn't touch it even if you install the 3rd party mysql
interface library...when you do that it just installs a client program).

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5806] MySQL crash on machine startup....

2009-04-21 Thread Dave Fliger

Dave Fliger  added the comment:

Thank you, sir. I'll try that later in the day. I just don't want to "break" 
what I have. I'm eager to look under the hood of Python.
 
Dave Fliger
Webmaster
Rogers Sporting Goods
1760 N. Church Road
Liberty, MO 64068
(816) 781 9026
 


From: R. David Murray 
To: plattecountydu...@yahoo.com
Sent: Tuesday, April 21, 2009 11:39:24 AM
Subject: [issue5806] MySQL crash on machine startup

R. David Murray  added the comment:

Well, you mentioned that you also added something to your startup...so
it wasn't _only_ uninstalling python.  That's why I suggested
resinstalling it and seeing if things broke again...and then if it did
getting help to track down why, because as I said python doesn't touch
mysql.  (Doesn't touch it even if you install the 3rd party mysql
interface library...when you do that it just installs a client program).

--

___
Python tracker 

___

--
Added file: http://bugs.python.org/file13731/unnamed

___
Python tracker 

___
Thank you, sir. I'll try that later in the day. I just don't want to 
"break" what I have. I'm eager to look under the hood of Python. 
Dave Fliger
Webmaster
Rogers Sporting Goods
1760 N. Church Road
Liberty, MO 64068
(816) 781 9026
 
http://www.pintailwebdesigns.com/avatars/pwd_pintail.gif"; 
border=0>




From: R. David Murray 
To: plattecountydu...@yahoo.comSent: Tuesday, April 21, 2009 11:39:24 
AMSubject: [issue5806] MySQL 
crash on machine startupR. David Murray rdmur...@bitdance.com> added the 
comment:Well, you mentioned that you also added something to your 
startup...soit wasn't _only_ uninstalling python.  That's why I 
suggestedresinstalling it and seeing if things broke again...and then if it 
didgetting help to track down why, because as I said python doesn't 
touchmysql.  (Doesn't touch it even if you install the 3rd party 
mysqlinterface library...when you do that it just installs
 a client 
program).--___Python
 tracker rep...@bugs.python.org>;___

  ___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5786] len(reversed([1,2,3])) does not work anymore in 2.6.2

2009-04-21 Thread Giampaolo Rodola'

Changes by Giampaolo Rodola' :


--
nosy: +giampaolo.rodola

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5786] len(reversed([1,2,3])) does not work anymore in 2.6.2

2009-04-21 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

Essentially, the only argument for reverting this is breaking
compatibility with 2.6.0 and 2.6.1.  But, in the process, reverting it
means breaking compatibility with 2.6.2.  Since the cat is already out
of the bag for 2.6.2, I think the bugfix ought to be left in-place. 
It's too disruptive to switch back and forth during micro releases.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5761] add file name to py3k IO objects repr()

2009-04-21 Thread Benjamin Peterson

Benjamin Peterson  added the comment:

2009/4/21 Antoine Pitrou :
>
> Antoine Pitrou  added the comment:
>
> Benjamin, do you think it can still be added after beta1?
> (I ask that in case noone does it before)

Yes, I think that would be ok.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5807] ConfigParser.RawConfigParser it's an "old-style" class

2009-04-21 Thread Benjamin Peterson

Benjamin Peterson  added the comment:

Changing it would break compatibility.

--
nosy: +benjamin.peterson
resolution:  -> wont fix
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5786] len(reversed([1,2,3])) does not work anymore in 2.6.2

2009-04-21 Thread Mark Dickinson

Mark Dickinson  added the comment:

If 2.6.3 isn't imminent, I agree this change should be left in place.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5757] Documentation error for Condition.notify()

2009-04-21 Thread Georg Brandl

Georg Brandl  added the comment:

Thanks, fixed in r71786.

--
resolution:  -> fixed
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5751] Typo in documentation of print function parameters

2009-04-21 Thread Georg Brandl

Georg Brandl  added the comment:

Thanks, fixed in r71787.

--
resolution:  -> fixed
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5808] Subprocess.getstatusoutput Fails Executing 'dir' Command on Windows

2009-04-21 Thread Benjamin Peterson

Changes by Benjamin Peterson :


--
resolution:  -> invalid

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5434] datetime.monthdelta

2009-04-21 Thread Chris Rebert

Changes by Chris Rebert :


--
nosy: +cvrebert

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5237] Allow auto-numbered replacement fields in str.format() strings

2009-04-21 Thread Eric Smith

Eric Smith  added the comment:

Thanks, Terry. Your changes look reasonable to me. Can you commit them,
or at least convert it to a patch against the existing docs?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5805] Distutils (or py2exe) error with DistributionMetaData

2009-04-21 Thread Martin v. Löwis

Martin v. Löwis  added the comment:

The bug report was closed here because it is not a bug in Python, but in
py2exe, which is independent of Python. Please report it to the py2exe
maintainers.

Closing this one as well.

--
nosy: +loewis
resolution:  -> invalid
status: open -> closed
versions: +3rd party -Python 2.6

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5806] MySQL crash on machine startup....

2009-04-21 Thread Martin v. Löwis

Changes by Martin v. Löwis :


Removed file: http://bugs.python.org/file13730/unnamed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5806] MySQL crash on machine startup....

2009-04-21 Thread Martin v. Löwis

Changes by Martin v. Löwis :


Removed file: http://bugs.python.org/file13731/unnamed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5806] MySQL crash on machine startup....

2009-04-21 Thread Martin v. Löwis

Martin v. Löwis  added the comment:

As David says: Python has no business with mysql. If they interfere, it
could be because of a bug in Python, or because of a bug in mysql, or
because of a bug in Windows, or because of a plain misconfiguration on
your side.

So unless you can provide detailed instructions on how to reproduce it,
there is likely little that we can do.

--
nosy: +loewis

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5806] MySQL crash on machine startup....

2009-04-21 Thread Dave Fliger

Dave Fliger  added the comment:

True enough, my friend. I really didn't know if it had been reported before. If 
I go over the sequence of events tat I performed here on this machine, then my 
only conclusion was the installation of Python because everything worked prior 
to that. I know that if I can't give you the steps to reproduce, there is no 
problem.

So I guess this is an alert. If someone else reports something similar, you may 
have an issue. My original post clearly said that I didn't know if it was an 
issue or not.
 
Dave Fliger
Webmaster
Rogers Sporting Goods
1760 N. Church Road
Liberty, MO 64068
(816) 781 9026
 


From: ""Martin v. Löwis" @psf.upfronthosting.co.za" 
<=?utf-8?b?ik1hcnrpbib2libmw7z3axmiidxyzxbvcnraynvncy5wexrob24ub3jnpg=...@psf.upfronthosting.co.za>
To: plattecountydu...@yahoo.com
Sent: Tuesday, April 21, 2009 4:18:53 PM
Subject: [issue5806] MySQL crash on machine startup

Martin v. Löwis  added the comment:

As David says: Python has no business with mysql. If they interfere, it
could be because of a bug in Python, or because of a bug in mysql, or
because of a bug in Windows, or because of a plain misconfiguration on
your side.

So unless you can provide detailed instructions on how to reproduce it,
there is likely little that we can do.

--
nosy: +loewis

___
Python tracker 

___

--
Added file: http://bugs.python.org/file13732/unnamed

___
Python tracker 

___
True enough, my friend. I really didn't know if it had been reported 
before. If I go over the sequence of events tat I performed here on this 
machine, then my only conclusion was the installation of Python because 
everything worked prior to that. I know that if I can't give you the steps to 
reproduce, there is no problem.
 
So I guess this is an alert. If someone else reports something similar, 
you may have an issue. My original post clearly said that I didn't know if it 
was an issue or not. 
Dave Fliger
Webmaster
Rogers Sporting Goods
1760 N. Church Road
Liberty, MO 64068
(816) 781 9026
 
http://www.pintailwebdesigns.com/avatars/pwd_pintail.gif"; 
border=0>




From: ""Martin v. Löwis" 
@psf.upfronthosting.co.za" 
<=?utf-8?b?ik1hcnrpbib2libmw7z3axmiidxyzxbvcnraynvncy5wexrob24ub3jnpg=...@psf.upfronthosting.co.za>To: 
plattecountydu...@yahoo.comSent: Tuesday, April 21, 2009 4:18:53 PMSubject: [issue5806] MySQL crash on 
machine startupMartin v. Löwis mar...@v.loewis.de> added the 
comment:As David says: Python has no business with mysql. If they 
interfere, itcould be because of a bug in Python, or because of a bug in 
mysql, orbecause of a bug in Windows, or because of a plain 
misconfiguration onyour side.So unless you can provide detailed 
instructions on
 how to reproduce it,there is likely little that we can 
do.--nosy: 
+loewis___Python tracker rep...@bugs.python.org>;___

  ___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5237] Allow auto-numbered replacement fields in str.format() strings

2009-04-21 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

I am not a committer and cannot make patches.  However, I did download
http://svn.python.org/view/python/trunk/Doc/library/string.rst?revision=70650&view=markup,
as string27.txt, carefully edit using the existing rst format, and
upload.  I trust you can make the patch and commit.

--
Added file: http://bugs.python.org/file13733/string27.txt

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5237] Allow auto-numbered replacement fields in str.format() strings

2009-04-21 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

PS. I first edited
http://svn.python.org/view/python/branches/py3k/Doc/library/strings.rst?revision=63803&view=markup
but then noticed that this goes in 2.7.  My impression is that the
procedure is to commit to trunk and then forward port, so I redid it as
indicated above.  But if you are going from 3.1 to 2.7, I will upload
the 3.1 revision.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5237] Allow auto-numbered replacement fields in str.format() strings

2009-04-21 Thread Eric Smith

Eric Smith  added the comment:

Thanks, Terry.

I think the only changes I'll make are:

arg_name: (`identifier` | `integer`)*
should be:
arg_name: (`identifier` | `integer`)?

And leave:
conversion: "r" | "s"
instead of:
conversion: "r" | "s" | "a"
because 'a' isn't valid in 2.7.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5237] Allow auto-numbered replacement fields in str.format() strings

2009-04-21 Thread Eric Smith

Eric Smith  added the comment:

Documentation changes checked into trunk in r71788 and py3k in r71790.

Issue closed.

--
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5810] test_distutils fails - sysconfig._config_vars is None

2009-04-21 Thread Sridhar Ratnakumar

New submission from Sridhar Ratnakumar :

Sorry, but the commit r69598 (due to Issue4524) has a problem. On
Windows and Linux (although not on MacOSX), test_distutils fails:

test_distutils
test test_distutils failed -- Traceback (most recent call last):
  File "C:\Python26\lib\distutils\tests\test_build_scripts.py", line 93,
in test_version_int
old = sysconfig._config_vars.get('VERSION')
AttributeError: 'NoneType' object has no attribute 'get'


Using the documented API (`sysconfig.get_config_vars()`) instead of an
uninitialized private variable (`sysconfig._config_vars.get('VERSION')`)
may fix it.


The following session is from my a Windows machine:

>>> from distutils import sysconfig
>>> print sysconfig._config_vars
None
>>> s = sysconfig.get_config_vars()
>>> s
{'EXE': '.exe', ...}
>>> sysconfig._config_vars
{'EXE': '.exe', ...}
>>>

We face this failure while testing the ActivePython builds based on
Python 2.6.2.

--
assignee: tarek
components: Distutils
messages: 86266
nosy: srid, tarek, trentm
severity: normal
status: open
title: test_distutils fails - sysconfig._config_vars is None
type: behavior
versions: Python 2.6

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5796] test_posix, test_pty crash under Windows

2009-04-21 Thread R. David Murray

R. David Murray  added the comment:

x86 XP-4 trunk buildbot showed correct skip for these tests.  Ported to
py3k in r71792.

--
resolution:  -> fixed
stage: patch review -> committed/rejected
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5797] there is en exception om Create User page

2009-04-21 Thread Daniel Diniz

Daniel Diniz  added the comment:

Which Create User page? What is the error you get, where and how does it
happen?

--
nosy: +ajaksu2
type: crash -> behavior

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5753] CVE-2008-5983 python: untrusted python modules search path

2009-04-21 Thread Daniel Diniz

Changes by Daniel Diniz :


--
priority:  -> critical
stage:  -> test needed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5727] doctest pdb readline broken

2009-04-21 Thread Daniel Diniz

Changes by Daniel Diniz :


--
stage:  -> test needed
versions: +Python 2.6, Python 3.1 -Python 2.5

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1540112] Allow choice of copy function in shutil.copytree

2009-04-21 Thread Daniel Diniz

Changes by Daniel Diniz :


--
keywords: +easy

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5800] make wsgiref.headers.Headers accept empty constructor

2009-04-21 Thread Daniel Diniz

Changes by Daniel Diniz :


--
keywords: +easy
stage:  -> test needed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5754] Shelve module writeback parameter does not act as advertised

2009-04-21 Thread Daniel Diniz

Changes by Daniel Diniz :


--
keywords: +easy
stage:  -> test needed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5789] powerset recipe listed twice in itertools docs

2009-04-21 Thread Daniel Diniz

Daniel Diniz  added the comment:

Clear Bug Day candidate, but I just can't see the duplication :)

--
keywords: +easy
nosy: +ajaksu2
type:  -> behavior

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5752] xml.dom.minidom does not handle newline characters in attribute values

2009-04-21 Thread Daniel Diniz

Changes by Daniel Diniz :


--
keywords: +easy
stage:  -> test needed
versions:  -Python 2.4, Python 2.5, Python 2.7, Python 3.0

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1752919] Exception in HTMLParser for special JavaScript code

2009-04-21 Thread Daniel Diniz

Changes by Daniel Diniz :


--
keywords: +easy

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1672568] silent error in email.message.Message.get_payload

2009-04-21 Thread Daniel Diniz

Daniel Diniz  added the comment:

Looks good to me, adding tests and docs could be a nice Bug Day task.

--
keywords: +easy

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1745761] Bad attributes/data handling in SGMLib

2009-04-21 Thread Daniel Diniz

Changes by Daniel Diniz :


--
keywords: +easy

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1738179] help() can't find right source file

2009-04-21 Thread Daniel Diniz

Changes by Daniel Diniz :


--
keywords: +easy

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue809887] Improve pdb breakpoint feedback

2009-04-21 Thread Daniel Diniz

Changes by Daniel Diniz :


--
keywords: +easy

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5650] Obsolete RFC's should be removed from doc of urllib.urlparse

2009-04-21 Thread Daniel Diniz

Changes by Daniel Diniz :


--
keywords: +easy
stage:  -> needs patch
type:  -> behavior
versions:  -Python 2.5

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1711605] CGIHttpServer leaves traces of previous requests in env

2009-04-21 Thread Daniel Diniz

Changes by Daniel Diniz :


--
keywords: +easy

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1284670] Allow to restrict ModuleFinder to get "direct" dependencies

2009-04-21 Thread Daniel Diniz

Changes by Daniel Diniz :


--
keywords: +easy

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1721862] email.FeedParser.BufferedSubFile improperly handles "\r\n"

2009-04-21 Thread Daniel Diniz

Changes by Daniel Diniz :


--
keywords: +easy

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1681333] email.header unicode fix

2009-04-21 Thread Daniel Diniz

Changes by Daniel Diniz :


--
keywords: +easy

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1560032] confusing error msg from random.randint

2009-04-21 Thread Daniel Diniz

Daniel Diniz  added the comment:

Don't worry :)

Tagging as a Bug Day candidate.

--
keywords: +easy

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1076515] shutil.move clobbers read-only files.

2009-04-21 Thread Daniel Diniz

Changes by Daniel Diniz :


--
keywords: +easy

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1690608] email.utils.formataddr() should be rfc2047 aware

2009-04-21 Thread Daniel Diniz

Changes by Daniel Diniz :


--
keywords: +easy

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1648102] proxy_bypass in urllib handling of macro

2009-04-21 Thread Daniel Diniz

Changes by Daniel Diniz :


--
keywords: +easy

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1726208] SimpleHTTPServer extensions_map

2009-04-21 Thread Daniel Diniz

Changes by Daniel Diniz :


--
keywords: +easy

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1515142] sgmllib should recover from unmatched quotes

2009-04-21 Thread Daniel Diniz

Changes by Daniel Diniz :


--
keywords: +easy, patch
stage: test needed -> patch review

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1553375] Add traceback.print_full_exception()

2009-04-21 Thread Daniel Diniz

Changes by Daniel Diniz :


--
keywords: +easy

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5789] powerset recipe listed twice in itertools docs

2009-04-21 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

Already fixed.

--
nosy: +rhettinger
resolution:  -> out of date
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4111] Add DTrace probes

2009-04-21 Thread Robert Kern

Robert Kern  added the comment:

Skip, it doesn't appear that the ustack helper is getting incorporated
into the OS X build anywhere. This rule is obviously wrong (compiling
the wrong input file with the wrong flags):

Include/phelper.h: $(srcdir)/Include/phelper.d
dtrace -o $@ $(DFLAGS) -C -h -s $(srcdir)/Python/python.d

I *think* it should be something along these lines:

Include/phelper.h: $(srcdir)/Include/phelper.d
dtrace -o $@ -DPHELPER $(DFLAGS) $(CPPFLAGS) -C -h -s
$(srcdir)/Include/phelper.d

There are some static functions in the standard system headers that get
pulled in that need to be avoided. The #define _SYS_STAT_H up at the top
avoids similar problems on Solaris. I'm working through the OS X headers
now, but I'm stuck on trying to avoid sys/_structs.h. Unfortunately, it
does not have the #ifndef _SYS__STRUCTS_H magic up at the top that would
allow me to do so, nor any convenient #ifdefs around the offending
declaration. 

Even if that would work, phelper.h is not #included anywhere. I'm not
really sure where it needs to go. On Solaris, the object file gets
linked in, but on OS X, you don't generate an object file; you just
#include the .h. Somewhere. I'm guessing where the pydtrace.h is
currently, but I don't really know. John, do you have any insights?

Also, s/DTRADEHDRS/DTRACEHDRS/

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5811] io.BufferedReader.peek(): Documentation differs from Implementation

2009-04-21 Thread Torsten Rottmann

New submission from Torsten Rottmann :

The documented behavior of io.BufferedReader.peek([n]) states:

peek([n])
Return 1 (or n if specified) bytes from a buffer without advancing the 
position.

Thereas the parameter n is the _max_ length of returned bytes.

Implementation is:

def _peek_unlocked(self, n=0):
want = min(n, self.buffer_size)
have = len(self._read_buf) - self._read_pos
if have < want:
to_read = self.buffer_size - have
current = self.raw.read(to_read)
if current:
self._read_buf = self._read_buf[self._read_pos:] + 
current
self._read_pos = 0
return self._read_buf[self._read_pos:]

Where you may see that the parameter n is the _min_ length
of returned bytes. So peek(1) will return _not_ just 1 Byte, but the
remaining bytes in the buffer.

--
components: Library (Lib)
messages: 86274
nosy: trott
severity: normal
status: open
title: io.BufferedReader.peek(): Documentation differs from Implementation
type: behavior
versions: Python 3.0

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5811] io.BufferedReader.peek(): Documentation differs from Implementation

2009-04-21 Thread Torsten Rottmann

Torsten Rottmann  added the comment:

Note: this is also in Python 2.6

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5811] io.BufferedReader.peek(): Documentation differs from Implementation

2009-04-21 Thread Torsten Rottmann

Torsten Rottmann  added the comment:

Proposed patch to fix this:

set the default of n to 1 as stated by docs:

def _peek_unlocked(self, n=1):

return n bytes:

return self._read_buf[self._read_pos:self._read_pos+n]

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4111] Add DTrace probes

2009-04-21 Thread Robert Kern

Robert Kern  added the comment:

Got a bit farther. Adding this stanza to the top of phelper.d gets past
the issues in the headers:

#ifdef __APPLE__
#define _SYS_TIME_H_
#define _SYS_SELECT_H_
#define __MATH_H__
#define _OS__OSBYTEORDER_H
#define _FD_SET
#define __GNUC_VA_LIST
#endif /* __APPLE__ */


However, I now get a more legitimate dtrace compilation error that John
might be able to help us interpret:

$ dtrace -o /Users/rkern/hg/Python-2.5.4/Include/phelper.h -DPHELPER 
-I. -IInclude -I/Users/rkern/hg/Python-2.5.4/Include  -C -h -s
/Users/rkern/hg/Python-2.5.4/Include/phelper.d
dtrace: failed to compile script
/Users/rkern/hg/Python-2.5.4/Include/phelper.d: line 110: relocation
remains against user symbol D``PyEval_EvalFrameEx (offset 0x5)


I also tried running this without -DPHELPER as a regular DTrace script
rather than a ustack helper and ran into a problem that I've noticed
with any OS X Python build I've tried. I cannot seem to probe any of the
C functions in the Python interpreter. There are no simply
pid$target:a.out:: probes available. I'm wondering if that is an effect
of their being in a .framework, but I think I've been able to probe
other symbols other .frameworks.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com