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)
Fri, Apr 26, 1:43 AM
Unknown Object (File)
Apr 10 2024, 2:21 AM
Unknown Object (File)
Apr 2 2024, 6:09 AM
Unknown Object (File)
Apr 2 2024, 4:02 AM
Unknown Object (File)
Mar 20 2024, 9:59 AM
Unknown Object (File)
Mar 2 2024, 10:57 PM
Unknown Object (File)
Jan 18 2024, 1:20 PM
Unknown Object (File)
Jan 5 2024, 10:31 PM
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.