[issue1724822] provide a shlex.split alternative for Windows shell syntax

2009-10-09 Thread Philip Jenvey
Philip Jenvey added the comment: FYI I've implemented a Windows command line parser for use by subprocess on Jython, it's available here: http://fisheye3.atlassian.com/browse/jython/trunk/jython/Lib/subprocess. py?r=6636#l554 tests: http://fisheye3.atlassian.com/browse/jython/trunk/jython/Li

[issue6075] Patch for IDLE/OS X to work with Tk-Cocoa

2009-10-09 Thread Kevin Walzer
Kevin Walzer added the comment: I've run into an additional problem with these patches. While they correctly set up the menus for Python Shell and editor windows, when a front-most window is closed, the menubar suddenly displays duplicate entries (for Edit, Run, and Help) at the end of the me

[issue6653] Potential memory leak in multiprocessing

2009-10-09 Thread schlesin
Changes by schlesin : -- nosy: +schlesin ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/

[issue7089] shlex behaves unexpected if newlines are not whitespace

2009-10-09 Thread Gabriel Genellina
Gabriel Genellina added the comment: If you could add some tests to lib/test/test_shlex.py, there are more chances for this patch to be accepted. Also, consider the case when the comment is on the last line of input and there is no \n ending character. -- nosy: +gagenellina

[issue7095] Multiprocessing.Array(lock=False) fails

2009-10-09 Thread Jesse Noller
Changes by Jesse Noller : -- resolution: -> duplicate status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue7095] Multiprocessing.Array(lock=False) fails

2009-10-09 Thread Jesse Noller
Jesse Noller added the comment: Gabriel is right, I'm really hoping Apple includes an upgrade including 2.6.4 once it's buttoned down -- ___ Python tracker ___ _

[issue7096] test_curses fails on 3.1 when run under regrtest

2009-10-09 Thread R. David Murray
New submission from R. David Murray : test_curses currently fails on 3.1 when run under regrtest. It passes if run in verbose mode or standalone. The cause turns out to be that when not run in verbose mode regrtest substitutes an io.StringIO instance for sys.stdout, and that object does not hav

[issue7095] Multiprocessing.Array(lock=False) fails

2009-10-09 Thread Gabriel Genellina
Gabriel Genellina added the comment: Fixed in r68708 - upgrading to 2.6.2 should solve this. -- nosy: +gagenellina ___ Python tracker ___

[issue7082] Patch for get_filename in email.message when content-disposition is missing

2009-10-09 Thread R. David Murray
R. David Murray added the comment: Applied to trunk in r75301, py3k in r75307, and 3.1 in r75308. Leaving open until I can backport it to 2.6. Thanks, Darren. -- resolution: -> fixed stage: commit review -> committed/rejected ___ Python tracker <

[issue7060] test_multiprocessing dictionary changed size errors and hang

2009-10-09 Thread R. David Murray
R. David Murray added the comment: Benjamin tried reverting the weakref patch, but that didn't fix it. Turns out the problem is the other patch in that merge, that adds saving of the exception to AssertRaises. Adding Kristjan as that was his patch. (The tests pass with the weakref patch applie

[issue7095] Multiprocessing.Array(lock=False) fails

2009-10-09 Thread schlesin
schlesin added the comment: Happens both on Python 2.6 (r26:66714, Jul 25 2009, 11:30:23) [GCC 4.1.2 20080704 (Red Hat 4.1.2-44)] on linux2 and Python 2.6.1 (r261:67515, Dec 6 2008, 16:42:21) [GCC 4.0.1 (Apple Computer, Inc. build 5370)] on darwin --

[issue7095] Multiprocessing.Array(lock=False) fails

2009-10-09 Thread Jesse Noller
Jesse Noller added the comment: schlesin - what platform are you on, and what version of 2.6? -- ___ Python tracker ___ ___ Python-bug

[issue7095] Multiprocessing.Array(lock=False) fails

2009-10-09 Thread Benjamin Peterson
Changes by Benjamin Peterson : -- assignee: -> jnoller nosy: +jnoller ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubsc

[issue7095] Multiprocessing.Array(lock=False) fails

2009-10-09 Thread schlesin
New submission from schlesin : The documentation for the Multiprocessing.Array says: multiprocessing.Array(typecode_or_type, size_or_initializer, *, lock=True)¶ ... If lock is False then access to the returned object will not be automatically protected by a lock, so it will not necessarily be “

[issue7086] logging.handlers.SysLogHandler with TCP support

2009-10-09 Thread Jr Aquino
Jr Aquino added the comment: Vinay, tested on all syslog daemons/servers. Works perfectly. Thank you very much. I appreciate your time greatly. -- status: pending -> open ___ Python tracker __

[issue7082] Patch for get_filename in email.message when content-disposition is missing

2009-10-09 Thread R. David Murray
Changes by R. David Murray : -- assignee: -> r.david.murray ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: htt

[issue7077] SysLogHandler can't handle Unicode

2009-10-09 Thread Vinay Sajip
Changes by Vinay Sajip : -- assignee: -> vinay.sajip ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mai

[issue7086] logging.handlers.SysLogHandler with TCP support

2009-10-09 Thread Vinay Sajip
Vinay Sajip added the comment: @Jr Aquino: can you please test the attached alternative patch with all the various syslog daemons in Unix domain, UDP and TCP socket combinations, and post your results here? Thanks. P.S. Also available colourised at http://gist.github.com/206380 -- assi

[issue7094] Add alternate float formatting styles to new-style formatting.

2009-10-09 Thread Mark Dickinson
Mark Dickinson added the comment: Just for reference, the effect of the alternative style is explained succinctly in the C99 standard (well, the N1256 draft, anyway): "For a, A, e, E, f, F, g, and G conversions, the result of converting a floating-point number always contains a decimal-point

[issue7094] Add alternate float formatting styles to new-style formatting.

2009-10-09 Thread Eric Smith
Eric Smith added the comment: I'm adding 2.7. Since 2.7 and 3.2 share the same code base, I'd rather add it to both if we're going to do it at all. -- assignee: -> eric.smith versions: +Python 2.7 ___ Python tracker

[issue7094] Add alternate float formatting styles to new-style formatting.

2009-10-09 Thread Mark Dickinson
New submission from Mark Dickinson : Python's old-style formatting supports the use of an alternative form (specified by including a '#' in the format) for 'e', 'f' and 'g' formatting: Python 3.2a0 (py3k:75275:75276, Oct 7 2009, 20:26:36) [GCC 4.0.1 (Apple Inc. build 5493)] on darwin Type "h

[issue7092] Test suite emits many DeprecationWarnings when -3 is enabled

2009-10-09 Thread Antoine Pitrou
Antoine Pitrou added the comment: FWIW I tried to filter out the test-related warnings using the following command line, but it didn't work (nothing was filtered out): $ ./python -3 -W 'ignore::DeprecationWarning:test:0' -m test.regrtest -- nosy: +pitrou __

[issue7092] Test suite emits many DeprecationWarnings when -3 is enabled

2009-10-09 Thread Brett Cannon
Brett Cannon added the comment: I agree with Benjamin. We shouldn't release 2.7 w/ any of the standard library itself generating a Py3kWarning, but that should not apply to the test suite. I have made this a release blocker until we can create separate issues for the modules that are emittin

[issue6676] expat parser throws Memory Error when parsing multiple files

2009-10-09 Thread Hirokazu Yamamoto
Hirokazu Yamamoto added the comment: Hmm, looks useful. I think your patch is good. Only one problem is that we cannot use this new feature in python2.6. If we use my patch in that branch, I think there is no problem. -- ___ Python tracker

[issue6676] expat parser throws Memory Error when parsing multiple files

2009-10-09 Thread Hirokazu Yamamoto
Hirokazu Yamamoto added the comment: I knew existence of that new feature, but didn't know how to use it. -- ___ Python tracker ___ __

[issue6676] expat parser throws Memory Error when parsing multiple files

2009-10-09 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: Do you know the new "context manager" feature of assertRaises? it makes it easier to check for exceptions. I join a new patch that uses it. -- Added file: http://bugs.python.org/file15094/pyexpat-2.patch ___ Py

[issue7086] logging.handlers.SysLogHandler with TCP support

