[issue5404] Cross-compiling Python

2009-03-03 Thread Joshua Kinard

Joshua Kinard ku...@gentoo.org added the comment:

Making progress!

Adapted the cross-2.5.1.patch from Issue #1597850, integrated the %zd
printf fixup patch, and added another cross-compiler check for the
libffi configure bits in setup.py (it'd pass libffi's configure no
--host options, so libffi would compile for the build system, and that's
not good).

Now I'm just trying to figure out why for each extension module, why
CFLAGS gets passed, as far as I can tell, to both the CC and the LD
tools?  I see in the code that distutils doesn't allow one to separate
CC and CXX.  Is the same for CC and LD?  binutils' ld doesn't understand
the same range of flags that gcc does, so for a mips cross-compile case,
you may have the -mabi flag passed.  Gcc understands this, but -m on ld
is to select the output binary, of which 'abi' isn't (obviously) a valid
output type.

Is this to me a distutils limitation I'm hitting?  I've already dug
through the generated Makefile at Python's root and can't pin down
precisely where it invokes ld for each extension, so I'm assuming
setup.py handles this.  However, I don't read python 100%, and some of
the tricks you can do with classes and def's seems weird to me. 
PyBuildExt seems like some of its internal functions call themselves in
a recursive fashion -- right?  I'm also not sure which function is the
actual function call that executes the compiler or the linker.

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



[issue4626] compile() doesn't ignore the source encoding when a string is passed in

2009-03-03 Thread STINNER Victor

STINNER Victor victor.stin...@haypocalc.com added the comment:

 Should this be backported?

It's the r70113 (not the 70112). I see that pitrou backported the fix 
to 3.0.x. I think that it's enough, 2.x doesn't require the fix.

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



[issue5390] Item 'Python x.x.x' in Add/Remove Programs list still lacks an icon

2009-03-03 Thread Retro

Retro vinet...@gmail.com added the comment:

In my Windows Vista registry I only have the second two keys present

1)
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{9cc89170-000b-457d-91f1-53691f85b223}
2)
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{de2f2d9c-53e2-40ee-8209-74da63cb060e}

for which the value of the property DisplayName is

1) DisplayNamePython 2.6.1
2) DisplayNamePython 3.0.1

I don't have the property DisplayIcon for any of those two keys.

I did a complete removal and a reinstall of both the interpreters now,
but I have the same issue and the registry contains the very same two
keys and each of the keys contain only the property DisplayName as before.

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



[issue5404] Cross-compiling Python

2009-03-03 Thread Antoine Pitrou

Changes by Antoine Pitrou pit...@free.fr:


--
nosy: +tarek

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



[issue5396] os.read not handling O_DIRECT flag

2009-03-03 Thread Antoine Pitrou

Changes by Antoine Pitrou pit...@free.fr:


--
priority:  - normal
type: behavior - feature request
versions: +Python 2.7, Python 3.1 -Python 2.6

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



[issue5410] msvcrt bytes cleanup

2009-03-03 Thread Hirokazu Yamamoto

New submission from Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp:

I came from issue5391. Here is quote of Victor's message.

* msvcrt.putch(char), msvcrt.ungetch(char): msvcrt has also:
  - msvcrt.getch()-byte string of 1 byte
  - msvcrt.getwch()-unicode string of 1 character
  - msvcrt.putwch(unicode string of 1 character)
  - msvcrt_ungetwch(unicode string of 1 character)
  Hum, putch(), ungetch(), getch() use inconsistent types 
(unicode/bytes) and should be fixed. Another issue should be open for 
that.

Notes: msvcrt.putwch() accepts string of length  1 and 
msvcrt.ungetwch() doesn't check string length (and so may crash with 
length=0 or length  1?).

