Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#18104 closed Bug (fixed)

python_markdown_deprecation incorrectly formed

Reported by: RoySmith Owned by: claudep
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 3 years ago.

Download all attachments as: .zip

Change History (5)

comment:1 Changed 3 years ago by claudep

  • Needs documentation unset
  • Needs tests unset
  • Owner changed from nobody to claudep
  • Patch needs improvement unset
  • Status changed from new to assigned
  • Triage Stage changed from Unreviewed to Accepted

Changed 3 years ago by sage


comment:2 Changed 3 years ago by sage

  • Has patch set

comment:3 Changed 3 years ago by claudep

  • Resolution set to fixed
  • Status changed from assigned to closed

In [17897]:

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

comment:4 Changed 3 years ago by claudep

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