[issue6877] enable compilation of readline module on Mac OS X 10.5 and 10.6

2009-09-22 Thread Ronald Oussoren

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

This should have been closed, although readline shouldn't crash either.

Brett: What version of OSX do you use? Readline works fine for me on OSX 
10.6 without GNU readline.

BTW. The crashlog indicates you are no longer using GNU readline, but 
use system readline instead (that is the libedit emulation layer). 

This is one thing we completely failed to look at: how to determine 
which one to use? We currently use the first readline we find, which 
will we the system one on OSX 10.5 or later. 

It may be better to either add a configure flag to explicitly select 
which one is preferential, or use the GNU version when it is found.

--

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



[issue6957] Extension modules fail to build on OS X 10.6 using python.org 2.x/3.x

2009-09-22 Thread Ronald Oussoren

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

It should be possible to tweak distutils to do the right thing for 
upcoming releases, distutils already contains some special code to allow 
building extensions for a univeral build on 10.3.9 (where the compiler 
doesn't support universal builds at all) and we could extend that for 
the compiler version on SL.

Implementation sketch:
* Record the compiler version during build (using configure)
* Store the compiler version as a variable in Makefile.pre.in
* Teach distutils to read that variable and adjust the compiler 
  path ($CC,$LD,...)

This bit would only be active on OSX.

--

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



[issue6964] import new fails

2009-09-22 Thread Rene Dudfield

New submission from Rene Dudfield ill...@users.sourceforge.net:

python3.1

 import new
Traceback (most recent call last):
  File stdin, line 1, in module
ImportError: No module named new

2to3-3.1 doesn't mention how to change it.

--
components: 2to3 (2.x to 3.0 conversion tool)
messages: 92974
nosy: illume
severity: normal
status: open
title: import new fails
type: behavior
versions: Python 3.1

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



[issue6965] tmpnam should not be used if tempfile or mkstemp are available

2009-09-22 Thread djc

New submission from djc dirk...@ochtman.nl:

I have a bug report in the Gentoo tracker
(http://bugs.gentoo.org/show_bug.cgi?id=221183):

This is a rather strange request, but please bear me.
While building Posix module, python checks (among others) for
tmpfile, tmpnam and tmpnam_r
however man pages state explicitly, that in case tmpfile is available, other
two should not be used
if libpython2.5.a is built with either of them, linker complains each
time it's
added

While this doesn't break anything, it's still a bit annoying.
so I propose to remove functionality as an enhancement:
to change in Modules/posixmodule.c
#ifdef HAVE_TMPNAM
to
#ifdef HAVE_TMPNAM  !defined(HAVE_TMPFILE)

Your thoughts?

man 3 tmpnam state Never use this function.  Use mkstemp(3) or
tmpfile(3) instead..

Not sure whether this is exposed anywhere, but I figured this bug would
be better handled upstream from Gentoo.

--
components: Extension Modules
messages: 92975
nosy: djc
severity: normal
status: open
title: tmpnam should not be used if tempfile or mkstemp are available
versions: Python 2.7

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



[issue6964] import new fails

2009-09-22 Thread Quentin Gallet-Gilles

Quentin Gallet-Gilles qgal...@gmail.com added the comment:

The 'new' module has been removed in python 3.0. The documentation
advices you to use the 'types' modules instead
(http://docs.python.org/library/new.html).

I'm also pretty sure you get a message for this module if you enable the
warnings at interpreter startup in python 2.6.

--
nosy: +quentin.gallet-gilles

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



[issue6966] Ability to refer to arguments in TestCase.fail* methods

2009-09-22 Thread Johan Tufvesson

New submission from Johan Tufvesson j...@hms.se:

In the unittest module, TestCase class:

If one wants to provide a more descriptive fail message compared to the
default, it is often valuable to be able to refer to the arguments
evaluated by the fail*- (or assert*-) method. This can be accomplished
by binding names to the evaluated values before the call to the
fail*-methods, and then providing a string with the values embedded as
needed. This, however, can be quite cumbersome when there are a lot of
calls to fail*-methods.

Today:
Arg1 = RealValue()
Arg2 = ExpectedValue()
self.failUnlessEqual(Arg1, Arg2, Got {0}, but expected
{1}..format(Arg1, Arg2))

Proposed solution:
In the fail*-methods, check if the msg argument is some kind of string
(basestring?), and run the format() method on the string with the
supplied arguments. This would result in code like this:

self.failUnlessEqual(RealValue(), ExpectedValue(), Got {0}, but
expected {1}.)

--
components: Library (Lib)
messages: 92977
nosy: tuben
severity: normal
status: open
title: Ability to refer to arguments in TestCase.fail* methods
type: feature request
versions: Python 2.7

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



[issue6964] import new fails

2009-09-22 Thread Rene Dudfield

Rene Dudfield ill...@users.sourceforge.net added the comment:

Hi,

yes it does report a warning with 2.6, thanks.

python2.6 -3 -c import new
-c:1: DeprecationWarning: The 'new' module has been removed in Python
3.0; use the 'types' module instead.

I guess it should be a TODO item with 2to3.

cheers,

--

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



[issue6961] test_distutils failure

2009-09-22 Thread Tarek Ziadé

Tarek Ziadé ziade.ta...@gmail.com added the comment:

That was fixed already in trunk, and a pending merging waiting to be
merged. I've just merged in r75013 and r75014

--
resolution:  - invalid
status: open - closed

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



[issue6964] import new fails

2009-09-22 Thread Georg Brandl

Changes by Georg Brandl ge...@python.org:


--
assignee:  - benjamin.peterson
nosy: +benjamin.peterson

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



[issue6967] codec windows1256 should be windows windows-1256

2009-09-22 Thread Sascha

New submission from Sascha python-bugrep...@discorner.de:

It seem that there's a dash missing.

http://docs.python.org/dev/library/codecs.html#standard-encodings

 u'Sorry, this in here makes no sense'.encode('windows1256')
Traceback (most recent call last):
  File stdin, line 1, in module
LookupError: unknown encoding: windows1256

On the other hand windows-1256 works.

--
assignee: georg.brandl
components: Documentation
files: codecs.rst.patch
keywords: patch
messages: 92980
nosy: DerSascha, georg.brandl
severity: normal
status: open
title: codec windows1256 should be windows windows-1256
versions: Python 2.5, Python 2.7, Python 3.1
Added file: http://bugs.python.org/file14948/codecs.rst.patch

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



[issue6834] use different mechanism for pythonw on osx

2009-09-22 Thread Ronald Oussoren

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

The attached file 'pythonw.c' is a first version of a better pythonw 
executable.

This version uses posix_spawn rather than execv to start the real 
interpreter. The main advantage of the new implementation is that 'arch 
-ppc pythonw' works as expected, with the current version of pythonw the 
'arch' command only affects the pythonw executable and not the real 
interpreter.

Todo:
* I'm not use if the '-X32bit' option is a good idea or not.

  The basic idea of this is to provide an easy way to force python to 
  start in 32bit mode (for use in #! lines) for scripts that need it
  (basicly anything that needs to access Carbon GUI APIs, including most
  current Python GUI libraries)

* The implementation of '-X32bit' is sucky, it contains a copy of the
  getopt format string from Py_Main in Modules/main.c

* The path to the real executable is hardcoded for a standard framework
  install of 2.7 (easily changed to the same mechanism as used by
  the current edition of pythonw)

  What I'd like to do is link pythonw to the framework and use dyld
  introspection to deduce the path to the real executable. That's 
  slightly more complicated, but would provide a clean way to reuse
  the executable in tools like virtualenv without recompiling.

--
Added file: http://bugs.python.org/file14949/pythonw.c

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



[issue6967] codec windows1256 should be windows windows-1256

2009-09-22 Thread Georg Brandl

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

Fixed in r75015.

--
resolution:  - fixed
status: open - closed

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



[issue6966] Ability to refer to arguments in TestCase.fail* methods

2009-09-22 Thread Georg Brandl

Changes by Georg Brandl ge...@python.org:


--
assignee:  - michael.foord
nosy: +michael.foord

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



[issue6966] Ability to refer to arguments in TestCase.fail* methods

2009-09-22 Thread Michael Foord

Michael Foord mich...@voidspace.org.uk added the comment:

The new longMessage class attribute on TestCase already shows both
arguments when a call to assertEqual fails (the failUnless methods are
now deprecated) - even if you supply a custom message.

--

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



[issue6632] Include more fullwidth chars in the decimal codec

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

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

 int()/float() use the decimal codec for numbers - this only supports
 base-10 numbers. For hex numbers, we'd need a new hex codec (only
 the encoder part, actually), otherwise, int('a') would start to return
 10.

That's not true. PyUnicode_EncodeDecimal could happily accept hexdigits,
and int(u'a') would still be rejected. In fact, PyUnicode_EncodeDecimal
*already* accepts arbitrary Latin-1 characters, whether they represent
digits or not. I suppose this is to support non-decimal bases, so it
would only be consequential to widen this to all characters that
reasonably have the Hex_Digit property (although I'm unsure which ones
are excluded at the moment).

--

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



[issue6966] Ability to refer to arguments in TestCase.fail* methods

2009-09-22 Thread Johan Tufvesson

Johan Tufvesson j...@hms.se added the comment:

I admit that I had not seen the longMessage attribute. That is better
than the present possibilities in 2.6, although not as configurable as
my suggestion (but with better backwards compatibility).

Personally I will be a user of the longMessage feature, dreaming of even
more functionality.

--

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



[issue6968] numpy extensions to distutils... are a source of improvements for distutils

2009-09-22 Thread Rene Dudfield

New submission from Rene Dudfield ill...@users.sourceforge.net:

Hi,

numpy includes a numpy/distutils package which has a lot of
goodies/fixes which might be able to be incorporated into the main
distutils.

Adding this note so distutils maintainers are aware of it.

cheers,

--
assignee: tarek
components: Distutils
messages: 92986
nosy: illume, tarek
severity: normal
status: open
title: numpy extensions to distutils... are a source of improvements for 
distutils
type: feature request

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



[issue6963] Add worker process lifetime to multiprocessing.Pool - patch included

2009-09-22 Thread Jesse Noller

Jesse Noller jnol...@gmail.com added the comment:

Hi Charles; I don't see a doc update for this (see multiprocessing.rst) or 
unit tests. I'm not against it, but before I can commit this, I'll need 
those things

--

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



[issue6877] enable compilation of readline module on Mac OS X 10.5 and 10.6

2009-09-22 Thread Zvezdan Petkovic

Zvezdan Petkovic zvez...@zope.com added the comment:

Brett,

what does this command return for you?

otool -L /path/to/lib/python2.4/lib-dynload/readline.so

--

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



[issue6877] enable compilation of readline module on Mac OS X 10.5 and 10.6

2009-09-22 Thread Zvezdan Petkovic

Zvezdan Petkovic zvez...@zope.com added the comment:

Make that python2.6 in the command above.  :-)

--

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



[issue6236] os.popen causes illegal seek on AIX in Python 3.1rc

2009-09-22 Thread nestor

nestor nestornis...@gmail.com added the comment:

Fantastic. Applied the patch and it solved the problem with xlc 8.0 on
AIX 5.3.

--

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



[issue6877] enable compilation of readline module on Mac OS X 10.5 and 10.6

2009-09-22 Thread Ronald Oussoren

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

Better yet:

   otool -vL $(python -c 'import readline; print readline.__file__')

(Replace python by the interpreter that your actually using).

I'm still interested to know the OS release as well.

--

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



[issue6968] numpy extensions to distutils... are a source of improvements for distutils

2009-09-22 Thread Tarek Ziadé

Tarek Ziadé ziade.ta...@gmail.com added the comment:

Thanks for the note Rene,

Maybe someone from Numpy could help on this, by adding one issue per
feature/change proposal, and if possible with a patch including the
change with a test.

--

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



[issue6969] configparser

2009-09-22 Thread Kandalintsev Alexandre

New submission from Kandalintsev Alexandre bug_hun...@messir.net:

Hello! Seems configparser is broken in recent versions of py3k. Please also 
check older 
versions of python.

$ python3 ./cfgexample.py 
Traceback (most recent call last):
  File ./cfgexample.py, line 9, in module
config.write(configfile)
  File /usr/local/py3k/lib/python3.2/configparser.py, line 394, in write
fp.write([%s]\n % section)
TypeError: must be bytes or buffer, not str
$ cat ./cfgexample.py 
import configparser

config = configparser.RawConfigParser()

config.add_section('Section1')
config.set('Section1', 'int', '15')

with open('example.cfg', 'wb') as configfile:
config.write(configfile)
$ python3 --version
Python 3.2a0


I've built this version of python:
$ hg head
changeset:   4765:488e143fad23
branch:  py3k
tag: tip
user:tarek.ziade
date:Tue Sep 22 12:08:13 2009 +0200
summary: [svn r75013] Merged revisions 74812 via svnmerge from

--
components: Library (Lib)
messages: 92993
nosy: exe
severity: normal
status: open
title: configparser
versions: Python 3.2

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



[issue6958] Add Python command line flags to configure logging

2009-09-22 Thread Vinay Sajip

Vinay Sajip vinay_sa...@yahoo.co.uk added the comment:

Both Doug and Jean-Paul have made good points, IMO.

--

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



[issue6969] configparser

2009-09-22 Thread Georg Brandl

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

It seems that nobody updated the documentation to say that configparser
operates on text files.  The example is also wrong, it should open the
file in 'w' mode, not 'wb'.

Fixed in r75016.

PS: please use more expressive titles for issues in the future.

--
nosy: +georg.brandl
resolution:  - fixed
status: open - closed

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



[issue6877] enable compilation of readline module on Mac OS X 10.5 and 10.6

2009-09-22 Thread Ronald Oussoren

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

I've tested with readline 6 on OSX 10.6 as well. Both that and the system 
readline (libedit emulation) work just fine for me.

The current behaviour for me:
* When GNU readline is present in /usr/local it gets used
* Otherwise libedit gets used

--

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



[issue6959] OS X 10.6 / Snow Leopard: building 2.6 maintenance release fails for some modules (architecture issue)

2009-09-22 Thread Ronald Oussoren

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

As Ned noticed the readline failure is expected unless you have installed 
GNU readline in /usr/local. The system readline is not supported in the 
2.6 branch, it will be supported in 2.7 (at least on Snow Leopard)

I've commited a fix for the Nav.c errors in r75017 (trunk) and r75018 
(2.6)

In both cases the fix disabled Carbon.Nav in 64-bit mode because basicly 
all of the functions in that module wrap deprecated code.

--
resolution:  - accepted
stage:  - committed/rejected
status: open - closed
versions: +Python 2.7

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



[issue6877] enable compilation of readline module on Mac OS X 10.5 and 10.6

2009-09-22 Thread Zvezdan Petkovic

Zvezdan Petkovic zvez...@zope.com added the comment:

I assume you had to pass extra -I and -L flags when compiling with GNU 
readline.  Right?

--

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



[issue6963] Add worker process lifetime to multiprocessing.Pool - patch included

2009-09-22 Thread Charles Cazabon

Charles Cazabon charlesc-pyt...@pyropus.ca added the comment:

Alright, I'll add those.  Thanks for looking at it; first pass was
mostly to ensure it wouldn't be wasted work.

--

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



[issue6970] Redundant calls made to comparison methods.

2009-09-22 Thread Mark Dickinson

New submission from Mark Dickinson dicki...@gmail.com:

Here's some strange behaviour in py3k:

newton:py3k dickinsm$ ./python.exe
Python 3.2a0 (py3k:75015, Sep 22 2009, 16:25:12) 
[GCC 4.0.1 (Apple Inc. build 5493)] on darwin
Type help, copyright, credits or license for more information.
 class A:
... def __eq__(self, other):
... print(In A.__eq__, self, other)
... return NotImplemented
... 
 class B:
... def __eq__(self, other):
... print(In B.__eq__, self, other)
... return NotImplemented
... 
 A() == B()
In A.__eq__ __main__.A object at 0x34d030 __main__.B object at 0x448210
In B.__eq__ __main__.B object at 0x448210 __main__.A object at 0x34d030
In B.__eq__ __main__.B object at 0x448210 __main__.A object at 0x34d030
In A.__eq__ __main__.A object at 0x34d030 __main__.B object at 0x448210
False

I'd expect to see only one call to A.__eq__ and one call to B.__eq__.

The cause seems to be that:

 - slot_tp_richcompare (in typeobject.c) makes two calls to half_richcompare,
   one with the original arguments and one with reverse arguments, *and*

 - do_richcompare (in object.c) also makes two calls to the tp_richcompare
   slot; again, one with the original arguments and one with the reversed
   arguments.

I tried removing the second block of slot_tp_richcompare (still in py3k);  
make and make test succeeded without any problems.  Removing this block does 
change behaviour though, so probably should not happen until 3.2, given that 
no-one appears to have reported the current behaviour actually causing any 
problems.

The duplicate calls also exist in 2.x;  figuring out a solution there (and 
being sure that the solution does the right thing) looks complicated, thanks 
to all the rich-compare/three-way-compare interactions.

--
components: Interpreter Core
messages: 93000
nosy: mark.dickinson
severity: normal
stage: needs patch
status: open
title: Redundant calls made to comparison methods.
type: behavior
versions: Python 2.7, Python 3.2

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



[issue6877] enable compilation of readline module on Mac OS X 10.5 and 10.6

2009-09-22 Thread Ronald Oussoren

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

Zvezdan: I did not have to pass additional arguments to get readline, the 
default machinery automaticly picks up libraries in /usr/local.

I'd love to have a way to restrict the default compiler and linker search 
paths to system locations (e.g. exclude /usr/local and 
/Library/Frameworks), but that's sadly enough not easily possible (and the 
issue is in the compiler not distutils)

--

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



[issue6970] Redundant calls made to comparison methods.

2009-09-22 Thread Mark Dickinson

Mark Dickinson dicki...@gmail.com added the comment:

And here's an example from trunk:

Python 2.7a0 (trunk:75012M, Sep 22 2009, 11:16:39) 
[GCC 4.0.1 (Apple Inc. build 5493)] on darwin
Type help, copyright, credits or license for more information.
 class A(object):
... def __eq__(self, other):
... print A.__eq({!r}, {!r}).format(self, other)
... return NotImplemented
... 
 A() == A()
A.__eq(__main__.A object at 0x39f670, __main__.A object at 0x39f610)
A.__eq(__main__.A object at 0x39f610, __main__.A object at 0x39f670)
A.__eq(__main__.A object at 0x39f670, __main__.A object at 0x39f610)
A.__eq(__main__.A object at 0x39f610, __main__.A object at 0x39f670)
A.__eq(__main__.A object at 0x39f610, __main__.A object at 0x39f670)
A.__eq(__main__.A object at 0x39f670, __main__.A object at 0x39f610)
False

--
nosy: +cjw296

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



[issue6269] threading documentation makes no mention of the GIL

2009-09-22 Thread Rene Dudfield

Rene Dudfield ill...@users.sourceforge.net added the comment:

hello,

CPU intensive programs can also benefit from the GIL if they use code
which releases the GIL around the CPU intensive parts.

Some parts of python do this, as do the numpy and pygame extensions
amongst others.

Another good, but separate, documentation patch would be to document
which functions release the GIL.


cheers,

--
nosy: +illume

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



[issue6632] Include more fullwidth chars in the decimal codec

2009-09-22 Thread Marc-Andre Lemburg

Marc-Andre Lemburg m...@egenix.com added the comment:

Martin v. Löwis wrote:
 
 Martin v. Löwis mar...@v.loewis.de added the comment:
 
 int()/float() use the decimal codec for numbers - this only supports
 base-10 numbers. For hex numbers, we'd need a new hex codec (only
 the encoder part, actually), otherwise, int('a') would start to return
 10.
 
 That's not true. PyUnicode_EncodeDecimal could happily accept hexdigits,
 and int(u'a') would still be rejected. In fact, PyUnicode_EncodeDecimal
 *already* accepts arbitrary Latin-1 characters, whether they represent
 digits or not. I suppose this is to support non-decimal bases, so it
 would only be consequential to widen this to all characters that
 reasonably have the Hex_Digit property (although I'm unsure which ones
 are excluded at the moment).

