Thomas Heller <thel...@ctypes.org> added the comment: > The py3k version of the file already contains 3.x only code, and it's > missing the comment at the top that it should be compatible. But it's > not really a big deal to me.
Yes, I had deleted the comment since the 3.x code cannot be compatible with 2.x anyway (and I didn't remember that in my previous comment). > So I suggest that the original patch be applied. I have not checked if > there are other cases in util.py where this should be cleaned up. > > I also think it would be reasonable to change the try/finally's to > with's, since those are the very places that the 2.x code differs from > the 3.x code. But as I said, I don't feel too strongly about that. > I don't know why this problem doesn't show up in 2.x. I agree it would > be nice to understand why, but I don't have time to research it. Since > the new code (with try/finally) looks "more correct", if there's a > desire to keep them in sync then the try/finally fixes should be > back-ported to 2.x. So I would suggest the following approach: Add try/finally in py3k branch where missing, backport the patch to 2.x, and then change the try/finally into with blocks in py3k branch but do not backport this. If you have the time, and if you have commit privs could you please go ahead? Thanks, Thomas ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue6882> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com