Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Python: Bugs

[issue7249] Consider allowing io.BytesIO sizes to be passed as 'long' in 2.6

 

 

Python bugs RSS feed   Index | Next | Previous | View Threaded


report at bugs

Nov 1, 2009, 7:50 PM

Post #1 of 4 (52 views)
Permalink
[issue7249] Consider allowing io.BytesIO sizes to be passed as 'long' in 2.6

New submission from Ryan Leslie <rylesny[at]gmail.com>:

py> StringIO.StringIO("foo").read(long(1))
'f'

py> io.BytesIO("foo").read(long(1))
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: integer argument expected, got 'long'

This is known to cause problems when reading zip data from a BytesIO
object with zipfile. See this recent thread on comp.lang.python:

http://groups.google.com/group/comp.lang.python/browse_thread/thread/337c1b8a48e8acae/

----------
components: Library (Lib)
messages: 94818
nosy: ryles
severity: normal
status: open
title: Consider allowing io.BytesIO sizes to be passed as 'long' in 2.6
type: behavior
versions: Python 2.6

_______________________________________
Python tracker <report[at]bugs.python.org>
<http://bugs.python.org/issue7249>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

Nov 2, 2009, 10:20 AM

Post #2 of 4 (41 views)
Permalink
[issue7249] Consider allowing io.BytesIO sizes to be passed as 'long' in 2.6 [In reply to]

Changes by Georg Brandl <georg[at]python.org>:


----------
assignee: -> pitrou
nosy: +pitrou

_______________________________________
Python tracker <report[at]bugs.python.org>
<http://bugs.python.org/issue7249>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

Nov 2, 2009, 11:19 AM

Post #3 of 4 (40 views)
Permalink
[issue7249] Consider allowing io.BytesIO sizes to be passed as 'long' in 2.6 [In reply to]

Changes by Antoine Pitrou <pitrou[at]free.fr>:


----------
components: +IO
priority: -> normal
stage: -> needs patch
versions: +Python 2.7

_______________________________________
Python tracker <report[at]bugs.python.org>
<http://bugs.python.org/issue7249>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

Nov 2, 2009, 1:05 PM

Post #4 of 4 (41 views)
Permalink
[issue7249] Consider allowing io.BytesIO sizes to be passed as 'long' in 2.6 [In reply to]

Antoine Pitrou <pitrou[at]free.fr> added the comment:

I've committed to the 2.6 branch in r76073. 2.7 is actually ok.
Thanks for the report!

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

_______________________________________
Python tracker <report[at]bugs.python.org>
<http://bugs.python.org/issue7249>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com

Python bugs RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.