[issue5175] negative PyLong -> C unsigned integral, TypeError or OverflowError?

2009-02-07 Thread Mark Dickinson

Changes by Mark Dickinson :


--
assignee:  -> marketdickinson
nosy: +marketdickinson

___
Python tracker 

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



[issue1528074] difflib.SequenceMatcher.find_longest_match() wrong result

2009-02-07 Thread Jan

Jan  added the comment:

hi all,

just got bitten by this, so i took the time to reiterate the issue.

according to the docs:

http://docs.python.org/library/difflib.html

find_longest_match() should return the longest matching string:

"If isjunk was omitted or None, find_longest_match() returns (i, j, k)
such that a[i:i+k] is equal to b[j:j+k], where alo <= i <= i+k <= ahi
and blo <= j <= j+k <= bhi. For all (i', j', k') meeting those
conditions, the additional conditions k >= k', i <= i', and if i == i',
j <= j' are also met. In other words, of all maximal matching blocks,
return one that starts earliest in a, and of all those maximal matching
blocks that start earliest in a, return the one that starts earliest in b."

but after a couple of hours debugging i finally convinced myself that
the bug was in the library ... and i ended up here :) 

any ideas on how to work around this bug/feature, and just get the
longest matching string ? (from a normal/newbie user perspective, that
is, without patching the C++ library code and recompiling?)

from the comments (which i couldn't follow entirely), does it use some
concept of popularity that is not exposed by the API ? How is
"popularity" defined ?

many thanks!
- jan


ps.: using ubuntu's python 2.5.2

ps2.: and example of a string pair where the issue shows up:

s1='Floor Box SystemsFBS Floor Box Systems - Manufacturer & supplier
of FBS floor boxes, electrical ... experience, FBS Floor Box Systems
continue ... raceways, floor box. ...www.floorboxsystems.com'

s2='FBS Floor Box SystemsFBS Floor Box Systems - Manufacturer &
supplier of FBS floor boxes, electrical floor boxes, wood floor box,
concrete floor box, surface mount floor box, raised floor
...www.floorboxsystems.com'

--
nosy: +janpf

___
Python tracker 

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



[issue5174] xmlrpclib docs include incorrect file closing

2009-02-07 Thread Georg Brandl

Georg Brandl  added the comment:

Thanks, fixed in r69409.

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

___
Python tracker 

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



[issue5177] multiprocessing: SocketListener should use SO_REUSEADDR

2009-02-07 Thread Jon Dee

New submission from Jon Dee :

Without this flag it is necessary to wait for e.g. 120s after closing
down a 'BaseManager' server before restarting, due to the socket being
in the TIME_WAIT state. 

Example error, which occurs if a server is started, data transmitted
down the socket, the server shut down, then restarted:

 File "/usr/local/lib/python2.6/multiprocessing/connection.py", line
220, in __init__
self._socket.bind(address)
 File "", line 1, in bind
error: [Errno 48] Address already in use


I added (locally):
 self._socket.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)

to SocketListener.__init__, and it resolves the issue.

--
components: Library (Lib)
messages: 81336
nosy: jon_dee
severity: normal
status: open
title: multiprocessing: SocketListener should use SO_REUSEADDR
type: behavior
versions: Python 2.6

___
Python tracker 

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



[issue5177] multiprocessing: SocketListener should use SO_REUSEADDR

2009-02-07 Thread Giampaolo Rodola'

Changes by Giampaolo Rodola' :


--
nosy: +giampaolo.rodola

___
Python tracker 

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



[issue5134] Compiler warnings in sqlite module

2009-02-07 Thread Martin v. Löwis

Martin v. Löwis  added the comment:

Here is a patch that works similar to sqlite3_warnings, but moves all
sqlite3.dll settings into a separate property file.

Added file: http://bugs.python.org/file12968/sqlite.patch

___
Python tracker 

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



[issue5137] SystemError when __len__ returns a non-number

2009-02-07 Thread Benjamin Peterson

Benjamin Peterson  added the comment:

Here's patch that raises a TypeError like 2.x.

--
keywords: +needs review, patch
nosy: +benjamin.peterson
Added file: http://bugs.python.org/file12969/SystemError_bad_len.patch

___
Python tracker 

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



[issue4704] Update pybench for python 3.0

2009-02-07 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

> If possible, pybench should work unchanged in both Python 2.x and 3.x.

Ok, the best I can do is to make it 2.6-compatible. For versions before
2.6, stuff like "except Exception as e" does not make compatibility
reasonably achievable.

___
Python tracker 

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



[issue4704] Update pybench for python 3.0

2009-02-07 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Committed in r69411, r69412.

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

___
Python tracker 

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



[issue5177] multiprocessing: SocketListener should use SO_REUSEADDR

2009-02-07 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
nosy: +jnoller

___
Python tracker 

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



[issue4753] Faster opcode dispatch on gcc

2009-02-07 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Skip, removing the colon doesn't work if the macro adds code after the
colon :)

___
Python tracker 

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



[issue5178] Add content manager for temporary directory

2009-02-07 Thread Neil Schemenauer

New submission from Neil Schemenauer :

I noticed that it would be nice to have a temporary directory context
manager while trying to fix a broken unittest.  The attached patch
provides a pretty minimal implementation.  There appears to be lots of
unit tests that could use such a thing (just search for "rmtree").

I'm not sure if TemporaryDirectory is the best name.  Also, perhaps it
should have a __del__ method although that's tricky business.

--
assignee: ncoghlan
files: tempdir.patch
keywords: patch
messages: 81342
nosy: nascheme, ncoghlan
severity: normal
stage: patch review
status: open
title: Add content manager for temporary directory
type: feature request
Added file: http://bugs.python.org/file12970/tempdir.patch

___
Python tracker 

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



[issue2047] shutil.destinsrc returns wrong result when source path matches beginning of destination path

2009-02-07 Thread Senthil

Senthil  added the comment:

Sorry to bring this fixed-closed issue back again.

I see that this was committed in a hurry.

Either, shutil.destinsrc should be Documented, there currently does not
exists any documentation to explain what destinsrc is supposed to do, or
the function should be made _destinsrc to be internal only. I vote for
the second approach of making it _destinsrc as it is used only in the
shutil.move().

If no action can be taken on a closed bug, I shall open a new one and
also attach a patch to make the method private.

--
nosy: +orsenthil

___
Python tracker 

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



[issue2047] shutil.destinsrc returns wrong result when source path matches beginning of destination path

2009-02-07 Thread Benjamin Peterson

Benjamin Peterson  added the comment:

Made private in r69415.

___
Python tracker 

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



[issue2047] shutil.destinsrc returns wrong result when source path matches beginning of destination path

2009-02-07 Thread Senthil

Senthil  added the comment:

Thanks for the quick action. Really nice.

___
Python tracker 

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



[issue5122] test_tcl and test_ttk_guionly don't like each other

2009-02-07 Thread Guilherme Polo

Guilherme Polo  added the comment:

A bit cleaner patch.

Added file: http://bugs.python.org/file12971/protect_tk_loading.diff

___
Python tracker 

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



[issue5122] test_tcl and test_ttk_guionly don't like each other

2009-02-07 Thread Guilherme Polo

Changes by Guilherme Polo :


Removed file: 
http://bugs.python.org/file12960/checking_for_failed_tk_load-2.diff

___
Python tracker 

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



[issue5122] test_tcl and test_ttk_guionly don't like each other

2009-02-07 Thread Guilherme Polo

Changes by Guilherme Polo :


Removed file: http://bugs.python.org/file12958/checking_for_failed_tk_load.diff

___
Python tracker 

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



[issue5179] subprocess leaves open fds on construction error