2009-10-09 Thread Jr Aquino
Jr Aquino added the comment: Thank you for responding so quickly Vinay. I am using a multitude of syslog daemons, from syslog, syslog-ng, rsyslog, and several different proprietary SIEM/SEM Log archiving appliances. I work in the security sector. (Yes I have read Rainer before, its actually

[issue7092] Test suite emits many DeprecationWarnings when -3 is enabled

2009-10-09 Thread Benjamin Peterson
Benjamin Peterson added the comment: I don't think it's so important that tests not raises -3 warnings, but that the stdlib doesn't. -- nosy: +benjamin.peterson ___ Python tracker __

[issue7093] xmlrpclib.ServerProxy() doesn't support unicode uri

2009-10-09 Thread STINNER Victor
STINNER Victor added the comment: Hum, it looks that the issue is not on ServerProxy.__host, but on ServerProxy.__handler. That's why my test uses "http://host:port/RPC2"; instead of "http://host:port";. In the second case, the handler is set to the default value: "/RPC2" which is str (and not

[issue7093] xmlrpclib.ServerProxy() doesn't support unicode uri

2009-10-09 Thread STINNER Victor
New submission from STINNER Victor : I backported xmlrpclib from Python trunk to Python 2.5 to get "connected socket" (HTTP/1.1), which implies to backport also httplib, ssl and socket. It works well. It's *much* faster, eg. 960 ms => 70 ms with HTTPS over a VPN. I just have a little issue: if S

[issue6280] calendar.timegm() belongs in time module, next to time.gmtime()

2009-10-09 Thread Simon Cross
Simon Cross added the comment: The attached patch adds a simple implementation of time.timegm that calls calendar.timegm. It includes a short test to show that time.timegm(time.gmtime(ts)) == ts for various timestamps. I implemented a pure C version by pulling in the various functions needed f

[issue7029] Improve pybench

2009-10-09 Thread Kristján Valur Jónsson
Kristján Valur Jónsson added the comment: Fixed the bug with "timer = timer" in trunk in revision 75293 -- ___ Python tracker ___ ___

[issue7092] Test suite emits many DeprecationWarnings when -3 is enabled

2009-10-09 Thread Jean-Paul Calderone
New submission from Jean-Paul Calderone : If the test suite is run with -3, many deprecation warnings are reported. Quite a few are generated by code in the tests themselves, but many are from constructs in the stdlib which are different or no longer supported in 3.x. Even aside from the fact t

[issue6676] expat parser throws Memory Error when parsing multiple files

2009-10-09 Thread Hirokazu Yamamoto
Changes by Hirokazu Yamamoto : Removed file: http://bugs.python.org/file15089/pyexpat_addhok.patch ___ Python tracker ___ ___ Python-bugs-list

[issue6676] expat parser throws Memory Error when parsing multiple files

2009-10-09 Thread Hirokazu Yamamoto
Hirokazu Yamamoto added the comment: Here is the patch. I'm not confident with my English comment though. -- Added file: http://bugs.python.org/file15090/pyexpat.patch ___ Python tracker ___

[issue4555] Smelly exports

2009-10-09 Thread Antoine Pitrou
Antoine Pitrou added the comment: In trunk: _add_one_to_index_C _add_one_to_index_F asdl_int_seq_new asdl_seq_new init_ast init_codecs initerrno initgc initimp initposix initpwd initsignal init_sre init_symtable initthread initxxsubtype initzipimport In py3k: _add_one_to_index_C _add_one_to_i

[issue4428] make io.BufferedWriter observe max_buffer_size limits

2009-10-09 Thread Antoine Pitrou
Antoine Pitrou added the comment: max_buffer_size is no longer used, so this issue is obsolete ;) -- resolution: -> out of date status: open -> closed ___ Python tracker ___ ___

[issue6676] expat parser throws Memory Error when parsing multiple files

2009-10-09 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: Looks like an implementation bug to me; far too late to change it, though. In your test, you could use pyexpat.ErrorString(e.code) == pyexpat.errors.XML_ERROR_FINISHED And the docs could mention this trick. -- _

[issue6676] expat parser throws Memory Error when parsing multiple files

2009-10-09 Thread Hirokazu Yamamoto
Hirokazu Yamamoto added the comment: Well, I tried to write test like this. 1. Check if xml.parsers.expat.error is raised. 2. Compare *code* attribute of error object with xml.parsers.expat.errors.XML_ERROR_FINISHED But I noticed XML_ERROR_FINISHED is not integer but string. (!) According to

[issue7091] Distutils build ignores the --compiler command line option

2009-10-09 Thread jmb
New submission from jmb : I tried building an extension on windows with the following command: > python setup.py build --compiler=mingw32 and got an error: "Unable to find vcvarsall.bat". The way I understand it, that error shows that it tried to use the MSVC compiler instead of obeying the --c

[issue5672] Implement a way to change the python process name

2009-10-09 Thread Martin Marcher
Changes by Martin Marcher : -- nosy: +martin.marcher ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail

[issue3210] subprocess.Popen does not release process handles if process cannot be started

2009-10-09 Thread Hirokazu Yamamoto
Hirokazu Yamamoto added the comment: Probably we can fix this issue by calling Close() of sp_handle_type somewhere in Lib/subprocess.py, but I have no patch now. -- ___ Python tracker __

