This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ferringb
Recipients ferringb
Date 2010-01-31.23:23:24
SpamBayes Score 4.6569657e-08
Marked as misclassified No
Message-id <1264980229.62.0.257206789858.issue7824@psf.upfronthosting.co.za>
In-reply-to
Content
Under py3.1, translation of the attached file works fine- under py3.2, goes boom however.

Nothing custom in use here in terms of 2to3- there is some compatibility code in use w/in the module but that's not affecting the translator in my testing.

assertion error follows-

RefactoringTool: Skipping implicit fixer: buffer
RefactoringTool: Skipping implicit fixer: idioms
RefactoringTool: Skipping implicit fixer: set_literal
RefactoringTool: Skipping implicit fixer: ws_comma
Traceback (most recent call last):
  File "/usr/bin/2to3", line 6, in <module>
    sys.exit(main("lib2to3.fixes"))
  File "/home/ferringb/python-svn/Lib/lib2to3/main.py", line 165, in main
    options.processes)
  File "/home/ferringb/python-svn/Lib/lib2to3/refactor.py", line 613, in refactor
    items, write, doctests_only)
  File "/home/ferringb/python-svn/Lib/lib2to3/refactor.py", line 273, in refactor
    self.refactor_file(dir_or_file, write, doctests_only)
  File "/home/ferringb/python-svn/Lib/lib2to3/refactor.py", line 653, in refactor_file
    *args, **kwargs)
  File "/home/ferringb/python-svn/Lib/lib2to3/refactor.py", line 325, in refactor_file
    tree = self.refactor_string(input, filename)
  File "/home/ferringb/python-svn/Lib/lib2to3/refactor.py", line 355, in refactor_string
    self.refactor_tree(tree, name)
  File "/home/ferringb/python-svn/Lib/lib2to3/refactor.py", line 389, in refactor_tree
    self.traverse_by(self.post_order_heads, tree.post_order())
  File "/home/ferringb/python-svn/Lib/lib2to3/refactor.py", line 415, in traverse_by
    node.replace(new)
  File "/home/ferringb/python-svn/Lib/lib2to3/pytree.py", line 135, in replace
    assert self.parent is not None, str(self)
AssertionError:
    def __init__(self, get_keys_func, get_val_func):
        """
        @param get_keys_func: either a container, or func to call to get keys.
        @param get_val_func: a callable that is JIT called
            with the key requested.
        """
        if not isinstance(get_val_func, collections.Callable):
            raise TypeError("get_val_func isn't a callable")
        if hasattr(get_keys_func, "__iter__"):
            self._keys = get_keys_func
            self._keys_func = None
        else:
            if not isinstance(get_keys_func, collections.Callable):
                raise TypeError(
                    "get_keys_func isn't iterable or callable")
            self._keys_func = get_keys_func
        self._val_func = get_val_func
        self._vals = {}

If y'all need more than just the mappings.py file, this is from http://pkgcore.org/trac/pkgcore/browser/ferringb/snakeoil-dev/ , or just grab the most recent release at http://pkgcore.org/releases/snakeoil/snakeoil-0.3.6.tar.bz2 (both trunk and most recent blow up).
History
Date User Action Args
2010-01-31 23:23:50ferringbsetrecipients: + ferringb
2010-01-31 23:23:49ferringbsetmessageid: <1264980229.62.0.257206789858.issue7824@psf.upfronthosting.co.za>
2010-01-31 23:23:47ferringblinkissue7824 messages
2010-01-31 23:23:44ferringbcreate