2009-02-07 Thread Georg Brandl

New submission from Georg Brandl :

The test case below will (on Linux here) eventually quit with "OSError:
[Errno 24] Too many open files".  I assume that some additional cleaning
up is in order.

---

from subprocess import Popen, PIPE

while 1:
try:
Popen(['nonexisting'], stdout=PIPE, stderr=PIPE)
except OSError, err:
if err.errno != 2:  # ignore "no such file"
raise

--
components: Library (Lib)
messages: 81347
nosy: georg.brandl
priority: high
severity: normal
status: open
title: subprocess leaves open fds on construction error
versions: Python 2.6, Python 2.7

___
Python tracker 

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



[issue5179] subprocess leaves open fds on construction error

2009-02-07 Thread Georg Brandl

Georg Brandl  added the comment:

Proposed patch attached.

Added file: http://bugs.python.org/file12972/sp-patch.py

___
Python tracker 

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



[issue5178] Add content manager for temporary directory

2009-02-07 Thread Nick Coghlan

Nick Coghlan  added the comment:

A __del__ method is definitely desirable (tempfile._TemporaryFileWrapper
gives an example of how to cache the relevant globals on the class
object to avoid attempting calls to None during interpreter shutdown).

The new examples are good, but may give the misleading impression that
TemporaryFile can't be used as a context manager (it can, and the file
will be closed at the end of the with statement). A second file example
showing it being used as a context manager would probably be helpful.

There is also at least one existing contextlib based temp_dir context
managers that could be replaced given the addition of this (i.e. in
test_cmd_line_script.py, "test_dir" could be changed to a class that
inherits from tempfile.TemporaryDirectory and overrides __enter__ to
invoke realname() on the directory name).

___
Python tracker 

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



[issue5122] test_tcl and test_ttk_guionly don't like each other

2009-02-07 Thread Eric Smith

Eric Smith  added the comment:

protect_tk_loading.diff works for me.

___
Python tracker 

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



[issue5180] 3.1 cannot unpickle 2.7-created pickle

2009-02-07 Thread Antoine Pitrou

New submission from Antoine Pitrou :

The pickle was generated by pybench. You can try to display it by running:

./python Tools/pybench/pybench.py --debug -s 27.bench

It fails with the following traceback:

Traceback (most recent call last):
  File "Tools/pybench/pybench.py", line 954, in 
PyBenchCmdline()
  File "/home/antoine/py3k/__svn__/Tools/pybench/CommandLine.py", line
349, in __init__
rc = self.main()
  File "Tools/pybench/pybench.py", line 888, in main
bench = pickle.load(f)
  File "/home/antoine/py3k/__svn__/Lib/pickle.py", line 1335, in load
return Unpickler(file, encoding=encoding, errors=errors).load()
_pickle.UnpicklingError: bad pickle data

--
components: Extension Modules
messages: 81351
nosy: alexandre.vassalotti, pitrou
priority: high
severity: normal
status: open
title: 3.1 cannot unpickle 2.7-created pickle
type: behavior
versions: Python 3.0, Python 3.1

___
Python tracker 

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



[issue5180] 3.1 cannot unpickle 2.7-created pickle

2009-02-07 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Here is the pickle file.

Added file: http://bugs.python.org/file12973/27.bench

___
Python tracker 

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



[issue5181] test_urllib failures on the 3.1 buildbots

2009-02-07 Thread Antoine Pitrou

New submission from Antoine Pitrou :

This failure happens on all 3.x buildbots:

==
ERROR: test_empty_socket (test.test_urllib.urlopen_HttpTests)
--
Traceback (most recent call last):
  File
"/home/pybot/buildarea/3.x.klose-debian-ppc/build/Lib/test/test_urllib.py",
line 194, in test_empty_socket
self.assertRaises(IOError, urlopen, "http://something";)
  File
