Skip to content
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

Issues with the c_string_encoding directive at the top of a file. #2632

Closed
robertwb opened this issue Sep 27, 2018 · 0 comments
Closed

Issues with the c_string_encoding directive at the top of a file. #2632

robertwb opened this issue Sep 27, 2018 · 0 comments

Comments

@robertwb
Copy link
Contributor

Placing

# cython: c_string_encoding=default

in the first two lines of the file will trigger the source coding detector and try to open the file in default encoding, which of course doesn't exist.

(Perhaps we should always be ignoring it, as it's only applied if it happens to fall within the first two lines...)

@scoder scoder added this to the 0.29 milestone Sep 29, 2018
@scoder scoder closed this as completed in 5b8bced Sep 29, 2018
mchouque pushed a commit to scibian/python-pyslurm that referenced this issue Nov 29, 2023
There's an upstream bug in cython which will result in an incorrect
encoding detection if the c_string_encoding keyword appears in the first
two lines of a file: cython/cython#2632

So the "simple" fix is to add 2 extra lines before the magic headers of
the only file which is incorrectly detected.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants