[issue6611] HTMLParser cannot deal with mixture of arbitrary data and character reference
bones7456 bones7...@gmail.com added the comment: another fix way: and these three lines to the head of file: import sys reload(sys) sys.setdefaultencoding('utf8') -- nosy: +bones7456 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6611 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6550] asyncore incorrect failure when connection is refused and using async_chat channel
Nir Soffer nir...@gmail.com added the comment: I was wrong about handle_connect_event - it is called only from the dispatcher, so it will not break 3rd party dispatcher. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6550 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6550] asyncore incorrect failure when connection is refused and using async_chat channel
Nir Soffer nir...@gmail.com added the comment: This is asyncore-fix-refused-3.patch with some fixes: 1. Call handle_close instead of non exiting handle_close_event 2. Remove unneeded handle_close_event in test classes 3. Revert removal of handle_expt_event in test classes - not clear why it was removed in the previous patch. Tested on Mac OS X 10.5. -- Added file: http://bugs.python.org/file14617/asyncore-fix-refused-4.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6550 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4432] IDLE.app (Mac) File Menu MIssing Options
Guilherme Polo ggp...@gmail.com added the comment: Closing. I have seen the code changes regarding idle and mac and I believe this issue has been fixed (some time after the OP started this, but it has). -- resolution: - out of date status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4432 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3559] Pasted \n not same as typed \n
Guilherme Polo ggp...@gmail.com added the comment: This seems to be problematic in general. I have worked on a patch now, but it fails to succeed while pasting multiple lines. The problem is that when a second line is pasted, IDLE is still marked as executing so it ends up just pasting the line without executing it. -- keywords: +patch Added file: http://bugs.python.org/file14618/fix_idleshell_paste.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3559 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6615] multiprocessing logging support test
New submission from OG7 ony...@users.sourceforge.net: There is an additional test for multiprocessing's logging support here: http://code.google.com/p/python-multiprocessing/issues/detail?id=18 (disregard the fix, it is only needed for the backport). -- components: Library (Lib) messages: 91163 nosy: OG7, jnoller severity: normal status: open title: multiprocessing logging support test type: behavior versions: Python 2.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6615 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6611] HTMLParser cannot deal with mixture of arbitrary data and character reference
Liu DongMiao liudongm...@gmail.com added the comment: i think this should not be a bug. as we dont know the encoding of str, so we cannt deal with str and unicode together. in my example, str is in utf-8, so i need to convert unicode to str in utf-8. i will takes bones' suggestion. -- status: open - closed type: compile error - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6611 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6550] asyncore incorrect failure when connection is refused and using async_chat channel
Josiah Carlson josiahcarl...@users.sourceforge.net added the comment: handle_expt_event was removed in the test classes because it is no longer being used by any of the tests. None of them send OOB data (also known as priority data), so handle_expt_event should never be called. When I have a chance to compare your patch to mine (Monday, likely), I'll comment then. In terms of handle_expt_event should handle the low level expt event called from select, what you don't seem understand is that and expt event is not an exception event, it's a we got OOB data event, and with the patches, it is called at *exactly* the time it should be: when there is OOB data. It used to be mistakenly called in the select loop whenever any sort of non-normal condition happened on the socket, which was a serious design flaw, and lead to significant misunderstanding about the purpose of the method. With the _exception() call as-is, it now behaves like the asyncore.poll2() function, which is the right thing. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6550 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5124] IDLE - pasting text doesn't delete selection
Guilherme Polo ggp...@gmail.com added the comment: btw, I just added a patch for issue3559 which could be easily adjusted to work as described in this issue. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5124 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6616] PyList_APPEND (append without incref)
New submission from Campbell Barton ideasma...@gmail.com: This patch was made on python r74276 Often when writing in C/Python I want to append to a list within a C loop of an unknown length. When this is done for newly created PyObject (which is quite common) - you need to assign each item to a variable and then decref it. eg: PyObject *item= PyFloat_FromDouble(x); PyList_Append(list, item); Py_DECREF(item); I have seen people make mistakes with this (in pygame code and blender3d), and run PyList_Append(list, PyFloat_FromDouble(x)), ofcourse this is not the fault of python/c api that devs do not read docs properly but I think it would be very convenient to have an append that works in a similar way to PyList_SET_ITEM This simple patch allows... PyList_APPEND(list, PyFloat_FromDouble(x)) doc included. -- files: py3_APPEND.diff keywords: patch messages: 91167 nosy: ideasman42 severity: normal status: open title: PyList_APPEND (append without incref) versions: Python 3.2 Added file: http://bugs.python.org/file14619/py3_APPEND.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6616 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4832] idle filename extension
Guilherme Polo ggp...@gmail.com added the comment: I'm attaching a very similar patch that I tested on Linux and Windows. It just combines the default behaviour with the details required for Windows, that is, the default extension is set to '.py' for Windows and '' elsewhere (the default). -- Added file: http://bugs.python.org/file14620/fix_defaultextension.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4832 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6616] PyList_APPEND (append without incref)
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: This simple patch allows... PyList_APPEND(list, PyFloat_FromDouble(x)) This isn't a good idea because the error checking for the inner function is lost. The current API encourages keeping one function per line so that the ref counting and error-checking are more obvious. Also, I'm not too keen on adding second-ways-to-do-it. The C API is already somewhat fat, making it harder to learn and remember. The current API has standard patterns of creating and consuming references. Introducing variants that don't follow those patterns makes it harder to review code and determine that it is correct. It is better to learn to use the API as designed than to commingle two different styles. -- nosy: +rhettinger ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6616 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6617] During compiling python 3.1 getting error Undefined symbol libintl_bind_textdomain_codeset
New submission from Sandip Thorat thoratsan...@gmail.com: Hi I am installing Python-3.1 on SunOS sunx7qa 5.10 Generic_127112-06 i86pc i386 i86pc. ./configure done without any error. But 'make' throwing folloing error: gcc -c -fno-strict-aliasing -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict- prototypes -I. -IInclude -I./Include -DPy_BUILD_CORE - DSVNVERSION=\`LC_ALL=C echo Unversioned directory`\ -o Modules/getbuildinfo.o ./Modules/getbuildinfo.c rm -f libpython3.1.a ar rc libpython3.1.a Modules/getbuildinfo.o ar rc libpython3.1.a Parser/acceler.o Parser/grammar1.o Parser/listnode.o Parser/node.o Parser/parser.o Parser/parsetok.o Parser/bitset.o Parser/metagrammar.o Parser/firstsets.o Parser/grammar.o Parser/pgen.o Parser/myreadline.o Parser/tokenizer.o ar rc libpython3.1.a Objects/abstract.o Objects/boolobject.o Objects/bytes_methods.o Objects/bytearrayobject.o Objects/bytesobject.o Objects/cellobject.o Objects/classobject.o Objects/cobject.o Objects/codeobject.o Objects/complexobject.o Objects/descrobject.o Objects/enumobject.o Objects/exceptions.o Objects/genobject.o Objects/fileobject.o Objects/floatobject.o Objects/frameobject.o Objects/funcobject.o Objects/iterobject.o Objects/listobject.o Objects/longobject.o Objects/dictobject.o Objects/memoryobject.o Objects/methodobject.o Objects/moduleobject.o Objects/object.o Objects/obmalloc.o Objects/capsule.o Objects/rangeobject.o Objects/setobject.o Objects/sliceobject.o Objects/structseq.o Objects/tupleobject.o Objects/typeobject.o Objects/unicodeobject.o Objects/unicodectype.o Objects/weakrefobject.o ar rc libpython3.1.a Python/_warnings.o Python/Python-ast.o Python/asdl.o Python/ast.o Python/bltinmodule.o Python/ceval.o Python/compile.o Python/codecs.o Python/errors.o Python/frozen.o Python/frozenmain.o Python/future.o Python/getargs.o Python/getcompiler.o Python/getcopyright.o Python/getplatform.o Python/getversion.o Python/graminit.o Python/import.o Python/importdl.o Python/marshal.o Python/modsupport.o Python/mystrtoul.o Python/mysnprintf.o Python/peephole.o Python/pyarena.o Python/pyctype.o Python/pyfpe.o Python/pymath.o Python/pystate.o Python/pythonrun.o Python/structmember.o Python/symtable.o Python/sysmodule.o Python/traceback.o Python/getopt.o Python/pystrcmp.o Python/pystrtod.o Python/dtoa.o Python/formatter_unicode.o Python/dynload_shlib.o Python/thread.o ar rc libpython3.1.a Modules/config.o Modules/getpath.o Modules/main.o Modules/gcmodule.o ar rc libpython3.1.a Modules/_threadmodule.o Modules/signalmodule.o Modules/posixmodule.o Modules/errnomodule.o Modules/pwdmodule.o Modules/_sre.o Modules/_codecsmodule.o Modules/_weakref.o Modules/_functoolsmodule.o Modules/_localemodule.o Modules/_iomodule.o Modules/iobase.o Modules/fileio.o Modules/bytesio.o Modules/bufferedio.o Modules/textio.o Modules/stringio.o Modules/zipimport.o Modules/symtablemodule.o Modules/xxsubtype.o ranlib libpython3.1.a gcc -o python \ Modules/python.o \ libpython3.1.a -lresolv -lsocket -lnsl -lrt -ldl -lm Undefined first referenced symbol in file libintl_bind_textdomain_codeset libpython3.1.a(_localemodule.o) libintl_gettext libpython3.1.a(_localemodule.o) libintl_textdomain libpython3.1.a(_localemodule.o) libintl_dcgettext libpython3.1.a(_localemodule.o) libintl_bindtextdomain libpython3.1.a(_localemodule.o) libintl_dgettextlibpython3.1.a(_localemodule.o) ld: fatal: Symbol referencing errors. No output written to python collect2: ld returned 1 exit status *** Error code 1 make: Fatal error: Command failed for target `python' bash-3.00$ pwd Need your help to resolve this issue. -- components: Installation messages: 91170 nosy: thoratsandip severity: normal status: open title: During compiling python 3.1 getting error Undefined symbol libintl_bind_textdomain_codeset type: compile error versions: Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6617 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6615] multiprocessing logging support test
Changes by Jesse Noller jnol...@gmail.com: -- assignee: - jnoller ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6615 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6618] Typo in a listing in 5.2.9 of language reference
New submission from Gregor Lingl gregorli...@users.sourceforge.net: Error in: Python v3.1 documentation The Python language reference In the listing at the end of section 5.2.9 Yield expressions, line 7: ... except Exception, e: is syntactically incorrect and consequently raises a Syntax Error. Should read: ... except Exception as e: -- assignee: georg.brandl components: Documentation messages: 91171 nosy: georg.brandl, gregorlingl severity: normal status: open title: Typo in a listing in 5.2.9 of language reference versions: Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6618 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6619] Remove duplicated function in Lib/inspect.py
New submission from Vincent Legoll vincent.leg...@gmail.com: The isgenerator() function looks duplicated, remove the one with the shortest docstring -- components: Library (Lib) files: py3k-inspect.py-remove-duplicated-func.patch keywords: patch messages: 91172 nosy: vincele severity: normal status: open title: Remove duplicated function in Lib/inspect.py versions: Python 3.2 Added file: http://bugs.python.org/file14621/py3k-inspect.py-remove-duplicated-func.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6619 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6620] Variable may be used before first being assigned to in Lib/locale.py
New submission from Vincent Legoll vincent.leg...@gmail.com: The last_interval variable could potentially be used before being first assigned a value. -- components: Library (Lib) files: py3k-locale.py-use-before-assignment.patch keywords: patch messages: 91173 nosy: vincele severity: normal status: open title: Variable may be used before first being assigned to in Lib/locale.py versions: Python 3.2 Added file: http://bugs.python.org/file14622/py3k-locale.py-use-before-assignment.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6620 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6621] [RFC] Remove leftover use of Carbon module from Lib/binhex.py
New submission from Vincent Legoll vincent.leg...@gmail.com: The binhex module still has uses of the deprecated and now now removed Carbon module. The attached patch 'fix' this by removing the code, something else may be required, but I don't know what. So this is only a RFC to start discussion -- components: Library (Lib) files: py3k-binhex.py-remove-carbon-module-use.patch keywords: patch messages: 91174 nosy: vincele severity: normal status: open title: [RFC] Remove leftover use of Carbon module from Lib/binhex.py versions: Python 3.2 Added file: http://bugs.python.org/file14623/py3k-binhex.py-remove-carbon-module-use.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6621 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6622] [RFC] wrong variable used in Lib/poplib.py
New submission from Vincent Legoll vincent.leg...@gmail.com: The poplib modules use the 'secret' variable during its creation, this may be a mistake. Perhaps the intention was to use the 'password' instead... -- components: Library (Lib) files: py3k-poplib.py-use-wrong-variable.patch keywords: patch messages: 91175 nosy: vincele severity: normal status: open title: [RFC] wrong variable used in Lib/poplib.py versions: Python 3.2 Added file: http://bugs.python.org/file14624/py3k-poplib.py-use-wrong-variable.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6622 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6623] Lib/ftplib.py
Changes by Vincent Legoll vincent.leg...@gmail.com: -- components: Library (Lib) nosy: vincele severity: normal status: open title: Lib/ftplib.py versions: Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6623 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6623] Lib/ftplib.py netrc class parsing problem
New submission from Vincent Legoll vincent.leg...@gmail.com: The 'macro_lines' list should probably be emptied upon leaving macro parsing mode. Simplify code by using the 'macro_name' variable as the boolean for macro parsing mode. Deprecated code probably should be fixed until completely removed -- keywords: +patch title: Lib/ftplib.py - Lib/ftplib.py netrc class parsing problem Added file: http://bugs.python.org/file14625/py3k-ftplib.py-use-before-assignment.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6623 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6624] PyArg_ParseTuple with s format and NUL: Bogus TypeError detail string.
New submission from Sean Reifschneider j...@tummy.com: As detailed in the python-dev post: http://mail.python.org/pipermail/python-dev/2009-July/090791.html I have found a bug in the handling of PyArg_ParseTuple where a NUL in an argument causes a message like this: syslog.syslog('hello\0there') TypeError: [priority,] message string Instead of: TypeError: must be string without null bytes, not str This seems to be a thinko in Python/getargs.c at line 331: msg = convertitem(PyTuple_GET_ITEM(args, i), format, p_va, flags, levels, msgbuf, sizeof(msgbuf), freelist); if (msg) { seterror(i+1, msg, levels, fname, message);Line 331 return cleanreturn(0, freelist); } This also applies to Python 3 trunk in line 390. I think that's supposed to be msg instead of message in the last argument. I have made this change and make test for both python and py3k trunks is clean. -- assignee: jafo components: Interpreter Core messages: 91177 nosy: jafo priority: normal severity: normal stage: committed/rejected status: open title: PyArg_ParseTuple with s format and NUL: Bogus TypeError detail string. type: behavior versions: Python 2.7, Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6624 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6624] PyArg_ParseTuple with s format and NUL: Bogus TypeError detail string.
Sean Reifschneider j...@tummy.com added the comment: Fixed in python trunk commit 74277. Fixed in py3k trunk commit 74278. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6624 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6616] PyList_APPEND (append without incref)
Campbell Barton ideasma...@gmail.com added the comment: Hi Raymond, in general I agree with your comments that adding 2 ways to do things is not great. The reason I still think this is an advantage is that I know the API well enough (with manipulating dicts/lists etc) and I still want this function for the sake of convenience. For the same reason that PyList_SET_ITEM is useful, this is useful too. Loosing the error checking is a disadvantage but in many cases API's dont do error checking for every new item allocated. Python's own code does this in a few cases with PyList_SET_ITEM... eg. ./Python/_warnings.c:857: PyList_SET_ITEM(filters, 1, create_filter(PyExc_ImportWarning, ignore)) ./Python/Python-ast.c:2757: PyList_SET_ITEM(value, i, ast2obj_cmpop((cmpop_ty)asdl_seq_GET(o-v.Compare.ops, i))); -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6616 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com