[issue26911] lib2to3/tests/pytree_idempotency.py has a broken import

2016-05-02 Thread Ivan Zakhryaschev

Ivan Zakhryaschev added the comment:

BTW, this source file seems to be not used anywhere.

--

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue26911>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26911] lib2to3/tests/pytree_idempotency.py has a broken import

2016-05-02 Thread Ivan Zakhryaschev

New submission from Ivan Zakhryaschev:

Line 21 of lib2to3/tests/pytree_idempotency.py:

import pgen2

This seems to be broken, because it should be:

import lib2to3.pgen2

(This makes the auto-requirements generator in ALT Sisyphus to generate a 
broken/unsatisfiable dependency on pgen2 when packaging this into an RPM.)

All other uses of pgen2 in Python 3.5.1 sources use other forms of import: 
either relative or the absolute one as I suggest:

$ git grep -F pgen2
lib2to3/btm_matcher.py:# from .pgen2 import token // 
token.__dict__.items():
lib2to3/btm_utils.py:from .pgen2 import grammar, token
lib2to3/fixer_util.py:from .pgen2 import token
lib2to3/fixes/fix_apply.py:from ..pgen2 import token
lib2to3/fixes/fix_dict.py:from ..pgen2 import token
lib2to3/fixes/fix_except.py:from ..pgen2 import token
lib2to3/fixes/fix_filter.py:from ..pgen2 import token
lib2to3/fixes/fix_has_key.py:from ..pgen2 import token
lib2to3/fixes/fix_map.py:from ..pgen2 import token
lib2to3/fixes/fix_ne.py:from ..pgen2 import token
lib2to3/fixes/fix_next.py:from ..pgen2 import token
lib2to3/fixes/fix_numliterals.py:from ..pgen2 import token
lib2to3/fixes/fix_print.py:from ..pgen2 import token
lib2to3/fixes/fix_raise.py:from ..pgen2 import token
lib2to3/fixes/fix_throw.py:from ..pgen2 import token
lib2to3/fixes/fix_tuple_params.py:from ..pgen2 import token
lib2to3/fixes/fix_types.py:from ..pgen2 import token
lib2to3/fixes/fix_unicode.py:from ..pgen2 import token
lib2to3/fixes/fix_ws_comma.py:from ..pgen2 import token
lib2to3/patcomp.py:from .pgen2 import driver, literals, token, tokenize, parse, 
grammar
lib2to3/pgen2/__init__.py:"""The pgen2 package."""
lib2to3/pgen2/conv.py:from pgen2 import grammar, token
lib2to3/pgen2/token.py:#   originally monkeypatched in by pgen2.tokenize
lib2to3/pgen2/tokenize.py:from lib2to3.pgen2.token import *
lib2to3/pygram.py:from .pgen2 import token
lib2to3/pygram.py:from .pgen2 import driver
lib2to3/pytree.py:# from .pgen2 import token // token.__dict__.items():
lib2to3/refactor.py:from .pgen2 import driver, tokenize, token
lib2to3/tests/pytree_idempotency.py:import pgen2
lib2to3/tests/pytree_idempotency.py:from pgen2 import driver
lib2to3/tests/pytree_idempotency.py:except pgen2.parse.ParseError 
as err:
lib2to3/tests/support.py:from lib2to3.pgen2 import driver
lib2to3/tests/test_parser.py:from lib2to3.pgen2 import tokenize
lib2to3/tests/test_parser.py:from ..pgen2.parse import ParseError
lib2to3/tests/test_refactor.py:from lib2to3.pgen2 import token
lib2to3/tests/test_util.py:from lib2to3.pgen2 import token

--
components: 2to3 (2.x to 3.x conversion tool)
messages: 264663
nosy: imz
priority: normal
severity: normal
status: open
title: lib2to3/tests/pytree_idempotency.py has a broken import
type: compile error
versions: Python 3.5

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue26911>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com