Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#18104 closed Bug (fixed)

python_markdown_deprecation incorrectly formed

Reported by: Roy Smith Owned by: Claude Paroz
Component: contrib.markup Version: 1.4
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no


In /contrib/markup/templatetags/, this code is incorrect:

            python_markdown_deprecation = "The use of Python-Markdown "
            "< 2.1 in Django is deprecated; please update to the current version"

I suspect you were attempting to use string concatenation, but what you've got is two statements, one assigning a string, the next consisting of just a string. This results in:

[...]/ DeprecationWarning: The use of Python-Markdown 
  warnings.warn(python_markdown_deprecation, DeprecationWarning)

Attachments (1)

18104.diff (890 bytes) - added by sage 7 years ago.

Download all attachments as: .zip

Change History (5)

comment:1 Changed 7 years ago by Claude Paroz

Owner: changed from nobody to Claude Paroz
Status: newassigned
Triage Stage: UnreviewedAccepted

Changed 7 years ago by sage

Attachment: 18104.diff added


comment:2 Changed 7 years ago by sage

Has patch: set

comment:3 Changed 7 years ago by Claude Paroz

Resolution: fixed
Status: assignedclosed

In [17897]:

[1.4.X] Fixed #18104 -- Added missing parentheses around two-lines deprecation string. Thanks Roy Smith for the report.

comment:4 Changed 7 years ago by Claude Paroz

I didn't touch the code in trunk, as it will be removed (see #18041).

Note: See TracTickets for help on using tickets.
Back to Top