[New-bugs-announce] [issue24054] Invalid syntax in inspect_fodder2.py (on Python 2.x)

David D. Riddle report at bugs.python.org
Fri Apr 24 18:45:33 CEST 2015


New submission from David D. Riddle:

test_linecache.py reads from three files namely inspect_fodder.py, inspect_fodder2.py, and mapping_tests.py. It reads the py files directly as text files. This patch copies these files to linecache_fodder, linecache_fodder2, and linecache_mapping_fodder respectively, and updates test_linecache.py accordingly.

The reason I do this is so that the these files are not compiled. This is desirable for me because I use linecache2 on python 2.7. Python 2.7 can not compile inspect_fodder2.py nor is it necessary as this file is only used as a text file never as an object file in the test_linecache.py tests.

This issue came up for me when I attempted to make an RPM out of linecache2. rpmbuild compiles all py files in the rpm and fails when it tries to compile inspect_fodder2.py. If these files have the .py removed from the test files then they will not be compiled which fixes my issue. Nor do they need to be compiled to successfully run the test_linecache.py tests.

----------
components: Tests
files: mywork.patch
keywords: patch
messages: 241955
nosy: ddriddle
priority: normal
severity: normal
status: open
title: Invalid syntax in inspect_fodder2.py (on Python 2.x)
type: compile error
Added file: http://bugs.python.org/file39198/mywork.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue24054>
_______________________________________


More information about the New-bugs-announce mailing list