[issue6944] socket.getnameinfo raises SystemError on bogus input

2009-09-18 Thread Marien Zwart

Marien Zwart  added the comment:

Attaching a less broken patch, after Taggnostr pointed out on irc that
the code I removed is not actually dead. I really don't know why I
thought it was. I did take the opportunity to make it more obvious what
that code is actually checking for.

--
Added file: http://bugs.python.org/file14930/diff.patch

___
Python tracker 

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



[issue6944] socket.getnameinfo raises SystemError on bogus input

2009-09-18 Thread Marien Zwart

New submission from Marien Zwart :

socket.getnameinfo passes a PyObject* to PyArg_ParseTuple without
checking if it's a tuple first. That means it raises SystemError on
invalid input where TypeError would make more sense:

>>> socket.getnameinfo('localhost', 0)
SystemError: new style getargs format but argument is not a tuple

An explicit check for TypeError seems like the best way to fix this.
Patch (against Python 3.1.1, but it looked like this applies easily to
other branches too) attached, which also removes a bit of dead code.

--
components: Extension Modules
files: diff.patch
keywords: patch
messages: 92858
nosy: marienz
severity: normal
status: open
title: socket.getnameinfo raises SystemError on bogus input
type: behavior
versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2
Added file: http://bugs.python.org/file14929/diff.patch

___
Python tracker 

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



[issue6943] setup.py fails to find headers of system libffi

2009-09-18 Thread Arfrever Frehtes Taifersar Arahesis

Arfrever Frehtes Taifersar Arahesis  added the comment:

It seems that a part of my comment has been truncated.
I meant `pkg-config libffi --cflags` command.

--

___
Python tracker 

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



[issue6943] setup.py fails to find headers of system libffi

2009-09-18 Thread Arfrever Frehtes Taifersar Arahesis

New submission from Arfrever Frehtes Taifersar Arahesis 
:

I use --with-system-ffi option, but setup.py fails to find headers of
system libffi which are placed outside standard include directory,
which causes using of internal copy of libffi.

In Gentoo, headers of libffi-3.0.8 are installed into
/usr/lib/libffi-3.0.8/include directory, because their content is
specific to given architecture.

I'm attaching the patch which cause using of `pkg-config libffi --
(Unfortunately subprocess module cannot be used in setup.py, so I'm
using os.popen().)

--
components: Build
files: python-fix_search_for_libffi_headers.patch
keywords: patch
messages: 92856
nosy: Arfrever, loewis
severity: normal
status: open
title: setup.py fails to find headers of system libffi
versions: Python 2.5, Python 2.6, Python 2.7, Python 3.0, Python 3.1, Python 3.2
Added file: 
http://bugs.python.org/file14928/python-fix_search_for_libffi_headers.patch

___
Python tracker 

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



[issue6743] pprint.pprint should support no objects to print blank lines & allow args

2009-09-18 Thread Éric Araujo

Éric Araujo  added the comment:

And use keyword-only arguments :)

--
nosy: +Merwok

___
Python tracker 

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



[issue1602] windows console doesn't print utf8 (Py30a2)

2009-09-18 Thread Christos Georgi ou

Χρήστος Γεωργίου (Christos Georgiou)  added the 
comment:

Another note:
if one creates a dummy Stream object (having a softspace attribute and a
write method that writes using os.write, as in
http://stackoverflow.com/questions/878972/windows-cmd-encoding-change-causes-python-crash/1432462#1432462
) to replace sys.stdout and sys.stderr, then writes occur correctly,
without issues. Pre-requisites:
chcp 65001, Lucida Console font and cp65001 as an alias for UTF-8 in
encodings/aliases.py
This is Python 2.5.4 on Windows.

--

___
Python tracker 

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



[issue6942] email.generator.Generator memory consumption

2009-09-18 Thread Ross Patterson

New submission from Ross Patterson :

Due to repeated use of StringIO as a way to "look ahead" into subparts 
while checking that multipart boundaries are unique, memory consumption 
during email.generator.Generator.flatten() can be up to 3 times the 
original message size.

I implemented a subclass of email.generator.Generator that works around 
this using email.message.Message.walk() to check message headers and 
string (final) payloads for the boundary without duplicating their 
contents into a StringIO.

It assumes that the boundary only ever might be duplicated in a single 
part's headers or in a single part's payload when that part's payload is 
a string.  IOW, it assumes that the boundary will not be duplicated by 
some combination of all the parts' and recursive subparts' headers and 
string payloads.

If this assumption is safe, then this implementation should work.  If 
this assumption is not safe, then perhaps a different boundary format 
can be used which will make this assumption safe?

You can find my implementation at http://gitorious.org/rpatterson-
imappipe/rpatterson-
imappipe/blobs/master/rpatterson/imappipe/generator.py

--
components: Library (Lib)
messages: 92853
nosy: rpatterson
severity: normal
status: open
title: email.generator.Generator memory consumption
type: resource usage
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



[issue6925] Doc for locals and vars

2009-09-18 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

I disagree with calling only nonlocal variables but not module variables
'free'. As I quoted from Wikipedia, that restrictive definition is not
agree on by all at all.  From The Free On-line Dictionary of Computing,
"1. A variable referred to in a function, which is not an argument of
the function. In lambda-calculus, x is a bound variable in the term M =
\ x . T, and a free variable of T. We say x is bound in M and free in T.
If T contains a subterm \ x . U then x is rebound in this term. This
nested, inner binding of x is said to "shadow" the outer binding.
Occurrences of x in U are free occurrences of the new x.
Variables bound at the top level of a program are technically free
variables within the terms to which they are bound but are often treated
specially because they can be compiled as fixed addresses. Similarly, an
identifier bound to a recursive function is also technically a free
variable within its own body but is treated specially."

Python does not treat top-level or recursive function names specially in
the way meant above.

I used 'nonlocal' specifically because the behavior of locals() seemed
by my testing to be concordant with the behavior of the 'nonlocal'
statement, which rejects the globals that locals does not print.  What
do you mean by 'clash'?

--

___
Python tracker 

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



[issue6941] Socket error when launching IDL

2009-09-18 Thread Brett Cannon

Brett Cannon  added the comment:

Can you copy what is being printed out to a text file or into a comment on 
this issue? Also, what OS is this on? Otherwise we have nothing to work 
off of.

I also deleted whatever exe you uploaded as that will not help with 
debugging at all.

--
nosy: +brett.cannon
title: Help -> Socket error when launching IDL

___
Python tracker 

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



[issue6941] Help

2009-09-18 Thread Brett Cannon

Changes by Brett Cannon :


Removed file: http://bugs.python.org/file14926/python_icon.exe

___
Python tracker 

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



[issue6885] pdb documentation shows running as script using "python" not "python3"

2009-09-18 Thread Georg Brandl

Georg Brandl  added the comment:

I assume the poor Windows users can figure out what they need to do :)

--

___
Python tracker 

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



[issue6885] pdb documentation shows running as script using "python" not "python3"

2009-09-18 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

On Windows, 3.x has so far been installed as python.exe, not
python3.exe, so this change is not correct for Windows users. So please
consider reverting this until there is a consistent change across platforms.

--
nosy: +tjreedy

___
Python tracker 

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



[issue6930] [PATCH] PyUnicode_DecodeUTF16 docs wrong (byteorder param)

2009-09-18 Thread Georg Brandl

Georg Brandl  added the comment:

I applied a slightly different patch in r74933.

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



[issue6925] Doc for locals and vars

2009-09-18 Thread Georg Brandl

Georg Brandl  added the comment:

Should be fixed now in r74930.  I kept "free variables" because this is
the correct term, while "nonlocals" clashes with the "nonlocal"
statement in 3.x.

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



[issue6300] encode and decode should accept 'errors' as a keyword argument

2009-09-18 Thread Benjamin Peterson

Benjamin Peterson  added the comment:

Applied in r74929. Thanks!

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



[issue6925] Doc for locals and vars

2009-09-18 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

OK. Same is true of vars() also. So I suggest that current locals()
entry be changed to

