[issue8601] bz2.BZ2File should support "with" protocol per PEP 343

2010-05-02 Thread Matt Wartell
New submission from Matt Wartell : As the bz2.BZ2File object claims to be a file-like object it should conform to PEP 343 "The 'with' statement" by implementation of the __enter__ and __exit__ methods. boring, substantiating detail follows: $ uname -a Linux tallguy 2.6.32-21-generic #32-Ubunt

[issue8427] toplevel jumps to another location on the screen

2010-05-02 Thread Andrei Paraschivescu
Changes by Andrei Paraschivescu : -- type: -> behavior ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://m

[issue6763] Crash on mac os x leopard in mimetypes.guess_type (or PyObject_Malloc)

2010-05-02 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- assignee: -> ronaldoussoren components: +Macintosh ___ Python tracker ___ ___ Python-bugs-list ma

[issue3720] segfault in for loop with evil iterator

2010-05-02 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- keywords: +26backport ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http:

[issue8583] Hardcoded namespace_separator in the cElementTree.XMLParser

2010-05-02 Thread Dmitry Chichkov
Dmitry Chichkov added the comment: Interestingly in precisely these applications often you don't care about namespaces at all. Often all you need is to extract 'text' or 'name' elements irregardless of the namespace. -- ___ Python tracker

[issue8583] Hardcoded namespace_separator in the cElementTree.XMLParser

2010-05-02 Thread Dmitry Chichkov
Dmitry Chichkov added the comment: I agree that the argument name choice is poor. But it have already been made by whoever coded the EXPAT parser which cElementTree.XMLParser wraps. So there is not much room here. As to 'proposed feature have to be used with great care by users' - this s alr

[issue1429] FD leak in SocketServer

2010-05-02 Thread Jeff McNeil
Jeff McNeil added the comment: I was toying with adding Unix Socket support for one of our internal tools and I thought I ran into a leak in my own code. Searched the bug tracker and found this. I tried to reproduce, but wasn't able to. Though, if you look at the ThreadingMixIn class, you'll

[issue1533] Bug in range() function for large values

2010-05-02 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : Removed file: http://bugs.python.org/file17189/issue1533.diff ___ Python tracker ___ ___ Python-bugs-list mai

[issue1533] Bug in range() function for large values

2010-05-02 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: > - Please could you also add a test for small arguments for each test > class? Done. -- Added file: http://bugs.python.org/file17190/issue1533.diff ___ Python tracker __

[issue1533] Bug in range() function for large values

2010-05-02 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On Sun, May 2, 2010 at 4:37 AM, Mark Dickinson wrote: .. >  - Please could you also add a test for small arguments for each test >   class? Working on it ... -- ___ Python tracker

[issue1533] Bug in range() function for large values

2010-05-02 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : Removed file: http://bugs.python.org/file17171/bltinmodule3.diff ___ Python tracker ___ ___ Python-bugs-list

[issue1533] Bug in range() function for large values

2010-05-02 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : Removed file: http://bugs.python.org/file17176/bltinmodule4.diff ___ Python tracker ___ ___ Python-bugs-list

[issue1533] Bug in range() function for large values

2010-05-02 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : Removed file: http://bugs.python.org/file9543/bltinmodule.diff ___ Python tracker ___ ___ Python-bugs-list ma

[issue1533] Bug in range() function for large values

2010-05-02 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Attached patch, issue1533.diff, simplifies reference acrobatics at the expense of extra local variables. For the first time the first compilation did not have reference counting errors! -- Added file: http://bugs.python.org/file17189/issue1533.

[issue8600] test_gdb failures

2010-05-02 Thread Antoine Pitrou
New submission from Antoine Pitrou : All test_gdb tests fail here with both trunk and py3k. The failure is always the same so I'm just quoting one of them below: == FAIL: test_basic_command (test.test_gdb.PyBtTests) Verify that