The codec currently doesn't look at the base at all - and shouldn't
need to:

It simply converts input characters that have a decimal digit value
associated with them, to the usual ASCII digits in preparation
for parsing them using the standard number parsing tools we have in
Python.

This is to support number representations using non-ASCII code
points for digits (e.g. Japanese or Sanskrit numbers)

http://sp.cis.iwate-u.ac.jp/sp/lessonj/doc/numbers.html
http://veda.wikidot.com/sanskrit-numbers

All other Latin-1 characters are passed through as-is, so you
can already use the codec to e.g. prepare parsing of hex
values.

Also note that we already have a hex codec in Python 2.x
which converts between the hex representations of a string
and its regular form. This was removed in 3.x for some reason
I don't understand (probably just an oversight).

--

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



[issue6957] Extension modules fail to build on OS X 10.6 using python.org 2.x/3.x

2009-09-22 Thread Ned Deily

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

Tweaking distutils as you propose sounds like a good idea to help with 
future releases.  Also, the proposed installer variant to support 64-bit 
would not have this problem as it would only work with 10.5 and above.  
(Perhaps there's a warning in all this that trying to support too many 
releases with one installer is not a good thing.)

--

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



[issue6959] OS X 10.6 / Snow Leopard: building 2.6 maintenance release fails for some modules (architecture issue)

