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 christian.heimes
Recipients brett.cannon, christian.heimes, gvanrossum
Date 2007-10-20.01:32:56
SpamBayes Score 0.008118299
Marked as misclassified No
Message-id <47195AC4.9050701@cheimes.de>
In-reply-to <bbaeab100710191820s19cdc849rce94b5f3a4df62c4@mail.gmail.com>
Content
> runpy is failing because pkgutil is failing because it is giving
> compile() part of a source file instead of the entire thing::
> 
> Traceback (most recent call last):
>   File "/Users/drifty/Dev/python/3.x/pristine/Lib/runpy.py", line 97,
> in _run_module_as_main
>     loader, code, fname = _get_module_details(mod_name)
>   File "/Users/drifty/Dev/python/3.x/pristine/Lib/runpy.py", line 82,
> in _get_module_details
>     code = loader.get_code(mod_name)
>   File "/Users/drifty/Dev/python/3.x/pristine/Lib/pkgutil.py", line
> 275, in get_code
>     self.code = compile(source, self.filename, 'exec')
>   File "/Users/drifty/Dev/python/3.x/pristine/Lib/tokenize.py", line 2
>     "UR'''": single3prog, 'UR"""': double3prog,
>     ^
> IndentationError: unexpected indent
> 
> That bad line is the first line in the 'source' variable being passed
> to compile().  So somewhere the beginning of the source file is being
> chopped up.

Could you please comment out the PyTokenizer_FindEncoding(fp) call in
Python/import.c to check if it is related to it? That's the only change
(I can think of) that may be related to the problem. I always rewind the
fp in the function but it may not work on Mac.

Christian
History
Date User Action Args
2007-10-20 01:32:57christian.heimessetspambayes_score: 0.0081183 -> 0.008118299
recipients: + christian.heimes, gvanrossum, brett.cannon
2007-10-20 01:32:57christian.heimeslinkissue1267 messages
2007-10-20 01:32:56christian.heimescreate