"/home/pybot/buildarea/3.x.klose-debian-ppc/build/Lib/unittest.py", line
344, in failUnlessRaises
callableObj(*args, **kwargs)
  File
"/home/pybot/buildarea/3.x.klose-debian-ppc/build/Lib/test/test_urllib.py",
line 33, in urlopen
return opener.open(url)
  File
"/home/pybot/buildarea/3.x.klose-debian-ppc/build/Lib/urllib/request.py", line
1444, in open
return getattr(self, name)(url)
  File
"/home/pybot/buildarea/3.x.klose-debian-ppc/build/Lib/urllib/request.py", line
1618, in open_http
return self._open_generic_http(http.client.HTTPConnection, url, data)
  File
"/home/pybot/buildarea/3.x.klose-debian-ppc/build/Lib/urllib/request.py", line
1601, in _open_generic_http
response = http_conn.getresponse()
  File
"/home/pybot/buildarea/3.x.klose-debian-ppc/build/Lib/http/client.py",
line 937, in getresponse
method=self._method)
  File
"/home/pybot/buildarea/3.x.klose-debian-ppc/build/Lib/http/client.py",
line 275, in __init__
self.fp = sock.makefile("rb")
TypeError: makefile() takes exactly 3 positional arguments (2 given)

==
ERROR: test_read (test.test_urllib.urlopen_HttpTests)
--
Traceback (most recent call last):
  File
"/home/pybot/buildarea/3.x.klose-debian-ppc/build/Lib/test/test_urllib.py",
line 168, in test_read
fp = urlopen("http://python.org/";)
  File
"/home/pybot/buildarea/3.x.klose-debian-ppc/build/Lib/test/test_urllib.py",
line 33, in urlopen
return opener.open(url)
  File
"/home/pybot/buildarea/3.x.klose-debian-ppc/build/Lib/urllib/request.py", line
1444, in open
return getattr(self, name)(url)
  File
"/home/pybot/buildarea/3.x.klose-debian-ppc/build/Lib/urllib/request.py", line
1618, in open_http
return self._open_generic_http(http.client.HTTPConnection, url, data)
  File
"/home/pybot/buildarea/3.x.klose-debian-ppc/build/Lib/urllib/request.py", line
1601, in _open_generic_http
response = http_conn.getresponse()
  File
"/home/pybot/buildarea/3.x.klose-debian-ppc/build/Lib/http/client.py",
line 937, in getresponse
method=self._method)
  File
"/home/pybot/buildarea/3.x.klose-debian-ppc/build/Lib/http/client.py",
line 275, in __init__
self.fp = sock.makefile("rb")
TypeError: makefile() takes exactly 3 positional arguments (2 given)

==
ERROR: test_read_bogus (test.test_urllib.urlopen_HttpTests)
--
Traceback (most recent call last):
  File
"/home/pybot/buildarea/3.x.klose-debian-ppc/build/Lib/test/test_urllib.py",
line 185, in test_read_bogus
self.assertRaises(IOError, urlopen, "http://python.org/";)
  File
"/home/pybot/buildarea/3.x.klose-debian-ppc/build/Lib/unittest.py", line
344, in failUnlessRaises
callableObj(*args, **kwargs)
  File
"/home/pybot/buildarea/3.x.klose-debian-ppc/build/Lib/test/test_urllib.py",
line 33, in urlopen
return opener.open(url)
  File
"/home/pybot/buildarea/3.x.klose-debian-ppc/build/Lib/urllib/request.py", line
1444, in open
return getattr(self, name)(url)
  File
"/home/pybot/buildarea/3.x.klose-debian-ppc/build/Lib/urllib/request.py", line
1618, in open_http
return self._open_generic_http(http.client.HTTPConnection, url, data)
  File
"/home/pybot/buildarea/3.x.klose-debian-ppc/build/Lib/urllib/request.py", line
1601, in _open_generic_http
response = http_conn.getresponse()
  File
"/home/pybot/buildarea/3.x.klose-debian-ppc/build/Lib/http/client.py",
line 937, in getresponse
method=self._method)
  File
"/home/pybot/buildarea/3.x.klose-debian-ppc/build/Lib/http/client.py",
line 275, in __init__
self.fp = sock.makefile("rb")
TypeError: makefile() takes exactly 3 positional arguments (2 given)

--
messages: 81353
nosy: krisvale, pitrou
priority: critical
severity: normal
stage: needs patch
status: open
title: test_urllib failures on the 3.1 buildbots
type: behavior
versions: Python 3.0, Python 3.1

___
Python tracker 

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



[issue5181] test_urllib failures on the 3.1 buildbots

2009-02-07 Thread Benjamin Peterson

Benjamin Peterson  added the comment:

Fixed in r69416.

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

___
Python tracker 

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



[issue5181] test_urllib failures on the 3.1 buildbots

2009-02-07 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Now test_docxmlrpc fails and test_httpservers times out...

___
Python tracker 

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



[issue5181] test_urllib failures on the 3.1 buildbots

2009-02-07 Thread Daniel Diniz

Daniel Diniz  added the comment:

Benjamin,
r69416 breaks at least test_docxmlrpc and test_httplib, and hangs on
test_httpservers (Gentoo, Debian ppc, OSX buildbots show it).

--
nosy: +ajaksu2

___
Python tracker 

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



[issue5160] Intermittant segmentation fault with ctrl-c (threads and queues)

2009-02-07 Thread Corey Goldberg

Corey Goldberg  added the comment:

note:
on Windows Vista it is not ery intermittant :)
crashes every time the program is stopped.

___
Python tracker 

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



[issue5181] test_urllib failures on the 3.1 buildbots

2009-02-07 Thread Benjamin Peterson

Benjamin Peterson  added the comment:

Apparently, I don't know what I'm doing. reverted in r69418.

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

___
Python tracker 

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



[issue2636] Regexp 2.7 (modifications to current re 2.2.2)

2009-02-07 Thread Matthew Barnett

Matthew Barnett  added the comment:

issue2636-features-2.diff is based on Python 2.6.

Bugfix. No new features.

Added file: http://bugs.python.org/file12974/issue2636-features-2.diff

___
Python tracker 

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



[issue4631] urlopen returns extra, spurious bytes

2009-02-07 Thread Daniel Diniz

Daniel Diniz  added the comment:

Here's a test (in test_urllib2_localnet) that fails before the patch and
passes after, mostly lifted from test_httplib:

def test_chunked(self):
expected_response = b"hello world"
chunked_start = (
b'a\r\n'
b'hello worl\r\n'
b'1\r\n'
b'd\r\n'
)
response = [(200, [("Transfer-Encoding", "chunked")],
chunked_start)]
handler = self.start_server(response)
data = self.urlopen("http://localhost:%s/"; % handler.port)
self.assertEquals(data, expected_response)

Output:

test test_urllib2_localnet failed -- Traceback (most recent call last):
  File "~/py3k/Lib/test/test_urllib2_localnet.py", line 390, in test_chunked
self.assertEquals(data, expected_response)
AssertionError: b'a\r\nhello worl\r\n1\r\nd\r\n' != b'hello world'

To allow this test to work, the attached patch also touches
FakeHTTPRequestHandler and TestUrlopen.urlopen.

Added file: http://bugs.python.org/file12975/test_urllib_chunked.diff

___
Python tracker 

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



[issue4753] Faster opcode dispatch on gcc

2009-02-07 Thread Skip Montanaro

Skip Montanaro  added the comment:

Antoine> Skip, removing the colon doesn't work if the macro adds code
Antoine> after the colon :)

When I looked I thought both TARGET and TARGET_WITH_IMPL ended with a colon,
but I see that's not the case.  How about removing TARGET_WITH_IMPL and just
include the goto explicitly?  There are only a few instances of the
TARGET_WITH_IMPL used.

