[issue14705] Add 'bool' format character to PyArg_ParseTuple*

2012-05-02 Thread Larry Hastings
New submission from Larry Hastings : Currently functions that parse their arguments with the PyArg_ParseTuple family which want to take a boolean-ish parameter face two choices: * take an "int", then test whether or not the int is 0, or * take an "object", then call PyObject_IsTrue themselve

[issue13210] Support Visual Studio 2010

2012-05-02 Thread Kristján Valur Jónsson
Kristján Valur Jónsson added the comment: Posted some comments. Also, I see you didn't remove the old SxS functionality, no longer used by VS2010 (see my sxs.patch) -- ___ Python tracker _

[issue14705] Add 'bool' format character to PyArg_ParseTuple*

2012-05-02 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Yes, I too have encountered this in the process of working on issue 14626. For this purpose it is appropriate to use a special converter (with 'O&'). I suppose it must be a strict сonverter; there is no point in specifying followlinks=[1, 2, 3]. If it is so

[issue14706] Inconsistent os.access os.X_OK on Solaris and AIX when running as root

2012-05-02 Thread Adi Roiban
New submission from Adi Roiban : The return value of os.access(FILE, os.X_OK) is not consistent across operating system when executed as "root" I have tested with Python 2.5 on Linux and Solaris, but there is a bug in python-nose reporting the same behavior with Python 2.6 on Solaris and AIX.

[issue14705] Add 'bool' format character to PyArg_ParseTuple*

2012-05-02 Thread Larry Hastings
Larry Hastings added the comment: > For this purpose it is appropriate to use a special converter > (with 'O&'). The converter works--but, then, a similar converter would also work for double, and float, and long long and many others. If long long is special enough to merit explicit support in

[issue14656] Add a macro for unreachable code

2012-05-02 Thread STINNER Victor
STINNER Victor added the comment: I think you misuse __builtin_unreachable(): the code *is* reachable, it is just very unlikely. I really prefer to return something looking valid and continue the execution of the program, instead of calling the evil Py_FatalError() in release mode which stops i

[issue14706] Inconsistent os.access os.X_OK on Solaris and AIX when running as root

2012-05-02 Thread Antoine Pitrou
Antoine Pitrou added the comment: This is not a Python bug. os.access() is just a wrapper around the POSIX access() function: http://pubs.opengroup.org/onlinepubs/9699919799/functions/faccessat.html “If any access permissions are checked, each shall be checked individually, as described in XB

[issue14656] Add a macro for unreachable code

2012-05-02 Thread Antoine Pitrou
Antoine Pitrou added the comment: > I really prefer to return something looking valid and continue the > execution of the program How would that be better? Should Python become more like PHP? -- nosy: +pitrou ___ Python tracker

[issue14656] Add a macro for unreachable code

2012-05-02 Thread STINNER Victor
STINNER Victor added the comment: Oh, I read again the patch. There are two different cases: * The code is really unreachable. Ex: the loop of lookdict() does never stop, return is used in the loop. Py_UNREACHABLE can be used in this case *to avoid a compiler warning*. __builtin_unreachable(

[issue14706] Inconsistent os.access os.X_OK on Solaris and AIX when running as root

2012-05-02 Thread Adi Roiban
Adi Roiban added the comment: Many thanks for your comment! Cheers, Adi -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue14082] shutil doesn't copy extended attributes

2012-05-02 Thread Charles-François Natali
Charles-François Natali added the comment: I really like the idea of adding extended attributes copy to shutil.cop2(). However, I'm not convinced that exposing the raw copyxattr() is necessary (I can't really come up with a use case for this). So I'd suggest make copyxattr() private, and wait u

[issue14082] shutil doesn't copy extended attributes

2012-05-02 Thread Hynek Schlawack
Hynek Schlawack added the comment: > I really like the idea of adding extended attributes copy to shutil.cop2(). > However, I'm not convinced that exposing the raw copyxattr() is > necessary (I can't really come up with a use case for this). > > So I'd suggest make copyxattr() private, and wait

[issue14517] Recompilation of sources with Distutils

2012-05-02 Thread Christophe Benoit
Christophe Benoit added the comment: 2012/4/22 Éric Araujo > > Éric Araujo added the comment: > > Is it #5372? > > -- > > ___ > Python tracker > > ___ > Yes, I think so. The p

[issue14656] Add a macro for unreachable code

2012-05-02 Thread Antoine Pitrou
Antoine Pitrou added the comment: > I like the current > solution: assert(0) + return a almost valid value, but Antoine and > Benjamin don't like the "almost valid value" (and so prefer a fatal > error?). We may issue a warning instead of a fatal error (e.g. write a > message into stderr with f

[issue14662] shutil.move doesn't handle ENOTSUP raised by chflags on OS X

2012-05-02 Thread Antoine Pitrou
Antoine Pitrou added the comment: The test fails here (Linux), since there's no os.chflags: == ERROR: test_copystat_handles_harmless_chflags_errors (test.test_shutil.TestShutil)

[issue14662] shutil.move doesn't handle ENOTSUP raised by chflags on OS X

2012-05-02 Thread Hynek Schlawack
Hynek Schlawack added the comment: Fixed for 2.7 -- Added file: http://bugs.python.org/file25434/expand-chflags-catch-2.7-v2.diff ___ Python tracker ___

[issue13032] h2py.py can fail with UnicodeDecodeError

2012-05-02 Thread Mike Gilbert
Changes by Mike Gilbert : -- nosy: +floppymaster ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.py

[issue14656] Add a macro for unreachable code

2012-05-02 Thread Georg Brandl
Georg Brandl added the comment: > If there's a bug, either an exception should be raised, or a fatal error. > We should discourage warnings on stderr (the PHP approach). Agreed. That said, I'm with Martin in that don't see how the patch in this issue helps. -- nosy: +georg.brandl ___

[issue9400] multiprocessing.pool.AsyncResult.get() messes up exceptions

2012-05-02 Thread Roundup Robot
Roundup Robot added the comment: New changeset 26bbff4562a7 by Richard Oudkerk in branch '2.7': Issue #9400: Partial backport of fix for #9244 http://hg.python.org/cpython/rev/26bbff4562a7 -- nosy: +python-dev ___ Python tracker

[issue14656] Add a macro for unreachable code

2012-05-02 Thread Martin v . Löwis
Martin v. Löwis added the comment: > Py_UNREACHABLE can be used in this case *to avoid a compiler warning*. What is the specific warning that you want to avoid, and what specific compiler version produces it currently on what specific code? It's not "control reaches end of non-void function

[issue14662] shutil.move doesn't handle ENOTSUP raised by chflags on OS X

2012-05-02 Thread Hynek Schlawack
Hynek Schlawack added the comment: Fixed for 3.2. -- Added file: http://bugs.python.org/file25435/expand-chflags-catch-3.2-v2.diff ___ Python tracker ___ ___

[issue9244] multiprocessing.pool: Worker crashes if result can't be encoded

2012-05-02 Thread Roundup Robot
Roundup Robot added the comment: New changeset 26bbff4562a7 by Richard Oudkerk in branch '2.7': Issue #9400: Partial backport of fix for #9244 http://hg.python.org/cpython/rev/26bbff4562a7 -- nosy: +python-dev ___ Python tracker

[issue14656] Add a macro for unreachable code

2012-05-02 Thread Benjamin Peterson
Benjamin Peterson added the comment: It does not avoid any warning because we have the "assert(0); return X" pattern. I was just attempting to provide a standard way of marking unreachable code. -- ___ Python tracker

[issue14662] shutil.move doesn't handle ENOTSUP raised by chflags on OS X

2012-05-02 Thread Hynek Schlawack
Hynek Schlawack added the comment: And finally tip. -- Added file: http://bugs.python.org/file25436/expand-chflags-catch-tip-v2.diff ___ Python tracker ___ _

[issue9400] multiprocessing.pool.AsyncResult.get() messes up exceptions

2012-05-02 Thread Richard Oudkerk
Richard Oudkerk added the comment: I have backported the fix for issue #9244 to 2.7. This should fix the hang and produce a traceback containing a representation of the original error. -- ___ Python tracker _

[issue14656] Add a macro for unreachable code

2012-05-02 Thread Martin v . Löwis
Martin v. Löwis added the comment: > I was just attempting to provide a standard way of marking unreachable code. I'm -1 for the proposed patch (and probably -0 on the general idea). I think the patch has the potential *introducing* new warnings, as compilers might warn that a return is lacki

[issue14366] Supporting lzma compression in zip files

2012-05-02 Thread Martin v . Löwis
Martin v. Löwis added the comment: I'm not sure where the test run time actually comes from. It's certainly desirable to reduce the test run time, as long as all test purposes are preserved. It's not necessary to do redundant tests, e.g. if some test isn't about compression, there is no point

[issue14707] extend() puzzled me.

2012-05-02 Thread Daniel543
New submission from Daniel543 : Python 2.7.3 (default, Apr 20 2012, 22:44:07) [GCC 4.6.3] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> a = ['1'] >>> b = [] >>> c = a >>> b.append(a) >>> a ['1'] >>> b [['1']] >>> c ['1'] >>> a = ['2'] >>> c.extend(a) >>> b

[issue14707] extend() puzzled me.

2012-05-02 Thread Martin v . Löwis
Martin v. Löwis added the comment: This is correct behavior, because: >>> b[0] is c True (read up on the meaning of the "is" operator, if this is not a convincing proof to you). -- nosy: +loewis resolution: -> invalid status: open -> closed ___ P

[issue14707] extend() puzzled me.

2012-05-02 Thread Ezio Melotti
Ezio Melotti added the comment: >>> a = ['1'] >>> b = [] >>> c = a # now c and a refer to the same object >>> b.append(a) # this object is appended to b >>> a ['1'] >>> b [['1']] >>> c ['1'] # a and c refer to the same object you have in b # so all these ['1'] are actually the same object >>> a

[issue14366] Supporting lzma compression in zip files

2012-05-02 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Note that the supporting of bzip2 increases the time of testing > test_zipfile in 1.5x, and lzma -- 2x (total 3x). May be not all tests > are needed? I think it's ok. Some of our tests run quite longer than that; and better to be exhaustive than fast (even t

[issue13903] New shared-keys dictionary implementation

2012-05-02 Thread Benjamin Peterson
Changes by Benjamin Peterson : -- resolution: -> fixed status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing lis

[issue9530] integer undefined behaviors

2012-05-02 Thread Chris Rebert
Changes by Chris Rebert : -- nosy: +cvrebert ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.

[issue14698] test_posix failures - getpwduid()/initgroups()/getgroups()

2012-05-02 Thread Roundup Robot
Roundup Robot added the comment: New changeset 45f0272f5296 by Charles-François Natali in branch '2.7': Issue #14698: Make test_posix more robust when the current UID doesn't have an http://hg.python.org/cpython/rev/45f0272f5296 New changeset 93424b084d08 by Charles-François Natali in branch '3

[issue9530] integer undefined behaviors

2012-05-02 Thread Mark Dickinson
Mark Dickinson added the comment: > Alternatively, I can re-run the Python test suite on a Python compiled > using our tool. Let me know if this would be helpful. Definitely helpful if you have the time! Yes, please. Though I do intend to try out the tool for myself at some point.

[issue13183] pdb skips frames after hitting a breakpoint and running step

