[issue2712] enhanced ioctl

2008-04-29 Thread ndbecker

ndbecker <[EMAIL PROTECTED]> added the comment:

OK.

__
Tracker <[EMAIL PROTECTED]>

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



[issue1950] Potential overflows due to incorrect usage of PyUnicode_AsString.

2008-04-29 Thread Marc-Andre Lemburg

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

@@ -2195,7 +2200,7 @@
}
return Py_None;
}
-   len = lastdot - start;
+   len = (size_t)(lastdot - start);
if (len >= MAXPATHLEN) {
PyErr_SetString(PyExc_ValueError,
"Module name too long");

The above cast needs to be (Py_ssize_t). size_t is an unsigned length type.

--
nosy: +lemburg

__
Tracker <[EMAIL PROTECTED]>

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



[issue2717] tempfile.mkstempf

2008-04-29 Thread André Malo

André Malo <[EMAIL PROTECTED]> added the comment:

It should catch OSError on fdopen, close fd and reraise, I think.

--
nosy: +ndparker

__
Tracker <[EMAIL PROTECTED]>

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



[issue1950] Potential overflows due to incorrect usage of PyUnicode_AsString.

2008-04-29 Thread Marc-Andre Lemburg

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

BTW: The API PyUnicode_AsString() is pretty useless by itself - there's
no way to access the size information of the returned string without
again going to the Unicode object.

I'd suggest to remove the API altogether and not only deprecating it.

Furthermore, the API PyUnicode_AsStringAndSize() does not follow the API
signature of PyString_AsStringAndSize() in that it passes back the
pointer to the string as output parameter. That should be changed as
well. Note that PyString_AsStringAndSize() already does this for both
8-bit strings and Unicode, so the special Unicode API is not really
needed at all or you may want to rename PyString_AsStringAndSize() to
PyUnicode_AsStringAndSize().

Finally, since there are many cases where the string buffer contents are
copied to a new buffer, it's probably worthwhile to add a new API which
does the copying straight away and also deals with the overflow cases in
a central place. I'd suggest PyUnicode_AsChar() (with an API like
PyUnicode_AsWideChar()).

__
Tracker <[EMAIL PROTECTED]>

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



[issue2690] Precompute range length

2008-04-29 Thread Nick Coghlan

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

It also isn't what range() and xrange() are used for now in 2.x. range()
returns an actual list, hence is limited to sequences that fit in a
reasonable amount of memory, and xrange() doesn't support values greater
than sys.maxint at all (as it uses C ints for its internal storage of
the start, stop and step values).

With itertools.count() available for the unbounded iterator case, I
think making range() mimic its 2.x counterpart as closely as possible
(without the memory inefficiency) will be quite valuable.

__
Tracker <[EMAIL PROTECTED]>

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



[issue2717] tempfile.mkstempf

2008-04-29 Thread Skip Montanaro

Skip Montanaro <[EMAIL PROTECTED]> added the comment:

Thanks.  New patch attached.

Added file: http://bugs.python.org/file10137/mkstempf.diff

__
Tracker <[EMAIL PROTECTED]>

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



[issue2717] tempfile.mkstempf

2008-04-29 Thread Skip Montanaro

Changes by Skip Montanaro <[EMAIL PROTECTED]>:


Removed file: http://bugs.python.org/file10136/mkstempf.diff

__
Tracker <[EMAIL PROTECTED]>

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



[issue2717] tempfile.mkstempf

2008-04-29 Thread Nick Coghlan

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

What does this offer over using NamedTemporaryFile(delete=False)?

--
nosy: +ncoghlan

__
Tracker <[EMAIL PROTECTED]>

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



[issue2717] tempfile.mkstempf

2008-04-29 Thread Skip Montanaro

Skip Montanaro <[EMAIL PROTECTED]> added the comment:

Nick> What does this offer over using NamedTemporaryFile(delete=False)?

Nothing I suppose.  I wasn't aware of the similarity of the two (I always
use mkstemp()) or the delete arg to NamedTemporaryFile, and assumed Guido's
complaint about mkstemp's shortcoming indicated that the functionality he
desired didn't exist.

Skip

__
Tracker <[EMAIL PROTECTED]>

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



[issue1180] Option to ignore or substitute ~/.pydistutils.cfg

2008-04-29 Thread Phillip J. Eby

Phillip J. Eby <[EMAIL PROTECTED]> added the comment:

Oh, I thought you meant that it overrides *which* config files -- 
i.e., implied that it was handling --no-user-config.

__
Tracker <[EMAIL PROTECTED]>

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



[issue1652] subprocess should have an option to restore SIGPIPE to default action

2008-04-29 Thread Colin Watson

Colin Watson <[EMAIL PROTECTED]> added the comment:

2.6 is fine if that's what the release process dictates; I don't want it
to be lost, that's all.

__
Tracker <[EMAIL PROTECTED]>

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



[issue2718] Logging.basicConfig ignores level=0

2008-04-29 Thread Jeroen van der Ham

New submission from Jeroen van der Ham <[EMAIL PROTECTED]>:

logging.basicConfig seems to ignore level=0:

>>> import logging
>>> logging.basicConfig(level=0)
>>> logging.getLogger().getEffectiveLevel()
30


>>> import logging
>>> logging.basicConfig(level=10)
>>> logging.getLogger().getEffectiveLevel()
10

--
components: Library (Lib)
messages: 65969
nosy: vdham
severity: normal
status: open
title: Logging.basicConfig ignores level=0
versions: Python 2.5

__
Tracker <[EMAIL PROTECTED]>

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



[issue2718] Logging.basicConfig ignores level=0

2008-04-29 Thread Vinay Sajip

Vinay Sajip <[EMAIL PROTECTED]> added the comment:

Already fixed in SVN.

Change was: "if level:" -> "if level is not None:" in basicConfig().

--
nosy: +vsajip
resolution:  -> duplicate
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



[issue2717] tempfile.mkstempf

2008-04-29 Thread Nick Coghlan

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

The delete flag on NamedTemporaryFile is new for 2.6, so it isn't
surprising people aren't familiar with it. The other advantage of using
NamedTemporaryFile is that its name attribute is set correctly, which
isn't the case when using mkstemp directly.

__
Tracker <[EMAIL PROTECTED]>

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



[issue2685] Add -mieee to compile flags, when available

2008-04-29 Thread Mark Dickinson

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

Done in r62499

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



[issue1496032] test_float segfaults with SIGFPE on FreeBSD 6.0 / Alpha

2008-04-29 Thread Mark Dickinson

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

Adding -mieee didn't fix the math and cmath problems.  Should I revert 
the change in r62499, or leave it in?  It seems to me that having -mieee 
is a good thing on the whole.  The main reason to not want IEEE 754 
conformance would be speed.

It looks like the math and cmath failures are due to libm behaviour;  
either (1) libm is making no attempt to be IEEE compliant, or (2) it's 
setting errno in places that it shouldn't, or (3) it's trying to be IEEE 
compliant but is buggy.  I'm not sure how to proceed.  Would it be okay 
to check in some temporary autoconf tests to help identify the source of 
the failures, and remove them later?

_
Tracker <[EMAIL PROTECTED]>

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



[issue2714] Unable to start IDLE on Windows Server 2003 x64 Edition w/ SP2

2008-04-29 Thread Gregory Dai

Gregory Dai <[EMAIL PROTECTED]> added the comment:

After removing my Ruby installation, I got the following:

"
C:\lang\Python25>Lib\idlelib\idle.py
Traceback (most recent call last):
  File "C:\lang\Python25\Lib\idlelib\idle.py", line 21, in 
idlelib.PyShell.main()
  File "C:\lang\Python25\lib\idlelib\PyShell.py", line 1390, in main
root = Tk(className="Idle")
  File "C:\lang\Python25\lib\lib-tk\Tkinter.py", line 1636, in __init__
self.tk = _tkinter.create(screenName, baseName, className, interactive,
wantobjects, useTk, sync, use)
_tkinter.TclError: Can't find a usable init.tcl in the following
directories:
{c:\ruby\tcl\lib\tcl8.3} {c:\ruby\tcl\lib\tcl8.3} c:/ruby/tcl/lib/tcl8.4
C:/lang/Python25/lib/tcl8.4 C:/lang/lib/tcl8.4 C:/lib/tcl8.4 C:/lang/library
C:/library C:/tcl8.4.12/library

This probably means that Tcl wasn't installed properly.
"

The tcl was installed as part of the distribution in the .msi file, how
could it not be installed properly?

On Mon, Apr 28, 2008 at 4:42 PM, Martin v. Löwis <[EMAIL PROTECTED]>
wrote:

>
> Martin v. Löwis <[EMAIL PROTECTED]> added the comment:
>
> Can you please run IDLE in a console window, and report the exceptions
> that you get? Invoke Lib\idlelib\idle.py to do so.
>
> --
> nosy: +loewis
>
> __
> Tracker <[EMAIL PROTECTED]>
> 
> __
>

Added file: http://bugs.python.org/file10138/unnamed

__
Tracker <[EMAIL PROTECTED]>

__After removing my Ruby installation, I got the 
following:"C:\lang\Python25>Lib\idlelib\idle.py
Traceback (most recent call 
last):  File 
"C:\lang\Python25\Lib\idlelib\idle.py", line 21, in 

    
idlelib.PyShell.main()  File 
"C:\lang\Python25\lib\idlelib\PyShell.py", line 1390, in 
main
    root = 
Tk(className="Idle")  File 
"C:\lang\Python25\lib\lib-tk\Tkinter.py", line 1636, in 
__init__
    http://self.tk";>self.tk = _tkinter.create(screenName, baseName, 
className, interactive, wantobjects, useTk, sync, use)
_tkinter.TclError: Can't 
find a usable init.tcl in the following directories:    {c:\ruby\tcl\lib\tcl8.3} 
{c:\ruby\tcl\lib\tcl8.3} c:/ruby/tcl/lib/tcl8.4 C:/lang/Python25/lib/tcl8.4 
C:/lang/lib/tcl8.4 C:/lib/tcl8.4 C:/lang/library C:/library 
C:/tcl8.4.12/library
This probably means that Tcl 
wasn't installed properly.
"The tcl was installed as part of the distribution in the 
.msi file, how could it not be installed properly?On Mon, Apr 28, 2008 at 4:42 PM, Martin v. Löwis [EMAIL PROTECTED]> wrote:

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

Can you please run IDLE in a console window, and report the exceptions
that you get? Invoke Lib\idlelib\idle.py to do so.

--
nosy: +loewis

__
Tracker [EMAIL PROTECTED]>
http://bugs.python.org/issue2714>
__

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



[issue2714] Unable to start IDLE on Windows Server 2003 x64 Edition w/ SP2

2008-04-29 Thread Gregory Dai

Gregory Dai <[EMAIL PROTECTED]> added the comment:

Martin Loewis had me start IDLE from a DOS prompt. The backtrace pointed to
an improper installation of tcl.

On Mon, Apr 28, 2008 at 4:25 PM, Facundo Batista <[EMAIL PROTECTED]>
wrote:

>
> Facundo Batista <[EMAIL PROTECTED]> added the comment:
>
> Disable all Operating System firewalls and try again (remember to enable
> the firewalls again after the test).
>
> This was a common problem in WinXP
>
> --
> nosy: +facundobatista
>
> __
> Tracker <[EMAIL PROTECTED]>
> 
> __
>

Added file: http://bugs.python.org/file10139/unnamed

__
Tracker <[EMAIL PROTECTED]>

__Martin Loewis had me start IDLE from a DOS prompt. The backtrace pointed to an 
improper installation of tcl.On Mon, Apr 28, 
2008 at 4:25 PM, Facundo Batista [EMAIL 
PROTECTED]> wrote:

Facundo Batista [EMAIL 
PROTECTED]> added the comment:

Disable all Operating System firewalls and try again (remember to enable
the firewalls again after the test).

This was a common problem in WinXP

--
nosy: +facundobatista

__
Tracker [EMAIL PROTECTED]>
http://bugs.python.org/issue2714>
__

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



[issue2053] IDLE - standardize dialogs

2008-04-29 Thread Tal Einat

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

uploaded a single comprehensive patch file

Added file: 
http://bugs.python.org/file10140/IDLE_standardize_dialogs.080429.patch

__
Tracker <[EMAIL PROTECTED]>

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



[issue2693] IDLE doesn't work with Tk 8.5

2008-04-29 Thread Greg Couch

Greg Couch <[EMAIL PROTECTED]> added the comment:

Starting over:

The goal of this patch is to get Tk 8.5 to work with Python 2.5's Idle.
 It currently fails with a ValueError, "invalid literal for int() with
base 10: '(72,'" (the 72 changes depending on what was typed in).

The root cause of bug is due to an interaction between Tk 8.5 returning
more results as Tcl lists, instances of Idle's WidgetRedirector class
that wrap widget Tcl commands with the WidgetRedirector's dispatch
method, and _tkinter's internal PythonCmd function that stringifies
anything its gets from Python.  What happens is that when a Python
method is called on a redirected widget, the corresponding Tcl method is
called using the WidgetRedirector's imposter widget command, which calls
the WidgetRedirector's dispatch method from Tcl, which then invokes the
original widget Tcl command, and if that command returns a Tcl list,
_tkinter converts it to a Python tuple, the dispatch method returns the
tuple into _tkinter, _tkinter stringifies it so it looks like a Python
tuple representation instead of a Tcl list representation, returns it to
Tkinter which tries to parse it like a Tcl list representation, and
causes the ValueError.

The correct fix is already in Python 2.6a2, which is changing Text
class' index method in Tkinter.py to return a string, and changing
_tkinter's PythonCmd to convert Python objects to equivalent Tcl
objects.  Unfortunately backporting those simple changes to Python 2.5
cause a "SystemError: Objects/tupleobject.c:89: bad argument to internal
function".  While that is worth further investigation, Python 2.6a2
doesn't have that problem and a simple alternative fix is available for
Python 2.5, so that is for someone else to do.

The alternative fix that works in Python 2.5 is to make sure that the
Tcl list string representation is used for Python tuples that are
returned to _tkinter's PythonCmd.  Those changes are confined to the
WidgetRedirector's dispatch method.  Line 126 of WidgetRedirector.py:

return self.tk.call((self.orig, operation) + args)

is replaced with:

result = self.tk.call((self.orig, operation) + args)
if isinstance(result, tuple):
# convert to string ourselves so we get a Tcl list
# that can be converted back into a tuple by Tkinter
result = '{%s}' % '} {'.join(map(str, result))
return result

For Tk 8.4, the if clause is never invoked because Idle does not use any
of the Tk 8.4 methods that return Tcl lists (luckily).  In Tk 8.5, the
additional quoting is only needed for the Tk text widget's tag names and
tag ranges commands when spaces are used for tag names (explicitly not
recommended), all other uses are lists of numbers.  Since none of Idle's
Text tags have spaces in them, that line can safely be replaced with:

result = ' '.join(map(str, result))

__
Tracker <[EMAIL PROTECTED]>

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



[issue1652] subprocess should have an option to restore SIGPIPE to default action

2008-04-29 Thread Georg Brandl

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

Martin, what do you think?

--
assignee:  -> loewis

__
Tracker <[EMAIL PROTECTED]>

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



[issue2719] Backport next()

2008-04-29 Thread Georg Brandl

New submission from Georg Brandl <[EMAIL PROTECTED]>:

Backporting 3.0's next() builtin.

There's no change w.r.t. __next__/next, that is tracked in #2336.

--
assignee: gvanrossum
components: Interpreter Core
files: nextbackport.diff
keywords: 26backport, patch
messages: 65980
nosy: georg.brandl, gvanrossum
priority: critical
severity: normal
status: open
title: Backport next()
type: behavior
versions: Python 2.6
Added file: http://bugs.python.org/file10141/nextbackport.diff

__
Tracker <[EMAIL PROTECTED]>

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



[issue2690] Precompute range length

2008-04-29 Thread Facundo Batista

Facundo Batista <[EMAIL PROTECTED]> added the comment:

Fair enough, specially if in the documentation of range() we put "if you
want a unbound, no limit, number generator, use itertools.count()" (or
something well written in english ;) ).

Thanks!

__
Tracker <[EMAIL PROTECTED]>

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



[issue2409] regrtest should not just skip imports that fail

2008-04-29 Thread Benjamin Peterson

Changes by Benjamin Peterson <[EMAIL PROTECTED]>:


--
type:  -> behavior

