Package Details: python2-lxml 4.9.4-2

Git Clone URL: https://aur.archlinux.org/python2-lxml.git (read-only, click to copy)
Package Base: python2-lxml
Description: Python2 binding for the libxml2 and libxslt libraries
Upstream URL: https://lxml.de/
Licenses: custom, BSD
Submitter: patlefort
Maintainer: patlefort
Last Packager: patlefort
Votes: 10
Popularity: 0.002601
First Submitted: 2021-06-22 01:52 (UTC)
Last Updated: 2024-03-31 01:02 (UTC)

Dependencies (9)

Sources (1)

Latest Comments

« First ‹ Previous 1 2 3 4 5 Next › Last »

MarsSeed commented on 2022-06-25 19:11 (UTC)

Maybe also the parallel build contributes to the problem?

The inplace build, which enables parallelism and cython-coverage, was not used before, and no one reported segfaults.

So I would not use that build target; seems it's unreliable.

MarsSeed commented on 2022-06-25 19:06 (UTC) (edited on 2022-06-25 19:07 (UTC) by MarsSeed)

Not sure why I cannot reproduce the segfault.

But @patlefort, I think you should not build "--with-coverage". It does not provide useful information in any way for end-users. Don't know if that causes the segfaults or not, but better to eliminate any unnecessary factors.

I recommend using make PYTHON=python2 build.

dreieck commented on 2022-06-25 17:44 (UTC)

A note:

check() fails for me with a Segmentation Fault after the inidividual tests have run:

==> Starting check()...
python2 setup.py  build_ext -i  --with-cython --warnings  --with-coverage 
Building lxml version 4.9.0.
Building with Cython 0.29.30.
Building against libxml2 2.9.14 and libxslt 1.1.35
running build_ext
copying build/lib.linux-x86_64-2.7/lxml/etree.so -> src/lxml
copying build/lib.linux-x86_64-2.7/lxml/objectify.so -> src/lxml
copying build/lib.linux-x86_64-2.7/lxml/builder.so -> src/lxml
copying build/lib.linux-x86_64-2.7/lxml/_elementpath.so -> src/lxml
copying build/lib.linux-x86_64-2.7/lxml/html/diff.so -> src/lxml/html
copying build/lib.linux-x86_64-2.7/lxml/html/clean.so -> src/lxml/html
copying build/lib.linux-x86_64-2.7/lxml/sax.so -> src/lxml
python2 test.py -p -v   --coverage
Comparing with ElementTree 1.3.0

TESTED VERSION: 4.9.0
    Python:           sys.version_info(major=2, minor=7, micro=18, releaselevel='final', serial=0)
    lxml.etree:       (4, 9, 0, 0)
    libxml used:      (2, 9, 14)
    libxml compiled:  (2, 9, 14)
    libxslt used:     (1, 1, 35)
    libxslt compiled: (1, 1, 35)
    FS encoding:      UTF-8
    Default encoding: ascii
    Max Unicode:      1114111

   1/1955 (  0.1%): txt (test_autolink)
   2/1955 (  0.1%): txt (test_basic)
   3/1955 (  0.2%): Classes (lxml.html)
[...]
1954/1955 ( 99.9%): txt (extensions)nsmap (lxml.tests.test_xslt.ETreeXSLTExtElementTestCase)                                            
1955/1955 (100.0%): txt (xpathxslt)                    
Doctest: xpathxslt.txt  
----------------------------------------------------------------------
Ran 1955 tests in 81.629s

OK
Name                                               Stmts   Miss  Cover
----------------------------------------------------------------------
src/lxml/ElementInclude.py                           103     29    72%
src/lxml/__init__.py                                  11      1    91%
src/lxml/_elementpath.py                             205     21    90%
src/lxml/apihelpers.pxi                             1141    229    80%
src/lxml/builder.py                                   70      7    90%
src/lxml/classlookup.pxi                             217     55    75%
src/lxml/cleanup.pxi                                  96     23    76%
src/lxml/cssselect.py                                 35      4    89%
src/lxml/docloader.pxi                                66     25    62%
src/lxml/doctestcompare.py                           355     86    76%
src/lxml/dtd.pxi                                     248     77    69%
src/lxml/etree.pyx                                  1606    195    88%
src/lxml/extensions.pxi                              514    121    76%
src/lxml/html/ElementSoup.py                           6      6     0%
src/lxml/html/__init__.py                            936    241    74%
src/lxml/html/_diffcommand.py                         57     57     0%
src/lxml/html/_html5builder.py                        66     66     0%
src/lxml/html/_setmixin.py                            38     13    66%
src/lxml/html/builder.py                              98      0   100%
src/lxml/html/clean.py                               458     38    92%
src/lxml/html/defs.py                                 20      0   100%
src/lxml/html/diff.py                                468     65    86%
src/lxml/html/formfill.py                            215     64    70%
src/lxml/html/html5parser.py                         132     11    92%
src/lxml/html/soupparser.py                          184     33    82%
src/lxml/html/tests/__init__.py                        0      0   100%
src/lxml/html/tests/test_autolink.py                   8      1    88%
src/lxml/html/tests/test_basic.py                     31      1    97%
src/lxml/html/tests/test_clean.py                    124      0   100%
src/lxml/html/tests/test_diff.py                       9      1    89%
src/lxml/html/tests/test_elementsoup.py               78      5    94%
src/lxml/html/tests/test_feedparser_data.py           70     12    83%
src/lxml/html/tests/test_formfill.py                   6      0   100%
src/lxml/html/tests/test_forms.py                      8      1    88%
src/lxml/html/tests/test_frames.py                    27      0   100%
src/lxml/html/tests/test_html5parser.py              299     32    89%
src/lxml/html/tests/test_rewritelinks.py               8      1    88%
src/lxml/html/tests/test_select.py                    22      0   100%
src/lxml/html/tests/test_xhtml.py                      8      1    88%
src/lxml/html/tests/transform_feedparser_data.py      58     58     0%
src/lxml/html/usedoctest.py                            2      0   100%
src/lxml/includes/__init__.py                          0      0   100%
src/lxml/isoschematron/__init__.py                   122      8    93%
src/lxml/iterparse.pxi                               233     33    86%
src/lxml/nsclasses.pxi                               118     41    65%
src/lxml/objectify.pyx                              1097    130    88%
src/lxml/objectpath.pxi                              206     24    88%
src/lxml/parser.pxi                                 1063    261    75%
src/lxml/parsertarget.pxi                            126     31    75%
src/lxml/proxy.pxi                                   306     76    75%
src/lxml/public-api.pxi                              119     80    33%
src/lxml/pyclasslookup.py                              1      1     0%
src/lxml/readonlytree.pxi                            283    130    54%
src/lxml/relaxng.pxi                                  83     29    65%
src/lxml/sax.py                                      189      4    98%
src/lxml/saxparser.pxi                               518    115    78%
src/lxml/schematron.pxi                               56     17    70%
src/lxml/serializer.pxi                             1166    337    71%
src/lxml/tests/__init__.py                             0      0   100%
src/lxml/tests/common_imports.py                     212     51    76%
src/lxml/tests/dummy_http_server.py                   43      4    91%
src/lxml/tests/fuzz_xml_parse.py                      13     13     0%
src/lxml/tests/selftest.py                           170     31    82%
src/lxml/tests/selftest2.py                           93     25    73%
src/lxml/tests/test_builder.py                        42      1    98%
src/lxml/tests/test_classlookup.py                   267      3    99%
src/lxml/tests/test_css.py                            40      5    88%
src/lxml/tests/test_doctestcompare.py                 64      3    95%
src/lxml/tests/test_dtd.py                           258      1    99%
src/lxml/tests/test_elementpath.py                   145      4    97%
src/lxml/tests/test_elementtree.py                  3314     96    97%
src/lxml/tests/test_errors.py                         46     13    72%
src/lxml/tests/test_etree.py                        3370     37    99%
src/lxml/tests/test_external_document.py              65      4    94%
src/lxml/tests/test_htmlparser.py                    451     17    96%
src/lxml/tests/test_http_io.py                        78      3    96%
src/lxml/tests/test_incremental_xmlfile.py           475     33    93%
src/lxml/tests/test_io.py                            265     12    95%
src/lxml/tests/test_isoschematron.py                 231      1    99%
src/lxml/tests/test_nsclasses.py                     145      1    99%
src/lxml/tests/test_objectify.py                    1698      3    99%
src/lxml/tests/test_pyclasslookup.py                 286      1    99%
src/lxml/tests/test_relaxng.py                       116     19    84%
src/lxml/tests/test_sax.py                           261      7    97%
src/lxml/tests/test_schematron.py                     34      1    97%
src/lxml/tests/test_threading.py                     350     10    97%
src/lxml/tests/test_unicode.py                       138      3    98%
src/lxml/tests/test_xmlschema.py                     222      3    99%
src/lxml/tests/test_xpathevaluator.py                464     15    97%
src/lxml/tests/test_xslt.py                          910     80    91%
src/lxml/usedoctest.py                                 2      0   100%
src/lxml/xinclude.pxi                                 27     10    63%
src/lxml/xmlerror.pxi                                413    138    67%
src/lxml/xmlid.pxi                                    93     36    61%
src/lxml/xmlschema.pxi                               101     17    83%
src/lxml/xpath.pxi                                   256     63    75%
src/lxml/xslt.pxi                                    502    143    72%
src/lxml/xsltext.pxi                                 107     30    72%
----------------------------------------------------------------------
TOTAL                                              29556   3834    87%
make: *** [Makefile:92: test_inplace] Segmentation fault
==> ERROR: A failure occurred in check().

