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.

classification
Title: parser fails on long non-ascii lines if coding declared
Type: Stage:
Components: Interpreter Core Versions: Python 2.3
process
Status: closed Resolution: duplicate
Dependencies: Superseder:
Assigned To: Nosy List: doerwalter, oleg_noga
Priority: normal Keywords:

Created on 2005-08-08 14:56 by oleg_noga, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
parseError.py oleg_noga, 2005-08-08 14:56 reproduce MemoryError
Messages (2)
msg25998 - (view) Author: Oleg Noga (oleg_noga) Date: 2005-08-08 14:56
python version: 2.3.5, 2.3.3
os: windows 2000 sp4

Parser fails to read .py file and does one of 
1. SyntaxError with broken traceback
2. MemoryError (without traceback)
3. Crush with Access violation 
4. Sometimes there is no fail at all and code imported ok

Requirements to reproduce

1. Coding must be defined like 

# -*- coding: Cp1251 -*-

if coding not declared it is all ok except warning (pep-
0263).

2. File must have at list one long line (about longer than 
256 characters) containing characters with ordinals > 
128.

3. Some luck, because sometimes there is no crush.

attached parseError.py does MemoryError
msg25999 - (view) Author: Walter Dörwald (doerwalter) * (Python committer) Date: 2005-08-08 15:40
Logged In: YES 
user_id=89016

This is a duplicate of #1163244. Closing.
History
Date User Action Args
2022-04-11 14:56:12adminsetgithub: 42260
2005-08-08 14:56:30oleg_nogacreate