[issue3058] Let SimpleXMLRPCServer pass client_address to called functions.

2008-06-09 Thread Raghuram Devarakonda

Changes by Raghuram Devarakonda <[EMAIL PROTECTED]>:


--
nosy: +draghuram

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3066] FD leak in urllib2

2008-06-09 Thread Bohdan Vlasyuk

New submission from Bohdan Vlasyuk <[EMAIL PROTECTED]>:

In urllib2.AbstractHTTPHandler.do_open, the following like creates a
circular link:

r.recv = r.read

[r.read is a bound method, so it contains a reference to 'r'. Therefore,
r now refers to itself.]

If the GC is disabled or doesn't run often, this creates a FD leak.

How to reproduce:

import gc
import urllib2
u = urllib2.urlopen("http://google.com";)
s = [ u.fp._sock.fp._sock ]
u.close()
del u
print gc.get_referrers(s[0])
[, []]

I would expect that only one reference to the socket would exist (the
"s" list itself).

I can reproduce with 2.4; the problems seems to still exist in SVN HEAD.

--
components: Library (Lib)
messages: 67860
nosy: bohdan
severity: normal
status: open
title: FD leak in urllib2
type: resource usage
versions: Python 2.4

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3067] setlocale Tracebacks on unicode locale strings

2008-06-09 Thread vincent.chute

New submission from vincent.chute <[EMAIL PROTECTED]>:

import locale
locale.setlocale( locale.LC_ALL, u'ja_JP.utf8')
Traceback (most recent call last):
  File "", line 1, in 
  File "/usr/lib/python2.5/locale.py", line 475, in setlocale
locale = normalize(_build_localename(locale))
  File "/usr/lib/python2.5/locale.py", line 383, in _build_localename
language, encoding = localetuple
ValueError: too many values to unpack

The problem is line 473:
if locale and type(locale) is not type(""):

Replacing this with
 if locale and not isinstance(locale, basestring):
fixes the problem.

--
components: Library (Lib)
messages: 67861
nosy: vincent.chute
severity: normal
status: open
title: setlocale Tracebacks on unicode locale strings
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



[issue3067] setlocale Tracebacks on unicode locale strings

2008-06-09 Thread vincent.chute

vincent.chute <[EMAIL PROTECTED]> added the comment:

I have confirmed this exists on trunk

http://svn.python.org/view/python/trunk/Lib/locale.py?rev=63824&view=markup

(63824 is the latest)
where the line in question is now 475

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3051] heapq change breaking compatibility

2008-06-09 Thread Raymond Hettinger

Changes by Raymond Hettinger <[EMAIL PROTECTED]>:


--
status: closed -> open

___
Python tracker <[EMAIL PROTECTED]>

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



[issue2517] Error when printing an exception containing a Unicode string

2008-06-09 Thread Simon Cross

Simon Cross <[EMAIL PROTECTED]> added the comment:

One of the examples Christoph tried was

  unicode(Exception(u'\xe1'))

which fails quite oddly with:

  UnicodeEncodeError: 'ascii' codec can't encode character u'\xe1' in
position 0: ordinal not in range(128)

The reason for this is Exception lacks an __unicode__ method
implementation so that unicode(e) does something like unicode(str(e))
which attempts to convert the exception arguments to the default
encoding (almost always ASCII) and fails.

Fixing this seems quite important. It's common to want to raise errors
with non-ASCII characters (e.g. when the data which caused the error
contains such characters). Usually the code raising the error has no way
of knowing how the characters should be encoded (exceptions can end up
being written to log files, displayed in web interfaces, that sort of
thing). This means raising exceptions with unicode messages. Using
unicode(e.message) is unattractive since it won't work in 3.0 and also
does not duplicate str(e)'s handling of the other exception __init__
arguments.

I'm attaching a patch which implements __unicode__ for BaseException.
Because of the lack of a tp_unicode slot to mirror tp_str slot, this
breaks the test that calls unicode(Exception). The existing test for
unicode(e) does unicode(Exception(u"Foo")) which is a bit of a non-test.
My patch adds a test of unicode(Exception(u'\xe1')) which fails without
the patch.

A quick look through trunk suggests implementing tp_unicode actually
wouldn't be a huge job. My worry is that this would constitute a change
to the C API for PyObjects and has little chance of acceptance into 2.6
(and in 3.0 all these issues disappear anyway). If there is some chance
of acceptance, I'm willing to write a patch that adds tp_unicode.

--
nosy: +hodgestar
Added file: http://bugs.python.org/file10559/exception-unicode.diff

___
Python tracker <[EMAIL PROTECTED]>

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



[issue775544] Tk.quit leads to crash in python.exe

2008-06-09 Thread Jim Jewett

Jim Jewett <[EMAIL PROTECTED]> added the comment:

Were you using IDLE at the time?

When I try this (Windows XP SP2), the button and its window do not go away 
(which is arguably a bug), but it does not crash.

If I then try to close the window using the little X (from the window 
manager),

(1)  A qb started from the command-line interface exits, as it should.
(2)  A qb started from within IDLE becomes non-responsive, and Windows 
asks whether or not I want to continue shutting it down.

--
nosy: +jimjjewett

___
Python tracker <[EMAIL PROTECTED]>

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



[issue2517] Error when printing an exception containing a Unicode string

2008-06-09 Thread David Fraser

Changes by David Fraser <[EMAIL PROTECTED]>:


--
nosy: +davidfraser

___
Python tracker <[EMAIL PROTECTED]>

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



[issue2517] Error when printing an exception containing a Unicode string

2008-06-09 Thread David Fraser

David Fraser <[EMAIL PROTECTED]> added the comment:

Aha - the __unicode__ method was previously there in Python 2.5, and was
ripped out because of the unicode(Exception) problem. See
http://bugs.python.org/issue1551432.

The reversion is in
http://svn.python.org/view/python/trunk/Objects/exceptions.c?rev=51837&r1=51770&r2=51837

___
Python tracker <[EMAIL PROTECTED]>

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



[issue1551432] __unicode__ breaks for exception class objects

2008-06-09 Thread David Fraser

David Fraser <[EMAIL PROTECTED]> added the comment:

Note that this causes problems with converting Exceptions to unicode -
see  http://bugs.python.org/issue2517

--
nosy: +davidfraser

___
Python tracker <[EMAIL PROTECTED]>

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



[issue2517] Error when printing an exception containing a Unicode string

2008-06-09 Thread Benjamin Peterson

Benjamin Peterson <[EMAIL PROTECTED]> added the comment:

On Mon, Jun 9, 2008 at 8:40 AM, Simon Cross <[EMAIL PROTECTED]> wrote:
>
> Simon Cross <[EMAIL PROTECTED]> added the comment:
>
> One of the examples Christoph tried was
>
>  unicode(Exception(u'\xe1'))
>
> which fails quite oddly with:
>
>  UnicodeEncodeError: 'ascii' codec can't encode character u'\xe1' in
> position 0: ordinal not in range(128)
>
> The reason for this is Exception lacks an __unicode__ method
> implementation so that unicode(e) does something like unicode(str(e))
> which attempts to convert the exception arguments to the default
> encoding (almost always ASCII) and fails.

What version are you using? In Py3k, str is unicode so __str__ can
return a unicode string.

>
> Fixing this seems quite important. It's common to want to raise errors
> with non-ASCII characters (e.g. when the data which caused the error
> contains such characters). Usually the code raising the error has no way
> of knowing how the characters should be encoded (exceptions can end up
> being written to log files, displayed in web interfaces, that sort of
> thing). This means raising exceptions with unicode messages. Using
> unicode(e.message) is unattractive since it won't work in 3.0 and also
> does not duplicate str(e)'s handling of the other exception __init__
> arguments.
>
> I'm attaching a patch which implements __unicode__ for BaseException.
> Because of the lack of a tp_unicode slot to mirror tp_str slot, this
> breaks the test that calls unicode(Exception). The existing test for
> unicode(e) does unicode(Exception(u"Foo")) which is a bit of a non-test.
> My patch adds a test of unicode(Exception(u'\xe1')) which fails without
> the patch.
>
> A quick look through trunk suggests implementing tp_unicode actually
> wouldn't be a huge job. My worry is that this would constitute a change
> to the C API for PyObjects and has little chance of acceptance into 2.6
> (and in 3.0 all these issues disappear anyway). If there is some chance
> of acceptance, I'm willing to write a patch that adds tp_unicode.

Email Python-dev for permission.

___
Python tracker <[EMAIL PROTECTED]>

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



[issue2517] Error when printing an exception containing a Unicode string

2008-06-09 Thread Simon Cross

Simon Cross <[EMAIL PROTECTED]> added the comment:

Concerning http://bugs.python.org/issue1551432:

I'd much rather have working unicode(e) than working unicode(Exception).
Calling unicode(C) on any class C which overrides __unicode__ is broken
without tp_unicode anyway.

___
Python tracker <[EMAIL PROTECTED]>

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



[issue2517] Error when printing an exception containing a Unicode string

2008-06-09 Thread Simon Cross

Simon Cross <[EMAIL PROTECTED]> added the comment:

Benjamin Peterson wrote:
> What version are you using? In Py3k, str is unicode so __str__ can
> return a unicode string.

I'm sorry it wasn't clear. I'm aware that this issue doesn't apply to
Python 3.0. I'm testing on both Python 2.5 and Python 2.6 for the
purposes of the bug.

Code I'm developing that hits these issues are database exceptions with
unicode messages raised inside MySQLdb on Python 2.5.

The patch I submitted is against trunk.

___
Python tracker <[EMAIL PROTECTED]>

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



[issue2517] Error when printing an exception containing a Unicode string

2008-06-09 Thread Marc-Andre Lemburg

Marc-Andre Lemburg <[EMAIL PROTECTED]> added the comment:

Removing 3.0 from the versions list.

--
nosy: +lemburg
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



[issue3064] new turtle module for Python 3.0

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

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

Can you please provide the documentation change as a patch relative to
the 2.6 Doc/lib/turtle.rst (or as a complete file based on turtle.rst)?
In the current form, I find it hard to accept, since I would have to
redo all the changes that I had already done for the 2.6 version.

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3068] IDLE - Add an extension configuration dialog

2008-06-09 Thread Tal Einat

New submission from Tal Einat <[EMAIL PROTECTED]>:

Attaching a patch for a straightforward extension config dialog, largely
based on configDialog.py.

This uses the multiple-tab-rows feature of the TabbedPageSet widget from
the tabbedPages module, as well as the included VerticalScrolledFrame
widget. Other than that there's nothing really new here.

--
components: IDLE
files: IDLE_configExtensionsDialog.080609.patch
keywords: patch
messages: 67872
nosy: kbk, taleinat
severity: normal
status: open
title: IDLE - Add an extension configuration dialog
type: behavior
versions: Python 2.6
Added file: 
http://bugs.python.org/file10560/IDLE_configExtensionsDialog.080609.patch

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3068] IDLE - Add an extension configuration dialog

2008-06-09 Thread Tal Einat

Changes by Tal Einat <[EMAIL PROTECTED]>:


Removed file: 
http://bugs.python.org/file10560/IDLE_configExtensionsDialog.080609.patch

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3068] IDLE - Add an extension configuration dialog

2008-06-09 Thread Tal Einat

Tal Einat <[EMAIL PROTECTED]> added the comment:

I forgot to mention:

This patch also removes the "paragraph width" option from the "General"
tab in the normal IDLE config, since that configures a parameter of the
FormatParagraph extension, which can now be done in the extension config
dialog.

Added file: 
http://bugs.python.org/file10561/IDLE_configExtensionsDialog.080609.patch

___
Python tracker <[EMAIL PROTECTED]>

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



[issue2517] Error when printing an exception containing a Unicode string

2008-06-09 Thread David Fraser

David Fraser <[EMAIL PROTECTED]> added the comment:

So I've got a follow-up patch that adds tp_unicode.
Caveat that I've never done anything like this before and it's almost
certain to be wrong.

It does however generate the desired result in this case :-)

Added file: http://bugs.python.org/file10562/tp_unicode_exception.patch

___
Python tracker <[EMAIL PROTECTED]>

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



[issue2517] Error when printing an exception containing a Unicode string

2008-06-09 Thread Benjamin Peterson

Benjamin Peterson <[EMAIL PROTECTED]> added the comment:

On Mon, Jun 9, 2008 at 2:04 PM, David Fraser <[EMAIL PROTECTED]> wrote:
>
> David Fraser <[EMAIL PROTECTED]> added the comment:
>
> So I've got a follow-up patch that adds tp_unicode.
> Caveat that I've never done anything like this before and it's almost
> certain to be wrong.

Unfortunately, adding a slot is a bit more complicated. You have to
deal with inheritance and such. Have a look in typeobject.c for all
the gory details. I'd recommend you write to python-dev before going
on the undertaking, though.

>
> It does however generate the desired result in this case :-)
>
> Added file: http://bugs.python.org/file10562/tp_unicode_exception.patch
>
> ___
> Python tracker <[EMAIL PROTECTED]>
> 
> ___
>

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3064] new turtle module for Python 3.0

2008-06-09 Thread Gregor Lingl

Gregor Lingl <[EMAIL PROTECTED]> added the comment:

Here is the (slightly) modified docfile in rst-format for the new
turtle module for Python 3.0

I'll submit the diff (from the turtle.rst for Python 2.6) in a
follow up posting for your convenience. So you can easily check the few 
differences - as well as if I have used reST correctly.

Regards, 
Gregor

Added file: http://bugs.python.org/file10563/turtle30.rst

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3064] new turtle module for Python 3.0

2008-06-09 Thread Gregor Lingl

Gregor Lingl <[EMAIL PROTECTED]> added the comment:

And here the diff from docfile turtle.rst to what I have named
turtle30.rst for now.

Gregor

--
keywords: +patch
Added file: http://bugs.python.org/file10564/turtle.rst.diff

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3069] Let set.union and set.intersection accept multiple arguments

2008-06-09 Thread Arnaud Delobelle

New submission from Arnaud Delobelle <[EMAIL PROTECTED]>:

The patch allows the following syntax for s set/frozenset:
* s.union(a, b, c,...)
* s.update(a, b, c,...)
* s.intersection(a, b, c,...)
* s.intersection_update(a, b, c,...)

By extension:
* set.union(a, b, c,...) # provided a is a set/frozenset
* ...

Union is extended by iterative application of set_union_internal
Intersection is optimized by sorting all sets/frozensets/dicts in 
increasing order of size and only iterating over elements in the 
smallest.

This was discussed on python-ideas:
http://groups.google.com/group/python-
ideas/browse_thread/thread/945a6c989ab905a3/54defd5e62b9a2a6

--
components: Interpreter Core
files: set_ui_varargs.diff
keywords: patch
messages: 67878
nosy: arno
severity: normal
status: open
title: Let set.union and set.intersection accept multiple arguments
type: feature request
versions: Python 3.0
Added file: http://bugs.python.org/file10565/set_ui_varargs.diff

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3069] Let set.union and set.intersection accept multiple arguments

2008-06-09 Thread Raymond Hettinger

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

Time machine -- I already put in a version of this last night.  See 
r64051 and r64055.

Will take a look at your code to see if I can incorporate the sorting 
for insection() and harvest it for more tests.

--
assignee:  -> rhettinger
nosy: +rhettinger

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3070] Wrong size calculation in posix_execve

2008-06-09 Thread Adam Olsen

New submission from Adam Olsen <[EMAIL PROTECTED]>:

In 2.x, the size of C string needed for an environment variable used by
posix_execve was calculated using PyString_GetSize.  In 3.0 this is
translated to PyUnicode_GetSize.  However, in 3.0 the C string is the
UTF-8 encoded version of the unicode object, which doesn't necessarily
have the same length as what PyUnicode_GetSize reports.

The simplest solution I see is to use strlen() instead.

--
components: Extension Modules
messages: 67880
nosy: Rhamphoryncus
severity: normal
status: open
title: Wrong size calculation in posix_execve
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



[issue3069] Let set.union and set.intersection accept multiple arguments

2008-06-09 Thread Arnaud Delobelle

Arnaud Delobelle <[EMAIL PROTECTED]> added the comment:

I must have diffed my patch against the wrong revision then, because I 
haven't seen it.  I had finished it last thursday, but have had a very 
hectic few days and only found a few minutes to send it this evening.  
Something must have gone wrong & the patch must be against last thursday's 
revision I guess.

Anyway it doesn't matter too much as you have started making the changes 
and it's easy to isolate set_intersection, which is a whole new function, 
in the patch file.

___
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-09 Thread Alexandre Vassalotti

Changes by Alexandre Vassalotti <[EMAIL PROTECTED]>:


Added file: http://bugs.python.org/file10566/changeset-2.diff

___
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-09 Thread Alexandre Vassalotti

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

Here is the full patch that adds the _pickle module. I would like to
commit it as soon another developer tests it and (hopefully) reviews it.

A documentation patch is coming as well. However since I don't want to
block the release just for documentation patch, I will post it as a
separate issue.

Added file: http://bugs.python.org/file10567/add-cpickle-1.patch

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3004] Bug in slice.indices()

2008-06-09 Thread Arnaud Bergeron

Arnaud Bergeron <[EMAIL PROTECTED]> added the comment:

Don't blame me for the delay, I have long days (yes, really up to 96
hours long :)

As for the documentation patch, I'm not certain anymore about it. 
Unless I bloat the description to about one full screen worth of text,
there will always be surprises for the user.  And describing only one
little part in detail feels inconsistent.

So unless I'm just a really bad writer, I think the current doc could be
left as-is.  I'm still all for the attached patch.  Comments anyone?  Or
does this needs more nagging?

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3050] Implement PEP 371: multiprocessing module

2008-06-09 Thread Jesse Noller

Jesse Noller <[EMAIL PROTECTED]> added the comment:

Quick status:

Completed:
- Redo all documentation to match ReST format of stdlib
- thanks to Benjamin Peterson for the massive conversion he did.
- All unit tests are converted, I'm just chasing down a few lingering 
bugs  that came with the conversion. (jnoller)

Richard and I are ironing out a few remaining API cleanups that came 
about with the renaming and I'll update the docs to reflect the new 
method names.

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3071] The ValueError raised by failing to unpack sequence should have more information.

2008-06-09 Thread Jonathan Lange

New submission from Jonathan Lange <[EMAIL PROTECTED]>:

Here's the current message:

Python 2.5.2 (r252:60911, Apr 21 2008, 11:12:42) 
[GCC 4.2.3 (Ubuntu 4.2.3-2ubuntu7)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> [foo] = [2, 3]
Traceback (most recent call last):
  File "", line 1, in 
ValueError: too many values to unpack

It would be good if the message of the ValueError contained information
about how many values were expected and how many values were given.

--
components: Interpreter Core
messages: 67885
nosy: jml
severity: normal
status: open
title: The ValueError raised by failing to unpack sequence should have more 
information.
type: feature request
versions: Python 2.3, Python 2.4, 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



[issue2918] Merge StringIO/cStringIO in 3.0

2008-06-09 Thread Alexandre Vassalotti

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

Here's a preliminary patch that add the C optimization for StringIO.
All tests are passing except two which depends on the StringIO.buffer
attribute of the TextIOWrapper class. Honestly, I am not sure what is
the correct way to fix this. I cannot simply "fake" the attribute by
returning a BytesIO object, since the file position of buffer is
undecidable. It seems to me that the only way to fix these failing tests
would be to define a FakeIO class, in their test file, that would wrap
ByteIO with TextIOWrapper, just like the old and inefficient StringIO.

So, any idea on what would be the best thing to do?

--
keywords: +patch
Added file: http://bugs.python.org/file10568/add-stringio-1.patch

___
Python tracker <[EMAIL PROTECTED]>

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



[issue2523] binary buffered reading is quadratic

2008-06-09 Thread Alexandre Vassalotti

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

Oh, that is simple to fix. You can round the value 2*avail to the
nearest block by doing something like (2*avail) & ~(bksize-1) where
bksize is a power of 2, or the less magic (2*avail//bksize) * bksize.

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3050] Implement PEP 371: multiprocessing module

2008-06-09 Thread Benjamin Peterson

Benjamin Peterson <[EMAIL PROTECTED]> added the comment:

I'm attaching my version of the docs. (Jesse, I did fix the Sphinx
warnings and some other problems I noticed.) Georg, if you could cast
your expert reST eye over them, I'd be much obliged.

--
assignee:  -> benjamin.peterson
nosy: +benjamin.peterson, georg.brandl
priority:  -> release blocker

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3050] Implement PEP 371: multiprocessing module

2008-06-09 Thread Benjamin Peterson

Changes by Benjamin Peterson <[EMAIL PROTECTED]>:


--
keywords: +patch
Added file: http://bugs.python.org/file10569/multiprocessing_docs.patch

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3071] The ValueError raised by failing to unpack sequence should have more information.

2008-06-09 Thread Benjamin Peterson

Benjamin Peterson <[EMAIL PROTECTED]> added the comment:

Would you like to submit a patch?

--
nosy: +benjamin.peterson
priority:  -> low

___
Python tracker <[EMAIL PROTECTED]>

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



[issue754016] urlparse goes wrong with IP:port without scheme

2008-06-09 Thread Senthil

Senthil <[EMAIL PROTECTED]> added the comment:

Attaching the patch to fix this issue. I deliberated upon this for a
while and came up with the approach to:

1) fix the port issue, wherein urlparse should technically recognize the 
':' separator for port from ':' after scheme.

2) And Doc fix wherein, it is advised that in the absence of a scheme,
use the net_loc as //net_loc (following RCF 1808).

If we go for any other fix, like internally pre-pending // when user has
not specified the scheme (like in many pratical purpose), then we stand
at chance of breaking a number of tests ( cases where url is 'g'(path
only),';x' (path with params) and cases where relative url is g:h)

Let me know your thoughts on this.

>>> urlparse('1.2.3.4:80')
ParseResult(scheme='', netloc='', path='1.2.3.4:80', params='',
query='', fragment='')
>>> urlparse('http://www.python.org:80/~guido/foo?query#fun')
ParseResult(scheme='http', netloc='www.python.org:80',
path='/~guido/foo', params='', query='query', fragment='fun')
>>>

--
keywords: +patch
nosy: +orsenthil
Added file: http://bugs.python.org/file10570/issue754016.patch

___
Python tracker <[EMAIL PROTECTED]>

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



[issue2582] Unpickling of range objects fail in Py3k

2008-06-09 Thread Alexandre Vassalotti

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

Fixed in r64059 for Python 3.0
Fixed in r64056 and r64057 for Python 2.6

--
resolution:  -> fixed
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



[issue2582] Unpickling of range objects fail in Py3k

2008-06-09 Thread Alexandre Vassalotti

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

> Fixed in r64056 and r64057 for Python 2.6

Oops, I meant r64057 and r64058.

___
Python tracker <[EMAIL PROTECTED]>

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



[issue1092962] Make Generators Pickle-able

2008-06-09 Thread Alexandre Vassalotti

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

I think is a bad idea too. Unless I see patch that implements this
feature cleanly, I will have to reject this feature request.

--
nosy: +alexandre.vassalotti
resolution:  -> rejected
status: open -> pending

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3072] Assignment to list of lists gives incorrect result

2008-06-09 Thread Steve Emmert

New submission from Steve Emmert <[EMAIL PROTECTED]>:

This bug is explained in the attached file.  The list of lists does not
behave correctly when it is defined by the makeGrid function in the
attached file.  When attempting to set the value of one element, it
actually sets multiple elements.  The same operation works differently
when the list of lists is defined with a literal.  I am using version
2.5.2 with Windows XP.  I am just learning Python, so I may have gotten
some terminology wrong.
stesteve

--
components: Interpreter Core
files: Bug_Case.py
messages: 67894
nosy: stesteve
severity: normal
status: open
title: Assignment to list of lists gives incorrect result
type: behavior
versions: Python 2.5
Added file: http://bugs.python.org/file10571/Bug_Case.py

___
Python tracker <[EMAIL PROTECTED]>

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



[issue1580] Use shorter float repr when possible

2008-06-09 Thread Alexandre Vassalotti

Changes by Alexandre Vassalotti <[EMAIL PROTECTED]>:


--
nosy: +alexandre.vassalotti

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3064] new turtle module for Python 3.0

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

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

Thanks for the patch. Committed as r64061.

Notice that the turtle module was meanwhile moved into the tkinter
package. If you think it should stay as a toplevel module, you should
discuss that on stdlib-sig.

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3064] new turtle module for Python 3.0

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

Changes by Martin v. Löwis <[EMAIL PROTECTED]>:


--
resolution:  -> accepted
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



[issue2919] Merge profile/cProfile in 3.0

2008-06-09 Thread Alexandre Vassalotti

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

I will try to fix issue. I cannot promise that I will get it done before
the beta though.

--
nosy: +alexandre.vassalotti

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3072] Assignment to list of lists gives incorrect result

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

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

This is not a bug. Please read about references in Python, and what this
means:



py> b=[0]
py> a=[b,b]
py> a[0] is a[1]
True
py> c=[[0],[0]]
py> c[0] is c[1]
False
py> c[0] == c[1]
True

In short, there is only a single list stored in the variable gridRow,
and the very same list is appended multiple times (not copies of the
list, but the very same object). There are then multiple ways to refer
to the list, such as g[0] or g[1].

To avoid sharing the list objects, either create new lists (i.e. nest
the first loop into the second one, and create a new gridRow on each
outer loop iteration), or create clones of the first list, e.g.

  grid.append(list(gridRow))
# or
  grid.append(gridRow[:])

--
nosy: +loewis
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