[issue3358] 2to3 Iterative Wildcard Matching

2008-10-03 Thread Collin Winter
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]>

[issue3358] 2to3 Iterative Wildcard Matching

2008-09-26 Thread Benjamin Peterson
Benjamin Peterson <[EMAIL PROTECTED]> added the comment: On Fri, Sep 26, 2008 at 9:24 PM, Nick Edds <[EMAIL PROTECTED]> wrote: > > Nick Edds <[EMAIL PROTECTED]> added the comment: > > What do you think would be the best way to implement a test for this? To > test it, I ran it on a known file that

[issue3358] 2to3 Iterative Wildcard Matching

2008-09-26 Thread Nick Edds
Nick Edds <[EMAIL PROTECTED]> added the comment: What do you think would be the best way to implement a test for this? To test it, I ran it on a known file that caused the old recursive method to fail, but I don't know if it makes sense to include that with the tests. I could always write a test

[issue3358] 2to3 Iterative Wildcard Matching

2008-09-12 Thread Benjamin Peterson
Benjamin Peterson <[EMAIL PROTECTED]> added the comment: Nick, it would be nice if your patch had a test. ___ Python tracker <[EMAIL PROTECTED]> ___

[issue3358] 2to3 Iterative Wildcard Matching

2008-08-04 Thread Nick Edds
Nick Edds <[EMAIL PROTECTED]> added the comment: Here is a patch that tries to use the faster recursive matching, but if there is a RuntimeError, it will use the iterative matching. It passes all the tests and works on the ssl.py file that were known to break the recursive matching. Added file:

[issue3358] 2to3 Iterative Wildcard Matching

2008-08-01 Thread Nick Edds
Nick Edds <[EMAIL PROTECTED]> added the comment: Sounds good to me. I should have a chance to implement this and submit it within the next couple of days. ___ Python tracker <[EMAIL PROTECTED]> ___

[issue3358] 2to3 Iterative Wildcard Matching

2008-08-01 Thread Collin Winter
Collin Winter <[EMAIL PROTECTED]> added the comment: Nick, what do you think about that? ___ Python tracker <[EMAIL PROTECTED]> ___ ___ Python-bu

[issue3358] 2to3 Iterative Wildcard Matching

2008-07-27 Thread Benjamin Peterson
Benjamin Peterson <[EMAIL PROTECTED]> added the comment: Never mind. I had thought it would take a while for the RuntimeError to be generated, but it only took about 7 seconds; I have no need for a command line switch. ___ Python tracker <[EMAIL PROTECTED]>

[issue3358] 2to3 Iterative Wildcard Matching

2008-07-27 Thread Collin Winter
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]> _

[issue3358] 2to3 Iterative Wildcard Matching

2008-07-27 Thread Benjamin Peterson
Benjamin Peterson <[EMAIL PROTECTED]> added the comment: On Sun, Jul 27, 2008 at 6:07 PM, Collin Winter <[EMAIL PROTECTED]> wrote: > > 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 h

[issue3358] 2to3 Iterative Wildcard Matching

2008-07-27 Thread Collin Winter
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 li

[issue3358] 2to3 Iterative Wildcard Matching

2008-07-25 Thread Nick Edds
Nick Edds <[EMAIL PROTECTED]> added the comment: I don't think it would be hard to implement, I just need a good, fast metric to determine if a file should be processed iteratively or recursively. What do you think would be the best way to do this? ___ Python

[issue3358] 2to3 Iterative Wildcard Matching

2008-07-25 Thread Benjamin Peterson
Benjamin Peterson <[EMAIL PROTECTED]> added the comment: Maybe this is a bad idea, but would it be possible/reasonable to provide recursive and iterative implementations and use the iterative one on large files? -- nosy: +benjamin.peterson ___ Python

[issue3358] 2to3 Iterative Wildcard Matching

2008-07-24 Thread Collin Winter
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. __

[issue3358] 2to3 Iterative Wildcard Matching

2008-07-18 Thread Nick Edds
Nick Edds <[EMAIL PROTECTED]> added the comment: Just as an added note: with the new changes made to fix_imports, this is now noticeably slower than the recursive approach, even after I made a few optimizations like removing the unnecessary len() in the while loop. __

[issue3358] 2to3 Iterative Wildcard Matching

2008-07-14 Thread Nick Edds
New submission from Nick Edds <[EMAIL PROTECTED]>: Here is an iterative replacement to _recursive_matches for Wildcard Patterns. It's not really much faster now, although I think there is some room to improve it. It's doesn't seem like the most elegant solution, but it works. It passes all of the