[issue2848] Remove mimetools usage from the stdlib

2008-06-04 Thread Raymond Hettinger

Raymond Hettinger <[EMAIL PROTECTED]> added the comment:

One idea:  in http.client.HTTPMessage, inherit from email.Message, 
modify the addheaders/addcontinue/readheaders methods to use the 
methods in Message.   Then, change the instantiation in HTTPResponse to 
self.msg = email.parser.Parser(_class=HTTPMessage).parsestr(io.BytesIO
()).  

Something similar may apply to pydoc.  FYI, I believe there is a 
pending discussion about whether to keep pydoc in Py3.0.

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3008] Let bin() show floats

2008-06-04 Thread Raymond Hettinger

Raymond Hettinger <[EMAIL PROTECTED]> added the comment:

No need to conquer the whole world.  Start with bin(1.1).  If requests 
pour-in for hex(1.1) or for a reverse routine, we can deal with those 
when we get them (in the context of their use cases).

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3036] docs - print() example wrong in whatsnew

2008-06-04 Thread Nick Veitch

New submission from Nick Veitch <[EMAIL PROTECTED]>:

In the whatsnew/3.0.html doc, the example for print is the wrong way
around. Current version reads:
* The :func:`print` function doesn't support the "softspace" feature of
the old ``print`` statement.  For example, in Python 2.x,
``print "A\n", "B"`` would write ``"A\nB\n"``; but in Python 3.0,
``print("A\n", "B")`` writes ``"A\n B\n"``.

should read:
* The :func:`print` function doesn't support the "softspace" feature of
the old ``print`` statement.  For example, in Python 2.x,
``print "A\n", "B"`` would write ``"A\n B\n"``; but in Python 3.0,
``print("A\n", "B")`` writes ``"A\nB\n"``.

--
assignee: georg.brandl
components: Documentation
messages: 67688
nosy: evilnick, georg.brandl
severity: normal
status: open
title: docs - print() example wrong in whatsnew
versions: Python 3.0

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3036] docs - print() example wrong in whatsnew

2008-06-04 Thread Georg Brandl

Georg Brandl <[EMAIL PROTECTED]> added the comment:

Have you tried it? :)

The example is correct as it is.

--
resolution:  -> invalid
status: open -> closed

___
Python tracker <[EMAIL PROTECTED]>

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



[issue2917] merge pickle and cPickle in 3.0

2008-06-04 Thread Giampaolo Rodola'

Changes by Giampaolo Rodola' <[EMAIL PROTECTED]>:


--
nosy: +giampaolo.rodola

___
Python tracker <[EMAIL PROTECTED]>

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



[issue1608818] Sloppy error checking in listdir() for Posix

2008-06-04 Thread Duane Griffin

Duane Griffin <[EMAIL PROTECTED]> added the comment:

This bug hit one of our (Gentoo) users, causing random failures when
running emerge (Gentoo's package management tool). See the bug report
here for more information: http://bugs.gentoo.org/show_bug.cgi?id=218378

Unfortunately the patch given previously is slightly broken. Please find
attached a working version that has survived testing and fixes the
problem for the bug reporter.

--
keywords: +patch
nosy: +duaneg
Added file: http://bugs.python.org/file10517/fix-unicode-listdir.patch

___
Python tracker <[EMAIL PROTECTED]>

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



[issue1102] Add support for _msi.Record.GetString() and _msi.Record.GetInteger()

2008-06-04 Thread Anthony Tuininga

Anthony Tuininga <[EMAIL PROTECTED]> added the comment:

This patch appears to be mostly duplicated by patch 2125 which has been
accepted. Would it be helpful if I separated out the parts that have now
been accepted?

___
Python tracker <[EMAIL PROTECTED]>

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



[issue2630] repr() should not escape non-ASCII characters

2008-06-04 Thread Atsuo Ishimoto

Atsuo Ishimoto <[EMAIL PROTECTED]> added the comment:

stringlib can be compiled for Python 2.6 now, but the '!a' converter is
disabled by #ifdef for now.

Added file: http://bugs.python.org/file10518/diff8.patch

___
Python tracker <[EMAIL PROTECTED]>

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



[issue2613] inconsistency with bare * in parameter list

2008-06-04 Thread Buck Golemon

Buck Golemon <[EMAIL PROTECTED]> added the comment:

/agree

___
Python tracker <[EMAIL PROTECTED]>

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



[issue1102] Add support for _msi.Record.GetString() and _msi.Record.GetInteger()

2008-06-04 Thread Martin v. Löwis

Martin v. Löwis <[EMAIL PROTECTED]> added the comment:

Yes, please do provide an updated patch.

___
Python tracker <[EMAIL PROTECTED]>

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



[issue2917] merge pickle and cPickle in 3.0

2008-06-04 Thread Alexandre Vassalotti

Alexandre Vassalotti <[EMAIL PROTECTED]> added the comment:

Here is a diff against the previously posted _pickle.c module. The
module is pretty much done now. I fixed find_class() to be a proper
method and move the initialization code of Pickler/Unpickler into the
tp_init slot to allow proper subclassing.

The only things I didn't do is make save_reduce() public (since it would
be useless) and fix instantiate() to be exactly the same as in pickle.py
(since I have no idea how to cleanly inject a __class__ attribute into a
pre-build empty class from C).

