[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

[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

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

[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

[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

[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

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

[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

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

[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

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

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

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

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

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

[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

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

[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

[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

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

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

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

[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

[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

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

[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

[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

[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

[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

[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

[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

[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

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

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

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

[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

[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

[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

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

[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

[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

[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

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

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

[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

[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

[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

[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

[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

[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. -- ___

[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

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

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

[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

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

[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

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

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

[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

[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

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

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