[issue7861] 2to3: "import foo" -> "from . import foo"
New submission from Thomas Spura : My custom setup / testcase for testing the transition "import foo" -> "from . import foo": mkdir -p test/sub touch test/sub/__init__.py touch test/__init__.py cat >> test/__init__.py << EOF import sub EOF cat >> test.py << EOF import test EOF This won't work with python3 so I ran 2to3 on it: $ 2to3 . RefactoringTool: Skipping implicit fixer: buffer RefactoringTool: Skipping implicit fixer: idioms RefactoringTool: Skipping implicit fixer: set_literal RefactoringTool: Skipping implicit fixer: ws_comma RefactoringTool: No files need to be modified. -> Nothing found. Using the python3 version of 2to3: $ python3-2to3 . RefactoringTool: Skipping implicit fixer: buffer RefactoringTool: Skipping implicit fixer: idioms RefactoringTool: Skipping implicit fixer: set_literal RefactoringTool: Skipping implicit fixer: ws_comma RefactoringTool: Refactored ./test/__init__.py --- ./test/__init__.py (original) +++ ./test/__init__.py (refactored) @@ -1,1 +1,1 @@ -import sub +from . import sub RefactoringTool: Files that need to be modified: RefactoringTool: ./test/__init__.py -> python3 version of 2to3 can change it, but Python 2.6.2 is not able to. -- components: 2to3 (2.x to 3.0 conversion tool) messages: 98900 nosy: tomspur severity: normal status: open title: 2to3: "import foo" -> "from . import foo" type: compile error versions: Python 2.6 ___ Python tracker <http://bugs.python.org/issue7861> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7861] 2to3: "import foo" -> "from . import foo"
Thomas Spura added the comment: #2446 should be related to this one. -- nosy: +David Wolever ___ Python tracker <http://bugs.python.org/issue7861> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7861] 2to3: "import foo" -> "from . import foo"
Thomas Spura added the comment: The commit I'm talking about was 22 months ago (r61755), python 2.6.2 was released April 14, 2009. At least strange, that this is not jet in there, but if you think, it will in the next version... -- ___ Python tracker <http://bugs.python.org/issue7861> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13934] sqlite3 test typo
Thomas Spura added the comment: It might be good to add some documentation to the sqlite3 module and describe that version_info is only the PYSQLITE_VERSION and not the version of the sqlite library. -- nosy: +tomspur ___ Python tracker <http://bugs.python.org/issue13934> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14472] .gitignore is outdated
Thomas Spura added the comment: AFAIK hg supports symlinks. Why not just symlink .gitignore to .hgignore and keep .hgignore up to date? But in this case "$" and "^" need to be avoided, e.g. this doesn't work for git: Makefile$ Makefile.pre$ -- nosy: +tomspur ___ Python tracker <http://bugs.python.org/issue14472> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com