With the beta postponed, I will probably add some optimizations to the
module and update the stdlib documentation.

--
keywords: +patch
Added file: http://bugs.python.org/file10519/changeset-1.diff

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3037] in output

2008-06-04 Thread Ian Bicking

New submission from Ian Bicking <[EMAIL PROTECTED]>:

I updated to sphinx trunk and made just a few small changes in my
template, and I'm now seeing:















  

Note specifically "", which comes right
before extrahead.

--
assignee: georg.brandl
components: Documentation tools (Sphinx)
messages: 67696
nosy: georg.brandl, ianb
severity: normal
status: open
title:  in output
type: behavior

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3037] in output

2008-06-04 Thread Ian Bicking

Ian Bicking <[EMAIL PROTECTED]> added the comment:

You can see the source that produces this in
http://svn.pythonpaste.org/Paste/trunk at revision 7387

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3037] in output

2008-06-04 Thread Ian Bicking

Ian Bicking <[EMAIL PROTECTED]> added the comment:

Armin says this is a bug that has now been resolved in Jinja

___
Python tracker <[EMAIL PROTECTED]>

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



[issue1608818] Sloppy error checking in listdir() for Posix

2008-06-04 Thread Ralf Schmitt

Changes by Ralf Schmitt <[EMAIL PROTECTED]>:


--
nosy: +schmir

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3026] mmap broken with large files on 64bit system

2008-06-04 Thread Ralf Schmitt

Changes by Ralf Schmitt <[EMAIL PROTECTED]>:


--
nosy: +schmir

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3037] in output

2008-06-04 Thread Georg Brandl

Georg Brandl <[EMAIL PROTECTED]> added the comment:

Okay, closing as "wfm".

--
resolution:  -> works for me
status: open -> closed

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3002] shutil.copyfile blocks indefinitely on named pipes

2008-06-04 Thread Ralf Schmitt

Ralf Schmitt <[EMAIL PROTECTED]> added the comment:

I can confirm this issue on python 2.5.
I think the priority should be set to critical, as this can lead to
denial of service attacks.

--
nosy: +schmir
versions: +Python 2.4, Python 2.5, Python 2.6

___
Python tracker <[EMAIL PROTECTED]>

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



[issue1608818] Sloppy error checking in listdir() for Posix

2008-06-04 Thread Georg Brandl

Changes by Georg Brandl <[EMAIL PROTECTED]>:


--
assignee:  -> loewis
components: +Extension Modules -Library (Lib)
keywords: +easy
nosy: +loewis
priority: normal -> high
type:  -> crash
versions: +Python 2.6, Python 3.0

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3026] mmap broken with large files on 64bit system

2008-06-04 Thread Ralf Schmitt

Ralf Schmitt <[EMAIL PROTECTED]> added the comment:

I tested this with python 2.6 and can confirm the issue.
The problem is that unsigned int isn't big enough to hold the size of
the objects, but the size is downcasted to an unsigned int at several
places in _hashopenssl.c. All of these occurences of Py_SAFE_DOWNCAST
seem problematic to me (Py_SAFE_DOWNCAST(len, Py_ssize_t, unsigned int))

___
Python tracker <[EMAIL PROTECTED]>

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



[issue2630] repr() should not escape non-ASCII characters

2008-06-04 Thread Antoine Pitrou

Antoine Pitrou <[EMAIL PROTECTED]> added the comment:

Shall the method be called isprintable() or simply printable()? For the
record, in the io classes, the writable()/readable() convention was chosen.

--
nosy: +pitrou

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3001] RLock's are SLOW

2008-06-04 Thread Antoine Pitrou

Antoine Pitrou <[EMAIL PROTECTED]> added the comment:

You should investigate and try to diagnose where the speed difference
comes from. ISTM the RLock class is implemented in Python while the Lock
class is simply an alias to the builtin native lock type, which could
explain most of the discrepancy.

--
nosy: +pitrou

___
Python tracker <[EMAIL PROTECTED]>

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



[issue2630] repr() should not escape non-ASCII characters

2008-06-04 Thread Georg Brandl

Georg Brandl <[EMAIL PROTECTED]> added the comment:

I would expect "abc".isprintable() give me a bool and "abc".printable()
to return a printable string, as with "abc".lower() and "abc".islower().

___
Python tracker <[EMAIL PROTECTED]>

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



[issue2630] repr() should not escape non-ASCII characters

2008-06-04 Thread Antoine Pitrou

Antoine Pitrou <[EMAIL PROTECTED]> added the comment:

You are right, I had forgotton about lower()/islower().

___
Python tracker <[EMAIL PROTECTED]>

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



[issue2704] IDLE: Patch to make PyShell behave more like a Terminal interface

2008-06-04 Thread Cherniavsky Beni

Cherniavsky Beni <[EMAIL PROTECTED]> added the comment:

The patch logic is very simple: inside the command area Up/Down move
through history.
But what about multi-line editing?  Wouldn't this interfere when you
just want to move between lines in a multi-line command (e.g. a long
``def``)?
I'm afraid the conditional logic needs more refining to be useful.

--
nosy: +cben

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3038] Return results from Python callbacks to Tcl as Tcl objects, please backport it.

2008-06-04 Thread Guilherme Polo

New submission from Guilherme Polo <[EMAIL PROTECTED]>:

I'm not sure if it is okay to ask this here, but could someone backport
r59653 ("Return results from Python callbacks to Tcl as Tcl objects.")
to releas25-maint ? Maybe it is already "marked" to be backported by
someone, if it is the case this could be closed, otherwise leave this as
a remainder.

Thanks.

--
components: Tkinter
messages: 67707
nosy: gpolo
severity: normal
status: open
title: Return results from Python callbacks to Tcl as Tcl objects, please 
backport it.
type: feature request

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3039] tarfile.TarFileCompat.writestr(ZipInfo, str) raises AttributeError

2008-06-04 Thread Jason Kankiewicz

New submission from Jason Kankiewicz <[EMAIL PROTECTED]>:

tarfile.TarFileCompat.writestr( self, zinfo, bytes ) raises
AttributeError("'ZipInfo' object has no attribute 'name'") because an
analog to the tarfile.TarInfo.name attribute cannot be monkeypatched
into the zinfo argument value when it's an instance of zipfile.ZipInfo.

The zipfile.ZipInfo class' attributes are slots, so no ad hoc attributes
can be monkeypatched into an instance of it.

I've replaced the monkeypatching of zinfo with the creation of a new
tarfile.TarInfo object, tinfo, which receives its relevant values instead.

This revealed another problem with the assignment of zinfo.file_size to
tinfo.size: if zinfo.file_size has not been assigned a value then an
AttributeError("file_size") will be raised because the slotted attribute
doesn't exist.
Being that the documentation for zipfile.ZipFile.writestr( self,
zinfo_or_arcname, bytes ) claims that a zipfile.ZipInfo object value for
zinfo_or_arcname must contain "at least the filename, date and time",
it's highly likely that zinfo.file_size will be unassigned in ordinary use.
I fixed this problem by ignoring the value of zinfo.file_size and using
the value of len(bytes) instead, just like the implementation of
zipfile.ZipFile.writestr.

I would have provided a patch for tarfile.TarFileCompat.writestr's unit
test suite, but it doesn't appear to exist.

--
components: Library (Lib)
files: tarfile.TarFileCompat.patch
keywords: patch
messages: 67708
nosy: jkankiewicz
severity: normal
status: open
title: tarfile.TarFileCompat.writestr(ZipInfo, str) raises AttributeError
type: crash
versions: Python 2.5, Python 2.6, Python 3.0
Added file: http://bugs.python.org/file10520/tarfile.TarFileCompat.patch

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3040] optparse documentation: variable arguments example doesn't work as listed

2008-06-04 Thread Trevor Meyerowitz

New submission from Trevor Meyerowitz <[EMAIL PROTECTED]>:

There are two minor bugs in the example in:
http://docs.python.org/lib/optparse-callback-example-6.html

For the optparse example documentation, the call to parser.add_option is
listed as:

parser.add_option("-c", "--callback",
  action="callback", callback=varargs)

this has two bugs:
  1. It refers to the wrong function name
  2. It needs to have a dest variable defined, b/c the callback function
operates on that.

This can be fixed if the parser.add_option call is changed to:
parser.add_option("-c", "--callback",
  action="callback", dest="foo", callback=varargs_callback)

--
assignee: georg.brandl
components: Demos and Tools, Documentation
messages: 67709
nosy: georg.brandl, meyerowitz
severity: normal
status: open
title: optparse documentation: variable arguments example doesn't work as listed
type: behavior
versions: Python 2.5

___
Python tracker <[EMAIL PROTECTED]>

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