[issue3210] subprocess.Popen does not release process handles if process cannot be started

2009-10-09 Thread Hirokazu Yamamoto
Hirokazu Yamamoto added the comment: No, this is not duplicate of issue5179. That issue described handle was leaked when exception occurred. But this issue is not *leak*. See following code. import subprocess, os, sys file = open("filename", "w") try: proc = subprocess.Popen("nosuchprogram"

[issue1208730] expat binding for XML_ParserReset

2009-10-09 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: This (old) patch needs some work: - unit tests are neeeded. - it it not enough to return NULL when XML_ParserReset() returns an error; a python exception must be raised. - "This function may not be used on a parser created using XML_ExternalEntityParser

[issue6676] expat parser throws Memory Error when parsing multiple files

2009-10-09 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: The patch is good; a test would be appreciated. The difference now is that in case of true low-memory conditions, ExpatError("no memory") is raised instead of MemoryError. This is acceptable IMO. > It seems ParseFile() doesn't support second call This is

[issue7086] logging.handlers.SysLogHandler with TCP support

2009-10-09 Thread Vinay Sajip
Vinay Sajip added the comment: Which syslog daemon are you using? There are some issues pending with syslog-ng and Python logging (see issue6444) and in general syslog over TCP is not necessarily all that reliable, see http://blog.gerhards.net/2008/04/on-unreliability-of-plain-tcp-syslog.html

[issue7082] Patch for get_filename in email.message when content-disposition is missing

2009-10-09 Thread Darren Worrall
Darren Worrall added the comment: Indeed, I'm certainly not constructing messages like that, but occasionally have to process them :) RE: the python versions, I'll remember that in future, thanks. -- ___ Python tracker

[issue6676] expat parser throws Memory Error when parsing multiple files

2009-10-09 Thread Hirokazu Yamamoto
Hirokazu Yamamoto added the comment: I'm not familiar with expat, but we can see what is happening more clearly with attached adhok patch. Traceback (most recent call last): File "expat-error.py", line 14, in p.ParseFile(file) xml.parsers.expat.ExpatError: parsing finished: line 2, colum

[issue7089] shlex behaves unexpected if newlines are not whitespace

2009-10-09 Thread Jan David Mol
Changes by Jan David Mol : -- components: +Library (Lib) ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://

[issue7090] encoding uncode objects greater than FFFF

2009-10-09 Thread Ezio Melotti
Ezio Melotti added the comment: If you want to specify codepoints greater than U+ you have to use u'\U': >>> x = u'\u10380' >>> x.encode('utf-8') '\xe1\x80\xb80' >>> x[0] u'\u1038' >>> x[1] u'0' >>> y = u'\U00010380' >>> y.encode('utf-8') '\xf0\x90\x8e\x80' -- nosy: +ezio.me

[issue7090] encoding uncode objects greater than FFFF

2009-10-09 Thread Mahmoud
New submission from Mahmoud : Odd behaviour with str.encode or codecs.Codec.encode or simailar functions, when dealing with uncode objects above with 2.6 >>> u'\u10380'.encode('utf') '\xe1\x80\xb80' with 3.x '\u10380'.encode('utf') '\xe1\x80\xb80' correct output must be: \xf0\x90\x8e\x80

[issue6676] expat parser throws Memory Error when parsing multiple files

2009-10-09 Thread Andy Balaam
Andy Balaam added the comment: Just in case it wasn't obvious - the workaround is to create a new parser (with xml.parsers.expat.ParserCreate()) for every XML file you want to parse. -- ___ Python tracker _

[issue7089] shlex behaves unexpected if newlines are not whitespace

2009-10-09 Thread Jan David Mol
Jan David Mol added the comment: Attached is a patch which fixes this for me. It basically does a fall-through using '\n' when encountering a comment. So that may be a bit of a hack (who says '\n' is the only newline char in there, and not '\r'?) but I'll leave the more intricate stuff to you ex

[issue6676] expat parser throws Memory Error when parsing multiple files

2009-10-09 Thread Andy Balaam
Andy Balaam added the comment: I am also seeing this with Python 2.5.2 on Ubuntu. -- nosy: +andybalaam ___ Python tracker ___ ___ Pyth

[issue7089] shlex behaves unexpected if newlines are not whitespace

2009-10-09 Thread Jan David Mol
New submission from Jan David Mol : The shlex module does not function as expected in the presence of comments when newlines are not whitespace. An example (attached): >>> from shlex import shlex >>> >>> lexer = shlex("a \n b") >>> print ",".join(lexer) a,b >>> >>> lexer = shlex("a # comment \