New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Syntax error on large file with MBCS encoding #41697
Comments
Large files generated by make-py.py from the win32all This is a regression from 2.3.5 (With Python2.4, the interpreter crashes. That is fixed Removing the mbcs encoding line from the top of the File should be attached, as zip-file. Probably requires |
Logged In: YES Useful pointers: in Python-dev, this has been characterised |
Logged In: YES I believe this is a different bug than the recent A Python source file containing: Will yield a SyntaxError when attempting to import the To reproduce, there must be exactly 1532 characters where Apart from the "block" of 1532 characters, the coding line To reproduce, save the attached file on Windows and execute:
> python -c "import foo2"
Traceback (most recent call last):
File "<string>", line 1, in ?
File "foo2.py", line 24
x = {}
^
SyntaxError: invalid syntax Note that Python 2.3 and earlier all work. Also note that Haven't tried to repro on Linux (mbcs isn't available there, Other pointers/notes: pywin32 bug 1085454 is related to [foo2.py is my attachment - ya gotta love sourceforge :)] |
Logged In: YES Could be irrelevant but... are the other block sizes close |
Logged In: YES Seems that the connection to n*512 blocks is very likely, Could this be linked to the new codec buffering code? See: |
Logged In: YES Importing foo2.py on Linux (with the current CVS HEAD The value object in err_input() (in the E_DECODE case) seems |
Logged In: YES i have reproductable test case with encoding cp1251 |
Logged In: YES For what it's worth: I have two files (that I unfortunately cannot attach) which # -- coding: ascii -- if I change that to something that does not match the coding (winxp) |
Logged In: YES Is pywin32 bug 1166627 relevant/related? |
Logged In: YES Are you sure about the bug number? pywin32 seems not to have |
Logged In: YES http://sourceforge.net/tracker/? |
Logged In: YES Is this still an issue in 2.4.2? I downloaded the zip file, and |
Logged In: YES Thanks Tim! I can confirm that I can no longer reproduce it |
Logged In: YES [Mark]
Did you know 2.4.2 final was released? That happened Leaving this closed, but assigned to Mark just so he'll get |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: