[issue12282] ABCMeta import error during build

2011-06-08 Thread Ned Deily
Ned Deily n...@acm.org added the comment: It's being called for hg: -DHGVERSION=\`LC_ALL=C hg id -i .`\ ... -- nosy: +ned.deily ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12282 ___

[issue12197] non-blocking SSL write in Windows sends large data but raises exception

2011-06-08 Thread David Siroky
David Siroky sir...@dasir.cz added the comment: Sorry, I attached wrong example version. It uses repeated sslsock.write() of the same buffer after catching SSL_ERROR_WANT_WRITE. It delivers the full block but this is a blocking operation. I'm troubled with non-blocking writes. But as I dig

[issue12283] python3.2 smtplib _quote_periods

2011-06-08 Thread DDarko
New submission from DDarko ddarko...@gmail.com: File /usr/lib/python3.2/smtplib.py, line 166, in _quote_periods def _quote_periods(bindata): return re.sub(br'(?m)^\.', '..', bindata) should be: return re.sub(br'(?m)^\.', b'..', bindata) -- components: Extension Modules messages:

[issue12283] python3.2 smtplib _quote_periods

2011-06-08 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- components: +Library (Lib) -Extension Modules nosy: +r.david.murray stage: - patch review type: - behavior versions: +Python 3.3 ___ Python tracker rep...@bugs.python.org

[issue11941] Support st_atim, st_mtim and st_ctim attributes in os.stat_result

2011-06-08 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: I'm not sure if that's deliberate, but the new attributes don't appear in the result repr(): s = os.stat(LICENSE) s posix.stat_result(st_mode=33204, st_ino=524885, st_dev=2053, st_nlink=1, st_uid=500, st_gid=500, st_size=14597,

[issue11277] Crash with mmap and sparse files on Mac OS X

2011-06-08 Thread Steffen Daode Nurpmeso
Steffen Daode Nurpmeso sdao...@googlemail.com added the comment: Ok, this patch could be used. *Unless* the code is not protected by the GIL. - Gestalt usage is a bit more complicated according to http://www.cocoadev.com/index.pl?DeterminingOSVersion unless Python only supports OS X

[issue11277] Crash with mmap and sparse files on Mac OS X

2011-06-08 Thread Steffen Daode Nurpmeso
Changes by Steffen Daode Nurpmeso sdao...@googlemail.com: Removed file: http://bugs.python.org/file22273/11277.apple-fix.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11277 ___

[issue12281] bytes.decode('mbcs', 'ignore') does replace undecodable bytes on Windows Vista or later

2011-06-08 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: mbcs.patch fixes PyUnicode_DecodeMBCS(): - only use flags=0 if errors=replace on Windows = Vista or if errors=ignore on Windows Vista - support any error handler - support any code page (but the code page is hardcoded to CP_ACP)

[issue12281] bytes.decode('mbcs', 'ignore') does replace undecodable bytes on Windows Vista or later

2011-06-08 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Example with ANSI=cp932 (on Windows Seven): - b'abc\xffdef'.decode('mbcs', 'replace') gives 'abc\uf8f3def' - b'abc\xffdef'.decode('mbcs', 'ignore') gives 'abcdef' -- nosy: +ocean-city

[issue12281] bytes.decode('mbcs', 'ignore') does replace undecodable bytes on Windows Vista or later

2011-06-08 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Example with ANSI=cp932 (on Windows Seven): - b'abc\xffdef'.decode('mbcs', 'replace') gives 'abc\uf8f3def' - b'abc\xffdef'.decode('mbcs', 'ignore') gives 'abcdef' Oh, and b'\xff'.decode('mbcs', 'surrogateescape') gives '\udcff'

[issue12284] argparse.ArgumentParser: usage example option

2011-06-08 Thread Jonas H.
New submission from Jonas H. jo...@lophus.org: I'd like to see an `examples` option added to argparse.ArgumentParser as found in many man pages. This could also be done using the `epilog` option, but that misses the %(proc)s replacement which makes usage examples like this Example usage:

[issue11549] Build-out an AST optimizer, moving some functionality out of the peephole optimizer