And msvcrt.ungetwch() calls _ungetch not _ungetwch. Here is the patch
hopefully fixing these issue. (I cannot test wide version of functions
because VC6 don't have them)

--
components: Extension Modules, Windows
files: py3k_fix_msvcrt.patch
keywords: patch
messages: 83071
nosy: ocean-city
severity: normal
status: open
title: msvcrt bytes cleanup
versions: Python 3.1
Added file: http://bugs.python.org/file13233/py3k_fix_msvcrt.patch

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



[issue5411] add xz compression support to distutils

2009-03-03 Thread Per Øyvind Karlsen

New submission from Per Øyvind Karlsen peroyv...@mandriva.org:

Here's a patch that adds support for xz compression:
http://svn.mandriva.com/cgi-bin/viewvc.cgi/packages/cooker/python/current/SOURCES/Python-2.6.1-distutils-xz-support.patch?view=log

--
assignee: tarek
components: Distutils
messages: 83072
nosy: proyvind, tarek
severity: normal
status: open
title: add xz compression support to distutils
type: feature request
versions: Python 2.6

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



[issue1978] Python(2.5.1) will be crashed when i use _ssl module in multi-threads environment in linux.

2009-03-03 Thread andrej

andrej andrej.filip...@ijs.si added the comment:

Is there a reason why this patch has not been implemented in the
official release (2.5.4)? I am having plenty of troubles using it in a
similar program.

--
nosy: +andrej

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



[issue4459] bdist_rpm should enable --fix-python by default

2009-03-03 Thread Akira Kitada

Changes by Akira Kitada akit...@gmail.com:


--
title: bdist_rpm assumes python - bdist_rpm should enable --fix-python by 
default

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



[issue5404] Cross-compiling Python

2009-03-03 Thread Roumen Petrov

Roumen Petrov bugtr...@roumenpetrov.info added the comment:

Joshua,
may be you need patch from Issue4010 to pass LDFLAGS to distutils.
Another issue4305 - it is for mipsel.

About cross compilation - yes it is Python flaw. For past ten years the
progress is near to zero.

About you problem - #error LONG_BIT definition appears
wrong for platform ... ( posted in another issue ) - please attach you
config.log .

Also Python 2.5 branch is closed (I guess even for security patches) and
for 2.6 I guess new features are not acceptable.

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



[issue5409] ConfigParser getint/float/boolean methods broken

2009-03-03 Thread Raghuram Devarakonda

Changes by Raghuram Devarakonda draghu...@gmail.com:


--
resolution:  - invalid
status: open - closed

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



[issue5412] extend configparser to support [] syntax

2009-03-03 Thread Jeff Kaufman

New submission from Jeff Kaufman jkauf...@bbn.com:

This is a patch against the configparser in the cvs version of 3.1 to
support [] notation:

 import configparser_patched
 config = configparser_patched.SafeConfigParser()
 config.add_section(spam)
 config[spam, eggs] = yummy
 config[spam, eggs]
'yummy'
 del config[spam, eggs]
 

The functions are just syntactic sugar for the simple forms of get,
set, and remove_option.

--
components: Library (Lib)
files: configparser.patch
keywords: patch
messages: 83075
nosy: jkaufman
severity: normal
status: open
title: extend configparser to support [] syntax
type: feature request
versions: Python 3.1
Added file: http://bugs.python.org/file13234/configparser.patch

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



[issue1294959] Problems with /usr/lib64 builds.

2009-03-03 Thread jan matejek

Changes by jan matejek jmate...@suse.cz:


--
nosy: +matejcik

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



[issue858809] Use directories from configure rather than hardcoded

2009-03-03 Thread jan matejek

Changes by jan matejek jmate...@suse.cz:


--
nosy: +matejcik

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



[issue858809] Use directories from configure rather than hardcoded

2009-03-03 Thread jan matejek

jan matejek jmate...@suse.cz added the comment:

well, seeing as redesign of distutils probably won't happen anytime soon...
why don't we fix the obvious bug (broken configure) now and redesign
distutils later?

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



[issue858809] Use directories from configure rather than hardcoded

2009-03-03 Thread jan matejek

jan matejek jmate...@suse.cz added the comment:

...the patch is absolutely trivial, doesn't have any deep consequences
and applies cleanly to head and all branches i know of.

...i wonder if the patch-fasttracking offer still applies...

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



[issue1978] Python(2.5.1) will be crashed when i use _ssl module in multi-threads environment in linux.

2009-03-03 Thread Bill Janssen

Bill Janssen bill.jans...@gmail.com added the comment:

Yes, the reason is that the supplied patch doesn't provide enough test
cases.  This is a big patch; 2.5.x is a bug-fix release; a newer version
of the SSL code is available from PyPI as a work-around; I don't have
time right now to write more tests myself.  All of which means that I
won't look at it more till the patch (or another patch) includes more
test cases.

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



[issue4471] IMAP4 missing support for starttls

2009-03-03 Thread Bill Janssen

Bill Janssen bill.jans...@gmail.com added the comment:

I brought this up on pydotorg, and Barry suggests that someone put
together a Twisted environment which could be downloaded and run locally
on the test machine.  It would provide IMAP and POP servers, perhaps
NNTP and others as well.  Now, all we need is someone to make that
happen :-).

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



[issue1641] asyncore delayed calls feature

2009-03-03 Thread Giampaolo Rodola'

Giampaolo Rodola' billiej...@users.sourceforge.net added the comment:

 Giampaolo, I'm concerned that your patch uses a global 'tasks' list
 which cannot be overriden.  Shouldn't loop() accept an optional task 
 list argument, as it already does with the socket map?  That would keep
 with the spirit of asyncore and make things easier for those of us who
 use multiple event loops in multiple threads.

Personally I can't think of any use case in which that would come
helpful, but perhaps it's because I've never mixed asyncore and threads.
Can't you do that by simply overriding the global list?

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



[issue1641] asyncore delayed calls feature

2009-03-03 Thread Guido van Rossum

Guido van Rossum gu...@python.org added the comment:

The idea is to be able (whether you see a use case or not) to use
different tasks lists simultaneously.  Messing with globals is the worst
possible API for that.  All you need is to add a tasks=None argument to
the loop() signature, rename the global tasks list to (e.g.)
default_tasks, and add this to the top of loop:

