[issue4434] Embedding into a shared library fails

2008-11-28 Thread rb

rb <[EMAIL PROTECTED]> added the comment:

The problem, and the reason for the existence of this bug, is that I
cannot build a shared object that links to libpython2.5.so.1 and works.

Please don't mark this bug invalid until this problem is fixed.

My proposal of adding dependencies to lib-dynload/*.so is just a
suggestion on how to go about fixing this bug. If this is not a suitable
solution, please suggest a solution that is.


In response to your discussion on why the static library is currently
useful, you haven't really answered the question. In what circumstance
would someone actually want to build against the static library and then
dynamically load other libraries?

"Because it works" isn't an answer, as if this bug were fixed, then
building against the shared library would validly have the same response.

Why static over dynamic, if when static you have to link to dynamic anyway?

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4448] should socket readline() use default_bufsize instead of _rbufsize?

2008-11-28 Thread Kristján Valur Jónsson

Kristján Valur Jónsson <[EMAIL PROTECTED]> added the comment:

If you look at http://bugs.python.org/issue4336, half of the proposed 
patch is an attempt to deal with this performance issue.  In the patch, 
we laboriously ensure that bufsize=-1 is passed in for for the xmlrpc 
client.

Seeing your comment, I realize that xmlrpclib.py also uses direct 
access to h._conn.sock (if present) and uses recv() on that.  In fact, 
that is the only place in the standard library where I can find this 
pattern.  Was that a performance improvement?  It is hard to see how 
bypassing buffered read with a manual recv() can significantly alter 
performance.

In all the cases in the test_xmlrpc.py, h._conn.sock is actually None 
because h._conn has been closed in HttpConnection.getresponse()  
Therefore, my patch continues to work.  However, I will fix that patch 
to cater to this strange special case.

However, please observe that since _fileobject.read() calls are always 
buffered, in general there is no way to safely mix read() and recv() 
calls, althought the recv() and readline() has been fudged to work.  
Isn´t this just a case of a wart in the standard lib that we ought to 
remove?

Here is a suggestion:
1) document why readline() observes 0 buffering (to enable it to be 
used as a readline() utility tool on top of vanilla socket recv()
2) stop doing that in xmrlrpclib and use default buffering.

--
nosy: +krisvale

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4336] Fix performance issues in xmlrpclib

2008-11-28 Thread Kristján Valur Jónsson

Kristján Valur Jónsson <[EMAIL PROTECTED]> added the comment:

Guido pointed out the problem with _fileobject.readline() being 
followed by socket.recv() if readline uses read buffering.  
xmlrpclib.py was attempting to directly use the underlying socket, 
although in actual fact it never did, (since HTTPConnectio had closed 
it when it returned the response from getresponse()) Never the less, it 
is prudent to make sure that we don't attempt this.
There really should be no need to use the socket directly, a buffered 
read() call is just as efficient.

Added file: http://bugs.python.org/file12145/xmlrpc.patch

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4449] AssertionError in Doc/includes/mp_benchmarks.py

2008-11-28 Thread Christian Heimes

New submission from Christian Heimes <[EMAIL PROTECTED]>:

./python Doc/includes/mp_benchmarks.py

    testing Array("i", ..., lock=False)

Traceback (most recent call last):
  File "Doc/includes/mp_benchmarks.py", line 235, in 
test()
  File "Doc/includes/mp_benchmarks.py", line 203, in test
test_seqspeed(multiprocessing.Array('i', range(10), lock=False))
  File
"/home/heimes/dev/python/release26-maint/Lib/multiprocessing/__init__.py",
line 254, in Array
return Array(typecode_or_type, size_or_initializer, **kwds)
  File
"/home/heimes/dev/python/release26-maint/Lib/multiprocessing/sharedctypes.py",
line 87, in Array
assert hasattr(lock, 'acquire')
AssertionError

The assertion error occurs when using Python 2.6 and our backports to
2.4 and 2.5.

--
assignee: jnoller
components: Library (Lib)
messages: 76525
nosy: christian.heimes, jnoller
priority: high
severity: normal
stage: needs patch
status: open
title: AssertionError in Doc/includes/mp_benchmarks.py
type: behavior
versions: 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



[issue3741] DISTUTILS_USE_SDK set causes msvc9compiler.py to raise an exception

2008-11-28 Thread Christian Heimes

Christian Heimes <[EMAIL PROTECTED]> added the comment:

Fixed in r67414, r67415, r67416 (trunk, 2.6, 3.0).

--
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



[issue4450] 2to3 run changed multiprocessing.Queue() to multiprocessing.queue()

2008-11-28 Thread Christian Heimes

New submission from Christian Heimes <[EMAIL PROTECTED]>:

I've fixed the multiprocessing examples in r67417. 2to3 altered
multiprocessing.Queue() to multiprocessing.queue().

--
assignee: benjamin.peterson
components: 2to3 (2.x to 3.0 conversion tool)
messages: 76527
nosy: benjamin.peterson, christian.heimes
priority: high
severity: normal
stage: needs patch
status: open
title: 2to3 run changed multiprocessing.Queue() to multiprocessing.queue()
versions: 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



[issue4449] AssertionError in Doc/includes/mp_benchmarks.py

2008-11-28 Thread Christian Heimes

Christian Heimes <[EMAIL PROTECTED]> added the comment:

The examples in 3.0 didn't work at at all because nobody did a 2to3 run
on them. See r67417: mp_benchmarks, mp_newtypes and mp_distribution are
still broken but the others are working properly. We should include the
examples in our unit test suite ...

--
priority: high -> 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



[issue4451] multiprocessing fails with "Invalid thread state for this thread" on 2.4 and 2.5

2008-11-28 Thread Christian Heimes

New submission from Christian Heimes <[EMAIL PROTECTED]>:

The multiprocessing backport to 2.4/2.5 fails with a fatal error when
the test suite is run with a debug build of Python.

PYTHONPATH="Lib/" /home/heimes/dev/python/release25-maint/python -tt -c
"from multiprocessing.tests import main; main()"
Fatal Python error: Invalid thread state for this thread
Traceback (most recent call last):
  File "", line 1, in 
  File
"/home/heimes/dev/py/python-multiprocessing/Lib/multiprocessing/tests.py",
line 1826, in main
test_main(unittest.TextTestRunner(verbosity=2).run)
  File
"/home/heimes/dev/py/python-multiprocessing/Lib/multiprocessing/tests.py",
line 1805, in test_main
ManagerMixin.pool = ManagerMixin.manager.Pool(4)
  File
"/home/heimes/dev/py/python-multiprocessing/Lib/multiprocessing/managers.py",
line 637, in temp
token, exp = self._create(typeid, *args, **kwds)
  File
"/home/heimes/dev/py/python-multiprocessing/Lib/multiprocessing/managers.py",
line 535, in _create
conn = self._Client(self._address, authkey=self._authkey)
  File
"/home/heimes/dev/py/python-multiprocessing/Lib/multiprocessing/connection.py",
line 142, in Client
answer_challenge(c, authkey)
  File
"/home/heimes/dev/py/python-multiprocessing/Lib/multiprocessing/connection.py",
line 373, in answer_challenge
message = connection.recv_bytes(256) # reject large message
EOFError

--
components: Interpreter Core
messages: 76528
nosy: christian.heimes, jnoller
priority: high
severity: normal
stage: needs patch
status: open
title: multiprocessing fails with "Invalid thread state for this thread" on 2.4 
and 2.5
type: crash
versions: Python 2.4, Python 2.5.3

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4452] Incorrect docstring of os.setpgrp

2008-11-28 Thread Mark Florisson

New submission from Mark Florisson <[EMAIL PROTECTED]>:

The docstring of os.setpgrp says 'Make this process a session leader.',
but that's not what setpgrp does. setpgrp() is the same as setpgid(0,
0), which sets the pgid of the calling process to the pid of the calling
process, thus making it a process group leader, not a session leader (it
will still be in the same session). It might say instead 'Make this
process a process group leader.'.

--
messages: 76529
nosy: eggy
severity: normal
status: open
title: Incorrect docstring of os.setpgrp
versions: Python 2.4, Python 2.5, 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



[issue4449] AssertionError in Doc/includes/mp_benchmarks.py

2008-11-28 Thread Jesse Noller

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

The 3.0 doc/example issue is in issue 3256

I plan on fixing all the doc/example issue this/next week.

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4449] AssertionError in Doc/includes/mp_benchmarks.py

2008-11-28 Thread Christian Heimes

Christian Heimes <[EMAIL PROTECTED]> added the comment:

Are you able to fix the examples before 3.0.0 and 2.6.1 are released?
They are scheduled for Wednesday 3rd of December.

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4449] AssertionError in Doc/includes/mp_benchmarks.py

2008-11-28 Thread Jesse Noller

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

Yes, I have a pending patch. I'll see if I can steal some time today
to check it in.

On Fri, Nov 28, 2008 at 9:36 AM, Christian Heimes
<[EMAIL PROTECTED]> wrote:
>
> Christian Heimes <[EMAIL PROTECTED]> added the comment:
>
> Are you able to fix the examples before 3.0.0 and 2.6.1 are released?
> They are scheduled for Wednesday 3rd of December.
>
> ___
> 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



[issue4451] multiprocessing fails with "Invalid thread state for this thread" on 2.4 and 2.5

2008-11-28 Thread Benjamin Peterson

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

Christian, to fix this, you need to backport the fix for #1683.

--
nosy: +benjamin.peterson

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4451] multiprocessing fails with "Invalid thread state for this thread" on 2.4 and 2.5

2008-11-28 Thread Jesse Noller

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

As ben mentioned, this is already fixed in core. See issue 1683 - this is 
only a problem when running in 2.5/2.4

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



[issue1683] Thread local storage and PyGILState_* mucked up by os.fork()

2008-11-28 Thread Christian Heimes

Christian Heimes <[EMAIL PROTECTED]> added the comment:

The fix is required to run multiprocessing on Python 2.4 and 2.5, see
#4451. I suggest we fix the issue in 2.5.3. The fork-thread-patch-2
patch doesn't work on Python 2.5. I'm getting a segfault on my system:

test_connection (multiprocessing.tests.WithProcessesTestConnection) ...
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fa2e999f6e0 (LWP 10594)]
0x0052065f in PyCFunction_Call (func=Cannot access memory at
address 0x7ffeffd8
) at Objects/methodobject.c:73
73  return (*meth)(self, arg);

Linux on AMD64 with Python 2.5 svn --with-pydebug.

--
resolution: fixed -> 
status: closed -> open
versions: +Python 2.5.3

___
Python tracker <[EMAIL PROTECTED]>

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



[issue1683] Thread local storage and PyGILState_* mucked up by os.fork()

2008-11-28 Thread Benjamin Peterson

Changes by Benjamin Peterson <[EMAIL PROTECTED]>:


--
versions:  -Python 2.5, 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



[issue4434] Embedding into a shared library fails

2008-11-28 Thread John Levon

John Levon <[EMAIL PROTECTED]> added the comment:

If Ubuntu wants to deliver a static libpython, it also needs to deliver
static versions of the Python modules, or accept that they're not usable
from a static libpython.

It makes no sense at all to mix libpython.a with these .so files. Many of
them declare dynamic dependencies on stuff like libkrb5.so or
libsqlite3.so. I can't conceive of a scenario where you need a static
libpython AND you're OK with both dlopen() of the Python modules and any
of its dynamic dependencies. What is this case?

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4453] MSI installer shows error message if "Compile .py files to bytecode" option is selected

2008-11-28 Thread Suraj Barkale

New submission from Suraj Barkale <[EMAIL PROTECTED]>:

If the option to "Compile .py files to bytecode after installation" is
selected during installation (by clicking on "Advanced" button on
"Customize" dialog), installer shows the attached dialog. There seems to
be no problem after installation is finished. I have tested this on
Vista Ultimate SP1 32 bit.

--
components: Installation
files: SetupError.JPG
messages: 76537
nosy: suraj
severity: normal
status: open
title: MSI installer shows error message if "Compile .py files to bytecode" 
option is selected
type: behavior
versions: Python 3.0
Added file: http://bugs.python.org/file12146/SetupError.JPG

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4448] should socket readline() use default_bufsize instead of _rbufsize?

2008-11-28 Thread Guido van Rossum

Guido van Rossum <[EMAIL PROTECTED]> added the comment:

I'm fine with disabling this feature in xmlrpclib.py, and possibly even
in httplib.py.

I'm *not* fine with "fixing" this behavior in socket.py -- the unittest
coverage is unfortunately small and we have had plenty of trouble in
this area in the past.  It is there for a reason, even if that reason is
hard to fathom and poorly documented.

Fortunately in 3.0 it's gone (or, more likely, replaced with a different
set of issues :-).

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4434] Embedding into a shared library fails

2008-11-28 Thread Ralf Schmitt

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

no john, linking with the static library really works. the resulting
executable does not depend on the shared library and it is possible to
import the e.g. the time module.

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4434] Embedding into a shared library fails

2008-11-28 Thread rb

rb <[EMAIL PROTECTED]> added the comment:

Ralf,

I'm sure it does work, but what is the point of linking statically to
libpython.a but then having other dependencies, for example on
lib-dynload/time.so? Why not just link to libpython2.5.so in the first
place?

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4389] Uninstaller Lacks an Icon

2008-11-28 Thread Marc-Andre Lemburg

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

Would be nice if the same icon could also be the default for bdist_msi.

"Retro" could you point us to some documentation on how to fix this ?

--
nosy: +lemburg

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4385] Py_Object_HEAD_INIT in Py3k

2008-11-28 Thread Marc-Andre Lemburg

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

I think this is a documentation bug more than anything else.

Removing PyObject_HEAD_INIT() is certainly not an option, since it is
required to init static PyObject singletons that are declared in C (just
like the PyTypeObjects are).

--
assignee:  -> georg.brandl
components: +Documentation
nosy: +georg.brandl, lemburg

___
Python tracker <[EMAIL PROTECTED]>

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



[issue1683] Thread local storage and PyGILState_* mucked up by os.fork()

2008-11-28 Thread Jesse Noller

Changes by Jesse Noller <[EMAIL PROTECTED]>:


--
nosy: +jnoller

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4450] 2to3 run changed multiprocessing.Queue() to multiprocessing.queue()

2008-11-28 Thread Jesse Noller

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

Hmm, we should actually rename mp.Queue to mp.queue at one point

--
nosy: +jnoller

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4449] AssertionError in Doc/includes/mp_benchmarks.py

2008-11-28 Thread Jesse Noller

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

I guess you just 2to3'ed the examples

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4193] Multiprocessing example

2008-11-28 Thread Jesse Noller

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

Added in r67419 on trunk, merged to py3k and 2.6.1

--
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



[issue3518] multiprocessing: BaseManager.from_address documented but doesn't exist

2008-11-28 Thread Jesse Noller

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

Added the mp.managers shared queue example, fixed the docs in r67419 on 
trunk. merged to py3k and 2.6.1 maint

--
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



[issue4012] Minor errors in multiprocessing docs

2008-11-28 Thread Jesse Noller

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

Warning added for georg's issue, all doc errors fixed on trunk, py3k and 
2.6.1 maint. see r67419

--
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



[issue4238] BSD support for multiprocessing.cpu_count

2008-11-28 Thread Jesse Noller

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

Fixed, trunk r67423

--
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



[issue4438] Add an easy way to __import___ submodules

2008-11-28 Thread Mart Sõmermaa

Mart Sõmermaa <[EMAIL PROTECTED]> added the comment:

Implement imp.import_module() instead. See
http://mail.python.org/pipermail/python-dev/2008-November/083758.html

Added file: http://bugs.python.org/file12147/imp_import_module.diff

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4438] Add an easy way to __import___ submodules

2008-11-28 Thread Mart Sõmermaa

Mart Sõmermaa <[EMAIL PROTECTED]> added the comment:

Note that the hack described in http://bugs.python.org/issue2090 should
be disabled once this gets integrated.

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4438] Given a module hierarchy string 'a.b.c', add an easy way to import tail module 'c'

2008-11-28 Thread Mart Sõmermaa

Changes by Mart Sõmermaa <[EMAIL PROTECTED]>:


--
components:  -Interpreter Core
title: Add an easy way to __import___ submodules -> Given a module hierarchy 
string 'a.b.c', add an easy way to import tail module 'c'

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4454] Coding cookie crashes IDLE

2008-11-28 Thread Terry J. Reedy

New submission from Terry J. Reedy <[EMAIL PROTECTED]>:

Running the following from an edit window with F5 in IDLE 3.0c3 causes a
complete crash. Both edit window and shell window disappear.

# -*- coding: utf-8 -*-

The is copied from what IDLE said to add when I previously ran file with
non-ascii char and no cookie. Same if add pass statement.

Copying the same directly into the shell window appears to work fine.

--
components: IDLE
messages: 76551
nosy: tjreedy
severity: normal
status: open
title: Coding cookie crashes IDLE
type: crash
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



[issue4445] String allocations waste 3 bytes of memory on average.

2008-11-28 Thread Mark Dickinson

Mark Dickinson <[EMAIL PROTECTED]> added the comment:

Yep.  That works nicely.

Here's a revised patch.

Added file: http://bugs.python.org/file12148/string_alloc.patch

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4445] String allocations waste 3 bytes of memory on average.

2008-11-28 Thread Mark Dickinson

Changes by Mark Dickinson <[EMAIL PROTECTED]>:


Removed file: http://bugs.python.org/file12141/string_alloc.patch

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4445] String allocations waste 3 bytes of memory on average.

2008-11-28 Thread Christian Heimes

Christian Heimes <[EMAIL PROTECTED]> added the comment:

Why is +1 required here? If I understand offsetof() correctly than it
returns the position of the ob_sval element. Shouldn't PyStringObject +
offsetof(PyStringObject, ob_sval) point to the first element of the
ob_svall array?

--
nosy: +christian.heimes

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4445] String allocations waste 3 bytes of memory on average.

2008-11-28 Thread Mark Dickinson

Mark Dickinson <[EMAIL PROTECTED]> added the comment:

The +1 is there for the trailing null byte on the string:  if s is a 
Python string with len(s) == n, then the ob_sval array needs space for n+1 
characters.

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4445] String allocations waste 3 bytes of memory on average.

2008-11-28 Thread Christian Heimes

Christian Heimes <[EMAIL PROTECTED]> added the comment:

Ah! I forgot the trailing \0 byte ... Thanks Mark!

___
Python tracker <[EMAIL PROTECTED]>

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



[issue1693050] \w not helpful for non-Roman scripts

2008-11-28 Thread Terry J. Reedy

Terry J. Reedy <[EMAIL PROTECTED]> added the comment:

Vowel 'marks' are condensed vowel characters and are very much part of
words and do not separate words.  Python3 properly includes Mn and Mc as
identifier characters.

http://docs.python.org/dev/3.0/reference/lexical_analysis.html#identifiers-and-keywords

For instance, the word 'hindi' has 3 consonants 'h', 'n', 'd', 2 vowels
'i' and 'ii' (long i) following 'h' and 'd', and a null vowel (virama)
after 'n'. [The null vowel is needed because no vowel mark indicates the
default vowel short a.  So without it, the word would be hinadii.]
The difference between the devanagari vowel characters, used at the
beginning of words, and the vowel marks, used thereafter, is purely
graphical and not phonological.  In short, in the sanskrit family,
word = syllable+
syllable = vowel | consonant + vowel mark

From a clp post asking why re does not see hindi as a word:

हिन्दी
 ह DEVANAGARI LETTER HA (Lo)
 ि DEVANAGARI VOWEL SIGN I (Mc)
 न DEVANAGARI LETTER NA (Lo)
 ् DEVANAGARI SIGN VIRAMA (Mn)
 द DEVANAGARI LETTER DA (Lo)
 ी DEVANAGARI VOWEL SIGN II (Mc)

.isapha and possibly other unicode methods need fixing also
>>> 'हिन्दी'.isalpha()#2.x and 3.0
False

--
nosy: +tjreedy
versions: +Python 3.1

___
Python tracker <[EMAIL PROTECTED]>

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



[issue1693050] \w not helpful for non-Roman scripts

2008-11-28 Thread Martin v. Löwis

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

Unicode TR#18 defines \w as a shorthand for

\p{alpha}
\p{gc=Mark}
\p{digit}
\p{gc=Connector_Punctuation}

which would include all marks. We should recursively check whether we
follow the recommendation (e.g. \p{alpha} refers to all character having
the Alphabetic derived core property, which is Lu+Ll+Lt+Lm+Lo+Nl +
Other_Alphabetic, where Other_Alphabetic is a selected list of
additional character - all from Mn/Mc)

--
nosy: +loewis

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4445] String allocations waste 3 bytes of memory on average.

2008-11-28 Thread Mark Dickinson

Changes by Mark Dickinson <[EMAIL PROTECTED]>:


Removed file: http://bugs.python.org/file12148/string_alloc.patch

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4445] String allocations waste 3 bytes of memory on average.

2008-11-28 Thread Mark Dickinson

Mark Dickinson <[EMAIL PROTECTED]> added the comment:

Hmmm.  test_sys fails on 64-bit build.
Patch updated to fix this.

All tests now pass on 32-bit and 64-bit, debug and non-debug builds.

Added file: http://bugs.python.org/file12149/string_alloc.patch

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4450] 2to3 run changed multiprocessing.Queue() to multiprocessing.queue()

2008-11-28 Thread Benjamin Peterson

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

Fixed in r67426.

One result of this fix is that attribute usage of modules is not
replaced. (ie. getattr(somemodule, "attr") isn't changed.) This is
probably isn't a problem, though.

--
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



[issue4195] Regression for executing packages

2008-11-28 Thread Nick Coghlan

Nick Coghlan <[EMAIL PROTECTED]> added the comment:

Missed the window for 2.6/3.0. Guido agreed on python-dev that it counts
as a new feature, so it was definitely out for the already-released 2.6,
and also wasn't really an option for the release candidate phase of 3.0.

Assigning to myself for 2.7/3.1 - I'll put it in once the 3.0
maintenance branch has been cut (so I can update both 2.x and 3.x at the
same time.

For 2.6 and 3.0 though, short run scripts such as "python -m jcc.main"
are going to be the order of the day.

--
assignee:  -> ncoghlan
priority:  -> normal
versions: +Python 2.7, Python 3.1 -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



[issue4082] __main__.__file__ not set correctly when -m switch gets __main__ from a zipfile

2008-11-28 Thread Nick Coghlan

Nick Coghlan <[EMAIL PROTECTED]> added the comment:

Morphing the issue to refer to the __main__.__file__ problem I mentioned
in my previous comment.

--
assignee:  -> ncoghlan
title: python2.6 -m site doesn't run site._script() any more -> 
__main__.__file__ not set correctly when -m switch gets __main__ from a zipfile

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4455] No Windows List in IDLE if several windows have the same title

2008-11-28 Thread Amaury Forgeot d'Arc

New submission from Amaury Forgeot d'Arc <[EMAIL PROTECTED]>:

Start IDLE, and hit Ctrl-N twice to create two windows named "Untitled":
This displays the message
"""
warning: callback failed in WindowList  : unorderable 
types: ListedToplevel() < ListedToplevel()
"""
And the "Windows" menu does not contain the windows list.

This is specific to python 3: Windows objects cannot be ordered any 
more. Patch is attached.

--
files: windowslist.patch
keywords: needs review, patch
messages: 76562
nosy: amaury.forgeotdarc
priority: release blocker
severity: normal
status: open
title: No Windows List in IDLE if several windows have the same title
versions: Python 3.0
Added file: http://bugs.python.org/file12150/windowslist.patch

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4456] xmlrpc is broken

2008-11-28 Thread Benjamin Peterson

New submission from Benjamin Peterson <[EMAIL PROTECTED]>:

It looks there are logic problems with regards to encoding in xmlrpc:

if not isinstance(methodname, str):
methodname = methodname.encode(encoding)

Merging r67370 and running test_xmlrpc gives:

test_bug_1164912 (test.test_xmlrpc.XMLRPCTestCase) ... ok
test_cmp_datetime_DateTime (test.test_xmlrpc.XMLRPCTestCase) ... ok
test_datetime_before_1900 (test.test_xmlrpc.XMLRPCTestCase) ... ok
test_dump_bad_dict (test.test_xmlrpc.XMLRPCTestCase) ... ok
test_dump_bare_datetime (test.test_xmlrpc.XMLRPCTestCase) ... ok
test_dump_big_int (test.test_xmlrpc.XMLRPCTestCase) ... ok
test_dump_big_long (test.test_xmlrpc.XMLRPCTestCase) ... ok
test_dump_load (test.test_xmlrpc.XMLRPCTestCase) ... ok
test_dump_none (test.test_xmlrpc.XMLRPCTestCase) ... ok
test_dump_recursive_dict (test.test_xmlrpc.XMLRPCTestCase) ... ok
test_dump_recursive_seq (test.test_xmlrpc.XMLRPCTestCase) ... ok
test_newstyle_class (test.test_xmlrpc.XMLRPCTestCase) ... ok
test_escape (test.test_xmlrpc.HelperTestCase) ... ok
test_datetime_datetime (test.test_xmlrpc.DateTimeTestCase) ... ok
test_decode (test.test_xmlrpc.DateTimeTestCase) ... ok
test_default (test.test_xmlrpc.DateTimeTestCase) ... ok
test_repr (test.test_xmlrpc.DateTimeTestCase) ... ok
test_time (test.test_xmlrpc.DateTimeTestCase) ... ok
test_time_struct (test.test_xmlrpc.DateTimeTestCase) ... ok
test_time_tuple (test.test_xmlrpc.DateTimeTestCase) ... ok
test_decode (test.test_xmlrpc.BinaryTestCase) ... ok
test_default (test.test_xmlrpc.BinaryTestCase) ... ok
test_string (test.test_xmlrpc.BinaryTestCase) ... ok
test_dotted_attribute (test.test_xmlrpc.FaultTestCase) ... ok
test_dump_fault (test.test_xmlrpc.FaultTestCase) ... ok
test_repr (test.test_xmlrpc.FaultTestCase) ... ok
test_custom_user_agent (test.test_xmlrpc.TransportSubclassTestCase) ...
ERROR
test_send_content (test.test_xmlrpc.TransportSubclassTestCase) ... ERROR
test_send_host (test.test_xmlrpc.TransportSubclassTestCase) ... ERROR
test_send_request (test.test_xmlrpc.TransportSubclassTestCase) ... ERROR
test_dotted_attribute (test.test_xmlrpc.SimpleServerTestCase) ... ok
test_introspection1 (test.test_xmlrpc.SimpleServerTestCase) ... ok
test_introspection2 (test.test_xmlrpc.SimpleServerTestCase) ... ok
test_introspection3 (test.test_xmlrpc.SimpleServerTestCase) ... ok
test_introspection4 (test.test_xmlrpc.SimpleServerTestCase) ... ok
test_multicall (test.test_xmlrpc.SimpleServerTestCase) ... ok
test_non_existing_multicall (test.test_xmlrpc.SimpleServerTestCase) ... ok
test_simple1 (test.test_xmlrpc.SimpleServerTestCase) ... ok
test_basic (test.test_xmlrpc.FailingServerTestCase) ... ok
test_fail_no_info (test.test_xmlrpc.FailingServerTestCase) ... ok
test_fail_with_info (test.test_xmlrpc.FailingServerTestCase) ... ok
test_cgi_get (test.test_xmlrpc.CGIHandlerTestCase) ... ok
test_cgi_xmlrpc_response (test.test_xmlrpc.CGIHandlerTestCase) ... ok

==
ERROR: test_custom_user_agent (test.test_xmlrpc.TransportSubclassTestCase)
--
Traceback (most recent call last):
  File "/temp/python/py3k/Lib/test/test_xmlrpc.py", line 657, in
test_custom_user_agent
req = self.issue_request(TestTransport)
  File "/temp/python/py3k/Lib/test/test_xmlrpc.py", line 645, in
issue_request
proxy.pow(6, 8)
  File "/temp/python/py3k/Lib/xmlrpc/client.py", line 1095, in __call__
return self.__send(self.__name, args)
  File "/temp/python/py3k/Lib/xmlrpc/client.py", line 1353, in __request
verbose=self.__verbose
  File "/temp/python/py3k/Lib/xmlrpc/client.py", line 1136, in request
return self._parse_response(resp, None)
  File "/temp/python/py3k/Lib/xmlrpc/client.py", line 1246, in
_parse_response
p.feed(response)
  File "/temp/python/py3k/Lib/xmlrpc/client.py", line 516, in feed
self._parser.Parse(data, 0)
xml.parsers.expat.ExpatError: mismatched tag: line 12, column 2

==
ERROR: test_send_content (test.test_xmlrpc.TransportSubclassTestCase)
--
Traceback (most recent call last):
  File "/temp/python/py3k/Lib/test/test_xmlrpc.py", line 687, in
test_send_content
req = self.issue_request(TestTransport)
  File "/temp/python/py3k/Lib/test/test_xmlrpc.py", line 645, in
issue_request
proxy.pow(6, 8)
  File "/temp/python/py3k/Lib/xmlrpc/client.py", line 1095, in __call__
return self.__send(self.__name, args)
  File "/temp/python/py3k/Lib/xmlrpc/client.py", line 1353, in __request
verbose=self.__verbose
  File "/temp/python/py3k/Lib/xmlrpc/client.py", line 1136, in request
return self._parse_response(resp, None)
  File "/temp/python/py3k/Lib/xmlrpc/client.py", line 1246, in
_parse_response
p.feed(response)
  File "/temp/python/py3k/Lib/xmlrpc/client.py", line 516, in feed
   

[issue1683] Thread local storage and PyGILState_* mucked up by os.fork()

2008-11-28 Thread Gregory P. Smith

Changes by Gregory P. Smith <[EMAIL PROTECTED]>:


--
assignee: gregory.p.smith -> christian.heimes

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4455] No Windows List in IDLE if several windows have the same title

2008-11-28 Thread Benjamin Peterson

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

Looks good.

--
keywords:  -needs review
nosy: +benjamin.peterson

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4454] Coding cookie crashes IDLE

2008-11-28 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment:

I don't reproduce this problem (on windows XP). Which platform are you 
running?

--
nosy: +amaury.forgeotdarc

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3826] BaseHTTPRequestHandler depends on GC to close connections

2008-11-28 Thread Gregory P. Smith

Changes by Gregory P. Smith <[EMAIL PROTECTED]>:


--
keywords: +patch
Added file: http://bugs.python.org/file12151/issue3826_socketserver-gps01.diff

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3826] BaseHTTPRequestHandler depends on GC to close connections

2008-11-28 Thread Gregory P. Smith

Changes by Gregory P. Smith <[EMAIL PROTECTED]>:


Added file: http://bugs.python.org/file12152/issue3826_socket-gps01.diff

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4455] No Windows List in IDLE if several windows have the same title

2008-11-28 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment:

Fixed in r67436.

--
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



[issue3826] BaseHTTPRequestHandler depends on GC to close connections

2008-11-28 Thread Gregory P. Smith

Gregory P. Smith <[EMAIL PROTECTED]> added the comment:

Alright I've taken another fresh look at this.  I understand the dup
semantics issue and don't want to break that.

Attached are two patches, either one of these will fix the problem and
breakage.py test code attached to this bug.

Personally I prefer the socket.py patch as I think it will solve this
problem in other places it could potentially pop up.  It calls
self._sock._decref_socketios() from within the SocketIO.close() method
so that after a SocketIO returned by socket.makefile() is closed, it
will no longer prevent the underlying socket from closing.

The socketserver.py patch also works but seems like more of a hack as it
is still relies on immediate reference counted destruction.

Please review.

I'm guessing its too late in the release candidate process for 3.0 to
get this in, but we should do it for 3.0.1.

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3826] BaseHTTPRequestHandler depends on GC to close connections

2008-11-28 Thread Gregory P. Smith

Gregory P. Smith <[EMAIL PROTECTED]> added the comment:

P.S.  Gabriel Genellina (gagenellina)  -  Your comment sounded like you
had a unit test for this but it never got attached.  Still have it?

--
stage:  -> patch review

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3826] BaseHTTPRequestHandler depends on GC to close connections

2008-11-28 Thread Gregory P. Smith

Changes by Gregory P. Smith <[EMAIL PROTECTED]>:


Added file: http://bugs.python.org/file12153/issue3826_socket-gps02.diff

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3826] BaseHTTPRequestHandler depends on GC to close connections

2008-11-28 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment:

I agree that the patch on socket.py is the correct fix: the raw socket 
should be detached when the close() method is called.

I have one remark on the patch:
io.IOBase.__del__ already calls close(): could SocketIO.__del__ be 
removed completely? And no need for "_need_to_decref_sock": the closed 
property should be enough.

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3826] BaseHTTPRequestHandler depends on GC to close connections

2008-11-28 Thread Gregory P. Smith

Gregory P. Smith <[EMAIL PROTECTED]> added the comment:

Indeed IOBase does call close() from its __del__.  Excellent.  That
makes this simpler.  -gps03 attached.

Added file: http://bugs.python.org/file12154/issue3826_socket-gps03.diff

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3826] BaseHTTPRequestHandler depends on GC to close connections

2008-11-28 Thread Gregory P. Smith

Changes by Gregory P. Smith <[EMAIL PROTECTED]>:


Removed file: http://bugs.python.org/file12152/issue3826_socket-gps01.diff

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4428] io.BufferedWriter does not observe buffer size limits

2008-11-28 Thread Gregory P. Smith

Changes by Gregory P. Smith <[EMAIL PROTECTED]>:


--
assignee:  -> gregory.p.smith
nosy: +gregory.p.smith
priority:  -> normal

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4428] io.BufferedWriter does not observe buffer size limits

2008-11-28 Thread Gregory P. Smith

Gregory P. Smith <[EMAIL PROTECTED]> added the comment:

I've attached my first attempt at fixing this as io-bufwrite-gps01.

Unfortunately it causes the Lib/test/test_io.py testThreads to fail:

==
FAIL: testThreads (__main__.BufferedReaderTest)
--
Traceback (most recent call last):
  File "Lib/test/test_io.py", line 456, in testThreads
self.assertEqual(s.count(c), N)
AssertionError: 30 != 1000

I haven't read the test yet, but my guess is that the test is broken and
is blindly calling write() without checking the return value.

--
keywords: +patch
Added file: http://bugs.python.org/file12155/issue4428-io-bufwrite-gps01.diff

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3826] BaseHTTPRequestHandler depends on GC to close connections

2008-11-28 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment:

Patch issue3826_socket-gps03.diff is OK for me.
Here is a unit test for this new behavior.

Someone should review both patches.

--
keywords: +needs review
Added file: http://bugs.python.org/file12156/test_makefileclose.patch

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4428] io.BufferedWriter does not observe buffer size limits

2008-11-28 Thread Gregory P. Smith

Gregory P. Smith <[EMAIL PROTECTED]> added the comment:

Yep, the test was ignoring the return value from BufferedWriter.write. 
Fixed in the attached io-bufwrite-gps02.

This can wait for 3.0.1 and 2.6.1/2 (depending on the 2.6.x release
schedule).

--
keywords: +needs review
Added file: http://bugs.python.org/file12157/issue4428-io-bufwrite-gps02.diff

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4428] io.BufferedWriter does not observe buffer size limits

2008-11-28 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment:

I do not agree. User code should not have to verify the return value of write().

When a big amount of data is passed to BufferedWriter.write,
- normal blocking streams should block until all data has been written.
(the implementation may call self.raw.write several times)
- non-blocking streams should raise BlockingIOError indicating the number of 
characters actually written.

This applies only to buffered files, of course.

--
nosy: +amaury.forgeotdarc

___
Python tracker <[EMAIL PROTECTED]>

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



[issue1208304] urllib2's urlopen() method causes a memory leak

2008-11-28 Thread Gregory P. Smith

Changes by Gregory P. Smith <[EMAIL PROTECTED]>:


--
components: +Library (Lib) -Extension Modules
type:  -> resource usage
versions: +Python 2.5, Python 2.6, Python 2.7 -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



[issue4454] Coding cookie crashes IDLE

2008-11-28 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment:

This is a duplicate of #4008

--
resolution:  -> duplicate
status: open -> closed
superseder:  -> IDLE: checksyntax() doesn't support Unicode?

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4428] io.BufferedWriter does not observe buffer size limits

2008-11-28 Thread Gregory P. Smith

Gregory P. Smith <[EMAIL PROTECTED]> added the comment:

I agree with Amuary, write() traditionally never writes less data unless
the underlying IO is in nonblocking mode.

I'm working up a new patch to write to self.raw in max_buffer_size
chunks with as few data copies as possible, raising an appropriate
BlockingIOError (as the surrounding code does) when the IO on the
underlying self.raw.write raises one through self._flush_unlocked().

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4445] String allocations waste 3 bytes of memory on average.

2008-11-28 Thread Raymond Hettinger

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

Looks much cleaner.

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



[issue4336] Fix performance issues in xmlrpclib

2008-11-28 Thread Jeremy Hylton

Jeremy Hylton <[EMAIL PROTECTED]> added the comment:

I did the simple part of the patch, where the request and headers are
sent at the same time.  The applied patch didn't pass the test suite,
and I want to think about the buffering change a bit more.  It's
definitely tricky.

Jeremy

On Fri, Nov 28, 2008 at 5:53 AM, Kristján Valur Jónsson
<[EMAIL PROTECTED]> wrote:
>
> Kristján Valur Jónsson <[EMAIL PROTECTED]> added the comment:
>
> Guido pointed out the problem with _fileobject.readline() being
> followed by socket.recv() if readline uses read buffering.
> xmlrpclib.py was attempting to directly use the underlying socket,
> although in actual fact it never did, (since HTTPConnectio had closed
> it when it returned the response from getresponse()) Never the less, it
> is prudent to make sure that we don't attempt this.
> There really should be no need to use the socket directly, a buffered
> read() call is just as efficient.
>
> Added file: http://bugs.python.org/file12145/xmlrpc.patch
>
> ___
> Python tracker <[EMAIL PROTECTED]>
> 
> ___
> ___
> Python-bugs-list mailing list
> Unsubscribe: 
> http://mail.python.org/mailman/options/python-bugs-list/jeremy%40alum.mit.edu
>
>

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4008] IDLE: checksyntax() doesn't support Unicode?

2008-11-28 Thread Terry J. Reedy

Terry J. Reedy <[EMAIL PROTECTED]> added the comment:

This is still a problem on my WinXP 3.0rc3 with
# -*- coding: utf-8 -*-
in a file but not with the same pasted directly into the shell Window.

--
nosy: +tjreedy
type:  -> crash

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4454] Coding cookie crashes IDLE

2008-11-28 Thread Terry J. Reedy

Terry J. Reedy <[EMAIL PROTECTED]> added the comment:

WinXP
And sorry for dup.  I searched IDLE items for 'crash'

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4428] io.BufferedWriter does not observe buffer size limits

2008-11-28 Thread Gregory P. Smith

Gregory P. Smith <[EMAIL PROTECTED]> added the comment:

Okay, here's a new patch that obeys the blocking vs nonblocking
semantics properly.  It still needs explicit unit tests for proper behavior.

Added file: http://bugs.python.org/file12158/issue4428-io-bufwrite-gps03.diff

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4428] io.BufferedWriter does not observe buffer size limits

2008-11-28 Thread Gregory P. Smith

Changes by Gregory P. Smith <[EMAIL PROTECTED]>:


Removed file: http://bugs.python.org/file12155/issue4428-io-bufwrite-gps01.diff

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4457] __import__ documentation obsolete

2008-11-28 Thread Steven D'Aprano

New submission from Steven D'Aprano <[EMAIL PROTECTED]>:

The documentation for __import__ says that it primarily exists "so that
you can replace it with another function that has a compatible
interface, in order to change the semantics of the import statement".
http://docs.python.org/library/functions.html

That is no longer the case. The recommended way to do that is with the
new import hooks, and the docs should reflect that.

A common use for __import__ is for when you don't know the module name
until runtime. That too should be mentioned.

--
assignee: georg.brandl
components: Documentation
messages: 76582
nosy: georg.brandl, stevenjd
severity: normal
status: open
title: __import__ documentation obsolete

___
Python tracker <[EMAIL PROTECTED]>

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



[issue1868] threading.local doesn't free attrs when assigning thread exits

2008-11-28 Thread Gregory P. Smith

Changes by Gregory P. Smith <[EMAIL PROTECTED]>:


--
versions: +Python 2.5.3

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4458] getopt.gnu_getopt() loses dash argument

2008-11-28 Thread Yevgen Muntyan

New submission from Yevgen Muntyan <[EMAIL PROTECTED]>:

If you feed a dash as an argument to getopt.gnu_getopt() then it gets
lost, because the code only checks if the argument starts with a dash,
not if it's more than a dash (unlike getopt.getopt() which is correct).

Example:

>>> import getopt
>>> getopt.gnu_getopt('-', '')
([], [])
>>> getopt.getopt('-', '')
([], '-')

--
components: Library (Lib)
messages: 76583
nosy: muntyan
severity: normal
status: open
title: getopt.gnu_getopt() loses dash argument
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