Page MenuHomeFreeBSD

www/py-readability-lxml: Add new port
ClosedPublic

Authored by jbo on Sep 11 2023, 12:46 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Nov 9, 3:13 AM
Unknown Object (File)
Wed, Nov 6, 5:58 AM
Unknown Object (File)
Sun, Nov 3, 10:37 AM
Unknown Object (File)
Sun, Nov 3, 10:37 AM
Unknown Object (File)
Sun, Nov 3, 10:37 AM
Unknown Object (File)
Sun, Nov 3, 10:37 AM
Unknown Object (File)
Sun, Nov 3, 10:29 AM
Unknown Object (File)
Sun, Nov 3, 9:58 AM
Subscribers

Details

Summary

Fast HTML to text parser (article readability tool).

PR: 273553

Diff Detail

Repository
R11 FreeBSD ports repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

jbo requested review of this revision.Sep 11 2023, 12:46 PM
www/py-readability-lxml/files/patch-readability_compat_two.py
10

Hi! Any idea why this patch is needed? Looks to me like it suppresses some exception? But I don't know much python ...

www/py-readability-lxml/files/patch-readability_compat_two.py
10

The patch was supplied by the author of the port.
Without it, the byte compiler fails (poudriere-testport output without the patch):

byte-compiling /wrkdirs/usr/ports/www/py-readability-lxml/work-py39/stage/usr/local/lib/python3.9/site-packages/readability/compat/two.py to two.cpython-39.pyc
  File "/usr/local/lib/python3.9/site-packages/readability/compat/two.py", line 6
    raise exc_type(*args, **kwargs), None, traceback
                                   ^
SyntaxError: invalid syntax

I did not further investigate into upstream tho.

www/py-readability-lxml/files/patch-readability_compat_two.py
10

Nevermind, turns out this code is for python 2.x only, so will never be executed anyways.

I would recommend adding a comment to the patch, something like disable some python-2.x code that's invalid syntax in python 3.

Leave comment in potentially obscure patch

This revision is now accepted and ready to land.Sep 11 2023, 2:53 PM
This revision was automatically updated to reflect the committed changes.
jbo marked an inline comment as done.