if tasks is None:
tasks = default_tasks

similar to what it does for map.  You'd also have to pass the tasks list
to the scheduler() call and the call_later() constructor.  Defaulting to
a global is fine.

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



[issue1641] asyncore delayed calls feature

2009-03-03 Thread Josiah Carlson

Josiah Carlson josiahcarl...@users.sourceforge.net added the comment:

Forest:
To answer your question, yes, that blog post discusses a better variant 
of sched.py , but no, there isn't a bug.  I should probably post it some 
time soon for 2.7/3.1 inclusion.

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



[issue5397] PEP 372: OrderedDict

2009-03-03 Thread Forest Wilkinson

Forest Wilkinson for...@users.sourceforge.net added the comment:

I was just reading the PEP, and caught this bit:

Does OrderedDict.popitem() return a particular key/value pair?
Yes. It pops-off the most recently inserted new key and its
corresponding value.

Okay, but I'd also like a convenient and fast way to find the oldest
key, which I think I'd need for an LRU cache.  I didn't notice one in
the patch.  Perhaps I simply missed something.  Shouldn't popitem()
allow the caller to choose which end from which to pop?

--
nosy: +forest

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



[issue5397] PEP 372: OrderedDict

2009-03-03 Thread Georg Brandl

Georg Brandl ge...@python.org added the comment:

I wonder if, instead of all kinds of new APIs, the _keys list could just
be made public (under a different name of course).

Of course, that makes further optimization or a rewrite in C harder.

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



[issue5397] PEP 372: OrderedDict

2009-03-03 Thread Raymond Hettinger

Raymond Hettinger rhettin...@users.sourceforge.net added the comment:

The internal data structure *must* remain private so that we can build a
C replacement or switch to one of the other possible algorithms.

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



[issue2459] speedup for / while / if with better bytecode

2009-03-03 Thread Jeffrey Yasskin

Jeffrey Yasskin jyass...@gmail.com added the comment:

Hold off on reviewing this. There's one bug around the peepholer not
turning itself off when line numbers skip by more than 127, and another
around the traceback generator still assuming line numbers are unsigned.
I'll post another patch when those are fixed and tested. I may not get
to it for a day or two, so someone else is welcome to update the patch
instead. :)

--
assignee: pitrou - jyasskin

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



[issue5397] PEP 372: OrderedDict

2009-03-03 Thread Georg Brandl

Georg Brandl ge...@python.org added the comment:

 The internal data structure *must* remain private so that we can build a
 C replacement or switch to one of the other possible algorithms.

Even then the keys list could be offered as a property.

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



[issue5397] PEP 372: OrderedDict

2009-03-03 Thread Raymond Hettinger

Raymond Hettinger rhettin...@users.sourceforge.net added the comment:

Forest, I've taken another look at what's involved and am inclined to
accept the idea.  It can be done without mucking-up the regular dict API
and without precluding any of the other possible underlying algorithms.
 I like that it supports an entire new categoy of use cases with only a
trivial, easily-understood API extension.  Patch is attached.

Added file: http://bugs.python.org/file13235/popoldest.diff

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



[issue5397] PEP 372: OrderedDict

2009-03-03 Thread Raymond Hettinger

Raymond Hettinger rhettin...@users.sourceforge.net added the comment:

Forest, for your use case I recommend copying the code to a new class
and replacing the _keys list with a deque so that you can efficiently
pop from the other end.

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



[issue5397] PEP 372: OrderedDict

2009-03-03 Thread Forest Wilkinson

Forest Wilkinson for...@users.sourceforge.net added the comment:

 Shouldn't popitem() allow the caller to choose which end from
 which to pop?

Thinking it through a bit more, and LRU cache would actually need to
access the oldest item without necessarily removing it.  Besides,
popitem() should probably retain the signature of dict.popitem().  I
think I'll take this matter to python-dev.

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



[issue5397] PEP 372: OrderedDict

2009-03-03 Thread Raymond Hettinger

Changes by Raymond Hettinger rhettin...@users.sourceforge.net:


Removed file: http://bugs.python.org/file13221/od4.diff

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



[issue5397] PEP 372: OrderedDict

2009-03-03 Thread Raymond Hettinger

Changes by Raymond Hettinger rhettin...@users.sourceforge.net:


Removed file: http://bugs.python.org/file13228/od5.diff

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



[issue5397] PEP 372: OrderedDict

2009-03-03 Thread Raymond Hettinger

Changes by Raymond Hettinger rhettin...@users.sourceforge.net:


Removed file: http://bugs.python.org/file13229/od6.diff

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



[issue5397] PEP 372: OrderedDict

2009-03-03 Thread Armin Ronacher

Armin Ronacher armin.ronac...@active-4.com added the comment:

Please no.  We just decided to *not* extend the API.  The PEP originally
had a well designed list of dict API extensions that already provided
exactly that.  If we really want to provide access to that, we can roll
back to where we came from.