2011-06-08 Thread Nick Coghlan
Nick Coghlan ncogh...@gmail.com added the comment: As Raymond noted though, some of the block stack fiddling doesn't make sense until after the bytecode has already been generated. It's OK to have multiple optimisers at different layers, each taking care of the elements that are best suited

[issue11277] Crash with mmap and sparse files on Mac OS X

2011-06-08 Thread Ronald Oussoren
Ronald Oussoren ronaldousso...@mac.com added the comment: Steffen: _mac_ver_xml should not be dropped, it is a perfectly fine way to determine the system version. Discussing it is also off-topic for this issue, please keep the discussion focussed. Wrt. mailing Apple: I wouldn't expect and

[issue12285] Unexpected behavior for 0 or negative processes in multiprocessing.pool()

2011-06-08 Thread Jorgen Skancke
New submission from Jorgen Skancke jor...@nt.ntnu.no: A normal way to start a multiprocessing-pool is like this: Multiprocessing.Pool(processes=some_number). However, if 'some_number' is 0 or negative, Python hangs and must be killed. I would expect an error message of the type: Number of

[issue12284] argparse.ArgumentParser: usage example option

2011-06-08 Thread R. David Murray
Changes by R. David Murray rdmur...@bitdance.com: -- nosy: +bethard ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12284 ___ ___ Python-bugs-list

[issue12282] ABCMeta import error during build

2011-06-08 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: As far as I can tell my python2.7 installation is fine and bug free. hg is working fine when called from the command line. -- ___ Python tracker rep...@bugs.python.org

[issue12279] Add build_distinfo command to packaging

2011-06-08 Thread higery
higery shoulderhig...@gmail.com added the comment: Now, the workaround of my code is just setting the 'distinfo-dir' option with os.curdir value through calling a 'reinitialize_command(self, command, reinit_subcommands=False, **kw)' function , which is added in packaging's Command class for

[issue12282] build process adds CWD (null entry) to PYTHONPATH if PYTHONPATH is set in the build environment

2011-06-08 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: It turns out that I had a stray abc.py file in my current working directory as the result of some previous tests of module-load-order rules. That by itself wouldn't have triggered the problem, but in addition, I have PYTHONPATH set in

[issue9205] Parent process hanging in multiprocessing if children terminate unexpectedly

2011-06-08 Thread Roundup Robot
Roundup Robot devnull@devnull added the comment: New changeset 6d6099f7fe89 by Antoine Pitrou in branch 'default': Issue #9205: concurrent.futures.ProcessPoolExecutor now detects killed http://hg.python.org/cpython/rev/6d6099f7fe89 -- nosy: +python-dev

[issue9205] Parent process hanging in multiprocessing if children terminate unexpectedly

2011-06-08 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: So, concurrent.futures is fixed now. Unless someone wants to patch multiprocessing.Pool, I am closing this issue. -- resolution: - fixed stage: patch review - committed/rejected status: open - closed

[issue12021] mmap.read requires an argument

2011-06-08 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Patch looks good to me, thank you :) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12021 ___

[issue12187] subprocess.wait() with a timeout uses polling on POSIX

2011-06-08 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Why not use signalfd() when available? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12187 ___

[issue12197] non-blocking SSL write in Windows sends large data but raises exception

2011-06-08 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Sorry, I attached wrong example version. It uses repeated sslsock.write() of the same buffer after catching SSL_ERROR_WANT_WRITE. It delivers the full block but this is a blocking operation. In normal non-blocking code you would use select()

[issue12021] mmap.read requires an argument

2011-06-08 Thread Roundup Robot
Roundup Robot devnull@devnull added the comment: New changeset 964d0d65a2a9 by Charles-François Natali in branch 'default': Issue #12021: Make mmap's read() method argument optional. Patch by Petri http://hg.python.org/cpython/rev/964d0d65a2a9 -- nosy: +python-dev

[issue12286] float('nan') breaks sort() method on a list of floats

2011-06-08 Thread Johann C. Rocholl
New submission from Johann C. Rocholl jcroch...@google.com: l = [1.0, 2.0, 3.0, float('nan'), 4.0, 3.0, 2.0, 1.0] l.sort() l [1.0, 2.0, 3.0, nan, 1.0, 2.0, 3.0, 4.0] The expected result is either of the following: [nan, 1.0, 1.0, 2.0, 2.0, 3.0, 3.0, 4.0] (similar to None) [1.0, 1.0, 2.0,

[issue12286] float('nan') breaks sort() method on a list of floats

2011-06-08 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: This is expected. See also #11986 and #11949. -- nosy: +belopolsky, ezio.melotti, mark.dickinson, rhettinger resolution: - invalid stage: - committed/rejected status: open - closed ___ Python

[issue12021] mmap.read requires an argument

2011-06-08 Thread Charles-François Natali
Charles-François Natali neolo...@free.fr added the comment: Patch committed. Thanks for the report and the patch! -- resolution: - fixed stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org

[issue12286] float('nan') breaks sort() method on a list of floats

2011-06-08 Thread Alexander Belopolsky
Alexander Belopolsky belopol...@users.sourceforge.net added the comment: This is actually a duplicate of issue7915. I don't think there is nothing we can do to improve the situation. In fact discussion at #11949 ends with a +0 from Mark Dickinson to issue a warning whenever nans participate

[issue12197] non-blocking SSL write in Windows sends large data but raises exception

2011-06-08 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' g.rod...@gmail.com: -- nosy: +giampaolo.rodola ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12197 ___ ___

[issue12187] subprocess.wait() with a timeout uses polling on POSIX

2011-06-08 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' g.rod...@gmail.com: -- nosy: +giampaolo.rodola ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12187 ___ ___

[issue8407] expose signalfd(2) and pthread_sigmask in the signal module

2011-06-08 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' g.rod...@gmail.com: -- nosy: +giampaolo.rodola ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8407 ___ ___

[issue1195571] simple callback system for Py_FatalError

2011-06-08 Thread Tom Whittock
Changes by Tom Whittock tom.whitt...@gmail.com: -- nosy: +Tom.Whittock ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1195571 ___ ___

[issue1195571] simple callback system for Py_FatalError

2011-06-08 Thread Gregory P. Smith
Gregory P. Smith g...@krypto.org added the comment: This makes sense, I'll add it to 3.3. -- assignee: - gregory.p.smith nosy: +gregory.p.smith ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1195571

[issue12287] ossaudiodev: stack corruption with FD = FD_SETSIZE

2011-06-08 Thread Charles-François Natali
New submission from Charles-François Natali neolo...@free.fr: ossaudiodev's writeall method doesn't check that the FD is less than FD_SETSIZE when passing it to FD_SET: since FD_SET typically doesn't do bound check, it will write to a random location in memory (in this case on the stack). I've

[issue12287] ossaudiodev: stack corruption with FD = FD_SETSIZE

2011-06-08 Thread Charles-François Natali
Changes by Charles-François Natali neolo...@free.fr: Added file: http://bugs.python.org/file22285/test_oss.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12287 ___

[issue12287] ossaudiodev: stack corruption with FD = FD_SETSIZE

2011-06-08 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: ossaudiodev's writeall method doesn't check that the FD is less than FD_SETSIZE when passing it to FD_SET: since FD_SET typically doesn't do bound check, it will write to a random location in memory (in this case on the stack). I've attached

[issue12288] Python 2.7.1 tkSimpleDialog initialvalue

2011-06-08 Thread Tom Middleton
New submission from Tom Middleton busfa...@gmail.com: Using Tkinter under Python 2.7.1 (Windows XP FWIF) If using the tkSimpleDialog.askinteger() function with an initialvalue = 0, the 0 is not displayed in the dialog box. The same is true for tkSimpleDialog.askfloat(). The cause of this

[issue1195571] simple callback system for Py_FatalError

2011-06-08 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: fatalhook-2.patch: I don't understand the documentation. It says Cause :cfunc:`Py_FatalError` to invoke the given function instead of printing to standard error and aborting out of the process., but if the callback does nothing,

[issue12287] ossaudiodev: stack corruption with FD = FD_SETSIZE

2011-06-08 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: You don't check that 0 = fd (e.g. oss.close()). The select has a specific code for Visual Studio (don't check v FD_SETSIZE): #if defined(_MSC_VER) max = 0; /* not used for Win32 */ #else /*

[issue12187] subprocess.wait() with a timeout uses polling on POSIX

2011-06-08 Thread Charles-François Natali
Charles-François Natali neolo...@free.fr added the comment: For subprocess.wait(), we can do something with signals (SIGCHLD and/or SIGCLD). There's just one problem: SIGCHLD is ignored by default, which means that sigwait and friends won't return when a child exits. Well, it actually works

[issue12187] subprocess.wait() with a timeout uses polling on POSIX

2011-06-08 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: To be portable, we would need to ... Antoine is right: we don't have to be portable. We can write an optimized implementations (without polling) for a specific OS, even for a specific version of an OS (e.g. like Linux kernel =

[issue12289] http.server.CGIHTTPRequestHandler doesn't check if a Python script is executable

2011-06-08 Thread STINNER Victor
New submission from STINNER Victor victor.stin...@haypocalc.com: CGIHTTPRequestHandler.run_cgi() only checks if the script processing the request is executable if the file is not a Python script, but later it uses os.execve(scriptfile, ...) if os has a fork() function. Moreover, the

[issue11583] os.path.isdir() is slow on windows

2011-06-08 Thread Roundup Robot
Roundup Robot devnull@devnull added the comment: New changeset 88e318166eaf by Brian Curtin in branch '3.2': Fix #11583. Changed os.path.isdir to use GetFileAttributes instead of os.stat. http://hg.python.org/cpython/rev/88e318166eaf New changeset 567f30527913 by Brian Curtin in branch

[issue11583] os.path.isdir() is slow on windows

2011-06-08 Thread Brian Curtin
Brian Curtin br...@python.org added the comment: This was also pushed to 2.7 in f1509fc75435. -- resolution: - fixed stage: patch review - committed/rejected status: open - closed versions: -Python 3.1 ___ Python tracker rep...@bugs.python.org

[issue12285] Unexpected behavior for 0 or negative processes in multiprocessing.pool()

2011-06-08 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: multiprocessing_pool.patch: raise a ValueError if processes is less than 1. A test should be added. -- keywords: +patch nosy: +haypo versions: +Python 2.7, Python 3.2, Python 3.3 -Python 2.6 Added file:

[issue12289] http.server.CGIHTTPRequestHandler doesn't check if a Python script is executable

2011-06-08 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: cgi.patch: fix the test checking that the script file is executable. The patch removes the executable() function. This function is not documented but is public. The patch can be easily modified to keep this function if needed.

[issue12290] __setstate__ is called for false values

2011-06-08 Thread Eugene Toder
New submission from Eugene Toder elto...@gmail.com: Pickle documentation [1] says: Note: If __getstate__() returns a false value, the __setstate__() method will not be called upon unpickling. However, this isn't quite true. This depends on the version of pickle protocol. A small example:

[issue12290] __setstate__ is called for false values

2011-06-08 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: See also #6827, just for some background on the current docs. -- nosy: +r.david.murray ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12290

[issue12290] __setstate__ is called for false values

2011-06-08 Thread Eugene Toder
Changes by Eugene Toder elto...@gmail.com: -- nosy: +alexandre.vassalotti, pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12290 ___ ___

[issue12243] getpass.getuser works on OSX

2011-06-08 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: It requires adding code to support a new Sphinx directive. I'm not sure if it should be a generic Sphinx directive (in which case we should open an issue on the Sphinx bug tracker) or Python specific. If the latter, I can't at the

[issue10884] pkgutil EggInfoDistribution requirements for .egg-info metadata

2011-06-08 Thread michael mulich
michael mulich michael.mul...@gmail.com added the comment: Sure, I'll have a look. I'm only getting back into the swing of things, but hopefully I can get more involved. Trying to do one or two small tasks a night. -Michael Mulich (pumazi) On Mon, Jun 6, 2011 at 11:33 AM, Éric Araujo

[issue11583] os.path.isdir() is slow on windows

2011-06-08 Thread Eli Bendersky
Eli Bendersky eli...@gmail.com added the comment: Brian - great, thanks. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11583 ___ ___

[issue7946] Convoy effect with I/O bound threads and New GIL

2011-06-08 Thread Julian Mehnle
Changes by Julian Mehnle jul...@mehnle.net: -- nosy: +jmehnle ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7946 ___ ___ Python-bugs-list mailing