Skip

___
Python tracker 

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



[issue4195] Regression for executing packages

2009-02-07 Thread Nick Coghlan

Nick Coghlan  added the comment:

Incorporated as:
2.7: r69419
3.1: r69421

--
resolution:  -> accepted
stage:  -> committed/rejected
status: open -> closed

___
Python tracker 

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



[issue5182] str() on memoryview of bytearray failing on py3k

2009-02-07 Thread Mark Hammond

New submission from Mark Hammond :

% py30 -c "str(memoryview(bytearray((1,2,3"
Traceback (most recent call last):
  File "", line 1, in 
TypeError: __str__ returned non-string (type bytes)

The expected behaviour is that a string representation be returned.

--
messages: 81363
nosy: mhammond
severity: normal
status: open
title: str() on memoryview of bytearray failing on py3k
versions: Python 3.0, Python 3.1

___
Python tracker 

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



[issue5182] str() on memoryview of bytearray failing on py3k

2009-02-07 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
nosy: +pitrou

___
Python tracker 

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



[issue3521] file.readline: bad exception recovery

2009-02-07 Thread Daniel Diniz

Daniel Diniz  added the comment:

Maybe this one should be in 3.0.1? Benchmarking the isinstance approach
against int() would be interesting.

The io-c branch doesn't have this bug, so 3.1 is OK :)

___
Python tracker 

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



[issue4512] Add get_filename method to zipimport

2009-02-07 Thread Nick Coghlan

Nick Coghlan  added the comment:

ZipImporter.get_filename() made public in:
2.7: r69425
3.1: r69426

--
resolution:  -> accepted
stage:  -> committed/rejected
status: open -> closed

___
Python tracker 

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



[issue5178] Add content manager for temporary directory

2009-02-07 Thread Nick Coghlan

Changes by Nick Coghlan :


--
priority:  -> normal
versions: +Python 2.7, Python 3.1

___
Python tracker 

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



[issue5178] Add context manager for temporary directory

2009-02-07 Thread Nick Coghlan

Changes by Nick Coghlan :


--
title: Add content manager for temporary directory -> Add context manager for 
temporary directory

___
Python tracker 

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



[issue5183] wsgiref.simple_server not working

2009-02-07 Thread Stephen Day

New submission from Stephen Day :

The attached application doesn't work. I think the value of self.headers  
(see line 114) has a blank line at the end that it did not in Python 2.5

Here is the error message that occurs when it gets a request 
(http://127.0.0.1:8080/):

Exception happened during processing of request from ('127.0.0.1', 
60549)
Traceback (most recent call last):
  File "C:\Python30\lib\socketserver.py", line 281, in 
_handle_request_noblock
self.process_request(request, client_address)
  File "C:\Python30\lib\socketserver.py", line 307, in process_request
self.finish_request(request, client_address)
  File "C:\Python30\lib\socketserver.py", line 320, in finish_request
self.RequestHandlerClass(request, client_address, self)
  File "C:\Python30\lib\socketserver.py", line 614, in __init__
self.handle()
  File "C:\Python30\lib\wsgiref\simple_server.py", line 136, in handle
self.rfile, self.wfile, self.get_stderr(), self.get_environ()
  File "C:\Python30\lib\wsgiref\simple_server.py", line 115, in 
get_environ
k,v = h.split(':',1)
ValueError: need more than 1 value to unpack

--
components: Library (Lib)
files: test_server.py
messages: 81366
nosy: StephenDay
severity: normal
status: open
title: wsgiref.simple_server not working
type: crash
versions: Python 3.0
Added file: http://bugs.python.org/file12976/test_server.py

___
Python tracker 

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



[issue5183] wsgiref.simple_server not working

2009-02-07 Thread Stephen Day

Stephen Day  added the comment:

This seems to be fixed already (see Issue4718). Next time I'll search 
more...

___
Python tracker 

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