MarsSeed commented on 2022-06-24 17:14 (UTC)

@toddejohnson, those are lightweight builds. Also, if you cache your packages, you only need to build them once. Updates will be very scarce among those.

But, like @patlefort said, you can skip installing the checkdepends and running the check() function:

makepkg --nocheck
# or
yay -Syu --mflags '--nocheck'
# or
paru -Syu --nocheck

patlefort commented on 2022-06-24 16:50 (UTC)

You can disable checks if you don't need tests and don't want to pull all these dependencies.

toddejohnson commented on 2022-06-24 16:40 (UTC)

Adding checkdepends makes me build 31 depends to build this package: python2-beautifulsoup4 python2-soupsieve python2-backports.functools_lru_cache python2-backports python2-setuptools-scm python2-html5lib python2-webencodings python2-npython2-cssselect python2-pytest python2-atomicwrites python2-attrs python2-funcsigs python2-unittest2 python2-traceback2 python2-linecache2 python2-pbr python2-more-itertools python2-wcwidth python2-py python2-pluggy python2-importlib-metadata python2-configparser python2-contextlib2 python2-zipp python2-pathlib2 python2-scandir python2-chardet python2-pytest-expect python2-u-msgpack python2-mock

Glad I'm caught up in python2 land.

MarsSeed commented on 2022-06-23 21:19 (UTC)

@semeion are these not optional enough for you? :D

semeion commented on 2022-06-23 20:39 (UTC) (edited on 2022-06-23 20:45 (UTC) by semeion)

I think that dependencies should be optional...

New optional dependencies for python2-lxml

python2-beautifulsoup4: malformed HTML parsing support

python2-cssselect: CSS parsing support

python2-html5lib: HTML5 parsing support

MarsSeed commented on 2022-06-23 20:38 (UTC)

I couldn't resist. :) Tried the build just now, with and without LC_ALL=C passed to makepkg. Everything was successful in both runs. Puzzling...

MarsSeed commented on 2022-06-23 20:22 (UTC)

Thanks for the update.

I am surprised about your report of segfaults. I've tested my suggestions and didn't experience any problems. Though I haven't changed anything else besides what I've sent to you.

Will check later or tomorrow; now I'm finished with the build stuff.

In the meantime, could you maybe share your full build log (e.g. via pastebin)?

Also, did you use modified env vars for the build, like LC_ALL=C?