[issue1481036] IOBaseError

2008-04-13 Thread Armin Rigo

Armin Rigo <[EMAIL PROTECTED]> added the comment:

This will break many existing applications, no?  I can easily think of
examples of reasonable code that would no longer work as intended. 
What's even worse, breakage might only show up in exceptional cases and
give obscure results (e.g. reporting the wrong problem to the user).

--
nosy: +arigo

_
Tracker <[EMAIL PROTECTED]>

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



[issue2530] Document IO module

2008-04-13 Thread Georg Brandl

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

Should be fixed now with the latest Sphinx revision.

__
Tracker <[EMAIL PROTECTED]>

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



[issue992389] attribute error after non-from import

2008-04-13 Thread Torsten Bronger

Torsten Bronger <[EMAIL PROTECTED]> added the comment:

I dare to make a follow-up although I have no idea at all about the
internal processes in the Python interpreter.  But I've experimented
with circular imports a lot recently.  Just two points:

First, I think that circular imports don't necessarily exhibit a
sub-opimal programming style.  I had a large parser module which I just
wanted to split in order to get handy file sizes.  However, the parser
parses human documents, and layout element A defined in module A may
contain element B from module B and vice versa.  In a language with
declarations, you just include a big header file but in Python, you end
up with circular imports.  Or, you must stay with large files.

So, while I think that this clean error message Nick suggests is a good
provisional solution, it should not make the impression that the
circular import is a flaw by itself.

And secondly, the problem with modules that are not yet populated with
objects is how circular imports have worked in Python anyway.  You can
easily cope with it by not referencing the imported module's objects in
the top-level code of the importing module (but only in functions and
methods).


Tracker <[EMAIL PROTECTED]>


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



[issue2624] swig support in distutils should use the build and temp dirs

2008-04-13 Thread Kjell Braden

Kjell Braden <[EMAIL PROTECTED]> added the comment:

Note that the language specific files can't be handled via py_modules
because this is processed before their generation.

__
Tracker <[EMAIL PROTECTED]>

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



[issue2620] Multiple buffer overflows in unicode processing

2008-04-13 Thread Marc-Andre Lemburg

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

On 32-bit platforms, it's probably best to add a size check. I don't
it's worth doing that on 64-bit platforms - overflows are rather
unlikely there.

__
Tracker <[EMAIL PROTECTED]>

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



[issue1481036] IOBaseError

2008-04-13 Thread Benjamin Peterson

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

Py3k then?

--
versions: +Python 3.0 -Python 2.6

_
Tracker <[EMAIL PROTECTED]>

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



[issue2530] Document IO module

2008-04-13 Thread Benjamin Peterson

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

And I have fleshed out the doc strings and backported it to 2.6.

__
Tracker <[EMAIL PROTECTED]>

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



[issue1751] Fast BytesIO implementation + misc changes

2008-04-13 Thread Christian Heimes

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

I'm going to review the patch later. How are we going to back port the
stuff to 2.6?

--
nosy: +tiran

__
Tracker <[EMAIL PROTECTED]>

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



[issue1751] Fast BytesIO implementation + misc changes

2008-04-13 Thread Christian Heimes

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

Hey Alexandre!

The latest patch doesn't apply cleanly. Please provide a new patch.

__
Tracker <[EMAIL PROTECTED]>

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



[issue902061] pydoc insists upon producing file: URLs

2008-04-13 Thread Ron Adam

Ron Adam <[EMAIL PROTECTED]> added the comment:

The following patch also fixes this along with other improvements. 
Maybe someone can review it.

http://bugs.python.org/issue2001

--
nosy: +ron_adam


Tracker <[EMAIL PROTECTED]>


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



[issue2627] mark pgen generated files

2008-04-13 Thread Benjamin Peterson

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

This patch makes pgen note that it generated the file at the top.

