[issue6975] symlinks incorrectly resolved on Linux

2009-09-22 Thread Sylwester Warecki
Sylwester Warecki added the comment: Hi I meant of course os.path.realpath() Sylwester -- ___ Python tracker ___ ___ Python-bugs-list

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

[issue6975] symlinks incorrectly resolved on Linux

2009-09-22 Thread Sylwester Warecki
New submission from Sylwester Warecki : 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

[issue6974] test_posix getcwd test leaves tmp dir

2009-09-22 Thread Ian Donaldson
New submission from Ian Donaldson : 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

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

2009-09-22 Thread Ian Donaldson
Ian Donaldson 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.or

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

2009-09-22 Thread Ian Donaldson
Ian Donaldson 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/E

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

2009-09-22 Thread Ian Donaldson
Ian Donaldson 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.pyth

[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 : -- type: -> feature request ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

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

2009-09-22 Thread Milko Krachounov
New submission from Milko Krachounov : 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

[issue6972] zipfile.ZipFile overwrites files outside destination path

2009-09-22 Thread Ralf Schmitt
Changes by Ralf Schmitt : -- title: zipfile.ZipFile -> zipfile.ZipFile overwrites files outside destination path ___ Python tracker ___ __

[issue6972] zipfile.ZipFile

2009-09-22 Thread Ralf Schmitt
New submission from Ralf Schmitt : 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]]])

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

[issue1766304] improve xrange.__contains__

2009-09-22 Thread Mark Dickinson
Mark Dickinson 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

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

2009-09-22 Thread Zvezdan Petkovic
Zvezdan Petkovic 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

[issue6970] Redundant calls made to comparison methods.

2009-09-22 Thread Brett Cannon
Brett Cannon 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 ___

[issue6964] import new fails

2009-09-22 Thread Brett Cannon
Brett Cannon 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 cover

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

2009-09-22 Thread Brett Cannon
Brett Cannon 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

[issue1766304] improve xrange.__contains__

2009-09-22 Thread Mark Dickinson
Mark Dickinson 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

[issue6958] Add Python command line flags to configure logging

2009-09-22 Thread Vinay Sajip
Vinay Sajip added the comment: Ummm, s/logging -m/-m logging/ -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue6958] Add Python command line flags to configure logging

2009-09-22 Thread Vinay Sajip
Vinay Sajip 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 po

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

[issue6958] Add Python command line flags to configure logging

2009-09-22 Thread Doug Hellmann
Doug Hellmann 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 config

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

[issue6958] Add Python command line flags to configure logging

2009-09-22 Thread Thomas Heller
Thomas Heller 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 setting

[issue6958] Add Python command line flags to configure logging

2009-09-22 Thread Thomas Heller
Thomas Heller added the comment: > Jean-Paul Calderone: > > How about putting this into the logging module instead? Instead of > "python ", making it > "python -m logging > This: > > * involves no changes to the core interpreter > * only requires Python to be written, not C > * Le

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

2009-09-22 Thread cscscs
cscscs added the comment: hi ron, thanks for the information. much appreciated. best regards. Ronald Oussoren wrote: > Ronald Oussoren 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 sup

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

[issue6632] Include more fullwidth chars in the decimal codec

2009-09-22 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Martin v. Löwis wrote: > > Martin v. Löwis 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'

[issue6269] threading documentation makes no mention of the GIL

2009-09-22 Thread Rene Dudfield
Rene Dudfield 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 pa

[issue6970] Redundant calls made to comparison methods.

2009-09-22 Thread Mark Dickinson
Mark Dickinson 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): ...

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

2009-09-22 Thread Ronald Oussoren
Ronald Oussoren 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/l

[issue6970] Redundant calls made to comparison methods.

2009-09-22 Thread Mark Dickinson
New submission from Mark Dickinson : 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: ...

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

2009-09-22 Thread Charles Cazabon
Charles Cazabon 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 ___ _

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

2009-09-22 Thread Zvezdan Petkovic
Zvezdan Petkovic added the comment: I assume you had to pass extra -I and -L flags when compiling with GNU readline. Right? -- ___ Python tracker ___ __

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

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

2009-09-22 Thread Ronald Oussoren
Ronald Oussoren 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 -- __

[issue6969] configparser

2009-09-22 Thread Georg Brandl
Georg Brandl 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. -

[issue6958] Add Python command line flags to configure logging

2009-09-22 Thread Vinay Sajip
Vinay Sajip added the comment: Both Doug and Jean-Paul have made good points, IMO. -- ___ Python tracker ___ ___ Python-bugs-list mail

[issue6969] configparser

2009-09-22 Thread Kandalintsev Alexandre
New submission from Kandalintsev Alexandre : 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 config.write(configfile) File "/usr

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

2009-09-22 Thread Tarek Ziadé
Tarek Ziadé 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

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

2009-09-22 Thread Ronald Oussoren
Ronald Oussoren 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

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

2009-09-22 Thread nestor
nestor added the comment: Fantastic. Applied the patch and it solved the problem with xlc 8.0 on AIX 5.3. -- ___ 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 added the comment: Make that python2.6 in the command above. :-) -- ___ Python tracker ___ ___ Python-bugs-list mail

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

2009-09-22 Thread Zvezdan Petkovic
Zvezdan Petkovic added the comment: Brett, what does this command return for you? otool -L /path/to/lib/python2.4/lib-dynload/readline.so -- ___ Python tracker ___

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

2009-09-22 Thread Jesse Noller
Jesse Noller 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

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

2009-09-22 Thread Rene Dudfield
New submission from Rene Dudfield : 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

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

2009-09-22 Thread Johan Tufvesson
Johan Tufvesson 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, dreami

[issue6632] Include more fullwidth chars in the decimal codec

2009-09-22 Thread Martin v . Löwis
Martin v. Löwis 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 c

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

2009-09-22 Thread Michael Foord
Michael Foord 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 <

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

2009-09-22 Thread Georg Brandl
Changes by Georg Brandl : -- assignee: -> michael.foord nosy: +michael.foord ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue6967] codec windows1256 should be windows windows-1256

2009-09-22 Thread Georg Brandl
Georg Brandl added the comment: Fixed in r75015. -- resolution: -> fixed status: open -> closed ___ Python tracker ___ ___ Python-bug

[issue6834] use different mechanism for pythonw on osx

2009-09-22 Thread Ronald Oussoren
Ronald Oussoren 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

[issue6967] codec windows1256 should be windows windows-1256

2009-09-22 Thread Sascha
New submission from Sascha : 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 "", line 1, in LookupError: unknown encoding: windows125

[issue6964] import new fails

2009-09-22 Thread Georg Brandl
Changes by Georg Brandl : -- assignee: -> benjamin.peterson nosy: +benjamin.peterson ___ Python tracker ___ ___ Python-bugs-list maili

[issue6961] test_distutils failure

2009-09-22 Thread Tarek Ziadé
Tarek Ziadé 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 Rene Dudfield
Rene Dudfield 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, -- ___

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

2009-09-22 Thread Johan Tufvesson
New submission from Johan Tufvesson : 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 bindi

[issue6964] import new fails

2009-09-22 Thread Quentin Gallet-Gilles
Quentin Gallet-Gilles 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

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

2009-09-22 Thread djc
New submission from djc : 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 explicitl

[issue6964] import new fails

2009-09-22 Thread Rene Dudfield
New submission from Rene Dudfield : python3.1 >>> import new Traceback (most recent call last): File "", line 1, in 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: nor