2012-05-02 Thread Charles-François Natali
Charles-François Natali added the comment: All 3.2 and 2.7 buildbots are still broken: http://python.org/dev/buildbot/all/builders/x86 OpenIndiana 3.2/builds/1080 """ == FAIL: test_issue13183 (test.test_pdb.PdbTestCase) ---

[issue13032] h2py.py can fail with UnicodeDecodeError

2012-05-02 Thread Arfrever Frehtes Taifersar Arahesis
Arfrever Frehtes Taifersar Arahesis added the comment: UTF-8 is default encoding in Python 3, so statements with UTF-8 characters could be accepted. Any strings are very rare in these statements. On my system, only generated TYPES.py contains 2 strings: # Included from bits/select.h __FD_ZERO

[issue14204] Support for the NPN extension to TLS/SSL

2012-05-02 Thread Colin Marc
Colin Marc added the comment: Just noticed this is missing from "What's new in Python 3.3": http://docs.python.org/dev/whatsnew/3.3.html. Should I submit a patch for that? -- ___ Python tracker

[issue14204] Support for the NPN extension to TLS/SSL

2012-05-02 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Just noticed this is missing from "What's new in Python 3.3": > http://docs.python.org/dev/whatsnew/3.3.html. > Should I submit a patch for that? No need for that, the What's New document usually gets filled later in the release cycle. -- __

[issue14204] Support for the NPN extension to TLS/SSL

2012-05-02 Thread Colin Marc
Colin Marc added the comment: Ah ok, just curious. Thanks! -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue8077] cgi handling of POSTed files is broken

2012-05-02 Thread Pierre Quentel
Changes by Pierre Quentel : -- nosy: +quentel ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python

[issue13183] pdb skips frames after hitting a breakpoint and running step

2012-05-02 Thread Xavier de Gaye
Xavier de Gaye added the comment: The test has been changed in the default branch by changeset 1b174a117e19. This change replaces the assertIn by a less restrictive assertTrue. These changes should also probably be made in 3.2 and 2.7 and hopefully this will fix the problem in 3.2 and 2.7. The

[issue11618] Locks broken wrt timeouts on Windows

2012-05-02 Thread Kristján Valur Jónsson
Kristján Valur Jónsson added the comment: Again, to clarify because this seems to have been put to sleep by Martin's unfortunate dismissal. A recap of the patch: 1) Extract the Contition Variable functions on windows out of ceval_gil.h and into thread_nt_cv.h, so that they can be used in mo

[issue14632] Race condition in WatchedFileHandler leads to unhandled exception

2012-05-02 Thread Vinay Sajip
Vinay Sajip added the comment: Re. the error on open(), I have no idea why it's failing. That's just open, and it appears to be trying to open a file in a directory for which one would expect you to have write access. Re. the error on unlink(), could that be an older version of the code that

[issue14632] Race condition in WatchedFileHandler leads to unhandled exception

2012-05-02 Thread Brian Curtin
Brian Curtin added the comment: I'm seeing this with the current tip 8635825b9734. I wouldn't trust the build slaves with a race condition test since they're incredibly slow machines, but this issue isn't about the race. That path really should be accessible so I'm not sure why it's failing.

[issue14687] Optimize str%tuple for the PEP 393

2012-05-02 Thread STINNER Victor
STINNER Victor added the comment: pyunicode_format_writer.patch: a new completly different approach. It's an optimistic patch: start with a short ASCII buffer, and grows slowly the buffer, and convert to UCS2 and maybe to UCS4 if needed. The UTF-8 decoder is based on the same idea. The patch

[issue14687] Optimize str%tuple for the PEP 393

2012-05-02 Thread STINNER Victor
Changes by STINNER Victor : Removed file: http://bugs.python.org/file25388/pyunicode_format.patch ___ Python tracker ___ ___ Python-bugs-list

[issue9925] Idle doesn't launch

2012-05-02 Thread Roger Serwy
Roger Serwy added the comment: Closing this issue as a duplicate of #4625. -- resolution: -> duplicate status: pending -> closed ___ Python tracker ___ _

