Code

Opened 2 years ago

Closed 2 years ago

Last modified 2 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

Description

In /contrib/markup/templatetags/markup.py, 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:

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

Attachments (1)

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

Download all attachments as: .zip

Change History (5)

comment:1 Changed 2 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 2 years ago by sage

Patch

comment:2 Changed 2 years ago by sage

  • Has patch set

comment:3 Changed 2 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 2 years ago by claudep

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

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.