"Update and return a dictionary representing the current local symbol
table. In function blocks, this includes nonlocal names.

Note
The contents of this dictionary should not be modified; changes may not
affect the values of local (or nonlocal) variables used by the interpreter."

and vars() first sentence be simplified to "Without arguments, same as
locals()." to follow the DRY principle.

--

___
Python tracker 

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



[issue3366] Add gamma function, error functions and other C99 math.h functions to math module

2009-09-18 Thread Mark Dickinson

Mark Dickinson  added the comment:

Here's a more careful patch for just the gamma function.  It's a fairly 
direct implementation of Lanczos' formula, with the choice of parameters 
(N=13, g=6.024680040776729583740234375) taken from the Boost library.  In 
testing of random values and known difficult values, it's consistently 
giving errors of < 5ulps across its domain.  This is considerably better 
than the error from the exp(lgamma(x)) method, since the exp call alone 
can easily introduce errors of hundreds of ulps for larger values of x.

I'd appreciate any feedback, especially if anyone has the chance to test 
on Windows:  I'd like to know whether I got the build modifications right.

This patch *doesn't* use the system gamma function, even when available.  
At least on OS X 10.5.8, the supplied gamma function has pretty terrible 
accuracy, and some severe numerical problems near negative integers.  I 
don't imagine Linux is much better.

Once this is working, I'll concentrate on lgamma.  Then erf and erfc.

--
Added file: http://bugs.python.org/file14927/gamma3.patch

___
Python tracker 

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



[issue6729] Add support for ssize_t

2009-09-18 Thread Thomas Heller

Thomas Heller  added the comment:

Find where c_size_t is defined: in Lib/ctypes/__init__.py

--

___
Python tracker 

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



[issue6613] ctypes.PyThreadState_SetAsyncExc does not work on linux 64bit machines

2009-09-18 Thread Thomas Heller

Thomas Heller  added the comment:

I guess this is a bug in your code, as mentioned in my last comment, so
closing as invalid.

--
resolution:  -> invalid
status: open -> closed

___
Python tracker 

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



[issue4606] Passing 'None' if argtype is set to POINTER(...) doesn't always result in NULL

2009-09-18 Thread Thomas Heller

Thomas Heller  added the comment:

Comitted as

trunk: 74921, py3k: 74922, release31-maint: 74923, release26-maint: 74924

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



[issue6941] Help

2009-09-18 Thread Joshua Purcell

New submission from Joshua Purcell :

My IDLE (Python GUI) Will NOT open It says socket error which is really 
annoying me because it doesnt open IDLE (AT ALL)

--
components: +IDLE
type:  -> performance
Added file: http://bugs.python.org/file14926/python_icon.exe

___
Python tracker 

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



[issue6300] encode and decode should accept 'errors' as a keyword argument

2009-09-18 Thread Marc-Andre Lemburg

Marc-Andre Lemburg  added the comment:

Jeff Bradberry wrote:
> 
> Jeff Bradberry  added the comment:
> 
> Ok, fixed.  I am kind of vague, though, on the usefulness of str.encode
> and unicode.decode.

codecs can work on any combination of types. Here's an example of
a codec that accepts str and unicode and returns str:

'313233'
>>> u'123'.encode('hex')
'313233'
>>> '313233'.decode('hex')
'123'
>>> u'313233'.decode('hex')
'123'

In 3.1 the method don't support this anymore, since they are more
strict w/r to type checking.

--

___
Python tracker 

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



[issue6941] Help

2009-09-18 Thread Joshua Purcell

Changes by Joshua Purcell :


--
nosy: 08jpurcell
severity: normal
status: open
title: Help
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



[issue5042] Structure sub-subclass does not initialize with base class positional arguments

2009-09-18 Thread Thomas Heller

Changes by Thomas Heller :


--
resolution:  -> fixed
status: open -> closed
versions:  -Python 2.5

___
Python tracker 

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



[issue5042] Structure sub-subclass does not initialize with base class positional arguments

2009-09-18 Thread Thomas Heller

Thomas Heller  added the comment:

I've commited a slightly changed patch plus a test.

trunk: 74917, py3k: 74918, release26-maint: 74919, release31-maint: 74920.

--

___
Python tracker 

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



[issue6300] encode and decode should accept 'errors' as a keyword argument

2009-09-18 Thread Jeff Bradberry

Jeff Bradberry  added the comment:

Ok, fixed.  I am kind of vague, though, on the usefulness of str.encode
and unicode.decode.

--
Added file: http://bugs.python.org/file14925/python27.patch

___
Python tracker 

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



[issue6940] cannot compute sizeof wchar_t on OS X 10.5.7, Python 2.6.2

2009-09-18 Thread Rajarshi

Rajarshi  added the comment:

Thanks for the pointer. Indeed, clearing PATH to the minimal set of
paths allows configure to complete.

--
status: open -> closed

___
Python tracker 

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



[issue6940] cannot compute sizeof wchar_t on OS X 10.5.7, Python 2.6.2

2009-09-18 Thread Ned Deily

Ned Deily  added the comment:

Works for me (2.6.2 tarball, 10.5.8 PPC, gcc build 5493).

Check configure.log and search for the failing "wchar_t" section.  Also, 
try stripping your $PATH down to bare essentials, removing /opt/local/bin 
(MacPorts), /sw/bin (Fink), /usr/local/bin, etc.; it's possible you're 
picking up an unexpected version of one of the build chain tools.

--
assignee:  -> ronaldoussoren
components: +Macintosh
nosy: +ned.deily, ronaldoussoren

___
Python tracker 

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



[issue6713] Integer & Long types: Performance improvement of 1.6x to 2x for base 10 conversions

2009-09-18 Thread Mark Dickinson

Mark Dickinson  added the comment:

Here's a patch for trunk's Objects/intobject.c.  With this patch, I'm 
seeing more than 100% speed increases for str(sys.maxint) on OS X 10.6 
(64-bit) and more modest speed gains on OS X 10.5 (32-bit).

I'm leaving out the two-digits-at-a-time optimization.  It *does* give a 
small speed gain on my machine, but IMO it's not enough of a gain to 
justify the extra code complexity;  it also seems like one of those 
optimizations whose value might be highly machine/compiler-dependent.

I'll apply this in a few days' time.

--
Added file: http://bugs.python.org/file14924/int_decimal_conversion_trunk.patch

___
Python tracker 

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



[issue6939] shadows around the io truncate() semantics

2009-09-18 Thread Pascal Chambon

Pascal Chambon  added the comment:

Well, I guess it deserve discussion on the pydev mailing lits, that's
imo a rather important point, to be documented precisely.

Concerning the padding, I guess the semantic doesn't change between the
io module and the old file type, i.e :

file.truncate([size])¶
Truncate the file’s size. If the optional size argument is present,
the file is truncated to (at most) that size. The size defaults to the
current position. The current file position is not changed. Note that if
a specified size exceeds the file’s current size, the result is
platform-dependent: possibilities include that the file may remain
unchanged, increase to the specified size as if zero-filled, or increase
to the specified size with undefined new content. Availability: Windows,
many Unix variants.

Having platform-dependent semantics for a so important type is anyway
dangerous, I feel. The io module should be rock-solid, with very deeply
documented semantics, and implementations that force platforms to
conform to these specifications. Eg. I've noticed that all io.FileIO
methods raised IOErrors in case of problem, except in one case (wrapping
a bad file decsriptor) where it's OSError - that little thing might make
big programs crash in an ugly way, if they only caught IOError.
I'm currently working on a cross-platform (linux, mac, windows at least)
FileIO type, with very strict semantics and extended abilities (file
range shared and exclusive locking, with timeouts) ; even though it'll
initially be slower than _fileio (most of it is in pure python), maybe
it might solve most of these io module problems. I'll keep people informed.

--

___
Python tracker 

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



[issue3890] ssl.SSLSocket.recv() implementation may not work with non-blocking sockets

2009-09-18 Thread Giampaolo Rodola'

Giampaolo Rodola'  added the comment:

