[issue1007] [py3k] Fix dumbdbm, which fixes test_shelve (for me); instrument other tests so we catch this sooner (and more directly)
Changes by Collin Winter: -- versions: +Python 3.0 -Python 2.6 __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1007> __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1670765] email.Generator: no header wrapping for multipart/signed
Collin Winter added the comment: I'd like some tests demonstrating where the current implementation fails and your patch helps, yes. _ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1670765> _ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1002] Patch to rename HTMLParser module to lower_case
Collin Winter added the comment: orsenthil: that this will break external modules is completely acceptable. Those modules won't work out-of-the-box with Python 3 anyway, and hopefully Paul's patch to 2to3 will alleviate some of the burden. -- nosy: +collinwinter __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1002> __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1066] Implement PEPs 3109, 3134
New submission from Collin Winter: This does not implement __context__; it turned out to be much more difficult than expected and will require some more thought. The new raise syntax and the __traceback__ and __cause__ attributes are implemented, however. This does not yet include a docs patch, though I'm working on that now. -- assignee: gvanrossum components: Interpreter Core, Library (Lib), Tests files: raise.patch keywords: patch, py3k messages: 55517 nosy: collinwinter, gvanrossum severity: normal status: open title: Implement PEPs 3109, 3134 type: behavior versions: Python 3.0 __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1066> __=== Python/Python-ast.c == --- Python/Python-ast.c (revision 980) +++ Python/Python-ast.c (local) @@ -2,7 +2,7 @@ /* - __version__ 56266. + __version__ 465. This module must be committed separately after each AST grammar change; The __version__ number is set to the revision number of the commit @@ -101,9 +101,8 @@ }; static PyTypeObject *Raise_type; static char *Raise_fields[]={ -"type", -"inst", -"tback", +"exc", +"cause", }; static PyTypeObject *TryExcept_type; static char *TryExcept_fields[]={ @@ -510,7 +509,7 @@ if (!If_type) return 0; With_type = make_type("With", stmt_type, With_fields, 3); if (!With_type) return 0; -Raise_type = make_type("Raise", stmt_type, Raise_fields, 3); +Raise_type = make_type("Raise", stmt_type, Raise_fields, 2); if (!Raise_type) return 0; TryExcept_type = make_type("TryExcept", stmt_type, TryExcept_fields, 3); if (!TryExcept_type) return 0; @@ -1052,17 +1051,15 @@ } stmt_ty -Raise(expr_ty type, expr_ty inst, expr_ty tback, int lineno, int col_offset, - PyArena *arena) +Raise(expr_ty exc, expr_ty cause, int lineno, int col_offset, PyArena *arena) { stmt_ty p; p = (stmt_ty)PyArena_Malloc(arena, sizeof(*p)); if (!p) return NULL; p->kind = Raise_kind; -p->v.Raise.type = type; -p->v.Raise.inst = inst; -p->v.Raise.tback = tback; +p->v.Raise.exc = exc; +p->v.Raise.cause = cause; p->lineno = lineno; p->col_offset = col_offset; return p; @@ -2221,21 +2218,16 @@ case Raise_kind: result = PyType_GenericNew(Raise_type, NULL, NULL); if (!result) goto failed; -value = ast2obj_expr(o->v.Raise.type); +value = ast2obj_expr(o->v.Raise.exc); if (!value) goto failed; -if (PyObject_SetAttrString(result, "type", value) == -1) +if (PyObject_SetAttrString(result, "exc", value) == -1) goto failed; Py_DECREF(value); -value = ast2obj_expr(o->v.Raise.inst); +value = ast2obj_expr(o->v.Raise.cause); if (!value) goto failed; -if (PyObject_SetAttrString(result, "inst", value) == -1) +if (PyObject_SetAttrString(result, "cause", value) == -1) goto failed; Py_DECREF(value); -value = ast2obj_expr(o->v.Raise.tback); -if (!value) goto failed; -if (PyObject_SetAttrString(result, "tback", value) == -1) -goto failed; -Py_DECREF(value); break; case TryExcept_kind: result = PyType_GenericNew(TryExcept_type, NULL, NULL); @@ -3179,7 +3171,7 @@ if (PyDict_SetItemString(d, "AST", (PyObject*)AST_type) < 0) return; if (PyModule_AddIntConstant(m, "PyCF_ONLY_AST", PyCF_ONLY_AST) < 0) return; -if (PyModule_AddStringConstant(m, "__version__", "56266") < 0) +if (PyModule_AddStringConstant(m, "__version__", "465") < 0) return; if (PyDict_SetItemString(d, "mod", (PyObject*)mod_type) < 0) return; if (PyDict_SetItemString(d, "Module", (PyObject*)Module_type) < 0) === Python/ast.c == --- Python/ast.c (revision 980) +++ Python/ast.c (local) @@ -2199,40 +2199,19 @@ } case raise_stmt: if (NCH(ch) == 1) -return Raise(NULL, NULL, NULL, LINENO(n), n->n_col_offset, c->c_arena); -else if (NCH(ch) == 2) { +return Raise(NULL, NULL, LINENO(n), n->n_col_offset, c-&g
[issue1066] Implement PEPs 3109, 3134
Changes by Collin Winter: __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1066> __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1066] Implement PEPs 3109, 3134
Changes by Collin Winter: __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1066> __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1066] Implement PEPs 3109, 3134
Changes by Collin Winter: -- status: open -> closed __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1066> __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1066] Implement PEPs 3109, 3134
Collin Winter added the comment: Committed as r57783. __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1066> __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1107] 2to3, lambda with non-tuple argument inside parenthesis
Changes by Collin Winter: -- components: +2to3 (2.x to 3.x conversion tool) -Demos and Tools __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1107> __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1001] 2to3 crashes on input files with no trailing newlines
Changes by Collin Winter: -- assignee: -> collinwinter components: +2to3 (2.x to 3.x conversion tool) -Demos and Tools nosy: +collinwinter __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1001> __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1034] [patch] Add 2to3 support for displaying warnings as Python comments
Changes by Collin Winter: -- assignee: -> collinwinter components: +2to3 (2.x to 3.x conversion tool) -Demos and Tools nosy: +collinwinter __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1034> __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1001] 2to3 crashes on input files with no trailing newlines
Collin Winter added the comment: I believe this was fixed in r57942; can you test to see if you still have this problem? __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1001> __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1005] Patches to rename Queue module to queue
Changes by Collin Winter: -- components: +2to3 (2.x to 3.x conversion tool) __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1005> __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1002] Patch to rename HTMLParser module to lower_case
Changes by Collin Winter: -- components: +2to3 (2.x to 3.x conversion tool) __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1002> __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1000] Patch to rename *Server modules to lower-case
Changes by Collin Winter: -- components: +2to3 (2.x to 3.x conversion tool) __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1000> __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1000] Patch to rename *Server modules to lower-case
Changes by Collin Winter: -- nosy: +collinwinter __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1000> __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1619049] sys.intern() 2to3 fixer
Changes by Collin Winter: -- components: +2to3 (2.x to 3.x conversion tool) -None _ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1619049> _ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1001] 2to3 crashes on input files with no trailing newlines
Changes by Collin Winter: -- resolution: -> fixed status: open -> closed __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1001> __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1107] 2to3, lambda with non-tuple argument inside parenthesis
Collin Winter added the comment: Fixed in r58055, r58056. -- resolution: -> fixed status: open -> closed __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1107> __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1138] Fixer needed for __future__ imports
New submission from Collin Winter: Per http://mail.python.org/pipermail/python-3000/2007-September/010337.html, 2to3 should strip out __future__ imports. This should probably be added to the existing import fixer. -- assignee: collinwinter components: 2to3 (2.x to 3.0 conversion tool) messages: 55769 nosy: collinwinter priority: normal severity: normal status: open title: Fixer needed for __future__ imports type: behavior __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1138> __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13430] Add a curry function to the functools module
Collin Winter added the comment: I assume I was added to this thread since I wrote the functional module, so I'll give my take in that capacity. IMO Python doesn't need a more general version of partial(); indeed, I question the need for partial() as it is today. Querying Google Code Search for code using partial, I haven't found any usages in the wild where partial() makes code more readable than simply defining a new function. partial() is almost always a loss for readability. -- ___ Python tracker <http://bugs.python.org/issue13430> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5572] distutils ignores the LIBS configure env var
Collin Winter added the comment: This wasn't so much a feature request as a request for review. I had already implemented the necessary changes and provided a patch. We found this change necessary when working on Unladen Swallow. -- ___ Python tracker <http://bugs.python.org/issue5572> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5575] Add env vars for controlling building sqlite, hashlib and ssl
Collin Winter added the comment: I don't know that the variables are Python-specific. We used these variables to build various Python modules statically against the versions of openssl and sqlite maintained in Google's internal third-party repository. -- assignee: collinwinter -> ___ Python tracker <http://bugs.python.org/issue5575> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5572] distutils ignores the LIBS configure env var
Collin Winter added the comment: I have provided justification in the original patch submission. Without this patch, we were unable to cleanly apply gcc's feedback-directed optimization system to Python. FDO yields significant performance improvements. -- ___ Python tracker <http://bugs.python.org/issue5572> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5572] distutils ignores the LIBS configure env var
Collin Winter added the comment: I have no interest in forward-porting the patch, closing accordingly. At least there will be a record of this patch for anyone interested in getting a free 10% performance boost for their Python 2.x or 3.[012] systems. -- assignee: tarek -> eric.araujo resolution: -> wont fix status: open -> closed ___ Python tracker <http://bugs.python.org/issue5572> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2636] Regexp 2.7 (modifications to current re 2.2.2)
Changes by Collin Winter : -- nosy: -collinwinter ___ Python tracker <http://bugs.python.org/issue2636> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9285] Add a profile decorator to profile and cProfile
Changes by Collin Winter : -- nosy: -collinwinter ___ Python tracker <http://bugs.python.org/issue9285> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1625576] add ability to specify name to os.fdopen
Collin Winter added the comment: Christian: yes, that sounds fine. -- assignee: collinwinter -> ___ Python tracker <http://bugs.python.org/issue1625576> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2507] Exception state lives too long in 3.0
Changes by Collin Winter <[EMAIL PROTECTED]>: -- assignee: collinwinter -> resolution: fixed -> status: closed -> open __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue2507> __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2866] syntax error in fix_imports.py
Collin Winter <[EMAIL PROTECTED]> added the comment: Fixed in r63321 -- resolution: -> fixed status: open -> closed __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue2866> __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2876] Write UserDict fixer for 2to3
Collin Winter <[EMAIL PROTECTED]> added the comment: It's doable, but there's no existing support similar to what fix_imports provides. I won't have time to work on this for the foreseeable future, but if someone is interested in working on this, I'd add this challenge: implement this in a way that generalizes well and is better/easier than what fix_imports does. I never expected fix_imports's mechanism to be so heavily reused, and as a result it's ass-slow. ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue2876> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3123] 2to3 fails
Collin Winter <[EMAIL PROTECTED]> added the comment: Benjamin, you did the recent merges, no? Can you please fix this breakage? -- assignee: collinwinter -> benjamin.peterson ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue3123> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3182] 2to3 Slight Patch
Collin Winter <[EMAIL PROTECTED]> added the comment: I'm not wild about making this change for such a minimal improvement (which I would guess falls within the margin of error), since it will limit extensibility and testability. I think I'd be fine with it if the benefit were >10%, but 3% doesn't sound significant enough. ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue3182> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3218] 2to3 Fix_imports optimization
Collin Winter <[EMAIL PROTECTED]> added the comment: The change to pytree.py doesn't add much speed benefit over the fix_imports.py change, and causes a test to fail. The fix_imports.py change, on the other hand, takes the test suite run time from 8m31s down to 1m45s -- this needs to go in! That said, I don't think the change is correct: you remove the portion of the pattern that matches "from foo import bar, baz, x, y as z", as well as the portion that matches "foo.bar" in the body of the code, where foo is a module to be renamed. These should be added back, but with support for member matching removed. ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue3218> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3238] backport python 3.0 language functionality to python 2.6 by adding 7 opcodes to ceval.c
Collin Winter <[EMAIL PROTECTED]> added the comment: I don't know why this is assigned to me. -- assignee: collinwinter -> components: +None -2to3 (2.x to 3.0 conversion tool) ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue3238> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3316] Proposal for fix_urllib
Collin Winter <[EMAIL PROTECTED]> added the comment: - You should add tests to test_fixers to ensure that this does what you expect. This will make it much easier for others to modify this fixer later. You can probably just reuse the tests Brett initially added. - There's a better data structure for MAPPING: rather than using MAPPING = {module: [(new_module, [member, member, ..., member])]} you should probably use MAPPING = {module: {new_module: [member, member, ..., member]}} The list-of-2-tuples was a bad idea on my part that didn't scale. - The "cannot handle star imports" warning isn't strictly correct: star imports for robotparser and urlparse can both be handled correctly, since they're just being renamed. - urlparse and robotparser don't seem to belong to this more specialized fixer: they can go in fix_imports, since they aren't being broken across multiple modules. ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue3316> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3182] 2to3 Slight Patch
Collin Winter <[EMAIL PROTECTED]> added the comment: So, revisiting this... On the face of it, I'm not convinced that the isinstance(x, Leaf) -> type(x) is Leaf changes are correct: certain fixers have in the past utilized their own subclasses of Node, and I can foresee this being done again in the future. Reverting those changes seems to remove the speedup you observed. ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue3182> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3218] 2to3 Fix_imports optimization
Collin Winter <[EMAIL PROTECTED]> added the comment: fix_imports.diff fails to apply cleanly against HEAD of fix_imports.py. Also, fix_imports2 now inherits from fix_imports, so it needs to be fixed as well. + yield """power< module_name=%r + trailer<'.' import_as_names< any > > any* > + """ % old_module Why are you using import_as_names here? That's meant to match a series of "NAME [as NAME]" in import statements, where this part of the pattern is meant to match usages of "urllib.foo()" in the code. ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue3218> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3417] make the fix_dict fixer smarter
Collin Winter <[EMAIL PROTECTED]> added the comment: I think the proper way to address this is via the confidence levels that Rodrigo Bernardo Pimentel is adding for his Summer of Code project. The idea is that you'll be able to say "let me inspect any changes where the fixer is less than X% confident". fix_dict and for loops would be one such place. Until that mechanism is in place, I agree with Raymond that we should err on the side of correctness. -- nosy: +rbp ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue3417> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3358] 2to3 Iterative Wildcard Matching
Collin Winter <[EMAIL PROTECTED]> added the comment: Yeah, benchmarking this change against the unmodified HEAD, the iterative version runs the test suite much slower. Let's file this under the "didn't work out" category. It was a good idea that you obviated with the fix_imports improvements. ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue3358> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3358] 2to3 Iterative Wildcard Matching
Collin Winter <[EMAIL PROTECTED]> added the comment: One option would be to use the faster recursive version, falling back to the iterative version if you hit a "RuntimeError: maximum recursion depth exceeded" error. This would keep the speed for most files, but would allow 2to3 to parse files like the one in issue 2532. ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue3358> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3358] 2to3 Iterative Wildcard Matching
Collin Winter <[EMAIL PROTECTED]> added the comment: Why include a command-line flag? Would you know when to use it? In what cases would you want to second-guess the app like that? ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue3358> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3480] Fix_imports pattern optimization
Collin Winter <[EMAIL PROTECTED]> added the comment: Committed as r65397. Nice work! -- resolution: -> fixed status: open -> closed ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue3480> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3358] 2to3 Iterative Wildcard Matching
Collin Winter <[EMAIL PROTECTED]> added the comment: Nick, what do you think about that? ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue3358> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2470] Need fixer for dl (removed) -> ctypes module
Collin Winter <[EMAIL PROTECTED]> added the comment: I'd prefer it if someone better-versed in ctypes/dl wrote this fixer (or at the very least, someone with access to Windows to test the translation). ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue2470> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3606] 2to3: commands varible replaced by subprocess
Collin Winter <[EMAIL PROTECTED]> added the comment: Victor: that's a common problem in most fixers. The analysis needed to statically determine whether a given identifier is a module or not is expensive and heuristic. One of our Summer of Code students has been working on adding a new feature to 2to3 whereby fixers can apply confidence estimates to the changes they make, allowing you to say "if 2to3 is 95+% confident, apply the fix, otherwise, let me see a diff first". This could be theoretically extended to allow other annotations, such as "changing an identifier", which you could filter on. ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue3606> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3448] Multi-process 2to3
Collin Winter <[EMAIL PROTECTED]> added the comment: I believe the only issue I recall was that the patch didn't work out-of-the-box for Python 2.6 (changed imports, PEP 8 compliance changes in the multiprocess module). Has that been fixed? I disagree with Benjamin: this is an import speed increase, and I don't see the point in adding the needless complexity of a subclass. The user won't notice any difference, and anyone wanting to use this as a library will want the faster version. ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue3448> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue214033] re incompatibility in sre
Changes by Collin Winter <[EMAIL PROTECTED]>: -- nosy: -collinwinter ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue214033> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3448] Multi-process 2to3
Collin Winter <[EMAIL PROTECTED]> added the comment: "I don't think we should force people using it as a library to go multiprocess." I don't understand this. What downsides do you perceive in multiprocessing support? Multiprocessing is a significant speed-up for 2to3 on multicore systems. ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue3448> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3448] Multi-process 2to3
Collin Winter <[EMAIL PROTECTED]> added the comment: You have yet to articulate a reason for that preference. ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue3448> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2532] file that breaks 2to3 (despite being correct python)
Collin Winter <[EMAIL PROTECTED]> added the comment: Fixed in r66775. -- resolution: -> fixed status: open -> closed ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue2532> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3358] 2to3 Iterative Wildcard Matching
Collin Winter <[EMAIL PROTECTED]> added the comment: Applied as r66775. I used the example file from issue2532 as test data. Thanks for the patch, Nick! -- resolution: -> fixed status: open -> closed ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue3358> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3260] fix_imports does not handle intra-package renames
Changes by Collin Winter <[EMAIL PROTECTED]>: -- assignee: collinwinter -> ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue3260> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3448] Multi-process 2to3
Collin Winter <[EMAIL PROTECTED]> added the comment: Benjamin, what "complexity" did you encounter when trying to use lib2to3 in your own work? Unless there's a concrete use-case where the mere existence of multiprocessing support (as opposed to actually enabling that support) made a tangible project harder, I say we leave it in. I can't imagine someone making the conscious choice to slow down their own lib2to3-based refactoring tool by 2x; if those people appear later, we'll deal with their concerns at that time. Nick: if you don't have time to make this work in 2.6, I can do so. The patch will also need doc fixes and tests, though the core functionality is fine. ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue3448> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1107887] Speed up function calls/can add more introspection info
Changes by Collin Winter <[EMAIL PROTECTED]>: -- nosy: +collinwinter ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1107887> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1518] Fast globals/builtins access (patch)
Collin Winter added the comment: Antoine: yes, this optimization is already implemented in the Unladen JIT. -- ___ Python tracker <http://bugs.python.org/issue1518> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8566] 2to3 should run under python 2.5
Changes by Collin Winter : -- nosy: +collinwinter ___ Python tracker <http://bugs.python.org/issue8566> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2179] with should be as fast as try/finally
Changes by Collin Winter: -- nosy: +collinwinter __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue2179> __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2354] cmp argument to list.sort()/sorted() should raise a Py3K warning
Collin Winter <[EMAIL PROTECTED]> added the comment: There's currently no central repository that I know of. We should have an informational PEP on the subject; would you like to start one with sort/sorted keys as the seed? I've got some notes I can contribute, and I'd like to milk Guido for his experience with str/bytes porting. -- assignee: collinwinter -> rhettinger __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue2354> __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2366] Fixer for new metaclass syntax is needed
Collin Winter <[EMAIL PROTECTED]> added the comment: A quick test indicates that the old way doesn't work anymore. __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue2366> __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2431] 2to3 is rather slow
Collin Winter <[EMAIL PROTECTED]> added the comment: Yes, and each new fixer makes it slower. The biggest problem is the pattern matching system, which tends to take 99% of the running time. I've talked to several people who are interested in optimizing 2to3 as a GSoC project, though, so I anticipate some speed ups coming through that. __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue2431> __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2431] 2to3 is rather slow
Collin Winter <[EMAIL PROTECTED]> added the comment: Keep in mind that not all fixers use PATTERN, for example fix_ne. __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue2431> __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2446] 2to3 translates "import foobar" to "import .foobar" rather than "from . import foobar"
Changes by Collin Winter <[EMAIL PROTECTED]>: -- assignee: collinwinter -> David Wolever nosy: +David Wolever __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue2446> __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2470] Need fixer for dl (removed) -> ctypes module
Collin Winter <[EMAIL PROTECTED]> added the comment: Can you list the mapping you'd like to see? I've never used dl or ctypes, so I'm not immediately sure how to port from one to the other. __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue2470> __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2431] 2to3 is rather slow
Collin Winter <[EMAIL PROTECTED]> added the comment: With the patch applied, all tests in test_fixers fail. __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue2431> __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2431] 2to3 is rather slow
Collin Winter <[EMAIL PROTECTED]> added the comment: The updated version of the patch passes the tests and yields a 19-20% speed increase in the running time of test_all_fixers and the time taken for 2to3 to translate itself. I've sent David some comments on the patch, and once it's cleaned up some, this will be checked in. I'd like to keep the issue open, since there are clearly additional speed increases to be made. __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue2431> __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2453] fix_except needs to allow for empty excepts
Collin Winter <[EMAIL PROTECTED]> added the comment: Fixed in r61983. -- resolution: -> fixed status: open -> closed __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue2453> __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2338] Backport reload() moving to imp.reload()
Changes by Collin Winter <[EMAIL PROTECTED]>: -- components: +2to3 (2.x to 3.0 conversion tool) __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue2338> __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2446] 2to3 translates "import foobar" to "import .foobar" rather than "from . import foobar"
Collin Winter <[EMAIL PROTECTED]> added the comment: The problem with the "fix" in r61755 is that it doesn't distinguish between stdlib and non-stdlib imports: "import os" becomes "from . import os", which is clearly wrong. __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue2446> __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2446] 2to3 translates "import foobar" to "import .foobar" rather than "from . import foobar"
Collin Winter <[EMAIL PROTECTED]> added the comment: Looking at it, I was confused by a quirk introduced into test_fixers: Test_import's check_both() helper method does the wrong thing in this case: a = "import os" self.check_both(a, a) # Fails, tries to translate "import os" into "from . import os" self.unchanged(a) passes, though. What's going on with these methods? __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue2446> __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2532] file that breaks 2to3 (despite being correct python)
Collin Winter <[EMAIL PROTECTED]> added the comment: Yes, this is a known problem with the pattern matching system. -- priority: -> normal __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue2532> __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2596] 2to3's fix_range needs fix_dict's context information
New submission from Collin Winter <[EMAIL PROTECTED]>: 2to3 should be able to translate the code snippet below successfully. First guess: generalizing fix_dict's notion of special contexts would do the trick. import random numbers = range(1, 50) chosen = [] while len(chosen) < 6: number = random.choice(numbers) numbers.remove(number) chosen.append(number) chosen.sort() print("This week's numbers are", chosen) print("The bonus ball is", random.choice(numbers)) -- assignee: collinwinter components: 2to3 (2.x to 3.0 conversion tool) messages: 65204 nosy: collinwinter priority: normal severity: normal status: open title: 2to3's fix_range needs fix_dict's context information type: behavior __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue2596> __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2596] 2to3's fix_xrange needs fix_dict's context information
Collin Winter <[EMAIL PROTECTED]> added the comment: Fixed in r62232. Verified that the sample code below runs successfully under Python 3.0a4+ (r62209) after being run through 2to3. -- resolution: -> fixed status: open -> closed title: 2to3's fix_range needs fix_dict's context information -> 2to3's fix_xrange needs fix_dict's context information __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue2596> __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2454] sha and md5 fixer
Changes by Collin Winter <[EMAIL PROTECTED]>: -- priority: -> normal __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue2454> __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2660] 2to3 throws a utf8 decode error on a iso-8859-1 string
Collin Winter <[EMAIL PROTECTED]> added the comment: 2to3 running under Python 2.5.1 handles this file just fine. 2to3 running under 3.0a4+ (r62404) fails as detailed below. However, that file doesn't run correctly under Python itself: [EMAIL PROTECTED]:~/src/python/py3k$ ./python /home/collinwinter/Desktop/2to3bug.py File "/home/collinwinter/Desktop/2to3bug.py", line 3 [EMAIL PROTECTED]:~/src/python/py3k This suggests this problem isn't 2to3-specific. Refiling this issue against py3k's Unicode support. -- assignee: collinwinter -> components: +Unicode -2to3 (2.x to 3.0 conversion tool) priority: -> high __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue2660> __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2660] Py3k fails to parse a file with an iso-8859-1 string
Changes by Collin Winter <[EMAIL PROTECTED]>: -- title: 2to3 throws a utf8 decode error on a iso-8859-1 string -> Py3k fails to parse a file with an iso-8859-1 string __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue2660> __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2412] Check 2to3 for support of print function.
Collin Winter <[EMAIL PROTECTED]> added the comment: Reviewing... __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue2412> __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2734] 2to3 converts long(itude) argument to int
Collin Winter <[EMAIL PROTECTED]> added the comment: Agreed. There's code in fix_next to detect this kind of case. I'll see what I can do about generalizing it to support fix_long. __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue2734> __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2734] 2to3 converts long(itude) argument to int
Collin Winter <[EMAIL PROTECTED]> added the comment: It *could* be implemented for all fixers, but since it's fairly expensive, I'd rather limit it to cases where the problem is more likely to occur (for example, unicode -> str doesn't meet this threshold IMHO). __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue2734> __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2507] Exception state lives too long in 3.0
Collin Winter <[EMAIL PROTECTED]> added the comment: Looks good to me. Antoine, do you have commit privileges? __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue2507> __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2370] operator.{isCallable,sequenceIncludes} needs a fixer
Collin Winter <[EMAIL PROTECTED]> added the comment: I believe you forgot to add fix_operator.py to this patch. -- components: +Build, Demos and Tools, Distutils, Documentation, Documentation tools (Sphinx), Extension Modules, IDLE, Installation, Interpreter Core, Library (Lib), Macintosh, Regular Expressions, Tests, Tkinter, Unicode, Windows, XML, ctypes __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue2370> __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2370] operator.{isCallable,sequenceIncludes} needs a fixer
Changes by Collin Winter <[EMAIL PROTECTED]>: -- components: -Build, Demos and Tools, Distutils, Documentation, Documentation tools (Sphinx), IDLE, Installation, Interpreter Core, Library (Lib), Macintosh, Regular Expressions, Tests, Tkinter, Unicode, Windows, XML, ctypes __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue2370> __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2805] 2to3 doesn't correct divisions
Collin Winter <[EMAIL PROTECTED]> added the comment: My gut feeling is that the number of cases where both operands are written as literals is exceedingly small when compared to the number of cases where one or both is an identifier. Since 2to3 doesn't support type inference, we'd miss the relevant, interesting cases. However, if you're interested in implementing a fix_literal_division fixer module that would catch these cases, I'd be happy to advise on such a thing :) __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue2805> __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2805] 2to3 doesn't correct divisions
Collin Winter <[EMAIL PROTECTED]> added the comment: I say do it before the GSoC projects complete. Those projects will take months, and we can't stop development for that long. __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue2805> __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4074] Building a list of tuples has non-linear performance
Changes by Collin Winter : -- nosy: +collinwinter ___ Python tracker <http://bugs.python.org/issue4074> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4688] GC optimization: don't track simple tuples and dicts
Changes by Collin Winter : -- nosy: +collinwinter ___ Python tracker <http://bugs.python.org/issue4688> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2262] Helping the compiler avoid memory references in PyEval_EvalFrameEx
Changes by Collin Winter : -- nosy: +collinwinter ___ Python tracker <http://bugs.python.org/issue2262> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4074] Building a list of tuples has non-linear performance
Collin Winter added the comment: Looking at gctrigger5.patch, my only thought is that it would be helpful for posterity to include more verbose comments about why this new behaviour was chosen; chunks of Martin's proposal from the referenced python-dev thread could be included verbatim. Otherwise, LGTM. ___ Python tracker <http://bugs.python.org/issue4074> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4074] Building a list of tuples has non-linear performance
Collin Winter added the comment: LGTM. Go ahead and commit this. ___ Python tracker <http://bugs.python.org/issue4074> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1479611] speed up function calls
Changes by Collin Winter : -- nosy: +collinwinter, jyasskin ___ Python tracker <http://bugs.python.org/issue1479611> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4715] optimize bytecode for conditional branches
Collin Winter added the comment: I've backported condbranches-plus.patch to trunk, and I'm getting these results: PyBench: 1.84-2.21% faster 2to3: 3.83% faster Spitfire: 6.13-6.23% faster PyBench was run with -w=1; 2to3 is translating its entire source directory five times; Spitfire is measured by the "Spitfire -O4" line from tests/perf/bigtable.py, run 15 times. This is on a Core 2 system. My AMD system (otherwise identical) shows somewhat less improvement, but still an improvement. I've haven't tested condbranches.patch vs condbranches-plus.patch; what difference are you seeing, Antoine? I like these changes. Folding POP into JUMP_IF_{TRUE,FALSE} should have been done years ago (I think I proposed it and Raymond shot me down). I'm also in favor of making POP_JUMP_IF_* absolute jumps. This patch mostly looks good, though you still need to change Doc/ library/dis.rst and the pure-Python compiler package. I'd get someone else to look over the patch, too, though. ___ Python tracker <http://bugs.python.org/issue4715> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4715] optimize bytecode for conditional branches
Collin Winter added the comment: On Tue, Jan 13, 2009 at 3:25 PM, Antoine Pitrou wrote: > > Antoine Pitrou added the comment: > > Hello, > >> I've backported condbranches-plus.patch to trunk, and I'm getting these >> results: > > Thanks! > >> PyBench: 1.84-2.21% faster >> 2to3: 3.83% faster >> Spitfire: 6.13-6.23% faster > > What is Spitfire? http://code.google.com/p/spitfire/. It's a template system designed for performance that I have some experience with. >> I've haven't tested condbranches.patch vs condbranches-plus.patch; what >> difference are you seeing, Antoine? > > condbranches.patch is the earlier version (without POP_OR_JUMP and > JUMP_OR_POP), it can be ignored. I was mostly curious whether the POP_OR_JUMP and JUMP_OR_POP opcodes had a noticeable performance impact, ie, do they make things fast enough to warrant their inclusion over the old JUMP_IF_FALSE implementations. >> This patch mostly looks good, though you still need to change Doc/ >> library/dis.rst and the pure-Python compiler package. > > Well, the pure-Python compiler package doesn't exist in py3k, for which > I've initially made the patch. > (and its state in 2.x is very sorry...) I'll update the compiler package in 2.x and post my patch once I have it working. There are also some test failures in 2.x that I'll take care of. ___ Python tracker <http://bugs.python.org/issue4715> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1700288] Armin's method cache optimization updated for Python 2.6
Collin Winter added the comment: Looks like this was re-applied in r59943 and r59944. Thanks for taking care of this, Amaury. -- nosy: +collinwinter, jyasskin resolution: accepted -> fixed status: open -> closed ___ Python tracker <http://bugs.python.org/issue1700288> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4941] Tell GCC Py_DECREF is unlikely to call the destructor
Changes by Collin Winter : -- nosy: +collinwinter, jyasskin ___ Python tracker <http://bugs.python.org/issue4941> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4896] Faster why variable manipulation in ceval.c
Collin Winter added the comment: Another data point: I've tested this patch applied to trunk on Core 2 Duo and Opteron 8214 HE machines using both gcc 4.0.3 and 4.3.1, and I'm seeing mixed results. Pybench with warp 1 is between ~1.5% slower and ~1% faster, depending on gcc version (fairly consistent across machines). 2to3 and two template systems I've tested are between 2.5% slower and 2% faster depending on workload and gcc version. ___ Python tracker <http://bugs.python.org/issue4896> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1518] Fast globals/builtins access (patch)
Changes by Collin Winter : -- nosy: +collinwinter, jyasskin type: feature request -> performance ___ Python tracker <http://bugs.python.org/issue1518> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2459] speedup for / while / if with better bytecode
Changes by Collin Winter : -- nosy: +collinwinter ___ Python tracker <http://bugs.python.org/issue2459> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5084] unpickling does not intern attribute names
Changes by Collin Winter : -- nosy: +collinwinter, jyasskin ___ Python tracker <http://bugs.python.org/issue5084> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5176] Special-case string formatting in BINARY_MODULO implementation
New submission from Collin Winter : This patch speeds up the string formatting % operator by avoiding the unnecessary indirection in PyNumber_Remainder(). This particularly benefits templating systems that do a lot of string formatting via %. Performance tested with gcc 4.3.1 x86_64 on Linux 2.6.18: 2to3: Min: 22.443 -> 22.306: 0.61% faster Avg: 22.465 -> 22.324: 0.63% faster Django: Min: 0.598 -> 0.591: 1.24% faster Avg: 0.601 -> 0.595: 1.03% faster Spitfire [1]: Min: 0.752 -> 0.717: 4.91% faster Avg: 0.754 -> 0.719: 4.83% faster The Django test renders a 150x150 cell table 100 times. The Spitfire test renders a 1000x1000 cell table 100 times. The 2to3 test translates all of 2to3 with `-f all` five times. There is no significant impact on PyBench. Less important code like the pure-Python pickle implementation also shows an improvement: Pickling: Min: 6.680 -> 6.535: 2.22% faster Avg: 6.740 -> 6.576: 2.50% faster This is pickling a list of 4 dicts 100 times. This does not impact unpickling. About the patch: I tested various combinations of PyString_Check and PyString_CheckExact and what you see in the patch demonstrated the best performance across all benchmarks. I also tested changing the definition of PyString_Check to include a short-circuit on PyString_CheckExact, but that did not provide a consistent benefit. [1] - http://code.google.com/p/spitfire/ -- assignee: jyasskin components: Interpreter Core files: faster_modulo.patch keywords: needs review, patch, patch messages: 81319 nosy: collinwinter, jyasskin severity: normal status: open title: Special-case string formatting in BINARY_MODULO implementation type: performance versions: Python 2.7 Added file: http://bugs.python.org/file12962/faster_modulo.patch ___ Python tracker <http://bugs.python.org/issue5176> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4751] Patch for better thread support in hashlib
Changes by Collin Winter : -- nosy: +collinwinter, jyasskin ___ Python tracker <http://bugs.python.org/issue4751> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com