[issue9584] Allow curly brace expansion
Changes by Tim Golden m...@timgolden.me.uk: Removed file: http://bugs.python.org/file27894/0003-reworked-issue9584.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9584 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9584] Allow curly brace expansion
Tim Golden added the comment: Given that this isn't going to go ahead in its current form, and will need wider discussion on python-dev, I'm unassigning myself and I've removed the flawed version of the patch which I'd posted. -- assignee: tim.golden - ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9584 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11313] Speed up default encode()/decode()
Ezio Melotti added the comment: Agreed, closing. -- resolution: - fixed stage: commit review - committed/rejected status: open - closed versions: +Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11313 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13301] the script Tools/i18n/msgfmt.py allows arbitrary code execution via po files
Roundup Robot added the comment: New changeset 058ff991bdcb by Ezio Melotti in branch '2.7': #13301: use ast.literal_eval() instead of eval() in Tools/i18n/msgfmt.py. Patch by Serhiy Storchaka. http://hg.python.org/cpython/rev/058ff991bdcb New changeset 2fa338374719 by Ezio Melotti in branch '3.2': #13301: use ast.literal_eval() instead of eval() in Tools/i18n/msgfmt.py. Patch by Serhiy Storchaka. http://hg.python.org/cpython/rev/2fa338374719 New changeset ea2cb9b69fd9 by Ezio Melotti in branch '3.3': #13301: merge with 3.2. http://hg.python.org/cpython/rev/ea2cb9b69fd9 New changeset aa02f7be68f6 by Ezio Melotti in branch 'default': #13301: merge with 3.3. http://hg.python.org/cpython/rev/aa02f7be68f6 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13301 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13301] the script Tools/i18n/msgfmt.py allows arbitrary code execution via po files
Ezio Melotti added the comment: Fixed, thanks for the patch! -- assignee: - ezio.melotti resolution: - fixed stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13301 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16444] Use support.TESTFN_UNDECODABLE on UNIX
Serhiy Storchaka added the comment: Try b'\x81', b'\x98', b'\xae', b'\xd5', b'\xff'. They are undecodable in all 1-byte encodings. b'\x81' : shift_jis_2004 shift_jis shift_jisx0213 cp869 cp874 cp932 cp1250 cp1252 cp1253 cp1254 cp1255 cp1257 cp1258 b'\x98' : shift_jis_2004 shift_jis shift_jisx0213 cp874 cp932 cp1250 cp1251 cp1253 cp1257 b'\xae' : iso8859-3 iso8859-6 iso8859-7 cp424 b'\xd5' : iso8859-8 cp856 cp857 b'\xff' : hp-roman8 iso8859-6 iso8859-7 iso8859-8 iso8859-11 shift_jis_2004 shift_jis shift_jisx0213 tis-620 cp864 cp874 cp1253 cp1255 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16444 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16444] Use support.TESTFN_UNDECODABLE on UNIX
Serhiy Storchaka added the comment: Try b'\xed\xb2\x80' and b'\xed\xb4\x80' for UTF-8 (on Unix and Mac OS X). b'\xed\xb2\x80' is b'\x80'.decode('utf-8', 'surrogateescape').encode('utf-8', 'surrogatepass'). b'\xed\xb4\x80' is '\udd00'.encode('utf-8', 'surrogatepass') and '\udd00' can't be encoded with surrogateescape. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16444 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16444] Use support.TESTFN_UNDECODABLE on UNIX
Serhiy Storchaka added the comment: The full test suite pass on: The matter is not only in the fact that tests passed. They should fail if the original bug occurs again. Have you tried to restore the bugs? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16444 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16445] SEGFAULT when deleting Exception.message
Serhiy Storchaka added the comment: The Coccinelle looks as an amazing tool! I propose split a patch on several patches (autogenerated code, attributes clearing, other pointer expressions (as *exceptionObject or unicode_latin1[i]) clearing, and local pointers clearing at the end) and commit they separately. -- components: +Extension Modules, Interpreter Core nosy: +serhiy.storchaka stage: - needs patch versions: +Python 2.7, Python 3.2, Python 3.3, Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16445 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16447] SEGFAULT when setting type.__name__
Changes by Serhiy Storchaka storch...@gmail.com: -- components: +Extension Modules, Interpreter Core stage: - needs patch versions: +Python 2.7, Python 3.2, Python 3.3, Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16447 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16447] SEGFAULT when setting type.__name__
Serhiy Storchaka added the comment: Yes, the macro appropriate here. In Modules/zlibmodule.c this patterns should be fixed by patch for issue16350. -- nosy: +serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16447 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16335] Integer overflow in unicode-escape decoder
Ezio Melotti added the comment: Tests would be good. You could use test.support.bigmemtest. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16335 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16163] Wrong name in Lib/pkgutil.py:iter_importers
Ezio Melotti added the comment: Given the lack of proper tests for iter_importers, wouldn't adding a proper test that returns something useful, rather than testing only with a non-existent module be better (this test could be kept, maybe converted to an assertRaises)? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16163 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16447] SEGFAULT when setting type.__name__
Amaury Forgeot d'Arc added the comment: - For the replacement with NULL, Py_CLEAR() should be used instead. - We should use a macro (Py_REF_ASSIGN?) for the replacement case. - Careful, in Modules/_json.c the code is wrong because tmp is already used:: PyObject *tmp = PyUnicode_AsEncodedString(...); { PyObject *tmp = s-encoding; s-encoding = tmp; Py_DECREF(tmp); } -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16447 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16163] Wrong name in Lib/pkgutil.py:iter_importers
Nick Coghlan added the comment: OK, I thought that iter_importers was at least being tested indirectly by the tests for walk_packages: http://hg.python.org/cpython/file/default/Lib/test/test_runpy.py#l417 However, it turns out that iter_modules() only calls iter_importers() if you don't supply an explicit path, and walk_packages() always passes an explicit path down. I suggest looking at the walk_packages test for ideas on devising a better functional test for iter_importers. Testing iter_modules directly would be good, too. (Note: There's a series of patches from Chris to move the walk_packages test to where it belongs in test_pkgutil, but they won't be applied until after the final 3.2 maintenance release has happened. Moving the test requires some fairly significant rearranging of the test suite to get the required helper functions out of test_runpy and into a shared, discoverable, location) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16163 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4965] Can doc index of html version be separately scrollable?
Ezio Melotti added the comment: In the root of the clone, with the doc already built in Doc/build (no need to rebuild it), do: hg import --no-c http://bugs.python.org/file27887/issue4965.diff cp Doc/tools/sphinxext/static/basic.css Doc/build/html/_static/basic.css firefox file://`pwd`/Doc/build/html/library/multiprocessing.html -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4965 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue834840] Unhelpful error message from cgi module
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +akuchling, ezio.melotti type: enhancement - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue834840 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3154] Quick search box renders too wide if font size is large
Ezio Melotti added the comment: I can't reproduce this with both the old (2.x) and new (3.x) themes on Firefox 16, so I'm closing this. If someone can still reproduce it, feel free to reopen it. -- resolution: - out of date stage: needs patch - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3154 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2454] sha and md5 fixer
Ezio Melotti added the comment: What's the status of this? -- nosy: +ezio.melotti ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2454 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15303] Minor revision to the BaseWidget._setup method in Tkinter
Ezio Melotti added the comment: Can you provide a patch in diff format? You can find more information about how to do it on the devguide. -- nosy: +ezio.melotti, gpolo stage: - needs patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15303 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15480] Drop TYPE_INT64 from marshal in Python 3.4
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +larry priority: deferred blocker - release blocker stage: - needs patch type: - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15480 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12907] Update test coverage devguide page
Changes by Ezio Melotti ezio.melo...@gmail.com: -- versions: -Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12907 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8843] urllib2 Digest Authorization uri must match request URI
Changes by Ezio Melotti ezio.melo...@gmail.com: -- versions: +Python 3.3, Python 3.4 -Python 2.6, Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8843 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2818] pulldom cannot handle xml file with large external entity properly
Changes by Ezio Melotti ezio.melo...@gmail.com: -- stage: - needs patch versions: +Python 3.3, Python 3.4 -Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2818 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9156] socket._fileobject: read raises AttributeError when closed in another thread
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +pitrou stage: - needs patch versions: +Python 2.7 -Python 2.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9156 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9194] winreg:fixupMultiSZ should check that P Q in the inner loop
Changes by Ezio Melotti ezio.melo...@gmail.com: -- versions: +Python 3.3, Python 3.4 -Python 2.6, Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9194 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5550] urllib2 use of opener.addheaders
Changes by Ezio Melotti ezio.melo...@gmail.com: -- versions: +Python 3.3, Python 3.4 -Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5550 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5888] mmap ehancement - resize with sequence notation
Changes by Ezio Melotti ezio.melo...@gmail.com: -- versions: +Python 3.4 -Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5888 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6359] pyexpat.c calls trace function incorrectly for exceptions
Ezio Melotti added the comment: Can you provide a patch? -- nosy: +ezio.melotti versions: +Python 3.3, Python 3.4 -Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6359 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16089] _elementtree.TreeBuilder broken with a non-C-deriving element_factory
Dmitry Shachnev added the comment: There are still some false-positive warnings caused by C code that affect docutils (see http://sourceforge.net/tracker/?func=detailatid=422030aid=3555164group_id=38414). Look at this traceback for exmaple: http://paste.ubuntu.com/1345164/ There, _ElementInterfaceWrapper is a subclass of etree._ElementInterface (http://repo.or.cz/w/docutils.git/blob/HEAD:/docutils/docutils/writers/odf_odt/__init__.py#l91). -- nosy: +larry, mitya57 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16089 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16089] _elementtree.TreeBuilder broken with a non-C-deriving element_factory
Changes by Dmitry Shachnev mity...@gmail.com: ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16089 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16089] _elementtree.TreeBuilder broken with a non-C-deriving element_factory
Changes by Dmitry Shachnev mity...@gmail.com: ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16089 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6386] importing yields unexpected results when initial script is a symbolic link
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +brett.cannon, ncoghlan versions: +Python 3.3, Python 3.4 -Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6386 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6709] It's possible to create TryExcept with no handlers
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +brett.cannon, georg.brandl, ncoghlan stage: - needs patch versions: +Python 3.3, Python 3.4 -Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6709 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6709] It's possible to create TryExcept with no handlers
Benjamin Peterson added the comment: This was fixed a while ago: Traceback (most recent call last): File stdin, line 1, in module ValueError: Try has neither except handlers nor finalbody -- resolution: - out of date status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6709 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15303] Minor revision to the BaseWidget._setup method in Tkinter
Guilherme Polo added the comment: Please include a short version of the widget class you mentioned. It must be only long enough to show the issue. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15303 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14215] http://www.python.org/dev/peps/ title is python.org
Ramchandra Apte added the comment: Bump. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14215 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2454] sha and md5 fixer
Meador Inge added the comment: I haven't touched the patch since I attached it. I will refresh it today with the feedback given. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2454 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16443] Add docstrings to regular expression match objects
Ezio Melotti added the comment: Do you mean http://docs.python.org/2/library/re.html#match-objects ? This doesn't seem to say anything too useful. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16443 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6709] It's possible to create TryExcept with no handlers
Changes by Ezio Melotti ezio.melo...@gmail.com: -- stage: needs patch - committed/rejected ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6709 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16121] shlex.shlex.error_leader() reports incorrect line number
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti stage: - needs patch type: - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16121 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16335] Integer overflow in unicode-escape decoder
Changes by Serhiy Storchaka storch...@gmail.com: Removed file: http://bugs.python.org/file27741/decode_unicode_escape_overflow.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16335 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16335] Integer overflow in unicode-escape decoder
Serhiy Storchaka added the comment: Here are patches for different Python versions. Test added. Victor, now you can try it on 12GB. Unfortunately, I can't run the tests. -- Added file: http://bugs.python.org/file27933/decode_unicode_escape_overflow-3.3.patch Added file: http://bugs.python.org/file27934/decode_unicode_escape_overflow-3.2.patch Added file: http://bugs.python.org/file27935/decode_unicode_escape_overflow-2.7.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16335 ___diff -r d170844a363f Lib/test/test_ucn.py --- a/Lib/test/test_ucn.py Fri Nov 09 01:09:27 2012 +0200 +++ b/Lib/test/test_ucn.py Fri Nov 09 16:36:22 2012 +0200 @@ -9,6 +9,7 @@ import unittest import unicodedata +import _testcapi from test import support from http.client import HTTPException @@ -215,6 +216,20 @@ str, b\\NSPACE, 'unicode-escape', 'strict' ) +@unittest.skipUnless(_testcapi.INT_MAX _testcapi.PY_SSIZE_T_MAX, + needs UINT_MAX SIZE_MAX) +@support.bigmemtest(size=_testcapi.UINT_MAX + 1 + len(b'\\N{SPACE}') + 1, +memuse=1 + 1, dry_run=False) +def test_issue16335(self, size): +# very very long bogus character name +x = b'\\N{SPACE' + b'x' * (_testcapi.UINT_MAX + 1) + b'}' +self.assertEqual(len(x), len(b'\\N{SPACE}') + (_testcapi.UINT_MAX + 1)) +self.assertRaisesRegex(UnicodeError, +'unknown Unicode character name', +x.decode, 'unicode-escape' +) + + def test_main(): support.run_unittest(UnicodeNamesTest) diff -r d170844a363f Objects/unicodeobject.c --- a/Objects/unicodeobject.c Fri Nov 09 01:09:27 2012 +0200 +++ b/Objects/unicodeobject.c Fri Nov 09 16:36:22 2012 +0200 @@ -5561,7 +5561,8 @@ /* found a name. look it up in the unicode database */ message = unknown Unicode character name; s++; -if (ucnhash_CAPI-getcode(NULL, start, (int)(s-start-1), +if (s - start - 1 = INT_MAX +ucnhash_CAPI-getcode(NULL, start, (int)(s-start-1), chr, 0)) goto store; } diff -r bb39ca6bcd7a Lib/test/test_ucn.py --- a/Lib/test/test_ucn.py Fri Nov 09 01:08:25 2012 +0200 +++ b/Lib/test/test_ucn.py Fri Nov 09 16:36:32 2012 +0200 @@ -8,6 +8,7 @@ # import unittest +import _testcapi from test import support @@ -141,6 +142,20 @@ str, b\\NSPACE, 'unicode-escape', 'strict' ) +@unittest.skipUnless(_testcapi.INT_MAX _testcapi.PY_SSIZE_T_MAX, + needs UINT_MAX SIZE_MAX) +@support.bigmemtest(size=_testcapi.UINT_MAX + 1 + len(b'\\N{SPACE}') + 1, +memuse=1 + 4, dry_run=False) +def test_issue16335(self, size): +# very very long bogus character name +x = b'\\N{SPACE' + b'x' * (_testcapi.UINT_MAX + 1) + b'}' +self.assertEqual(len(x), len(b'\\N{SPACE}') + (_testcapi.UINT_MAX + 1)) +self.assertRaisesRegex(UnicodeError, +'unknown Unicode character name', +x.decode, 'unicode-escape' +) + + def test_main(): support.run_unittest(UnicodeNamesTest) diff -r bb39ca6bcd7a Objects/unicodeobject.c --- a/Objects/unicodeobject.c Fri Nov 09 01:08:25 2012 +0200 +++ b/Objects/unicodeobject.c Fri Nov 09 16:36:32 2012 +0200 @@ -3919,7 +3919,8 @@ /* found a name. look it up in the unicode database */ message = unknown Unicode character name; s++; -if (ucnhash_CAPI-getcode(NULL, start, (int)(s-start-1), chr)) +if (s - start - 1 = INT_MAX +ucnhash_CAPI-getcode(NULL, start, (int)(s-start-1), chr)) goto store; } } diff -r 8b181c75792f Lib/test/test_ucn.py --- a/Lib/test/test_ucn.py Fri Nov 09 01:03:44 2012 +0200 +++ b/Lib/test/test_ucn.py Fri Nov 09 16:37:11 2012 +0200 @@ -8,6 +8,7 @@ # import unittest +import _testcapi from test import test_support @@ -137,6 +138,20 @@ unicode, \\NSPACE, 'unicode-escape', 'strict' ) +@unittest.skipUnless(_testcapi.INT_MAX _testcapi.PY_SSIZE_T_MAX, + needs UINT_MAX SIZE_MAX) +@test_support.bigmemtest(minsize=_testcapi.UINT_MAX + 1 + len(b'\\N{SPACE}') + 1, + memuse=1 + 4) +def test_issue16335(self, size): +# very very long bogus character name +x = b'\\N{SPACE' + b'x' * (_testcapi.UINT_MAX + 1) + b'}' +self.assertEqual(len(x), len(b'\\N{SPACE}') + (_testcapi.UINT_MAX + 1)) +self.assertRaisesRegex(UnicodeError, +'unknown Unicode character name',
[issue14010] deeply nested filter segfaults
Alex Gaynor added the comment: Since the paste is dead: i = filter(bool, range(5)) for _ in range(100): i = filter(bool, i) for p in i: print(p) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14010 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13574] refresh example in doc for Extending and Embedding
Changes by Ezio Melotti ezio.melo...@gmail.com: -- versions: +Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13574 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15474] Differentiate decorator and decorator factory in docs
Changes by Ezio Melotti ezio.melo...@gmail.com: -- keywords: +easy nosy: +ezio.melotti stage: - needs patch type: - enhancement versions: +Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15474 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12217] Cross-link docs for faulthandler, traceback and pdb
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti type: - enhancement versions: +Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12217 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10048] urllib.request documentation confusing
Changes by Ezio Melotti ezio.melo...@gmail.com: -- type: - enhancement versions: +Python 3.3, Python 3.4 -Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10048 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16190] Misleading warning in random module docs
Changes by George Peristerakis peristera...@gmail.com: -- nosy: -George.Peristerakis ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16190 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16441] range usage in gzip module leads to excessive memory usage.
Roundup Robot added the comment: New changeset f938d478359a by Chris Withers in branch '2.7': Bug #16441: avoid excessive memory usage working with large gzip files http://hg.python.org/cpython/rev/f938d478359a -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16441 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16009] Json error messages could provide more information about the error
Serhiy Storchaka added the comment: Patch updated. Added new test cases as Ezio want.. -- Added file: http://bugs.python.org/file27936/json_errmsg_5.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16009 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16441] range usage in gzip module leads to excessive memory usage.
Chris Withers added the comment: Committed on 2.7 branch. -- stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16441 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6359] pyexpat.c calls trace function incorrectly for exceptions
Ned Batchelder added the comment: I have no idea why pyexpat.c invokes the trace function in the first place. Unless someone can explain why it does that when no other C extension does, my inclination would be to make it stop calling the trace function at all, not to fix how it calls it. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6359 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9156] socket._fileobject: read raises AttributeError when closed in another thread
Antoine Pitrou added the comment: I'm not sure there's really a point in making socket.makefile() objects thread-safe. In any case, making them thread-safe would probably require more than this small fix. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9156 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16391] add terminator ctor argument to logging.StreamHandlers derived handlers
Vinay Sajip added the comment: You can already do this with Python 3.2 (and hence with later Python 3.x): import logging.config def my_handler(*args, **kwargs): h = logging.StreamHandler(*args, **kwargs) h.terminator = '!\n' return h LOGGING = { 'version': 1, 'handlers': { 'console': { '()': my_handler, 'stream': 'ext://sys.stdout', } }, 'root': { 'handlers': ['console'], 'level': 'INFO', } } logging.config.dictConfig(LOGGING) logging.info('Hello') logging.info('world') which will print Hello! world! -- nosy: +vinay.sajip ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16391 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16391] add terminator ctor argument to logging.StreamHandlers derived handlers
Vinay Sajip added the comment: Note that you can also use the value 'ext://__main__.my_handler' for key '()'. -- assignee: - vinay.sajip ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16391 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9156] socket._fileobject: read raises AttributeError when closed in another thread
Christian Heimes added the comment: I agree with Antoine. IMHO it's common knowledge that file and socket object aren't thread safe. All access to these objects must be synced with a lock. -- nosy: +christian.heimes ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9156 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9156] socket._fileobject: read raises AttributeError when closed in another thread
Mathias Panzenböck added the comment: The problem is that the other thread is blocked, waiting for new client connections. A common pattern for very simple server applications (like you write during exercises at universities) is: 2 threads: 1. A server thread waiting for clients, maybe spawning even more threads for each connection. 2. A small shell thread reading commands from stdin. When quit is read it closes the server socket, which shuts down the server (the server thread just notices that the socket was closed and shuts down properly). This pattern we used all the time when writing exercises in Java. However, it seems to work quite differently in Python 3. I have to check if this problem still exists. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9156 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9156] socket._fileobject: read raises AttributeError when closed in another thread
Antoine Pitrou added the comment: 2 threads: 1. A server thread waiting for clients, maybe spawning even more threads for each connection. 2. A small shell thread reading commands from stdin. When quit is read it closes the server socket, which shuts down the server (the server thread just notices that the socket was closed and shuts down properly). You're originally talking about socket._fileobject. I don't see what that has to do with a listening socket being closed (a server thread waiting for clients). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9156 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16424] regression: os.path.split('//hostname/foo/bar.txt')
Changes by Jesús Cea Avión j...@jcea.es: -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16424 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16427] Faster hash implementation
Changes by Jesús Cea Avión j...@jcea.es: -- nosy: +jcea ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16427 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16248] Security bug in tkinter allows for untrusted, arbitrary code execution.
Zachary Ware added the comment: Here are a pair of trivial patches that implement Antoine's suggestion of not executing readprofile() if the -E flag is set. Current tests seem to pass, but there are no new tests included because frankly I'm not sure of either how to test it or where. Also, I can't seem to find any tests of the -E flag at all; does this change need a test? No doc change either since the function isn't documented. The patches apply equally well on 2.6 or 2.7, or 3.1 or 3.2, depending on whether this is determined to be security issue enough to mess with 2.6 and 3.1. Thanks, Zach -- keywords: +patch Added file: http://bugs.python.org/file27937/issue16248-2.x.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16248 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16248] Security bug in tkinter allows for untrusted, arbitrary code execution.
Changes by Zachary Ware zachary.w...@gmail.com: Added file: http://bugs.python.org/file27938/issue16248-3.x.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16248 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9156] socket._fileobject: read raises AttributeError when closed in another thread
Mathias Panzenböck added the comment: Yeah, I don't remember anymore. It was so long ago. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9156 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16218] Python launcher does not support unicode characters
koobs added the comment: If there's not another revision of the test patch in the wings, can 56df0d4f0011 also be applied to 3.3, as tests are still failing on at least koobs-freebsd and koobs-freebsd-clang buildbots. -- nosy: +koobs ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16218 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16447] SEGFAULT when setting type.__name__
Changes by Jesús Cea Avión j...@jcea.es: -- nosy: +jcea ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16447 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16445] SEGFAULT when deleting Exception.message
Changes by Jesús Cea Avión j...@jcea.es: -- nosy: +jcea ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16445 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1020188] Use Py_CLEAR where necessary to avoid crashes
Changes by Jesús Cea Avión j...@jcea.es: -- nosy: +jcea ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1020188 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16435] Python 3 doc link to Python 2 FAQ
Roundup Robot added the comment: New changeset da0b3735be27 by Chris Jerdonek in branch '3.2': Improve FAQ link in documentation (for issue #16435). http://hg.python.org/cpython/rev/da0b3735be27 New changeset 3951264b0763 by Chris Jerdonek in branch '3.3': Merge from 3.2: improve FAQ link in documentation (for issue #16435). http://hg.python.org/cpython/rev/3951264b0763 New changeset 7cfe8cd4d65e by Chris Jerdonek in branch 'default': Merge from 3.3: improve FAQ link in documentation (for issue #16435). http://hg.python.org/cpython/rev/7cfe8cd4d65e -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16435 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16435] Python 3 doc link to Python 2 FAQ
Roundup Robot added the comment: New changeset 5b3648f5e452 by Chris Jerdonek in branch '2.7': Backport from 3.2: improve FAQ link in documentation (for issue #16435). http://hg.python.org/cpython/rev/5b3648f5e452 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16435 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9974] tokenizer.untokenize not invariant with line continuations
Changes by Eric Snow ericsnowcurren...@gmail.com: -- nosy: +eric.snow ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9974 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16447] SEGFAULT when setting type.__name__
Jesús Cea Avión added the comment: Yes, we should add a Py_REPLACE() macro. Sure. +1 to that. With this issue in mind, I wonder if there is any situation where Py_DECREF/Py_XDECREF must be used that can not be replace with Py_CLEAR/Py_REPLACE. Is there any code that breaks if we replace Py_XDECREF() by Py_CLEAR()?. Could be possible even to replace Py_DECREF definition?. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16447 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16436] Link directly to set and frozenset in built-in function docs
Roundup Robot added the comment: New changeset 16fa6462dfe1 by Chris Jerdonek in branch '3.2': Link set and frozenset function docs to their class definitions (issue #16436). http://hg.python.org/cpython/rev/16fa6462dfe1 New changeset d534da27ca8b by Chris Jerdonek in branch '3.3': Merge from 3.2: adjust set and frozenset function docs (issue #16436). http://hg.python.org/cpython/rev/d534da27ca8b New changeset 1fde0d70f2b8 by Chris Jerdonek in branch 'default': Merge from 3.3: adjust set and frozenset function docs (issue #16436). http://hg.python.org/cpython/rev/1fde0d70f2b8 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16436 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16436] Link directly to set and frozenset in built-in function docs
Roundup Robot added the comment: New changeset 24db5292c2c9 by Chris Jerdonek in branch '2.7': Backport from 3.2: adjust set and frozenset function docs (issue #16436). http://hg.python.org/cpython/rev/24db5292c2c9 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16436 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16436] Link directly to set and frozenset in built-in function docs
Chris Jerdonek added the comment: Fixed. Thanks a lot for the report, Yongzhi. -- resolution: - fixed stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16436 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13538] Improve doc for str(bytesobject)
Chris Jerdonek added the comment: New patch incorporating Ezio's suggestions, along with some other changes. -- Added file: http://bugs.python.org/file27939/issue-13538-4-default.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13538 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11957] re.sub confusion between count and flags args
Changes by Eric Snow ericsnowcurren...@gmail.com: -- nosy: -eric.snow ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11957 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12082] Python/import.c still references fstat even with DONT_HAVE_FSTAT/!HAVE_FSTAT
Changes by Eric Snow ericsnowcurren...@gmail.com: -- versions: +Python 3.4 -Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12082 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13912] ImportError using __import__ and relative level 1
Eric Snow added the comment: Are you okay on this, Jason? -- status: open - pending ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13912 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14080] Sporadic test_imp failure
Eric Snow added the comment: Given that issue14657 wrapped up, I'm closing this issue too. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14080 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13349] Non-informative error message in index() and remove() functions
Sean Ochoa added the comment: Truncating repr strings to 100chars will require the patch from #7330. After applying the patch from that issue, my tests work fine. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13349 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13349] Non-informative error message in index() and remove() functions
Sean Ochoa added the comment: Updated patch after taking into account Ezio's (aka Taggnostr on #python-dev) latest feedback. -- Added file: http://bugs.python.org/file27940/issue13349.patch.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13349 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com