The patch looks good as it just removes the while loop.
This is a high priority issue and should be fixed as soon as possible, 
imho, as it makes impossible to use ssl module with non blocking sockets.

--

___
Python tracker 

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



[issue6508] expose setresuid

2009-09-18 Thread Travis H.

Travis H.  added the comment:

On Fri, Sep 18, 2009 at 07:44:56AM +, Martin v. L??wis wrote:
> 
> Your patch looks good (except that in getresuid, you seem to be missing 
> return). I have no clue why it doesn't work; I'll see whether I can try it 
> out on Linux within the next few weeks.

I am testing it out now on a more up-to-date machine.

> The one puzzling detail is that you don't include a patch to 
> pyconfig.h.in: did you run autoheader?

No, I did not - it has been a long time since I was familiar with
autotools - and that was why there was no access to these functions
when I compiled before.

I've now got a complete, tested patch up on bugs.python.org
-- 
Obama Nation | My emails do not have attachments; it's a digital signature
that your mail program doesn't understand. | 
http://www.subspacefield.org/~travis/ 
If you are a spammer, please email j...@subspacefield.org to get blacklisted.

--

___
Python tracker 

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



[issue6508] expose setresuid

2009-09-18 Thread Travis H.

Travis H.  added the comment:

This patch fixes a number of typos in the original and, to my knowledge,
is now complete.

I have tested this manually and confirmed that it works.  I would start
as root, setresuid/gid to some non-root uid/gids, getresuid/gid to test
those functions, and follow it up with os.system("id") to check using an
outside utility.

--
Added file: http://bugs.python.org/file14923/res.patch

___
Python tracker 

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



[issue3890] ssl.SSLSocket.recv() implementation may not work with non-blocking sockets

2009-09-18 Thread Tom

Tom  added the comment:

I have just encountered this bug on Python 2.6.2 on Windows.  I hope the
fix makes it into 2.6.3.  Thanks for the patch.

--
nosy: +qwavel

___
Python tracker 

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



[issue6713] Integer & Long types: Performance improvement of 1.6x to 2x for base 10 conversions

2009-09-18 Thread Mark Dickinson

Mark Dickinson  added the comment:

The now unused arbitrary base conversion was removed in r74910 (py3k).  
I'm deliberately going to leave it in in the trunk, just in case there's 
third party code that's using _PyLong_Format.  (There shouldn't be, given 
the '_Py' prefix, but you never know.)

--

___
Python tracker 

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



[issue6939] shadows around the io truncate() semantics

2009-09-18 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

I can't tell you why it was decided to behave like this. Perhaps it was
felt that, since FileIO is low-level (lower than the file object in
2.x), it shouldn't have to remember and restore the old file position.
That argument wouldn't apply to BufferedWriter, though.

I'm afraid I don't know anything about the padding differences myself.
If you give us more precisions on the subject, we will be able to
include them in the documentation.

--
assignee:  -> pitrou
components: +Documentation
nosy: +pitrou
versions:  -Python 3.0

___
Python tracker 

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



[issue6940] cannot compute sizeof wchar_t on OS X 10.5.7, Python 2.6.2

2009-09-18 Thread Rajarshi

New submission from Rajarshi :

OS 10.5.7, Python 2.6.2 sources. 

When I execute:

/configure --enable-framework=/Library/Frameworks \
--enable-universalsdk=/ \
MACOSX_DEPLOYMENT_TARGET=10.5 \
--with-universal-archs=all \
--with-readline-dir=/usr/local

configure fails with the error
checking size of wchar_t... configure: error: cannot compute sizeof
(wchar_t)

However, if I replace all with 64-bit, it works fine. I note that this
issue was reported for OS X 10.4 and fixed. But this still happens

gcc information is

Using built-in specs.
Target: i686-apple-darwin9
Configured with: /var/tmp/gcc/gcc-5490~1/src/configure
--disable-checking -enable-werror --prefix=/usr --mandir=/share/man
--enable-languages=c,objc,c++,obj-c++
--program-transform-name=/^[cg][^.-]*$/s/$/-4.0/
--with-gxx-include-dir=/include/c++/4.0.0 --with-slibdir=/usr/lib
--build=i686-apple-darwin9 --with-arch=apple --with-tune=generic
--host=i686-apple-darwin9 --target=i686-apple-darwin9
Thread model: posix
gcc version 4.0.1 (Apple Inc. build 5490)

