Modify ↓
Ticket #877 (closed defect: fixed)
Encoding header in generated files is not PEP 0263 compliant.
| Reported by: | francis@… | Owned by: | andrew |
|---|---|---|---|
| Priority: | minor | Milestone: | 1.0 |
| Component: | commands | Version: | 0.7.3 |
| Keywords: | Cc: |
Description
South's "manage.py datamigration" command generates Python files with the following header:
# encoding: utf-8
This header is not compliant with PEP 0263. I suggest changing it to
# -*- coding: utf-8 -*-
which is PEP 0263 compliant and also works in Emacs.
Attachments
Change History
comment:2 Changed 21 months ago by kmike84@…
The existing header is PEP 0263 compliant because it matches 'coding[:=]\s*([-\w.]+)' regexp, the only issue here is Emacs.
comment:3 Changed 21 months ago by Francis Devereux <francis@…>
Sorry, you're right - I didn't read the PEP properly, I was looking at the examples in it and saw that what South generates isn't the same as any of the examples.
It would still be nice to have encoding headers that work in Emacs though.
Note: See
TracTickets for help on using
tickets.

Pull request sent: https://bitbucket.org/andrewgodwin/south/pull-request/6/made-encoding-header-generated-python