2009-09-22 Thread cscscs

cscscs ch...@schleiermachers.de added the comment:

hi ron,
thanks for the information.
much appreciated.

best regards.

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

 As Ned noticed the readline failure is expected unless you have installed 
 GNU readline in /usr/local. The system readline is not supported in the 
 2.6 branch, it will be supported in 2.7 (at least on Snow Leopard)

 I've commited a fix for the Nav.c errors in r75017 (trunk) and r75018 
 (2.6)

 In both cases the fix disabled Carbon.Nav in 64-bit mode because basicly 
 all of the functions in that module wrap deprecated code.

 --
 resolution:  - accepted
 stage:  - committed/rejected
 status: open - closed
 versions: +Python 2.7

 ___
 Python tracker rep...@bugs.python.org
 http://bugs.python.org/issue6959
 ___



--

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



[issue6958] Add Python command line flags to configure logging

2009-09-22 Thread Thomas Heller

Thomas Heller thel...@ctypes.org added the comment:

 Jean-Paul Calderone:
 
 How about putting this into the logging module instead?  Instead of
 python logging options program program options, making it
 python -m logging logging options program program options.
 
 This:
 
   * involves no changes to the core interpreter
   * only requires Python to be written, not C
   * Lets other VMs benefit from the feature immediately
   * Follows what seems to be the emerging convention for this kind of
 (eg pdb, unittest)
   * Still allows logging to be configured for arbitrary programs that
 wouldn't otherwise be configurable in this way

This is a very good idea, and fully covers my use case.

--

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



[issue6958] Add Python command line flags to configure logging

2009-09-22 Thread Thomas Heller

Thomas Heller thel...@ctypes.org added the comment:

 How do these global settings (either via the interpreter or a wrapper
 in the logging module) change what an app might do on its own?  IOW, if
 my app is already written to configure logging, and someone invokes it
 with these other settings, which settings are used?

IMO the same would happen as if logging.basicConfig() would have been called
followed by calls to the custom configuration.

--

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



[issue6957] Extension modules fail to build on OS X 10.6 using python.org 2.x/3.x

2009-09-22 Thread Ronald Oussoren

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

There is a much easier solution for the 2.6.3 release: ensure that CC=gcc-
4.0 when building the installer.

That requires minimal changes to the build machinery and should be safe 
enough.

The only change to distutils I do want to make for 2.6.3 is to detect
compilation with an SDK that is not present and remove the -isysroot 
option in that case.

--

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



[issue6958] Add Python command line flags to configure logging

2009-09-22 Thread Doug Hellmann

Doug Hellmann doug.hellm...@gmail.com added the comment:

@theller, I'm not sure what your point is.  I'm asking what the defined
behavior is if we provide some sort of global way to run a program with
logging configured, and then that app turns around and tries to
reconfigure it.  Should the last one to call the configuration
function(s) win, or the first?

I like the idea of adding this feature to the logging module better than
building it into the interpreter, but I still think it opens up areas
for unexpected behavior, and it would be better to just let each
application set up its own logging.

--

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



[issue6957] Extension modules fail to build on OS X 10.6 using python.org 2.x/3.x

2009-09-22 Thread Ronald Oussoren

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

r75022 (trunk) and r75023 (2.6) add the other half of my proposal: 
distutils will ignore -isysroot SDKPATH when SDKPATH is not present on the 
current system.

That combined with explicit compilation using gcc-4.0 should solve these 
build issues with the OSX binary installer.

--

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



[issue6958] Add Python command line flags to configure logging

2009-09-22 Thread Vinay Sajip

Vinay Sajip vinay_sa...@yahoo.co.uk added the comment:

@theller: Although your use case just covers using basicConfig, I can
just see users expecting the same mechanism to invoke configuration
stored in a logging configuration file, which is why I suggested the
config= variant. However, doughellmann raises the valid point of what
the semantics would be if the program you invoke via logging -m does its
own configuration.

With a simple implementation: If a script calls basicConfig after it has
been invoked with logging -m etc. then the basicConfig call won't do
anything, as if the root logger already has some handlers, the call is
essentially a no-op. If the called script loads a configuration file,
that will overwrite the configuration specified via logging -m.

Either way, it's not consistent IMO - sometimes the logging -m
configuration will seem to win, and other times, the called script's
configuration.

Of course, it could be argued that logging -m is intended for scripts
which don't do explicit configuration - I'm not sure of how strong an
argument this is.

Thinking caps on :-)

--

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



[issue6958] Add Python command line flags to configure logging

2009-09-22 Thread Vinay Sajip

Vinay Sajip vinay_sa...@yahoo.co.uk added the comment:

Ummm, s/logging -m/-m logging/

--

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



[issue1766304] improve xrange.__contains__

2009-09-22 Thread Mark Dickinson

Mark Dickinson dicki...@gmail.com added the comment:

Great---thanks!

Would it be worth using PyObject_IsTrue instead of comparing with zero 
using PyObject_RichCompareBool?  (Sorry;  should have spotted this last 
time around.)

--

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



[issue6877] enable compilation of readline module on Mac OS X 10.5 and 10.6

2009-09-22 Thread Brett Cannon

Brett Cannon br...@python.org added the comment:

I'm on OS X 10.6 and I *thought* I was using GNU Readline 6. But if my 
backtrace implies otherwise something must have gotten messed up somewhere 
on my end. When I deleted Readline and rebuilt everything worked fine.

I'm going to go ahead and close this as you got it build and working for 
yourself that's good enough for me, Ronald.

--
status: open - closed

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



[issue6964] import new fails

2009-09-22 Thread Brett Cannon

Brett Cannon br...@python.org added the comment:

Benjamin can re-open if he wants, but having 2to3 emit warnings about 
deprecated modules is not what it is meant to do. 2to3 is supposed to only 
be run once you are running against 2.6 w/ no DeprecationWarning or 
Py3KWarning being raised, which would have covered this issue.

If the docs don't make this clear then they need to be changed to do so 
(and that should be a new issue anyway).

--
nosy: +brett.cannon
resolution:  - wont fix
status: open - closed

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



[issue6970] Redundant calls made to comparison methods.

2009-09-22 Thread Brett Cannon

Brett Cannon br...@python.org added the comment:

I say fix it in 3.2 and don't worry about 2.x unless you really want to. 
As you said, it's rather tricky to untangle all of that and no one has 
complained yet. Plus it is a semantic change.

--
nosy: +brett.cannon

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



[issue6877] enable compilation of readline module on Mac OS X 10.5 and 10.6

2009-09-22 Thread Zvezdan Petkovic

Zvezdan Petkovic zvez...@zope.com added the comment:

Brett,

IMO, your backtrace only implies that readline module was built 
believing it has libedit (i.e., include files were system ones from 
/usr/include).

However, the following scenario is possible.  Some packaging tools 
choose to divide library packages into a runtime part and a development 
part.  If you had a copy of readline that was a runtime part only, it 
would have /usr/local/lib/* files but not /usr/local/include/* files 
(development part would have them).

Because of the way setup.py stashes /usr/local/lib first in the path, 
the build could have used system /usr/include/* file and linked to your 
local copy of readline library.

This is just a wild guess of course.

That's why I was interested in the output of otool command on your build 
of readline module.  That would tell us what it was linked to.

--

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



[issue1766304] improve xrange.__contains__

2009-09-22 Thread Mark Dickinson

Mark Dickinson dicki...@gmail.com added the comment:

Answering myself:  probably not worth it:  I failed to notice that you 
already need zero for the 'step  0' comparison.

Applied in r75028.

Leaving open for consideration of 2.x xrange.

--

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



[issue6971] Add the SIO_KEEPALIVE_VALS option to socket.ioctl

2009-09-22 Thread Kristján Valur Jónsson

New submission from Kristján Valur Jónsson krist...@ccpgames.com:

Adding the SIO_KEEPALIVE_VALS option to socket.ioctl on windows allows a 
windows user to specify the timeout and interval for TCP keepalive support 
differently from the defaults specified in RFC 1122 on a per-socket basis.  
The 'option' is a tuple corresponging to the 'struct tcp_keepalive' 
expected by WSAIoctl
See http://msdn.microsoft.com/en-us/library/dd877220(VS.85).aspx for 
details.

--
components: IO
files: wsaioctl.patch
keywords: easy, patch, patch
messages: 93020
nosy: krisvale
severity: normal
status: open
title: Add the SIO_KEEPALIVE_VALS option to socket.ioctl
versions: Python 2.7
Added file: http://bugs.python.org/file14950/wsaioctl.patch

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



[issue6972] zipfile.ZipFile

2009-09-22 Thread Ralf Schmitt

New submission from Ralf Schmitt sch...@gmail.com:

ZipFile.extractall happily overwrites any file on the filesystem. One
can put files with a name like //etc/password in a zip file and
extractall will overwrite /etc/password (with sufficient rights).

The docs say:

ZipFile.extractall([path[, members[, pwd]]])

Extract all members from the archive to the current working
directory. path specifies a different directory to extract to. members
is optional and must be a subset of the list returned by namelist(). pwd
is the password used for encrypted files.


I read that as: it will put all files into path or a subdirectory.
Using names like ../../../etc/password also leads to files being
written outside that path directory.

--
components: Library (Lib)
messages: 93021
nosy: schmir
severity: normal
status: open
title: zipfile.ZipFile
type: security
versions: Python 2.6

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



[issue6972] zipfile.ZipFile overwrites files outside destination path

2009-09-22 Thread Ralf Schmitt

Changes by Ralf Schmitt sch...@gmail.com:


--
title: zipfile.ZipFile - zipfile.ZipFile overwrites files outside destination 
path

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



[issue6973] subprocess.Popen.send_signal doesn't check whether the process has terminated

2009-09-22 Thread Milko Krachounov

New submission from Milko Krachounov pyt...@milko.3mhz.net:

When subprocess.Popen.send_signal is called, it simply calls
os.kill(self.pid, ...) without checking whether the child has already
terminated. If the child has been terminated, and Popen.wait() or
Popen.poll() have been called, a process with PID self.pid no longer
exists, and what's worse, could belong to a totally unrelated process.

A better behavior would be to raise an exception when self.returncode is
not None. Alternatively, self.pid might be set to None after the process
has been terminated, as it is no longer meaningful. Or to another value
that would be invalid pid and invalid argument to os.kill and os.wait,
but unlike None would still evaluate to True.

--
components: Library (Lib)
messages: 93022
nosy: milko.krachounov
severity: normal
status: open
title: subprocess.Popen.send_signal doesn't check whether the process has 
terminated
type: behavior
versions: Python 2.6, Python 3.1

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



[issue6971] Add the SIO_KEEPALIVE_VALS option to socket.ioctl

2009-09-22 Thread Kristján Valur Jónsson

Changes by Kristján Valur Jónsson krist...@ccpgames.com:


--
type:  - feature request

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



[issue3786] _curses, _curses_panel _multiprocessing can't be build in 2.6b3 w/ SunStudio 12

2009-09-22 Thread Ian Donaldson

Ian Donaldson i...@ekit-inc.com added the comment:

For those not desiring the use of the chgat function and wishing
to avoid all the fun suggested in the last post (like me), and just
get a _cursesmodule built on Solaris 9 or 10... I enclose a simple patch.

--
nosy: +iandekit
Added file: http://bugs.python.org/file14951/EKIT.PATCH1

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



[issue3876] multiprocessing does not compile on systems which do not define sem_timedwait

2009-09-22 Thread Ian Donaldson

Ian Donaldson i...@ekit-inc.com added the comment:

Similarly, compile fails on Solaris 9 due to lack of sem_timedwait()
so here is a patch for that.  Solaris 10 was the first Solaris
to have this function so the patch adapts for that case.

--
nosy: +iandekit
Added file: http://bugs.python.org/file14952/EKIT.PATCH3

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



[issue3876] multiprocessing does not compile on systems which do not define sem_timedwait

2009-09-22 Thread Ian Donaldson

Ian Donaldson i...@ekit-inc.com added the comment:

Similar to aix-patch, I enclose what I did for compilation
on Solaris 9, using macros from Solaris 10's headers.

These differ slightly to the aix ones, but I don't know if the
difference matters.  (alignment related)

--
Added file: http://bugs.python.org/file14953/EKIT.PATCH2

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



[issue6974] test_posix getcwd test leaves tmp dir

2009-09-22 Thread Ian Donaldson

New submission from Ian Donaldson i...@ekit-inc.com:

whilst debugging the getcwd test on Solaris 9 I noticed that
the rmtree() failed, as on Solaris rmdir(2) returns EINVAL
if cwd is the named directory.

Fix is to reorder the rmtree and chdir, see attached patch.

--
components: Tests
files: EKIT.PATCH4
messages: 93026
nosy: iandekit
severity: normal
status: open
title: test_posix getcwd test leaves tmp  dir
type: behavior
versions: Python 2.6
Added file: http://bugs.python.org/file14954/EKIT.PATCH4

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



[issue6975] symlinks incorrectly resolved on Linux

2009-09-22 Thread Sylwester Warecki

New submission from Sylwester Warecki sware...@cox.net:

Hi

The behavior of os.realpath function on Linux is different from the one 
presented by the system. 
Although the path (pointing to the linked dir) is correct
and is recognized by os.path.exists once it is resolved
by the realpath() it does not exist - at the end of the 
resolved path you will see the additional parent directory name.
you will see
. /two/two at the end of the path.

Below is the code that shows the issue.

def linkGen():
  import os
  print os.getcwd()
  test = ./test
  os.system( rm -rf  + test  )  
  #os.mkdir( test )
  os.makedirs( test + /one )
  os.makedirs( test + /two )
  os.symlink( ../two, test + /two/this_dir )
  os.symlink( ../two/this_dir/this_dir/this_dir/this_dir/, test + 
/one/that_dir )
  print test + /one/that_dir, EXISTS?,   
  print os.path.exists( test + /one/that_dir )
  print os.path.realpath( test + /one/that_dir ), EXISTS?, 
  print os.path.exists( os.path.realpath( test + /one/that_dir ) )
  os.system( ls -l  + test + /one/that_dir )
  # the line above will show that system can see the directory just fine

linkGen()

--
components: Library (Lib)
messages: 93027
nosy: swarecki
severity: normal
status: open
title: symlinks incorrectly resolved on Linux
type: behavior
versions: Python 2.5

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



[issue6976] getcwd hangs and leaks mem on Solaris = 9 in very long file name case

2009-09-22 Thread Ian Donaldson

New submission from Ian Donaldson i...@ekit-inc.com:

test_posix hung on Solaris 9 ... traced to getcwd test hanging.

This in turn was traced to the very long filename case...
It seems posixmodule was modified (since py2.4.3 at least) 
to retry getcwd with a bigger buffer if ERANGE occurs.  

However on Solaris 9 its not documented that ERANGE also
occurs if getcwd(3) can't cope with the path length, even
if the buffer is big enough.  This causes posix_getcwd() to
loop malloc'ing a bigger buffer, forever.

I enclose a patch that limits the damage, to 1Mbyte at least.
(not sure if more recent Solaris 9 patches than we have
provide another solution)

On Solaris 10, there is no problem as the getcwd() is implemented
as a system call.

--
components: Build
files: EKIT.PATCH5
messages: 93028
nosy: iandekit
severity: normal
status: open
title: getcwd hangs and leaks mem on Solaris = 9 in very long file name case
type: resource usage
versions: Python 2.6
Added file: http://bugs.python.org/file14955/EKIT.PATCH5

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



[issue6975] symlinks incorrectly resolved on Linux

2009-09-22 Thread Sylwester Warecki

Sylwester Warecki sware...@cox.net added the comment:

Hi
I meant of course 
os.path.realpath()
Sylwester

--

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