--
assignee: georg.brandl
components: Interpreter Core
files: pgen_generated.patch
keywords: easy, patch
messages: 65447
nosy: benjamin.peterson, georg.brandl
priority: low
severity: normal
status: open
title: mark pgen generated files
type: feature request
versions: Python 2.6
Added file: http://bugs.python.org/file10021/pgen_generated.patch

__
Tracker <[EMAIL PROTECTED]>

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



[issue2627] mark pgen generated files

2008-04-13 Thread Georg Brandl

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

Fine with me if you convert the spaces to a tab first.

--
assignee: georg.brandl -> benjamin.peterson

__
Tracker <[EMAIL PROTECTED]>

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



[issue2624] swig support in distutils should use the build and temp dirs

2008-04-13 Thread Kjell Braden

Changes by Kjell Braden <[EMAIL PROTECTED]>:


Removed file: http://bugs.python.org/file10017/python_distutils+swig.patch

__
Tracker <[EMAIL PROTECTED]>

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



[issue2624] swig support in distutils should use the build and temp dirs

2008-04-13 Thread Kjell Braden

Kjell Braden <[EMAIL PROTECTED]> added the comment:

I noticed that my patch did not work for absolute directory names and
adjusted the matching to fix this.

Added file: http://bugs.python.org/file10022/python_distutils+swig.patch

__
Tracker <[EMAIL PROTECTED]>

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



[issue2624] swig support in distutils should use the build and temp dirs

2008-04-13 Thread Kjell Braden

Changes by Kjell Braden <[EMAIL PROTECTED]>:


--
components: +Distutils -Demos and Tools

__
Tracker <[EMAIL PROTECTED]>

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



[issue2627] mark pgen generated files

2008-04-13 Thread Benjamin Peterson

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

Committed in r62329.

--
resolution:  -> accepted
status: open -> closed

__
Tracker <[EMAIL PROTECTED]>

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



[issue2510] Bazaar ignore file

2008-04-13 Thread Benjamin Peterson

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

Added in r26330.

--
resolution:  -> accepted
status: open -> closed

__
Tracker <[EMAIL PROTECTED]>

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



[issue1751] Fast BytesIO implementation + misc changes

2008-04-13 Thread Alexandre Vassalotti

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

Here's an updated patch.

Added file: http://bugs.python.org/file10023/bytesio+misc-fixes-7.patch

__
Tracker <[EMAIL PROTECTED]>

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



[issue1751] Fast BytesIO implementation + misc changes

2008-04-13 Thread Alexandre Vassalotti

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

Oops, I forgot again to "svn add" the new files.

Added file: http://bugs.python.org/file10024/bytesio+misc-fixes-8.patch

__
Tracker <[EMAIL PROTECTED]>

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



[issue1751] Fast BytesIO implementation + misc changes

2008-04-13 Thread Alexandre Vassalotti

Changes by Alexandre Vassalotti <[EMAIL PROTECTED]>:


Removed file: http://bugs.python.org/file10023/bytesio+misc-fixes-7.patch

__
Tracker <[EMAIL PROTECTED]>

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



[issue2628] ftplib Persistent data connection

2008-04-13 Thread Jonathan

New submission from Jonathan <[EMAIL PROTECTED]>:

About a year ago I found myself fighting a broken FTP server that
couldn't handle multiple passive data transfers through a firewall or
NATed connection. Thankfully, this same problem server supports block
transmission mode, which allows a client to create a single data
connection for transferring multiple files.

I've attached a patch (and sample debug output) for the latest trunk.

Might this be useful to anyone else in any way? I realize any MODE
option rather than S is widely unsupported and possibly an edge case,
but getting this into trunk would be preferable. We've been running this
code under Python2.3 for nearly a year -- the jobs run several times per
hour -- and are extremely happy with the results.

--
components: Library (Lib)
files: ftplib.py.blockmode.patch
keywords: patch
messages: 65454
nosy: jbell
severity: normal
status: open
title: ftplib Persistent data connection
type: feature request
versions: Python 2.6
Added file: http://bugs.python.org/file10025/ftplib.py.blockmode.patch

__
Tracker <[EMAIL PROTECTED]>

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



[issue2628] ftplib Persistent data connection

2008-04-13 Thread Jonathan

Jonathan <[EMAIL PROTECTED]> added the comment:

Here's the debug output when the transfers are going well.

Added file: http://bugs.python.org/file10026/debug.log

__
Tracker <[EMAIL PROTECTED]>

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



[issue2620] Multiple buffer overflows in unicode processing

2008-04-13 Thread Gregory P. Smith

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


--
assignee:  -> gregory.p.smith
versions: +Python 2.6

__
Tracker <[EMAIL PROTECTED]>

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



[issue2629] _Py_ForgetReference crash when called from _PyUnicode_New on MemoryError

2008-04-13 Thread Gregory P. Smith

New submission from Gregory P. Smith <[EMAIL PROTECTED]>:

In _PyUnicode_New() a unicode object is taken from the freelist but if
the unicode_resize() call fails and returns -1, the goto onerror calls
_Py_ForgetReference on the unicode object... But it has NULL _ob_prev
and _ob_next values causing a crash when they're used.

How to reproduce:

* Make a 32-bit --with-pydebug build of Python trunk.
* Run it on a machine with lots of ram (at least 3gigs recommended, or
lots of swap and a heap of patience):

./python
Python 2.6a2+ (trunk:62336M, Apr 13 2008, 18:51:30)
>>> msg = 'A'*2000111222
>>> x = msg.decode('utf8')

It segmentation faults in _Py_ForgetReference.

--
messages: 65456
nosy: gregory.p.smith
severity: normal
status: open
title: _Py_ForgetReference crash when called from _PyUnicode_New on MemoryError
type: crash
versions: Python 2.6

__
Tracker <[EMAIL PROTECTED]>

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



[issue2620] Multiple buffer overflows in unicode processing

2008-04-13 Thread Gregory P. Smith

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

Here's a patch that fixes this by making both Python's malloc and
realloc return NULL if (0 <= size <= PY_SSIZE_T_MAX).

A side effect of this is that strings on 32bit platforms can no longer
be allocated up to 2**31-1 in length as the malloc includes the internal
python object structure overhead.  The maximum string size becomes
2147483609 with an optimized build on this system.

I do not think that is a problem.  A 32-bit process by definition can
only ever have one such object allocated at a time anyways. ;)

any objections?

Added file: http://bugs.python.org/file10027/issue2620-gps01-patch.txt

__
Tracker <[EMAIL PROTECTED]>

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



[issue2620] Multiple buffer overflows in unicode processing

2008-04-13 Thread Alexander Belopolsky

Alexander Belopolsky <[EMAIL PROTECTED]> added the comment:

On Sun, Apr 13, 2008 at 11:12 PM, Gregory P. Smith
<[EMAIL PROTECTED]> wrote:
..
>  Here's a patch that fixes this by making both Python's malloc and
>  realloc return NULL if (0 <= size <= PY_SSIZE_T_MAX).
>
This will not solve the original problem completely: multiplicative
overflow may produce size in the 0 to PY_SSIZE_T_MAX range.
Furthemore, malloc and realloc take unsigned arguments and I believe
there are cases when they are called with unsigned arguments in python
code.  Using the proposed macro definitions in these cases will lead
to compiler warnings.

I don't object to limiting the allowed malloc/realoc size, but the
check should be expressed as unsigned comparison:  (size_t)(n) >
(size_t)PY_SSIZE_T_MAX and multiplications by n > 2 should still be
checked for overflow before the result can be used for malloc.

__
Tracker <[EMAIL PROTECTED]>

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



[issue2622] Import errors in email.message.py

2008-04-13 Thread John Jackson

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

I'll put one together.

__
Tracker <[EMAIL PROTECTED]>

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