[issue8596] crypt blowfish 'ignores' salt

2010-05-02 Thread pvo
pvo added the comment: $2a$12$saltysalt$ignored ^ ^ ^ ^ | | | \_ignored | | \_the salt | \_number of rounds (04-31) \_ crypt id About the crypt id: I read too much Blowfish crypt related stuff in the recent both days. Can't remember exactly the difference between

[issue8596] crypt blowfish 'ignores' salt

2010-05-02 Thread Mark Dickinson
Mark Dickinson added the comment: > FreeBSD's crypt(3) doesn't explain the 'salt' for Blowfish crypt exactly. Reading: http://www.freebsd.org/cgi/man.cgi?query=crypt&apropos=0&sektion=3&manpath=FreeBSD+7.2-RELEASE&format=html and especially the section entitled "Modular crypt", it looks like

[issue8576] test_support.find_unused_port can cause socket conflicts on Windows

2010-05-02 Thread Antoine Pitrou
Antoine Pitrou added the comment: > See, for example, the test for "source_address" parameter of > socket.create_connection() function. Instead of testing the port, you could test the host. For example by using two different loopback addresses (127.0.0.1 and 127.0.0.2?). Would it work on every

[issue8576] test_support.find_unused_port can cause socket conflicts on Windows

2010-05-02 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: > find_unused_port is the wrong approach altogether. Uses of it should > be replaced by bind_port and then find_unused_port should be removed I agree find_unused_port() is the wrong approach in general, but there are certain cases where this is needed. S

[issue8594] Add a "source_address" option to ftplib

2010-05-02 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: > You should not use find_unused_port() I agree find_unused_port() is the wrong approach in general, but in this case I think there's nothing we can do about it. > you never set self.source_address. You're right, I should set it in connect() method. I'm g

[issue8596] crypt blowfish 'ignores' salt

2010-05-02 Thread pvo
pvo added the comment: FreeBSD's crypt(3) doesn't explain the 'salt' for Blowfish crypt exactly. OpenBSD's crypt(3) says: "The Blowfish version of crypt has 128 bits of salt in order to make building dictionaries of common passwords space consuming." I wrote a few lines of C code. Copied the

[issue8598] test/support: don't use localhost as IPv6 host name

2010-05-02 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' : -- nosy: +giampaolo.rodola ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http:/

[issue3704] cookielib doesn't handle URLs with / in parameters

2010-05-02 Thread Tres Seaver
Tres Seaver added the comment: I can confirm that the patch applies cleanly to the release26-maint branch, and that the updated test fails without the updated implementation. However, the entire approach seems wrong to me: the patched method has just called 'request_path', which already cracke

[issue8514] Create fsencode() and fsdecode() functions in os.path

2010-05-02 Thread Martin v . Löwis
Martin v. Löwis added the comment: I really, really, REALLY think that it is bad to mix issues. This makes patch review impossible. This specific issue is about introducing an fsdecode and fsencode function; this is what the bug title says, and what the initial patch did. Whether or not byte

[issue4265] shutil.copyfile() leaks file descriptors when disk fills

2010-05-02 Thread Tarek Ziadé
Changes by Tarek Ziadé : -- assignee: -> tarek nosy: +tarek ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: htt

[issue1777134] minidom pretty xml output improvement

2010-05-02 Thread Tres Seaver
Tres Seaver added the comment: The patch applies cleanly to the 2.6 branch, and with minimal fuzz to the trunk. Exsting tests pass in both cases, as does the new test. The added testcase seems plainly correct. The first hunk of the diff to Lib/xml/dom/minidom.py is a little messy / hard to f

[issue4687] GC stats not accurate because of debug overhead

2010-05-02 Thread Antoine Pitrou
Antoine Pitrou added the comment: Thank you. Now committed in r80704 (trunk), r80705 (py3k), r80706 (2.6), r80707 (3.1). -- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed versions: +Python 3.1, Python 3.2 ___

[issue4265] shutil.copyfile() leaks file descriptors when disk fills

2010-05-02 Thread Tres Seaver
Tres Seaver added the comment: The patch doesn't apply cleanly to trunk. Attached is one which does. -- Added file: http://bugs.python.org/file17186/issue4265_shutil_copyfile-trunk.patch ___ Python tracker __

[issue4265] shutil.copyfile() leaks file descriptors when disk fills

2010-05-02 Thread Tres Seaver
Changes by Tres Seaver : -- versions: +Python 2.6 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.py

[issue4265] shutil.copyfile() leaks file descriptors when disk fills

2010-05-02 Thread Tres Seaver
Tres Seaver added the comment: This bug exists on Python 2.6, too. It seems to me that the right solution here is to use both opened files as context managers. See attached patch (made against the release26-maint branch). The patch also cleans up the old-style exception signature in the prec

[issue4687] GC stats not accurate because of debug overhead

2010-05-02 Thread Tres Seaver
Changes by Tres Seaver : -- versions: +Python 2.6 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.py

[issue4687] GC stats not accurate because of debug overhead

2010-05-02 Thread Tres Seaver
Tres Seaver added the comment: The patch looks obviously correct to me. I can confirm that the patch applies cleanly both to the trunk and to the 'release26-maint' branch, and that the 'test_gc' tests pass in both cases after applying it and rebuilding. -- nosy: +tseaver ___

[issue8598] test/support: don't use localhost as IPv6 host name

2010-05-02 Thread STINNER Victor
STINNER Victor added the comment: Oh, I forgot to copy/paste a test_ftplib failure: == ERROR: test_makeport (test.test_ftplib.TestIPv6Environment) -- Traceback

[issue8583] Hardcoded namespace_separator in the cElementTree.XMLParser

2010-05-02 Thread Stefan Behnel
Stefan Behnel added the comment: There is at least one valid use case: code that needs to deal with HTML and XHTML currently has to normalise the tag names in some way, which usually means that it will want to remove the namespaces from XHTML documents to make it look like plain HTML. It woul

[issue8533] regrtest: use backslashreplace error handler for stdout

2010-05-02 Thread STINNER Victor
STINNER Victor added the comment: As "expected", the patch doesn't work: it randomize the output order :-( I checked "sparc Ubuntu 3.x": the output order is correct. "test_xxx" lines are written to stdout, "FAIL: ..." + traceback are written to stderr, and the lines are written in the right o

[issue4180] warnings.simplefilter("always") does not make warnings always show up

2010-05-02 Thread Brett Cannon
Changes by Brett Cannon : -- assignee: -> exarkun keywords: +needs review ___ Python tracker ___ ___ Python-bugs-list mailing list Uns

[issue2091] file accepts 'rU+' as a mode

2010-05-02 Thread Brett Cannon
Changes by Brett Cannon : -- keywords: +needs review stage: patch review -> commit review ___ Python tracker ___ ___ Python-bugs-list m

[issue7546] msvc9compiler.py: add .asm extension

2010-05-02 Thread Tarek Ziadé
Tarek Ziadé added the comment: Distutils is frozen, switching to distutils2 -- components: +Distutils2 -Distutils ___ Python tracker ___ _

[issue8597] build out-of-line asm on Windows

2010-05-02 Thread Tarek Ziadé
Tarek Ziadé added the comment: Distutils is frozen, switching to distutils2 -- components: +Distutils2 -Distutils ___ Python tracker ___ _

[issue8598] test/support: don't use localhost as IPv6 host name

2010-05-02 Thread R. David Murray
R. David Murray added the comment: All of my Gentoo systems except one have localhost on the ::1 line. The one that doesn't hasn't been updated in several years. That one has the same entry for ::1 as your Ubuntu. The FreeBSD 6.3 box I have access to has localhost on the ::1 line. It has l