--
components: Build
messages: 92824
nosy: rajarshi
severity: normal
status: open
title: cannot compute sizeof wchar_t on OS X 10.5.7, Python 2.6.2
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



[issue6937] multiprocessing lock on OS X Snow Leopard dumps core

2009-09-18 Thread Jesse Noller

Jesse Noller  added the comment:

Ronald, could you email me the incantation for a full-on 64 bit build, 
I'll double check this on 26-maint. I just forget the magic build flags 
all the time.

--

___
Python tracker 

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



[issue6882] uuid creates zombies

2009-09-18 Thread Eric Smith

Eric Smith  added the comment:

I checked in a slightly modified version of Marcin's patch in py3k
(r74907) and release31-maint (r74909). I modified the patch to keep the
same style as the rest of the module.

I'll now work on back-porting all of the try/finally code to trunk. That
includes this change as well as the ones made in prior checkins (like
r59477). I'll probably not back-port that to 2.6, since it doesn't
actually fix any bugs, it's just an effort to keep the code in sync and
be "more correct".

--
stage: patch review -> committed/rejected

___
Python tracker 

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



[issue6937] multiprocessing lock on OS X Snow Leopard dumps core

2009-09-18 Thread Ronald Oussoren

Changes by Ronald Oussoren :


--
assignee: jnoller -> ronaldoussoren

___
Python tracker 

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



[issue6937] multiprocessing lock on OS X Snow Leopard dumps core

2009-09-18 Thread Ronald Oussoren

Ronald Oussoren  added the comment:

Jesse: Apple can fix their own copy of python (which is 2.6.1), I was more 
worried about the upcoming 2.6.3 release.

I'll file a bug with Apple and poke their Python maintainer once 2.6.3  is 
released.

--

___
Python tracker 

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



[issue4111] Add DTrace probes

2009-09-18 Thread Dave Malcolm

Changes by Dave Malcolm :


--
nosy: +dmalcolm

___
Python tracker 

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



[issue6939] shadows around the io truncate() semantics

2009-09-18 Thread Pascal Chambon

New submission from Pascal Chambon :

Hello

I'm having trouble around the behaviour of the io module's truncate
methods, in py3k. If I remember well, under unix and older versions of
Python (with other file types), truncate never move the fiel pointer
(and had to fake that behaviour under windows as well, by
saving/restoring the file pointer).

However, I see nothing in the documentation of the io module about that,
and studying the _fileio.c code, it seems that now the file pointer is
(under all OS) moved to the truncation point, and left there.

Maybe it requires discusions on the mailing list, but personally I think
that the common unix behaviour (letting the file pointer untouched)
would be better for everyone, and that the doc should claim it.

Also, additional notes about the behaviour of that truncation (reminding
people that on some OS, the padding is zero-filled, on others it's
not...) would be great.

Current doc of io in py3k :
http://docs.python.org/py3k/library/io.html#io.IOBase.truncate
truncate(size=None)
Truncate the file to at most size bytes. size defaults to the
current file position, as returned by tell().

Cheers
Pascal

--
components: IO
messages: 92822
nosy: pakal
severity: normal
status: open
title: shadows around the io truncate() semantics
type: behavior
versions: Python 2.6, Python 2.7, Python 3.0, Python 3.1, Python 3.2

___
Python tracker 

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



[issue6937] multiprocessing lock on OS X Snow Leopard dumps core

2009-09-18 Thread Jesse Noller

Jesse Noller  added the comment:

AFAIK: Tim is correct. Unfortunately, this has already been fixed - as 
much as it kills me, there's not much I can do to fix this for Snow 
Leopard.

--

___
Python tracker 

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



[issue6938] Incorrect multiprocessing log string in managers.py (python 2.6.2)

