Bug 260010

Summary: www/py-django-markwhat is broken after textproc/py-markdown 3.x update
Product: Ports & Packages Reporter: Simeon Simeonov <sgs>
Component: Individual Port(s)Assignee: Neel Chauhan <nc>
Status: Open ---    
Severity: Affects Many People CC: koobs, nc, python
Priority: --- Keywords: needs-patch, regression
Version: LatestFlags: koobs: maintainer-feedback+
nc: maintainer-feedback+
Hardware: Any   
OS: Any   
Attachments:
Description Flags
Upgrades py-django-markwhat from 1.6.1 to 1.6.2 none

Description Simeon Simeonov 2021-11-24 08:47:55 UTC
Created attachment 229689 [details]
Upgrades py-django-markwhat from 1.6.1 to 1.6.2

www/py-django-markwhat has been broken since textproc/py-markdown was upgraded from 2.6.11 to 3.3.4 (2021-05-05).

The problem is fixed in the latest upstream version - 1.6.2
Comment 1 Kubilay Kocak freebsd_committer freebsd_triage 2021-11-25 00:36:51 UTC
Thank you for the report. What is the failure? Please add log as an attachment, thanks!
Comment 2 Simeon Simeonov 2021-11-25 04:42:04 UTC
The failure is that 1.6.1 lacks Markdown 3.x compatibility and calls / uses
the markdown.markdown function in a wrong way.

https://github.com/Alir3z4/django-markwhat/releases/tag/1.6.2 

    output = self.filter_expression.resolve(context)
  File "/usr/lib/python3.9/site-packages/django/template/base.py", line 698, in resolve
    new_obj = func(obj, *arg_vals)
  File "/home/sgs/development/venvs/django_markwhat_test/lib/python3.9/site-packages/django_markwhat/templatetags/markup.py", line 70, in markdown
    return mark_safe(markdown.markdown(
TypeError: markdown() takes 1 positional argument but 2 were given
Comment 3 Simeon Simeonov 2021-11-28 14:40:09 UTC
poudriere testport passes for Python 3.8, 3.9 and 3.10 on amd64
Comment 4 Kubilay Kocak freebsd_committer freebsd_triage 2021-11-28 23:04:25 UTC
@Neel Could you either:

  - Backport the patch/commit adding support for 3.x, OR
  - Fork py-markdown (creating a py-markdown2 port) with the last 2.x version and switch py-django-markdown to that dependency