[issue12282] ABCMeta import error during build

2011-06-08 Thread Ned Deily
Ned Deily added the comment: It's being called for hg: -DHGVERSION="\"`LC_ALL=C hg id -i .`\"" ... -- nosy: +ned.deily ___ Python tracker ___ ___

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

2011-06-08 Thread David Siroky
David Siroky 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 deeper into the pr

[issue12283] python3.2 smtplib _quote_periods

2011-06-08 Thread DDarko
New submission from DDarko : 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: 137899 nosy: DDarko

[issue12283] python3.2 smtplib _quote_periods

2011-06-08 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- components: +Library (Lib) -Extension Modules nosy: +r.david.murray stage: -> patch review type: -> behavior versions: +Python 3.3 ___ Python tracker ___

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

2011-06-08 Thread Antoine Pitrou
Antoine Pitrou 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, st_atime=1307474138,

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

2011-06-08 Thread Steffen Daode Nurpmeso
Steffen Daode Nurpmeso 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 10.4 and later. (And pla

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

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

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

2011-06-08 Thread STINNER Victor
STINNER Victor 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) My patch always tries

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

2011-06-08 Thread STINNER Victor
STINNER Victor 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 ___ Python tracker

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

2011-06-08 Thread STINNER Victor
STINNER Victor 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' as expected. At least fo

[issue12284] argparse.ArgumentParser: usage example option

2011-06-08 Thread Jonas H.
New submission from Jonas H. : 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: ./script.py

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

2011-06-08 Thread Nick Coghlan
Nick Coghlan 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 to that level. And

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

2011-06-08 Thread Ronald Oussoren
Ronald Oussoren 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 answer. Is there somethin

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

2011-06-08 Thread Jorgen Skancke
New submission from Jorgen Skancke : 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 processes must be at

[issue12284] argparse.ArgumentParser: usage example option

2011-06-08 Thread R. David Murray
Changes by R. David Murray : -- nosy: +bethard ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyth

[issue12282] ABCMeta import error during build

2011-06-08 Thread R. David Murray
R. David Murray 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 ___

[issue12279] Add build_distinfo command to packaging

2011-06-08 Thread higery
higery 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 my own purpose, but I thin

[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 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 my environment because

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

2011-06-08 Thread Roundup Robot
Roundup Robot 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 ___ Python tr

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

2011-06-08 Thread Antoine Pitrou
Antoine Pitrou 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 ___ Python

[issue12021] mmap.read requires an argument

2011-06-08 Thread Antoine Pitrou
Antoine Pitrou added the comment: Patch looks good to me, thank you :) -- ___ Python tracker ___ ___ Python-bugs-list mailing list Un

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

2011-06-08 Thread Antoine Pitrou
Antoine Pitrou added the comment: Why not use signalfd() when available? -- ___ Python tracker ___ ___ Python-bugs-list mailing list

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

2011-06-08 Thread Antoine Pitrou
Antoine Pitrou 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() (or an eq

[issue12021] mmap.read requires an argument

2011-06-08 Thread Roundup Robot
Roundup Robot 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 : >>> 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, 2.0, 3.0, 3.0,

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

2011-06-08 Thread Ezio Melotti
Ezio Melotti 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 tracker

[issue12021] mmap.read requires an argument

2011-06-08 Thread Charles-François Natali
Charles-François Natali added the comment: Patch committed. Thanks for the report and the patch! -- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed ___ Python tracker ___

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

2011-06-08 Thread Alexander Belopolsky
Alexander Belopolsky 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 in order comparison. Discussion a

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

2011-06-08 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' : -- nosy: +giampaolo.rodola ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http:

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

2011-06-08 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' : -- nosy: +giampaolo.rodola ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http:

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

2011-06-08 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' : -- nosy: +giampaolo.rodola ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http:/

[issue1195571] simple callback system for Py_FatalError

2011-06-08 Thread Tom Whittock
Changes by Tom Whittock : -- nosy: +Tom.Whittock ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.

[issue1195571] simple callback system for Py_FatalError

2011-06-08 Thread Gregory P. Smith
Gregory P. Smith added the comment: This makes sense, I'll add it to 3.3. -- assignee: -> gregory.p.smith nosy: +gregory.p.smith ___ Python tracker ___ __

[issue12287] ossaudiodev: stack corruption with FD >= FD_SETSIZE

2011-06-08 Thread Charles-François Natali
New submission from Charles-François Natali : 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 a test

[issue12287] ossaudiodev: stack corruption with FD >= FD_SETSIZE

2011-06-08 Thread Charles-François Natali
Changes by Charles-François Natali : Added file: http://bugs.python.org/file22285/test_oss.py ___ Python tracker ___ ___ Python-bugs-list mail

[issue12287] ossaudiodev: stack corruption with FD >= FD_SETSIZE

2011-06-08 Thread Antoine Pitrou
Antoine Pitrou 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 a test tha

[issue12288] Python 2.7.1 tkSimpleDialog initialvalue

2011-06-08 Thread Tom Middleton
New submission from Tom Middleton : 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 seems to be the followi

[issue1195571] simple callback system for Py_FatalError

2011-06-08 Thread STINNER Victor
STINNER Victor 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, the message+traceback is pri

[issue12287] ossaudiodev: stack corruption with FD >= FD_SETSIZE

2011-06-08 Thread STINNER Victor
STINNER Victor 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 /* !_MSC_VER */ if (v < 0

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

2011-06-08 Thread Charles-François Natali
Charles-François Natali 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 on recent Linu

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

2011-06-08 Thread STINNER Victor
STINNER Victor 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 >= 2.6.22 for signalfd). I li

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

2011-06-08 Thread STINNER Victor
New submission from STINNER Victor : 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 executable() functions checks if os.st

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

2011-06-08 Thread Roundup Robot
Roundup Robot 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 'default': Fix #11583. C

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

2011-06-08 Thread Brian Curtin
Brian Curtin 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

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

2011-06-08 Thread STINNER Victor
STINNER Victor 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: http://bugs.python.org/file22287/multiprocessing_

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

2011-06-08 Thread STINNER Victor
STINNER Victor 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. -- keywords: +patch Adde

[issue12290] __setstate__ is called for false values

2011-06-08 Thread Eugene Toder
New submission from Eugene Toder : 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: >>> class Po

[issue12290] __setstate__ is called for false values

2011-06-08 Thread R. David Murray
R. David Murray added the comment: See also #6827, just for some background on the current docs. -- nosy: +r.david.murray ___ Python tracker ___

[issue12290] __setstate__ is called for false values

2011-06-08 Thread Eugene Toder
Changes by Eugene Toder : -- nosy: +alexandre.vassalotti, pitrou ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue12243] getpass.getuser works on OSX

2011-06-08 Thread R. David Murray
R. David Murray 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 moment tell you where the

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

2011-06-08 Thread michael mulich
michael mulich 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 wrote: > > Éric Araujo added the

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

2011-06-08 Thread Eli Bendersky
Eli Bendersky added the comment: Brian - great, thanks. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: htt

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

2011-06-08 Thread Julian Mehnle
Changes by Julian Mehnle : -- nosy: +jmehnle ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.

[issue7753] newgil backport

2011-06-08 Thread Julian Mehnle
Changes by Julian Mehnle : -- nosy: +jmehnle ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.