I don't think implementing an LRUCache on an ordered dict is a good
idea.  Especially because LRU caches are a shared resource and should be
thread safe because of that.  Which the ordered dict is not.

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



[issue5397] PEP 372: OrderedDict

2009-03-03 Thread Armin Ronacher

Armin Ronacher armin.ronac...@active-4.com added the comment:

Please no.  We just decided to *not* extend the API.  The PEP originally
had a well designed list of dict API extensions that already provided
exactly that.  If we really want to provide access to that, we can roll
back to where we came from.

I don't think implementing an LRUCache on an ordered dict is a good
idea.  Especially because LRU caches are a shared resource and should be
thread safe because of that.  Which the ordered dict is not.

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



[issue5397] PEP 372: OrderedDict

2009-03-03 Thread Armin Ronacher

Changes by Armin Ronacher armin.ronac...@active-4.com:


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



[issue1641] asyncore delayed calls feature

2009-03-03 Thread Giampaolo Rodola'

Giampaolo Rodola' billiej...@users.sourceforge.net added the comment:

 You'd also have to pass the tasks list to the scheduler() call and the
 call_later() constructor.  Defaulting to a global is fine.

Unless I change the current API I can't add a new optional arguments to
call_later constructor because it already uses *args **kwargs:

def __init__(self, seconds, target, *args, **kwargs):

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



[issue1641] asyncore delayed calls feature

2009-03-03 Thread Guido van Rossum

Guido van Rossum gu...@python.org added the comment:

You could solve this with a reserved keyword argument _tasks.

Or you could have two different factory methods, call_later_with_tasks()
and call_later().

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



[issue5397] PEP 372: OrderedDict

2009-03-03 Thread Georg Brandl

Georg Brandl ge...@python.org added the comment:

OK, disregard my suggestions, it's better not to have a property that
does almost exactly the same as keys().

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



[issue5397] PEP 372: OrderedDict

2009-03-03 Thread Forest Wilkinson

Forest Wilkinson for...@users.sourceforge.net added the comment:

Agreed here.  Thanks, gents.

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5397
___
___
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-03-03 Thread Hirokazu Yamamoto

Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp added the comment:

This issue is not fixed on windows yet. (test_leaking_fds_on_error fails)
I think attached patch will fix this.

==
ERROR: test_writes_before_communicate (__main__.ProcessTestCase)
--
Traceback (most recent call last):
  File test_subprocess.py, line 398, in test_writes_before_communicate
  File e:\python-dev\py3k\lib\subprocess.py, line 632, in __init__
  File e:\python-dev\py3k\lib\subprocess.py, line 746, in _get_handles
IOError: [Errno 24] Too many open files

--
keywords: +patch
nosy: +ocean-city
priority: high - release blocker
resolution: fixed - 
status: closed - open
versions: +Python 3.0, Python 3.1
Added file: 
http://bugs.python.org/file13236/fix_subprocess_leak_on_failure_on_windows.patch

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



[issue4712] Document pickle behavior for subclasses of dicts/lists

2009-03-03 Thread Raymond Hettinger

Raymond Hettinger rhettin...@users.sourceforge.net added the comment:

The behavior is a PITA.  It means that dict subclasses the redefine
__setitem__ have unpleasant pickling challenges.  The __setitem__
insertions are called before the subclass can initialize.

The workaround involves a funky dance using __reduce__.  See
collections.OrderedDict::__reduce__() for an example.

--
nosy: +rhettinger
priority: low - normal

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4712
___
___
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-03-03 Thread Georg Brandl

Georg Brandl ge...@python.org added the comment:

Since I can't test on Windows, I'll leave that in your hands :)

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



[issue4565] Rewrite the IO stack in C

2009-03-03 Thread Daniel Diniz

Daniel Diniz aja...@gmail.com added the comment:

A couple of typos in the Python implementation.

http://codereview.appspot.com/22061/diff/1/11
File Lib/_pyio.py (right):

http://codereview.appspot.com/22061/diff/1/11#newcode266
Line 266: fp is closed after the suite of the with statment is complete:
statment - statement

http://codereview.appspot.com/22061/diff/1/11#newcode844
Line 844: self._reset_read_buf()
Setting _read_buf and _read_pos directly on __init__ may help
introspection tools.

http://codereview.appspot.com/22061/diff/1/11#newcode963
Line 963: DEAFULT_BUFFER_SIZE. If max_buffer_size is omitted, it
defaults to
DEAFULT_BUFFER_SIZE - DEFAULT_BUFFER_SIZE

http://codereview.appspot.com/22061/diff/1/11#newcode1728
Line 1728: decoder = self._decoder or self._get_decoder()
'decoder' isn't used in this method, is this here for an useful
side-effect?

http://codereview.appspot.com/22061/diff/1/11#newcode1784
Line 1784: more_line = ''
This seems unused.

http://codereview.appspot.com/22061

--
nosy: +ajaksu2

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



[issue1175686] add reload function to IDLE

2009-03-03 Thread David W. Lambert

David W. Lambert lamber...@corning.com added the comment:

0-kbk

I avoid idle altogether and run python in emacs shell buffer.  Switching
windows usually involves mice.  Mice are evil.

emacs has gazillions of features.

artist mode (oops, mice!)
rectangular regions,
registers,
25 (hundreds with C-{digit}) reasonable places to move the cursor with a
couple keystrokes.
calc, modes, keyboard macros, mail, directory editing, buffer shared on
multiple x-servers ...

--
nosy: +LambertDW

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



[issue1641] asyncore delayed calls feature

2009-03-03 Thread Josiah Carlson

Josiah Carlson josiahcarl...@users.sourceforge.net added the comment:

I've just attached a patch to sched.py and asyncore.py to offer a richer 
set of features for sched.py, with a call_later() function and minimal 
related classes for asyncore.py to handle most reasonable use-cases.

There is no documentation or tests, but I can add those based on 
Giampaolo's tests and docs if we like this approach better.

Added file: http://bugs.python.org/file13237/scheduler_partial.patch

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



[issue1641] asyncore delayed calls feature

2009-03-03 Thread Josiah Carlson

Changes by Josiah Carlson josiahcarl...@users.sourceforge.net:


Removed file: http://bugs.python.org/file13237/scheduler_partial.patch

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



[issue1641] asyncore delayed calls feature

2009-03-03 Thread Josiah Carlson

Josiah Carlson josiahcarl...@users.sourceforge.net added the comment:

Here's a better patch without tabs.

Added file: http://bugs.python.org/file13238/scheduler_partial.patch

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




[issue5390] Item 'Python x.x.x' in Add/Remove Programs list still lacks an icon

2009-03-03 Thread Martin v. Löwis

Martin v. Löwis mar...@v.loewis.de added the comment:

Ok. Now run the installation (of, say, 2.6) with

msiexec /i python-xy.msi /l*v python26.log

and compress and attach the resulting log file.

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



[issue5390] Item 'Python x.x.x' in Add/Remove Programs list still lacks an icon

2009-03-03 Thread Martin v. Löwis

Martin v. Löwis mar...@v.loewis.de added the comment:

Also, what version of Vista *precisely* are you using?

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



[issue4565] Rewrite the IO stack in C

2009-03-03 Thread Benjamin Peterson

Benjamin Peterson benja...@python.org added the comment:

2009/3/3 Daniel Diniz rep...@bugs.python.org:
 A couple of typos in the Python implementation.

Thanks for taking a look! Fixed these things in r70135.

 http://codereview.appspot.com/22061/diff/1/11#newcode844
 Line 844: self._reset_read_buf()
 Setting _read_buf and _read_pos directly on __init__ may help
 introspection tools.

Perhaps, but I think it duplicates too much of _reset_read_buf(). And
it wouldn't damage introspection, just static analysis.

 http://codereview.appspot.com/22061/diff/1/11#newcode1728
 Line 1728: decoder = self._decoder or self._get_decoder()
 'decoder' isn't used in this method, is this here for an useful
 side-effect?

Yes, it's for side affect, but it needn't be in a variable.

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



[issue1975] signals not always delivered to main thread, since other threads have the signal unmasked

2009-03-03 Thread Adam Olsen

Adam Olsen rha...@gmail.com added the comment:

issue 960406 broke this as part of a fix for readline.  I believe that
was motivated by fixing ctrl-C in the main thread, but non-main threads
were thrown in as a why not measure.

msg 46078 is the mention of this.  You can go into readlingsigs7.patch
and search for SET_THREAD_SIGMASK.

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1975
___
___
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-03-03 Thread Hirokazu Yamamoto

Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp added the comment:

Thanks, fixed in r70137(trunk), r70142(py3k), r70146(release30-maint),
r70147(release26-maint)

--
priority: release blocker - high
resolution:  - fixed
status: open - closed

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



[issue1641] asyncore delayed calls feature

2009-03-03 Thread Giampaolo Rodola'

Giampaolo Rodola' billiej...@users.sourceforge.net added the comment:

A new patch is in attachment. 
Changes from the previous one (Sep 2008):


- renamed deafult_tasks global list to scheduled_tasks

- loop(), scheduler() and close_all() have a new tasks keyword
argument defaulting to None

- close_all() other than iterating over all existing dispatcher
instances and closing them, also iterate over any unfired scheduled call
found in tasks list, cancel() it and finally clears the list.

- call_later constructor accepts a reserved _tasks argument

- call_later overrides __lt__ instead of __le__


Tests and documentation are also included.

Added file: http://bugs.python.org/file13239/asyncore.patch

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



[issue1641] asyncore delayed calls feature

2009-03-03 Thread Giampaolo Rodola'

Changes by Giampaolo Rodola' billiej...@users.sourceforge.net:


Removed file: http://bugs.python.org/file8976/patch.diff

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



[issue5273] 3.0.1 crashes in unicode path

2009-03-03 Thread Hirokazu Yamamoto

Changes by Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp:


--
priority:  - release blocker

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



[issue5334] array.fromfile() fails to insert values when EOFError is raised

2009-03-03 Thread Hirokazu Yamamoto

Changes by Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp:


--
priority:  - release blocker
versions: +Python 3.1

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



[issue5273] 3.0.1 crashes in unicode path

2009-03-03 Thread Antoine Pitrou

Antoine Pitrou pit...@free.fr added the comment:

I cannot say anything except that the patch looks ok. If it doesn't make
anything worse and solves the present problem, I guess you can commit it.

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



[issue5413] urllib ctypes error on Mac OS X Server 10.5

2009-03-03 Thread Attila Soki

New submission from Attila Soki atiw...@gmx.net:

i trying to compile Python 2.6.1 from scratch on Mac OS X Server (ppc).
After configure/make/make install i test the compiled python with
the followig file (t.py) (example from
http://docs.python.org/library/urllib.html):


Contents of /tmp/t.py:
-
import urllib
params = urllib.urlencode({'spam': 1, 'eggs': 2, 'bacon': 0})
f = urllib.urlopen(http://www.musi-cal.com/cgi-bin/query;, params)
print f.read()
-

and i get this error:

python /tmp/t.py 
Traceback (most recent call last):
  File /tmp/t.py, line 3, in module
f = urllib.urlopen(http://www.musi-cal.com/cgi-bin/query;, params)
  File /usr/local/test/python/lib/python2.6/urllib.py, line 82, in urlopen
opener = FancyURLopener()
  File /usr/local/test/python/lib/python2.6/urllib.py, line 611, in
__init__
URLopener.__init__(self, *args, **kwargs)
  File /usr/local/test/python/lib/python2.6/urllib.py, line 129, in
__init__
proxies = getproxies()
  File /usr/local/test/python/lib/python2.6/urllib.py, line 1555, in
getproxies
return getproxies_environment() or getproxies_macosx_sysconf()
  File /usr/local/test/python/lib/python2.6/urllib.py, line 1449, in
getproxies_macosx_sysconf
_CFSetup(sc)
  File /usr/local/test/python/lib/python2.6/urllib.py, line 1330, in
_CFSetup
sc.CFStringCreateWithCString.argtypes = [ c_void_p, c_char_p, c_int32 ]
  File /usr/local/test/python/lib/python2.6/ctypes/__init__.py, line
366, in __getattr__
func = self.__getitem__(name)
  File /usr/local/test/python/lib/python2.6/ctypes/__init__.py, line
371, in __getitem__
func = self._FuncPtr((name_or_ordinal, self))
AttributeError: dlsym(RTLD_DEFAULT, CFStringCreateWithCString): symbol
not found
Exception AttributeError: FancyURLopener instance has no attribute
'tempcache' in bound method FancyURLopener.__del__ of
urllib.FancyURLopener instance at 0x3743a0 ignored


than tested it whit this code (Thanks to Ned Deily)
See the mailinglist thread at:
http://mail.python.org/pipermail/python-list/2009-March/703067.html

Contents of /tmp/tt.py:
---
from ctypes import cdll
from ctypes.util import find_library
sc = cdll.LoadLibrary(find_library(SystemConfiguration))
x = sc.CFStringCreateWithCString(0, HTTPEnable, 0)
---
/usr/local/test/python/bin/python2.6 /tmp/tt.py
Traceback (most recent call last):
  File /tmp/tt.py, line 4, in module
x = sc.CFStringCreateWithCString(0, HTTPEnable, 0)
  File /usr/local/test/python/lib/python2.6/ctypes/__init__.py, line
366,
in __getattr__
func = self.__getitem__(name)
  File /usr/local/test/python/lib/python2.6/ctypes/__init__.py, line
371,
in __getitem__
func = self._FuncPtr((name_or_ordinal, self))
AttributeError: dlsym(RTLD_DEFAULT, CFStringCreateWithCString): symbol
not
found

Both test fails on my PPC Mac and runs without error on my Intel MacBook

Some detailed info about the macs:

ppc:
Model Name: Xserve G5
Model Identifier: RackMac3,1
Processor Name: PowerPC G5  (3.1)
Processor Speed: 2.3 GHz
Number Of CPUs: 2
L2 Cache (per CPU): 512 KB
Boot ROM Version: 5.1.7f2
System Version: Mac OS X Server 10.5.6 (9G55)
Kernel Version: Darwin 9.6.0


intel:
Model Name: MacBook Pro
Model Identifier: MacBookPro3,1
Processor Name: Intel Core 2 Duo
Processor Speed: 2.4 GHz
Number Of Processors: 1
Total Number Of Cores: 2
L2 Cache: 4 MB
Bus Speed: 800 MHz
Boot ROM Version: MBP31.0070.B07
SSC Version: 1.16f8
System Version: Mac OS X 10.5.6 (9G55)
Kernel Version: Darwin 9.6.0


I recompiled Python-2.6.1 with MACOSX_DEPLOYMENT_TARGET=10.3, but no
change..
I updated developertools to xcode312_2621, no change..

Btw.. Python-2.5.4 compiled from scratch works fine.

I dig a bit deeper with otool and discover some differences:

Intel MacOS.so: Carbon, libSystem.B.dylib, CoreServices,
ApplicationServices

PPC MacOS.so: Carbon, libmx.A.dylib, libSystem.B.dylib

Intel _ctypes.so: libSystem.B.dylib
PPC _ctypes.so: libmx.A.dylib, libSystem.B.dylib

---
Intel with deploymant target 10.3, xcode312:
---
sh-3.2# otool
-L /usr/local/test/python/lib/python2.6/lib-dynload/MacOS.so
/usr/local/test/python/lib/python2.6/lib-dynload/MacOS.so:
/System/Library/Frameworks/Carbon.framework/Versions/A/Carbon
(compatibility version 2.0.0, current version 136.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current
version
111.1.3)

/System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices
(compatibility version 1.0.0, current version 32.0.0)

/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Applicat
ionServices (compatibility version 1.0.0, current version 34.0.0)

---

sh-3.2# otool
-L /usr/local/test/python/lib/python2.6/lib-dynload/_ctypes.so
/usr/local/test/python/lib/python2.6/lib-dynload/_ctypes.so:
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current
version
111.1.3)

--
PPC with deployment_target 10.3, xcode312_2621

[issue5413] urllib ctypes error on Mac OS X Server 10.5

2009-03-03 Thread Ned Deily

Ned Deily n...@acm.org added the comment:

For more info, see discussion starting here:
http://mail.python.org/pipermail/python-list/2009-March/703067.html

I suspect a difference in the proxy configuration available between OS X 
and OS X Server, although I don't have a OS X Server configuration at hand 
to test it.  (For 2.6, the OS X proxy configuration code was rewritten to 
use ctypes instead of the deprecated mac Carbon wrappers.)

--
nosy: +nad, ronaldoussoren

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



[issue5273] 3.0.1 crashes in unicode path

2009-03-03 Thread Hirokazu Yamamoto

Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp added the comment:

Thanks, fixed in r70157(py3k) and r70158(release30-maint)

--
priority: release blocker - 
resolution:  - fixed
status: open - closed

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



[issue5414] asciibin.a2b_uu returns unexpected values on non ascii data

2009-03-03 Thread David Majnemer

New submission from David Majnemer david.majne...@gmail.com:

Note that binascii.a2b_uu(\0) returns
'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'.
This appears to be the same as binascii.a2b_uu() which is most likely
not the intention.
Also, binascii.a2b_uu(\0\0) returns an exception, Illegal char,
which makes sense.

--
components: Library (Lib)
messages: 83114
nosy: dmajnemer
severity: normal
status: open
title: asciibin.a2b_uu returns unexpected values on non ascii data
type: behavior

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



[issue5414] asciibin.a2b_uu returns unexpected values on non ascii data

2009-03-03 Thread David Majnemer

David Majnemer david.majne...@gmail.com added the comment:

Added version number of python.

--
versions: +Python 2.5

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



[issue5404] Cross-compiling Python

2009-03-03 Thread Joshua Kinard

Joshua Kinard ku...@gentoo.org added the comment:

Roumen,

I took a look at 4010, and tried your patch (as well as attempted to
apply the latter patch, but they changes are too great).  Neither one
helped resolve my issue, but I should probably explain the angle I'm
attacking this from so you have an idea of what I'm doing.

Currently, in Gentoo, we have a package file (called an ebuild) for
2.5.4, and this is what our primary package manager, Portage, links up
against, so that's why I'm working on getting 2.5.4 to cross-compile
properly.  I have no idea when we will move towards using 2.6.0.  I'm
trying to help our embedded team get cross-compiling working in some
packages so we can cross-compile a base system from a fast host.  This
all started after I decided to resurrect an old Cobalt RaQ2 from the
grave.  That machine is extremely limited -- ~144MB of RAM and a 250MHz
RM5231 MIPS Processor with no L2 Cache and a small L1 cache.  Compiling
is very, very slow, so the ability to cross-compile about ~83 base
packages in about 2 hours versus an entire day is a very desirable
thing.  It has a CHOST tuple of mipsel-unknown-linux-gnu.

Right now, the three most difficult packages to cross-compile are Perl,
gettext, and Python, in that order.  Perl is probably beyond all hope. 
I don't even know if I'll tackle it.  Gettext is just a nightmare, even
for a GNU package.  We bypass this by disabling NLS support for the
cross-build.  Python, I feel, is doable.  It's got some autotools links,
so it's got the capability.  Python code is also easy to read for me
(unlike Perl, but I digress), so I can sort of follow the logic in some
spots in setup.py.

We have two packages that assist in cross-compiling.  The first is our
'crossdev' package.  It is akin to what you'll find in Debian or via Dan
Kegel's crosstools setup.  It takes care of installing cross-toolchains
of varying degrees (C-Only, Glibc/Uclibc-based, etc..) on a Gentoo
system.  Next, is 'crossdev-wrappers', which is a set of wrapper scripts
for the 'emerge' command, Gentoo's main package manager tool in Portage.
 This helps to pass a lot of the basic environment variables so that
common configure scripts can correctly identify the build system and
target/host system types, or allow simple, Makefile-only packages build
using cross-compile toolchains.



So what happens on a cross-compile of Python, is first, the _socket
module fails to cross-compile because for that very specific compiler
invocation, it passes -I/usr/include, and _socket references the
sys/param.h include.  Which it finds in my host system's /usr/include
(an amd64 machine currently, so x86_64-pc-linux-gnu is the CHOST tuple).
 This will pull in x86 assembler language, which is misunderstood by a
mipsel-based toolchain.  I dug around, and found some patches that
re-ordered how configure and setup.py do things, and after utilizing a
tool in our ebuild system to create config.sub/config.guess files, this
helps to get Python's core to compile for the most part (I also applied
a fix for the printf %zd issue).

However, the default compiling logic for python uses gcc to both compile
the *.o files AND link into the final *.so modules.  One of the patches
I dug up (and merged) converts this logic to explicitly calling $CC for
compiling the *.o files, and then $LD to link them into *.so modules. 
This is where part of my problem lies, because the patch doesn't address
the fact that $CFLAGS gets passed to the $CC call (which is fine) AND to
the $LD call (which is not fine, because 'ld' takes a different set of
arguments) -- via (I think) the $OPT variable.

The other problem was libffi, under the _ctypes/ folder.  The setup.py
script explicitly clears configure arguments out via 'config_args = []'
code, and then invokes libffi's configure.  Without a --host=${CHOST}
value passed to it, libffi's configure incorrectly assumes it's running
on an x86_64-pc-linux-gnu system, not in a cross-compile environment for
mipsel-unknown-linux-gnu.  Thus, the configure script will go on to
build for that system, BUT call the mipsel-unknown-linux-gnu-gcc
compiler to compile its internal test code.  This fails, and Python's
default behavior is to ignore build failures and continue on.

So, after addressing those two problems, I've been trying to figure out
how to pass $LD a minimal set of LDFLAGS -- mostly -L commands, although
I'd like to just send it nothing but the *.o files and see how it
handles those by itself.  The logic in the makefile is really quite
weird, though, and it's not helped by the patches I'm mixing in, some of
which are a mix of several patches from this bug tracker.

If you want to take a look at the two main patches, I've uploaded them
to an external host, because I didn't want to litter the bug tracker
with incomplete patches that don't fully address the core problem,
especially since they're for older versions.


This one addresses or hacks around:
- LONG_BIT detection (hack)
- Printf %zd 

[issue5413] urllib ctypes error on Mac OS X Server 10.5

2009-03-03 Thread Ronald Oussoren

Ronald Oussoren ronaldousso...@mac.com added the comment:

I don't have time to investigate this right now, I do have access to a 
10.5 server box though. With some luck I'll be able to create a patch 
later today.

Looking at the code in urllib I found the most likely reason for the 
problem: the Python script tries to resolve CFStringCreateWithCString 
through the SystemConfiguration framework. It may well be that this 
doesn't work on PPC systems and that this symbol should explicitly be 
loaded from the CoreFoundation framework.

BTW. This probably also affects 3.x.

--
versions: +Python 3.0, Python 3.1

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



[issue5415] uuid module generates incorrect values for uuid3 (and possibly uuid5)

2009-03-03 Thread René Puls

New submission from René Puls rene.p...@repro-mayr.de:

I am trying to recreate the sample output from appendix B of RFC 4122.

http://www.ietf.org/rfc/rfc4122.txt

In that document, a version 3 UUID is created using the DNS namespace 
(6ba7b810-9dad-11d1-80b4-00c04fd430c8, same as uuid.NAMESPACE_DNS in 
Python) and the name 'www.widgets.com'.

The result according to the RFC should be:

e902893a-9d22-3c7e-a7b8-d6e313b71d9f

Here is the output from the Python uuid module:

 import uuid
 uuid.NAMESPACE_DNS
UUID('6ba7b810-9dad-11d1-80b4-00c04fd430c8')
 uuid.uuid3(uuid.NAMESPACE_DNS, 'www.widgets.com')
UUID('3d813cbb-47fb-32ba-91df-831e1593ac29')

I couldn't find any test cases for the Python module. Did I use it 
incorrectly, or is the calculation really off?

--
components: Library (Lib)
messages: 83118
nosy: pwr
severity: normal
status: open
title: uuid module generates incorrect values for uuid3 (and possibly uuid5)
type: behavior
versions: Python 2.6, Python 3.0

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