[issue14687] Optimize str%tuple for the PEP 393

2012-05-02 Thread Roundup Robot
Roundup Robot added the comment: New changeset 90b4c2d7c90d by Victor Stinner in branch 'default': Issue #14687: Optimize str%tuple for the "%(name)s" syntax http://hg.python.org/cpython/rev/90b4c2d7c90d -- ___ Python tracker

[issue14632] Race condition in WatchedFileHandler leads to unhandled exception

2012-05-02 Thread Vinay Sajip
Vinay Sajip added the comment: The only thing I can think of is that the file is kept open by something else (the other thread). -- ___ Python tracker ___ _

[issue12776] argparse: type conversion function should be called only once

2012-05-02 Thread Mike Meyer
Mike Meyer added the comment: I've just verified that this patch also fixes 13824 and 11839. The attached patchfile adds a test to verify that using a non-existent default file fails if you don't specify the argument, and succeeds if you do. Could someone please apply it? -- nosy: +Mi

[issue12776] argparse: type conversion function should be called only once

2012-05-02 Thread Mike Meyer
Mike Meyer added the comment: Sorry - got ahead of myself. It doesn't fix 13824. A deeper reading reveals that the problem wasn't quite what I thought it on first glance. -- ___ Python tracker ___

[issue11839] argparse: unexpected behavior of default for FileType('w')

2012-05-02 Thread Mike Meyer
Mike Meyer added the comment: Steven - 12776 indeed fixes this issue. I applied the patch from it to a build of todays checkout, verified that my simple test script worked, then wrote some test cases for test_argparse. I've uploaded the patch for that test to both issues. I can't close this a

[issue14632] Race condition in WatchedFileHandler leads to unhandled exception

2012-05-02 Thread Vinay Sajip
Vinay Sajip added the comment: The changeset you mentioned doesn't have a cleanup function in test_race (an older version used to) - so I'm not sure where that error is coming from. It's going to be hard for me to reproduce this - I was finding it pretty hard to throw up the original race con

[issue14632] Race condition in WatchedFileHandler leads to unhandled exception

2012-05-02 Thread Brian Curtin
Brian Curtin added the comment: I have exemptions set in AV for my dev folders for exactly that reason :) I'll try and poke around and get more info. -- ___ Python tracker ___ _

[issue14687] Optimize str%tuple for the PEP 393

2012-05-02 Thread STINNER Victor
STINNER Victor added the comment: > Parameters of the Unicode writer (overallocation factor > and initial size) may be adjusted (later?) for better performances. I tried to compute the initial size from the args object. It is hard because we don't know how arguments are used. For example, an a

[issue14618] remove modules_reloading from the interpreter state

2012-05-02 Thread Eric Snow
Eric Snow added the comment: from issue13959: New changeset eb68502731dd by Brett Cannon in branch 'default': Issues #13959, 14647: Re-implement imp.reload() in Lib/imp.py. http://hg.python.org/cpython/rev/eb68502731dd -- resolution: -> fixed stage: -> committed/rejected status: open

[issue14708] distutils's checking for MSVC compiler

2012-05-02 Thread jamesf
New submission from jamesf <54740...@qq.com>: I am using python 2.7.2 installed via the pre-built installer package, and my SDK version is v7.1. 1) The MSSdk environment variable is not set by lastest SDK's SetEnv.cmd anymore, but distutils still check for it. 2) I have also install MSVC 2010

[issue14708] distutils's checking for MSVC compiler

2012-05-02 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +loewis ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python

[issue14708] distutils's checking for MSVC compiler

2012-05-02 Thread Martin v . Löwis
Martin v. Löwis added the comment: > 1) The MSSdk environment variable is not set by lastest SDK's > SetEnv.cmd anymore, but distutils still check for it. This is intentional. Older SDKs still set the variable, so there is nothing wrong with checking it. > 2) I have also install MSVC 2010 Exp