2009-09-18 Thread Georg Brandl

Georg Brandl  added the comment:

Fixed in r74903; I used %r as the format code to match the formatting in
create().

--
nosy: +georg.brandl
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



[issue6905] inspect.getargspec(print) fails

2009-09-18 Thread Georg Brandl

Georg Brandl  added the comment:

OK, that is reasonable. I changed this and several other same-style
errors in r74901.

--

___
Python tracker 

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



[issue6938] Incorrect multiprocessing log string in managers.py (python 2.6.2)

2009-09-18 Thread Zhang Cong

New submission from Zhang Cong :

There is an issue in multiprocessing library.
Lib/multiprocessing/managers.py:413:

util.debug('disposing of obj with id %d', ident)

It is '%d' here, but 'ident' is a string.

This always cause an TypeError from logging module once enable logging
on multiprocessing.

Patch is attached to fix the issue.

--
components: Library (Lib)
files: managers-log.patch
keywords: patch
messages: 92818
nosy: ftofficer
severity: normal
status: open
title: Incorrect multiprocessing log string in managers.py (python 2.6.2)
type: behavior
versions: Python 2.6
Added file: http://bugs.python.org/file14922/managers-log.patch

___
Python tracker 

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



[issue6934] [PATCH] postflight.framework script (from the Mac OS X .dmg installer) fails.

2009-09-18 Thread Ned Deily

Ned Deily  added the comment:

Issue5652 suggests removing the Mac/Tools references here and in trunk.

--
nosy: +ned.deily

___
Python tracker 

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



[issue5042] Structure sub-subclass does not initialize with base class positional arguments

2009-09-18 Thread Thomas Heller

Thomas Heller  added the comment:

> Is that any help?
Not really ;-).

Here is a patch I just wrote - it must still be checked for correctness,
and tests for it must be added.  I hope the comment in the code explains
how it works.  ctypes-structinit.patch

--
keywords: +patch
Added file: http://bugs.python.org/file14921/ctypes-structinit.patch

___
Python tracker 

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



[issue5652] OS X Installer: remove references to Mac/Tools which no longer exists

2009-09-18 Thread Ned Deily

Ned Deily  added the comment:

See also Issue6934 for Python3 fix.

--
assignee:  -> ronaldoussoren
components: +Macintosh

___
Python tracker 

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



[issue6937] multiprocessing lock on OS X Snow Leopard dumps core

2009-09-18 Thread Tim Golden

Tim Golden  added the comment:

Don't know what exact release OS X ships with, but it
looks like you're being bitten by this:

http://bugs.python.org/issue5261

--
nosy: +tim.golden

___
Python tracker 

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



[issue6508] expose setresuid

2009-09-18 Thread Martin v . Löwis

Martin v. Löwis  added the comment:

Your patch looks good (except that in getresuid, you seem to be missing 
return). I have no clue why it doesn't work; I'll see whether I can try it 
out on Linux within the next few weeks.

The one puzzling detail is that you don't include a patch to 
pyconfig.h.in: did you run autoheader?

--

___
Python tracker 

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



[issue6935] Version updates needed in tutorial

2009-09-18 Thread Georg Brandl

Georg Brandl  added the comment:

Fixed in r74897, r74898 (3.1).

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



[issue6936] Import needed to quit Python?

2009-09-18 Thread Georg Brandl

Georg Brandl  added the comment:

And fixed now (I used ``quit()``) in r74896.

--
resolution: works for me -> fixed

___
Python tracker 

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



[issue6936] Import needed to quit Python?

2009-09-18 Thread Georg Brandl

Georg Brandl  added the comment:

They are meant for interactive use only.

--
resolution:  -> works for me
status: open -> closed

___
Python tracker 

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



[issue6925] Doc for locals and vars

2009-09-18 Thread Georg Brandl

Georg Brandl  added the comment:

I'm sorry, I messed up the test.  When "x" is not used in g(), it's of
course *not* a free variable in g.  This is the correct test:

def f():
  x = 1
  def g():
print x
print locals()
  g()
f()

--

___
Python tracker 

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