[issue7089] shlex behaves unexpected if newlines are not whitespace
New submission from Jan David Mol jjd...@gmail.com: 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 \n b) print ,.join(lexer) a,b lexer = shlex(a \n b) lexer.whitespace= print ,.join(lexer) a, ,b lexer = shlex(a # comment \n b) lexer.whitespace= print ,.join(lexer) a,b Now where did my newline go? The comment ate it! Even though the docs seem to indicate the newline is not part of the comment itself: shlex.commenters: The string of characters that are recognized as comment beginners. All characters from the comment beginner to end of line are ignored. Includes just '#' by default. -- files: lexertest.py messages: 93776 nosy: jjdmol2 severity: normal status: open title: shlex behaves unexpected if newlines are not whitespace type: behavior versions: Python 2.4, Python 2.5, Python 2.6, Python 2.7, Python 3.0, Python 3.1, Python 3.2 Added file: http://bugs.python.org/file15087/lexertest.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7089 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6676] expat parser throws Memory Error when parsing multiple files
Andy Balaam m...@artificialworlds.net added the comment: I am also seeing this with Python 2.5.2 on Ubuntu. -- nosy: +andybalaam ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6676 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7089] shlex behaves unexpected if newlines are not whitespace
Jan David Mol jjd...@gmail.com 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 experts. -- keywords: +patch Added file: http://bugs.python.org/file15088/lexer-newline-tokens.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7089 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6676] expat parser throws Memory Error when parsing multiple files
Andy Balaam m...@artificialworlds.net 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 rep...@bugs.python.org http://bugs.python.org/issue6676 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7090] encoding uncode objects greater than FFFF
New submission from Mahmoud sagh...@med.mui.ac.ir: 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 -- components: Unicode messages: 93780 nosy: msaghaei severity: normal status: open title: encoding uncode objects greater than type: behavior versions: Python 2.6, Python 2.7, Python 3.0, Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7090 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7090] encoding uncode objects greater than FFFF
Ezio Melotti ezio.melo...@gmail.com 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.melotti resolution: - invalid stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7090 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7089] shlex behaves unexpected if newlines are not whitespace
Changes by Jan David Mol jjd...@gmail.com: -- components: +Library (Lib) ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7089 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6676] expat parser throws Memory Error when parsing multiple files
Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp 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 module p.ParseFile(file) xml.parsers.expat.ExpatError: parsing finished: line 2, column 482 It seems ParseFile() doesn't support second call. I'm not sure this is intended behavior or not. -- keywords: +patch nosy: +ocean-city versions: +Python 2.7 Added file: http://bugs.python.org/file15089/pyexpat_addhok.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6676 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7082] Patch for get_filename in email.message when content-disposition is missing
Darren Worrall d...@darrenworrall.co.uk 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 rep...@bugs.python.org http://bugs.python.org/issue7082 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7086] logging.handlers.SysLogHandler with TCP support
Vinay Sajip vinay_sa...@yahoo.co.uk 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 The requested change is not difficult to make, but it will be difficult for me to test because in general end-to-end testing for network APIs is not there in the standard regression test suite, and I don't have a setup where I can test it independently. So I'm sorry to say I will not be able to give this a very high priority at the moment (unless another committer can test this). Just curious (as no one has asked for this before) why you're using TCP, given that it doesn't eliminate message loss and it is slower and has less support than UDP? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7086 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6676] expat parser throws Memory Error when parsing multiple files
Amaury Forgeot d'Arc amaur...@gmail.com 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 correct; the C expat library has a function XML_ParserReset() which could be called before calling ParseFile() again, but pyexpat does not expose it yet (see issue1208730). -- nosy: +amaury.forgeotdarc ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6676 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1208730] expat binding for XML_ParserReset
Amaury Forgeot d'Arc amaur...@gmail.com 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_ExternalEntityParserCreate: if XML_ParserReset() does not check it properly, we should ensure that an exception is properly raised. - How many of the struct elements do I need to reset?: this should be worked out. And I'm not convinced that self-intern should be reset. -- nosy: +amaury.forgeotdarc ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1208730 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3210] subprocess.Popen does not release process handles if process cannot be started
Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp 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, stdout=file) except OSError: file.close() sys.exc_clear() # here we go os.remove(filename) # now we can delete file! subprocess is implemented using sp_handle_type in PC/_subprocess.c (windows). This object is in exception stack frame(?), so handle lives until another exception occurs or explicitly sys.exc_clear() is called. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3210 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3210] subprocess.Popen does not release process handles if process cannot be started
Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp 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 rep...@bugs.python.org http://bugs.python.org/issue3210 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5672] Implement a way to change the python process name
Changes by Martin Marcher mar...@marcher.name: -- nosy: +martin.marcher ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5672 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7091] Distutils build ignores the --compiler command line option
New submission from jmb jeber...@free.fr: 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 --compiler=mingw32 command line option. I then tried to give a bogus compiler value and got the same error message (iirc python 2.5 used to say that it didn't know the 'bogus' compiler). Finally, I modified _default_compilers in distutils/ccompiler.py and put 'mingw32' in the 'nt' key. Afterward, my extension compiled and works properly. Python version: 2.6.3 on WinXP 32 bits. -- assignee: tarek components: Distutils messages: 93789 nosy: jmb, tarek severity: normal status: open title: Distutils build ignores the --compiler command line option type: behavior versions: Python 2.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7091 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6676] expat parser throws Memory Error when parsing multiple files
Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp 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 http://docs.python.org/library/pyexpat.html#expaterror-objects ExpatError.code Expat’s internal error number for the specific error. This will match one of the constants defined in the errors object from this module. Is this document bug or implementation bug? Personally, I think string 'parsing finished' as error constant might be useless... -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6676 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6676] expat parser throws Memory Error when parsing multiple files
Amaury Forgeot d'Arc amaur...@gmail.com 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. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6676 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4428] make io.BufferedWriter observe max_buffer_size limits
Antoine Pitrou pit...@free.fr added the comment: max_buffer_size is no longer used, so this issue is obsolete ;) -- resolution: - out of date status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4428 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4555] Smelly exports
Antoine Pitrou pit...@free.fr 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_index_F asdl_int_seq_new asdl_seq_new -- versions: +Python 3.2 -Python 3.0 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4555 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6676] expat parser throws Memory Error when parsing multiple files
Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp 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 rep...@bugs.python.org http://bugs.python.org/issue6676 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6676] expat parser throws Memory Error when parsing multiple files
Changes by Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp: Removed file: http://bugs.python.org/file15089/pyexpat_addhok.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6676 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7092] Test suite emits many DeprecationWarnings when -3 is enabled
New submission from Jean-Paul Calderone exar...@divmod.com: 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 that many of these warnings being caused by code which I think many people would agree is not ideal, I think it is important for these warnings to be fixed for Python 2.7. Since the 3.x porting guidelines recommend that projects first run their test suite with -3, these warnings are going to be generating extra noise for developers to filter through when they try porting their code to 3.x. They shouldn't need to wade through stdlib warnings to find warnings about their own code. Attached is a log of a complete test run with -3. -- components: Library (Lib) files: test.log messages: 93795 nosy: exarkun severity: normal status: open title: Test suite emits many DeprecationWarnings when -3 is enabled type: behavior versions: Python 2.7 Added file: http://bugs.python.org/file15091/test.log ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7092 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7029] Improve pybench
Kristján Valur Jónsson krist...@ccpgames.com added the comment: Fixed the bug with timer = timer in trunk in revision 75293 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7029 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6280] calendar.timegm() belongs in time module, next to time.gmtime()
Simon Cross hodges...@gmail.com 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 from datetime, but it was a bit messy and a lot more invasive. Documentation updates are still needed -- I will do those if there is support for the patch. -- keywords: +patch Added file: http://bugs.python.org/file15092/add-timegm-to-time.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6280 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7093] xmlrpclib.ServerProxy() doesn't support unicode uri
New submission from STINNER Victor victor.stin...@haypocalc.com: 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 ServerProxy() URI is an unicode string and an argument is an unicode string (with at least one non-ASCII character), the request fails with: File .../SVN/python-trunk/Lib/httplib.py, line 784, in _send_output msg += message_body UnicodeDecodeError: 'ascii' codec can't decode byte 0xe9 in position 320: ordinal not in range(128) Attached patch includes a test. Can uri contains a login and/or pasword? If yes, should it be encoded to UTF-8 (instead of ASCII)? -- components: Library (Lib) files: xmlrpclib_unicode_host.patch keywords: patch messages: 93798 nosy: haypo severity: normal status: open title: xmlrpclib.ServerProxy() doesn't support unicode uri versions: Python 2.6, Python 2.7 Added file: http://bugs.python.org/file15093/xmlrpclib_unicode_host.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7093 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7093] xmlrpclib.ServerProxy() doesn't support unicode uri
STINNER Victor victor.stin...@haypocalc.com 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 unicode). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7093 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7092] Test suite emits many DeprecationWarnings when -3 is enabled
Benjamin Peterson benja...@python.org 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 rep...@bugs.python.org http://bugs.python.org/issue7092 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7086] logging.handlers.SysLogHandler with TCP support
Jr Aquino jr.aqu...@citrixonline.com 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 a big reason I am writing the tool that I am working on. Gaps in logs are a real world problem!) Regarding issue 6444, these users are attempting to use SysLogHandler to write to the local system's syslog sockets. A way of piggy backing on the configuration of the local systems logging daemon. What I am actually doing is ignoring the local systems syslog, and sending the syslog packets directly to a remote syslog server. This is to replay syslog data that may have been previously lost due to connectivity outages. My tool can also be used to send the data to an external server for forensic reasons. I believe the answer to your last question also sheds light on your first question! The reason that I am looking to add TCP is because a lot of new data center architectures are heavily utilizing tcp syslog in a chained / centralized environment. I am also seeing a lot of preferential treatment of tcp syslog on logging appliances such as Loglogic. I am sorry to hear that your test environment is lacking the regression suites that you need. I do hope that another commiter can test for us. Syslog is an old technology and I hope that more efforts like mine and Rainer's can help to identify and correct deficiencies in the design. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7086 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6676] expat parser throws Memory Error when parsing multiple files
Amaury Forgeot d'Arc amaur...@gmail.com 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 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6676 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6676] expat parser throws Memory Error when parsing multiple files
Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp added the comment: I knew existence of that new feature, but didn't know how to use it. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6676 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6676] expat parser throws Memory Error when parsing multiple files
Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp 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 rep...@bugs.python.org http://bugs.python.org/issue6676 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7092] Test suite emits many DeprecationWarnings when -3 is enabled
Brett Cannon br...@python.org 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 emitting the warning. -- nosy: +brett.cannon priority: - release blocker ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7092 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7092] Test suite emits many DeprecationWarnings when -3 is enabled
Antoine Pitrou pit...@free.fr 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 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7092 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7094] Add alternate float formatting styles to new-style formatting.
New submission from Mark Dickinson dicki...@gmail.com: 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 help, copyright, credits or license for more information. '%.17g' % 1.2 '1.2' '%#.17g' % 1.2 '1.2000' New-style formatting doesn't currently support this: format(1.2, '#.17g') Traceback (most recent call last): File stdin, line 1, in module ValueError: Alternate form (#) not allowed in float format specifier To aid migration from old-style to new-style formatting, it might be worth adding the alternate forms. At least the float, complex and Decimal types would be affected. -- components: Interpreter Core messages: 93807 nosy: eric.smith, mark.dickinson severity: normal stage: test needed status: open title: Add alternate float formatting styles to new-style formatting. type: feature request versions: Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7094 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7094] Add alternate float formatting styles to new-style formatting.
Eric Smith e...@trueblade.com 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 rep...@bugs.python.org http://bugs.python.org/issue7094 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7094] Add alternate float formatting styles to new-style formatting.
Mark Dickinson dicki...@gmail.com 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 character, even if no digits follow it. (Normally, a decimal-point character appears in the result of these conversions only if a digit follows it.) For g and G conversions, trailing zeros are not removed from the result. For other conversions, the behavior is undefined. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7094 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7086] logging.handlers.SysLogHandler with TCP support
Vinay Sajip vinay_sa...@yahoo.co.uk 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 -- assignee: - vinay.sajip status: open - pending Added file: http://bugs.python.org/file15095/sockhand.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7086 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7077] SysLogHandler can't handle Unicode
Changes by Vinay Sajip vinay_sa...@yahoo.co.uk: -- assignee: - vinay.sajip ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7077 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7082] Patch for get_filename in email.message when content-disposition is missing
Changes by R. David Murray rdmur...@bitdance.com: -- assignee: - r.david.murray ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7082 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7086] logging.handlers.SysLogHandler with TCP support
Jr Aquino jr.aqu...@citrixonline.com 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 rep...@bugs.python.org http://bugs.python.org/issue7086 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7095] Multiprocessing.Array(lock=False) fails
New submission from schlesin schle...@cshl.edu: 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 “process-safe”. ... However: In [48]: mp.Array('i',1,lock=False) --- AssertionErrorTraceback (most recent call last) /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/ multiprocessing/__init__.pyc in Array(typecode_or_type, size_or_initializer, **kwds) 252 ''' 253 from multiprocessing.sharedctypes import Array -- 254 return Array(typecode_or_type, size_or_initializer, **kwds) 255 256 # /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/ multiprocessing/sharedctypes.pyc in Array(typecode_or_type, size_or_initializer, **kwds) 85 if lock is None: 86 lock = RLock() --- 87 assert hasattr(lock, 'acquire') 88 return synchronized(obj, lock) 89 AssertionError: --- I.e. it looks like lock=False is not actually supported. -- components: Extension Modules messages: 93812 nosy: schlesin severity: normal status: open title: Multiprocessing.Array(lock=False) fails type: behavior versions: Python 2.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7095 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7095] Multiprocessing.Array(lock=False) fails
Changes by Benjamin Peterson benja...@python.org: -- assignee: - jnoller nosy: +jnoller ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7095 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7095] Multiprocessing.Array(lock=False) fails
Jesse Noller jnol...@gmail.com added the comment: schlesin - what platform are you on, and what version of 2.6? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7095 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7095] Multiprocessing.Array(lock=False) fails
schlesin schle...@cshl.edu 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 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7095 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7060] test_multiprocessing dictionary changed size errors and hang
R. David Murray rdmur...@bitdance.com 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 applied and the unittest patch reverted, by the way.) -- nosy: +krisvale ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7060 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7082] Patch for get_filename in email.message when content-disposition is missing
R. David Murray rdmur...@bitdance.com 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 rep...@bugs.python.org http://bugs.python.org/issue7082 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7095] Multiprocessing.Array(lock=False) fails
Gabriel Genellina gagsl-...@yahoo.com.ar added the comment: Fixed in r68708 - upgrading to 2.6.2 should solve this. -- nosy: +gagenellina ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7095 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7096] test_curses fails on 3.1 when run under regrtest
New submission from R. David Murray rdmur...@bitdance.com: 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 have a .fileno attribute. The line that fails is this: curses.setupterm(fd=sys.stdout.fileno()) This test fails only on 3.1 for a couple of different reasons. On trunk and py3k, r73072 and the r73678 merge removed the regrtest check that made sure the tests produced no output on stdout, and therefore it no longer replaces stdout with a StringIO instance . On 2.6, on the other hand, the above line references sys.__stdout__.fileno() (presumably for this very reason!) r74181 was the commit that changed this to the above on the py3k branch, citing it as the cause of regrtest duplicating some output. It seems to me that not checking for output on stdout in regrtest is a regression in the quality of the test runner. It is also not clear to me how test_curses writing to the real stdout would cause regrtest to duplicate output. So I'm putting the authors of the two patches involved on the nosy list so they can comment. FYI I reverted the stdout change in test_curses and regrtest seems to run fine, so I'm not sure what output was being duplicated. -- components: Tests messages: 93818 nosy: alexandre.vassalotti, pitrou, r.david.murray priority: normal severity: normal stage: needs patch status: open title: test_curses fails on 3.1 when run under regrtest type: behavior versions: Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7096 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7095] Multiprocessing.Array(lock=False) fails
Jesse Noller jnol...@gmail.com 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 rep...@bugs.python.org http://bugs.python.org/issue7095 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7095] Multiprocessing.Array(lock=False) fails
Changes by Jesse Noller jnol...@gmail.com: -- resolution: - duplicate status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7095 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7089] shlex behaves unexpected if newlines are not whitespace
Gabriel Genellina gagsl-...@yahoo.com.ar 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 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7089 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6653] Potential memory leak in multiprocessing
Changes by schlesin schle...@cshl.edu: -- nosy: +schlesin ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6653 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6075] Patch for IDLE/OS X to work with Tk-Cocoa
Kevin Walzer wordt...@users.sourceforge.net 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 menubar, not all of which work correctly. Subsequent closing of other windows causes more duplication of menu entries. I have looked at every line of these patches, as well as some additional points in idlelib, and I cannot find what is causing the issue. As a result, I don't know where to fix it. If others are able to reproduce this bug after applying the patches and can find where the problem is occurring, suggestions (or a fix) are welcome. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6075 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com