[issue8597] build out-of-line asm on Windows

2010-05-02 Thread Stefan Krah
Stefan Krah added the comment: I think this is a duplicate of issue 7546. -- nosy: +skrah type: behavior -> feature request ___ Python tracker ___ ___

[issue8599] _execvpe behaves inconsistently when PATH includes a filename

2010-05-02 Thread R. David Murray
R. David Murray added the comment: The python functions are thin wrappers around the system calls, and are reporting the result of calling the corresponding system call. The fact that the shell chooses to catch both errors and report a single one would be equivalent to, say, the cmd module d

[issue8599] _execvpe behaves inconsistently when PATH includes a filename

2010-05-02 Thread Oren Held
Changes by Oren Held : -- title: _execvpe should behaves inconsistently when PATH includes a filename -> _execvpe behaves inconsistently when PATH includes a filename ___ Python tracker

[issue8599] _execvpe should behaves inconsistently when PATH includes a filename

2010-05-02 Thread Oren Held
New submission from Oren Held : A. Description When running os._execvpe with a relative pathname that does not exist, I'd expect to get ENOENT error. But there is an edge case in which Python throws ENOTDIR error - when the LAST element in PATH is a regular file (e.g. /bin/ls). This case is ca

[issue3445] Ignore missing attributes in functools.update_wrapper

2010-05-02 Thread July Tikhonov
July Tikhonov added the comment: Patch updated: bound and unbound methods, user-defined callable, partial object included in test. By the way, >>> [id(abs.__doc__) for i in range(5)] [140714383081744, 140714383081744, 140714383081744, 140714383081744, 140714383081744] >>> [id(s) for s in [ab

[issue8597] build out-of-line asm on Windows

2010-05-02 Thread Brian Curtin
Changes by Brian Curtin : -- nosy: +brian.curtin ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyt

[issue7192] webbrowser.get("firefox") does not work on Mac with installed Firefox

2010-05-02 Thread R. David Murray
R. David Murray added the comment: issue 8238 notes the problem with autoraise and new on windows. I believe when I looked at that issue that I confirmed that the syntax webbrowser uses on Linux to support those options works on windows with the current firefox, even though I couldn't find t

[issue8538] Add ConfigureAction to argparse

2010-05-02 Thread Yaniv Aknin
Changes by Yaniv Aknin : -- nosy: +Yaniv.Aknin ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pytho

[issue8455] buildbot: test_urllib2_localnet failures (Connection refused) on Tiger buildbot

2010-05-02 Thread Mark Dickinson
Mark Dickinson added the comment: To clarify, that last message was about trunk, where this test is failing for me since r80243. Adding 2.7 to the versions. -- versions: +Python 2.7 ___ Python tracker ___

[issue8455] buildbot: test_urllib2_localnet failures (Connection refused) on Tiger buildbot

2010-05-02 Thread Mark Dickinson
Mark Dickinson added the comment: I'm also seeing this on OS X 10.6. It seems to have started with r80243. -- nosy: +mark.dickinson, ronaldoussoren ___ Python tracker ___ __

[issue8533] regrtest: use backslashreplace error handler for stdout

2010-05-02 Thread Antoine Pitrou
Antoine Pitrou added the comment: Since it may reorder output, I think it's better revert the patch and try the other solution. However, I don't think you need to replace sys.stdout at all: just output the traceback more carefully. -- status: pending -> open _

[issue8567] decimal module doesn't respect precedence rules for exceptional conditions

2010-05-02 Thread Mark Dickinson
Changes by Mark Dickinson : -- stage: unit test needed -> patch review ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubsc

[issue8598] test/support: don't use localhost as IPv6 host name

2010-05-02 Thread STINNER Victor
STINNER Victor added the comment: Debian Sid has "::1 ip6-localhost ip6-loopback localhost". -- ___ Python tracker ___ ___ Python-bugs

[issue8598] test/support: don't use localhost as IPv6 host name

2010-05-02 Thread STINNER Victor
STINNER Victor added the comment: Mac OS X 10.6.3 has "::1 localhost". My Ubuntu 9.10 has "::1 ip6-localhost ip6-loopback" but I don't rember if I edited this line or not. I don't think so. -- ___ Python tracker

[issue8596] crypt blowfish 'ignores' salt

2010-05-02 Thread Mark Dickinson
Changes by Mark Dickinson : -- resolution: -> invalid status: open -> pending ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue8598] test/support: don't use localhost as IPv6 host name

2010-05-02 Thread STINNER Victor
STINNER Victor added the comment: Attached patch uses IPV6_HOST='::1'. -- keywords: +patch Added file: http://bugs.python.org/file17183/support_ipv6_host.patch ___ Python tracker ___

[issue8596] crypt blowfish 'ignores' salt

2010-05-02 Thread Mark Dickinson
Mark Dickinson added the comment: I doubt this is a Python issue, since the crypt function does little more than wrap the system crypt function. What does your man page for crypt say? Are you sure you're providing a salt that the system crypt accepts? -- nosy: +mark.dickinson _

[issue8598] test/support: don't use localhost as IPv6 host name

2010-05-02 Thread STINNER Victor
New submission from STINNER Victor : TestIPv6Environment testcase of test_ftplib uses support.HOST as hostname, and HOST=localhost. Usually, localhost is the name of 127.0.0.1, but not always ::1. On Linux, the usual names for ::1 are ip6-localhost or ip6-loopback. My internet server provider

[issue7192] webbrowser.get("firefox") does not work on Mac with installed Firefox

2010-05-02 Thread Ronald Oussoren
Ronald Oussoren added the comment: I've ported the change to 3.2 as well. -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue7192] webbrowser.get("firefox") does not work on Mac with installed Firefox

2010-05-02 Thread Ronald Oussoren
Ronald Oussoren added the comment: Firefox doesn't seem to support a full scripting api, which makes opening tabs and windows harder. I've committed an alternate version of your patch in r80698: This uses osascript to open the url instead of the open command. I've also added a registration f

[issue1533] Bug in range() function for large values

2010-05-02 Thread Mark Dickinson
Mark Dickinson added the comment: BTW, I've changed the various "nb_int should return int object" error messages in Objects/intobject.c to the more meaningful and accurate message: "__int__ method should return an integer", in r80695. -- ___ Python

[issue8589] test_warnings.CEnvironmentVariableTests.test_nonascii fails under an ascii terminal

2010-05-02 Thread STINNER Victor
STINNER Victor added the comment: The bug only occurs on Mac OS X because file system encoding is hardcoded to UTF-8 on this OS and the test is skipped if the file system encoding is ASCII. But the bug is not specific to test_warnings, as mentionned by R. David Murray: #8533 is the real bug.

[issue8533] regrtest: use backslashreplace error handler for stdout

2010-05-02 Thread STINNER Victor
STINNER Victor added the comment: Ok, let's try sys.stderr solution: commited in r80694 (py3k). If it breaks buildbot outputs, I will revert it and try the second solution. -- status: open -> pending ___ Python tracker

[issue1533] Bug in range() function for large values

2010-05-02 Thread Mark Dickinson
Mark Dickinson added the comment: Thinking about it a bit more, I really would prefer get_range_argument not to steal a reference. If I'm reading a bit of C code and encounter something like: obj = transform(obj); if (obj == NULL) ... my hindbrain immediately starts fretting that somethi

[issue1533] Bug in range() function for large values

2010-05-02 Thread Mark Dickinson
Mark Dickinson added the comment: Thanks---the new patch looks good. Pulling the argument conversion out into a separate function makes the whole thing much cleaner. I still have a couple of nits: - Please add a comment before get_range_argument indicating what it's for. I'd also consid