__
Tracker <[EMAIL PROTECTED]>

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



[issue2720] make compiling struct be passed around to all ast helpers

2008-04-29 Thread Benjamin Peterson

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

This patch causes struct *compiling to be passed around to all of the
ast helper functions. Since most functions already take it, this makes
it more consistent as a whole. Also, the filename (from
compiling->c_filename) is needed to issue warnings with PyErr_WarnExplicit.

--
components: Interpreter Core
files: ast_compiling_struct.patch
keywords: patch
messages: 65982
nosy: benjamin.peterson
severity: normal
status: open
title: make compiling struct be passed around to all ast helpers
type: feature request
versions: Python 2.6
Added file: http://bugs.python.org/file10142/ast_compiling_struct.patch

__
Tracker <[EMAIL PROTECTED]>

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



[issue2720] make compiling struct be passed around to all ast helpers

2008-04-29 Thread Christian Heimes

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

+1 for the feature

--
nosy: +tiran

__
Tracker <[EMAIL PROTECTED]>

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



[issue2714] Unable to start IDLE on Windows Server 2003 x64 Edition w/ SP2

2008-04-29 Thread Martin v. Löwis

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

Check whether the TCL_DIR or TK_DIR environment variables are set. If
so, unset them.

__
Tracker <[EMAIL PROTECTED]>

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



[issue2349] Py3K warn against assigning to True/False

2008-04-29 Thread Benjamin Peterson

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

As I looked over the code again, I realized that it doesn't help to just
do a normal warning while compiling because the line number isn't
supplied. You have to use PyWarn_Explicit for that (see the warning
about backquotes). Since the filename (in the compiling struct) isn't
passed around to all ast helpers, you can't warn in every function.
Therefore, I have #2720.

__
Tracker <[EMAIL PROTECTED]>

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



[issue2721] unittest.makeSuite undocumented and "obsolete" - but what to use instead?

2008-04-29 Thread Paul Winkler

New submission from Paul Winkler <[EMAIL PROTECTED]>:

A comment in unittest.py says "these functions should be considered
obsolete". But I've seen a lot of code in the wild still using
unittest.makeSuite(MyTestCase)... in fact it's used frequently in the
python standard library tests.

And I don't see a replacement for this use case: given a subclass of
TestCase, conveniently turn all its test* methods into a suite. How are
we supposed to do that now?

Either makeSuite should be documented, or a suitable replacement should
be provided and documented.

--
assignee: georg.brandl
components: Documentation
messages: 65986
nosy: georg.brandl, slinkp
severity: normal
status: open
title: unittest.makeSuite undocumented and "obsolete" - but what to use instead?
versions: Python 2.4, Python 2.5

__
Tracker <[EMAIL PROTECTED]>

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



[issue2721] unittest.makeSuite undocumented and "obsolete" - but what to use instead?

2008-04-29 Thread Benjamin Peterson

Changes by Benjamin Peterson <[EMAIL PROTECTED]>:


--
nosy: +purcell

__
Tracker <[EMAIL PROTECTED]>

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



[issue1856] shutdown (exit) can hang or segfault with daemon threads running

2008-04-29 Thread Lars Immisch

Changes by Lars Immisch <[EMAIL PROTECTED]>:


--
nosy: +larsimmisch

__
Tracker <[EMAIL PROTECTED]>

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



[issue2722] os.getcwd fails for long path names on linux

2008-04-29 Thread Jean-Paul Calderone

New submission from Jean-Paul Calderone <[EMAIL PROTECTED]>:

$ python -c "print len('`pwd`'); import os; print os.getcwd()"
1174
Traceback (most recent call last):
  File "", line 1, in ?
OSError: [Errno 34] Numerical result out of range
$

The getcwd man page documents the ERANGE failure and suggests that the
calling application allocate a larger buffer and try again.

--
components: Library (Lib)
messages: 65987
nosy: exarkun
severity: normal
status: open
title: os.getcwd fails for long path names on linux
versions: Python 2.4

__
Tracker <[EMAIL PROTECTED]>

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



[issue2526] str.format() :n format does not appear to work for int and float

2008-04-29 Thread Eric Smith

Eric Smith <[EMAIL PROTECTED]> added the comment:

Committed fix in r62586.

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



[issue2723] Truncate __len__() at sys.maxsize

2008-04-29 Thread Alexander Belopolsky

New submission from Alexander Belopolsky <[EMAIL PROTECTED]>:

On Tue, Apr 29, 2008 at 10:36 PM, Guido van Rossum <[EMAIL PROTECTED]> 
wrote:
..
>  Let's also fix __len__() so that it returns sys.{maxint,maxsize} when
>  the result doesn't fit in a Py_ssize_t.

http://mail.python.org/pipermail/python-3000/2008-April/013343.html

With attached patch given

class x:
def __len__(self):
return 2**100

len(x()) and len(range(2**100)) will return sys.maxsize.

--
components: Interpreter Core
files: len.diff
keywords: patch
messages: 65989
nosy: belopolsky
severity: normal
status: open
title: Truncate __len__() at sys.maxsize
versions: Python 3.0
Added file: http://bugs.python.org/file10143/len.diff

__
Tracker <[EMAIL PROTECTED]>

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



[issue2723] Truncate __len__() at sys.maxsize

2008-04-29 Thread Alexander Belopolsky

Changes by Alexander Belopolsky <[EMAIL PROTECTED]>:


--
type:  -> feature request

__
Tracker <[EMAIL PROTECTED]>

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



[issue2601] [regression] reading from a urllib2 file descriptor happens byte-at-a-time

2008-04-29 Thread Mark Hammond

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

For those trying to follow along at home: best I can tell we have 3
other issues on this: #1092502 and #1389051 are dupes of an initial bug,
but the fix for those bugs caused regressions reported in this bug and
in #2632.  To try and reduce confusion I'm closing this as a dupe of
#2632 which has a patch for review.

--
nosy: +mhammond
superseder:  -> performance problem in socket._fileobject.read

__
Tracker <[EMAIL PROTECTED]>

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



[issue2601] [regression] reading from a urllib2 file descriptor happens byte-at-a-time

2008-04-29 Thread Mark Hammond

Changes by Mark Hammond <[EMAIL PROTECTED]>:


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



[issue2601] [regression] reading from a urllib2 file descriptor happens byte-at-a-time

2008-04-29 Thread Mark Hammond

Changes by Mark Hammond <[EMAIL PROTECTED]>:


--
resolution:  -> duplicate

__
Tracker <[EMAIL PROTECTED]>

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



[issue1092502] Memory leak in socket.py on Mac OS X

2008-04-29 Thread Mark Hammond

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

FYI, #2632 is tracking a regression caused by this change.

--
nosy: +mhammond

_
Tracker <[EMAIL PROTECTED]>

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



[issue2719] Backport next()

2008-04-29 Thread Raymond Hettinger

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

ISTM, the only value added by next(g) is that it replaces g.next() with 
a more conventional spelling, g.__next__().  Since 2.6 still has g.next
(),I don't see how this backport adds value.  It does however create a 
second way to do it that will be confusing to some remaining in the 2.x 
world.  I think we should avoid double spellings in 2.6 except in cases 
where the 2-to-3 converter would need help.

--
nosy: +rhettinger

__
Tracker <[EMAIL PROTECTED]>

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



[issue2719] Backport next()

2008-04-29 Thread Georg Brandl

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

IMO having next() in 2.6 helps since if you use it consistently you
don't have to care about calling .next() or .__next__().

Also, I don't see how this is different from having e.g. reduce() and
functools.reduce() in 2.6.

__
Tracker <[EMAIL PROTECTED]>

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



[issue2723] Truncate __len__() at sys.maxsize

2008-04-29 Thread Raymond Hettinger

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

Wouldn't it be better to raise OverflowError or somesuch?

--
nosy: +rhettinger

__
Tracker <[EMAIL PROTECTED]>

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



[issue2719] Backport next()

2008-04-29 Thread Raymond Hettinger

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

The problem is with the "if you use it consistently" premise.  That 
will not hold in an environment with legacy code, multiple programmers, 
lots of code in ASPN recipes and published materials, and third-party 
modules.  A patch like this dooms Py2.6 programmers to seeing both of 
these forms intermixed throughout the code base.  This is *not* a win.

__
Tracker <[EMAIL PROTECTED]>

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