Bug 1719008 - Review Request: python-soupsieve - CSS selector library
Summary: Review Request: python-soupsieve - CSS selector library
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Miro Hrončok
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 1667497 1742146
TreeView+ depends on / blocked
 
Reported: 2019-06-10 18:35 UTC by Zbigniew Jędrzejewski-Szmek
Modified: 2019-08-19 21:39 UTC (History)
5 users (show)

Fixed In Version: python-soupsieve-1.9.2-1.fc31
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-08-19 20:36:14 UTC
Type: ---
Embargoed:
mhroncok: fedora-review+


Attachments (Terms of Use)

Description Zbigniew Jędrzejewski-Szmek 2019-06-10 18:35:49 UTC
Spec URL: https://in.waw.pl/~zbyszek/fedora/python-soupsieve.spec
SRPM URL: https://in.waw.pl/~zbyszek/fedora/python-soupsieve-1.9.1-1.fc31.src.rpm
Description:
Soup Sieve is a CSS selector library designed to be used with Beautiful Soup 4.
It aims to provide selecting, matching, and filtering using modern CSS
selectors. Soup Sieve currently provides selectors from the CSS level 1
specifications up through the latest CSS level 4 drafts and beyond (though some
are not yet implemented).

Soup Sieve was written with the intent to replace Beautiful Soup's builtin
select feature, and as of Beautiful Soup version 4.7.0, it now is. Soup Sieve
can also be imported in order to use its API directly for more controlled,
specialized parsing.

Soup Sieve has implemented most of the CSS selectors up through the latest CSS
draft specifications, though there are a number that don't make sense in a
non-browser environment. Selectors that cannot provide meaningful functionality
simply do not match anything.

Fedora Account System Username: zbyszek

Comment 1 Zbigniew Jędrzejewski-Szmek 2019-06-10 18:40:40 UTC
See also https://src.fedoraproject.org/rpms/python-beautifulsoup4/pull-request/3.

Comment 2 Fabian Affolter 2019-06-10 19:53:12 UTC
It looks like that you don't want to build the package for EPEL. If that's the case then remove the support for Python 2.

- Package must not depend on deprecated() packages.
  Note: python2-devel is deprecated, you must not depend on it.
  See: https://docs.fedoraproject.org/en-US/packaging-
  guidelines/deprecating-packages/

- Move the BuildRequires for Python 3 to the %package for Python3  section

- Replace the Source0 with
  Source0:        https://github.com/facelessuser/soupsieve/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz

Package Review
==============

Legend:
[x] = Pass, [!] = Fail, [-] = Not applicable, [?] = Not evaluated
[ ] = Manual review needed


Issues:
=======

===== MUST items =====

Generic:
[x]: Package is licensed with an open-source compatible license and meets
     other legal requirements as defined in the legal section of Packaging
     Guidelines.
[x]: License field in the package spec file matches the actual license.
     Note: Checking patched sources after %prep for licenses. Licenses
     found: "Unknown or generated", "Expat License". 123 files have unknown
     license. Detailed output of licensecheck in
     /home/fab/Documents/repos/reviews/1719008-python-
     soupsieve/licensecheck.txt
[x]: License file installed when any subpackage combination is installed.
[x]: Package contains no bundled libraries without FPC exception.
[x]: Changelog in prescribed format.
[x]: Sources contain only permissible code or content.
[-]: Package contains desktop file if it is a GUI application.
[-]: Development files must be in a -devel package
[x]: Package uses nothing in %doc for runtime.
[x]: Package consistently uses macros (instead of hard-coded directory
     names).
[x]: Package is named according to the Package Naming Guidelines.
[x]: Package does not generate any conflict.
[x]: Package obeys FHS, except libexecdir and /usr/target.
[-]: If the package is a rename of another package, proper Obsoletes and
     Provides are present.
[x]: Requires correct, justified where necessary.
[x]: Spec file is legible and written in American English.
[-]: Package contains systemd file(s) if in need.
[x]: Package is not known to require an ExcludeArch tag.
[x]: Large documentation must go in a -doc subpackage. Large could be size
     (~1MB) or number of files.
     Note: Documentation size is 20480 bytes in 2 files.
[x]: Package complies to the Packaging Guidelines
[x]: Package successfully compiles and builds into binary rpms on at least
     one supported primary architecture.
[x]: Package installs properly.
[x]: Rpmlint is run on all rpms the build produces.
     Note: No rpmlint messages.
[x]: If (and only if) the source package includes the text of the
     license(s) in its own file, then that file, containing the text of the
     license(s) for the package is included in %license.
[x]: Package requires other packages for directories it uses.
[x]: Package must own all directories that it creates.
[x]: Package does not own files or directories owned by other packages.
[x]: Package uses either %{buildroot} or $RPM_BUILD_ROOT
[x]: Package does not run rm -rf %{buildroot} (or $RPM_BUILD_ROOT) at the
     beginning of %install.
[x]: Macros in Summary, %description expandable at SRPM build time.
[x]: Dist tag is present.
[x]: Package does not contain duplicates in %files.
[x]: Permissions on files are set properly.
[x]: Package use %makeinstall only when make install DESTDIR=... doesn't
     work.
[x]: Package is named using only allowed ASCII characters.
[x]: Package does not use a name that already exists.
[x]: Package is not relocatable.
[x]: Sources used to build the package match the upstream source, as
     provided in the spec URL.
[x]: Spec file name must match the spec package %{name}, in the format
     %{name}.spec.
[x]: File names are valid UTF-8.
[x]: Packages must not store files under /srv, /opt or /usr/local

Python:
[x]: Python eggs must not download any dependencies during the build
     process.
[x]: A package which is used by another package via an egg interface should
     provide egg info.
[x]: Package meets the Packaging Guidelines::Python
[x]: Package contains BR: python2-devel or python3-devel
[x]: Packages MUST NOT have dependencies (either build-time or runtime) on
     packages named with the unversioned python- prefix unless no properly
     versioned package exists. Dependencies on Python packages instead MUST
     use names beginning with python2- or python3- as appropriate.
[x]: Python packages must not contain %{pythonX_site(lib|arch)}/* in %files
[x]: Binary eggs must be removed in %prep

===== SHOULD items =====

Generic:
[-]: If the source package does not include license text(s) as a separate
     file from upstream, the packager SHOULD query upstream to include it.
[x]: Final provides and requires are sane (see attachments).
[x]: Fully versioned dependency in subpackages if applicable.
     Note: No Requires: %{name}%{?_isa} = %{version}-%{release} in
     python2-soupsieve , python3-soupsieve
[?]: Package functions as described.
[x]: Latest version is packaged.
[x]: Package does not include license text files separate from upstream.
[x]: Description and summary sections in the package spec file contains
     translations for supported Non-English languages, if available.
[x]: Package should compile and build into binary rpms on all supported
     architectures.
[x]: %check is present and all tests pass.
[x]: Packages should try to preserve timestamps of original installed
     files.
[x]: Reviewer should test that the package builds in mock.
[x]: Buildroot is not present
[x]: Package has no %clean section with rm -rf %{buildroot} (or
     $RPM_BUILD_ROOT)
[x]: No file requires outside of /etc, /bin, /sbin, /usr/bin, /usr/sbin.
[x]: Packager, Vendor, PreReq, Copyright tags should not be in spec file
[x]: Sources can be downloaded from URI in Source: tag
[x]: SourceX is a working URL.
[x]: Spec use %global instead of %define unless justified.

===== EXTRA items =====

Generic:
[x]: Rpmlint is run on all installed packages.
     Note: There are rpmlint messages (see attachment).
[x]: Spec file according to URL is the same as in SRPM.


Rpmlint
-------
Checking: python2-soupsieve-1.9.1-1.fc31.noarch.rpm
          python3-soupsieve-1.9.1-1.fc31.noarch.rpm
          python-soupsieve-1.9.1-1.fc31.src.rpm
3 packages and 0 specfiles checked; 0 errors, 0 warnings.




Rpmlint (installed packages)
----------------------------
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
	LANGUAGE = (unset),
	LC_ALL = (unset),
	LC_CTYPE = "C.UTF-8",
	LANG = "en_US.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
	LANGUAGE = (unset),
	LC_ALL = (unset),
	LC_CTYPE = "C.UTF-8",
	LANG = "en_US.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
	LANGUAGE = (unset),
	LC_ALL = (unset),
	LC_CTYPE = "C.UTF-8",
	LANG = "en_US.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
sh: /usr/bin/python: No such file or directory
/usr/share/rpmlint/Pkg.py:168: UnicodeWarning: decode() called on unicode string, see https://bugzilla.redhat.com/show_bug.cgi?id=1693751
  s.decode('UTF-8')
python3-soupsieve.noarch: W: invalid-url URL: https://github.com/facelessuser/soupsieve <urlopen error [Errno -2] Name or service not known>
/usr/share/rpmlint/Pkg.py:168: UnicodeWarning: decode() called on unicode string, see https://bugzilla.redhat.com/show_bug.cgi?id=1693751
  s.decode('UTF-8')
python2-soupsieve.noarch: W: invalid-url URL: https://github.com/facelessuser/soupsieve <urlopen error [Errno -2] Name or service not known>
2 packages and 0 specfiles checked; 0 errors, 2 warnings.



Source checksums
----------------
https://github.com/facelessuser/soupsieve/archive/1.9.1.tar.gz :
  CHECKSUM(SHA256) this package     : 9495e87b470d7ef490dd525d9a9b290608a35fb021562deec492bcf6b8abc6e1
  CHECKSUM(SHA256) upstream package : 9495e87b470d7ef490dd525d9a9b290608a35fb021562deec492bcf6b8abc6e1


Requires
--------
python2-soupsieve (rpmlib, GLIBC filtered):
    python(abi)
    python2.7dist(backports.functools-lru-cache)
    python2dist(backports.functools-lru-cache)

python3-soupsieve (rpmlib, GLIBC filtered):
    python(abi)



Provides
--------
python2-soupsieve:
    python-soupsieve
    python2-soupsieve
    python2.7dist(soupsieve)
    python2dist(soupsieve)

python3-soupsieve:
    python3-soupsieve
    python3.7dist(soupsieve)
    python3dist(soupsieve)



Generated by fedora-review 0.7.2 (65d36bb) last change: 2019-04-09
Command line :/usr/bin/fedora-review -b 1719008
Buildroot used: fedora-rawhide-x86_64
Active plugins: Python, Generic, Shell-api
Disabled plugins: Haskell, fonts, PHP, Ocaml, SugarActivity, Perl, R, Java, C/C++
Disabled flags: EPEL6, EPEL7, DISTTAG, BATCH, EXARCH

Comment 3 Miro Hrončok 2019-06-10 21:09:11 UTC
You need a FESCo exception if you really need python2-soupsieve.

Comment 4 Zbigniew Jędrzejewski-Szmek 2019-06-10 21:27:48 UTC
Thanks for the quick review!

> Move the BuildRequires for Python 3 to the %package for Python3  section
I kept them at the top on purpose. I assume that the python2 part will go away soon, and
then all BRs will be at the top.

> Source0
Updated to https://github.com/facelessuser/soupsieve/archive/%{version}/%{name}-%{version}.tar.gz.

I pushed an updated srpm/spec with just this change:
Spec URL: https://in.waw.pl/~zbyszek/fedora/python-soupsieve.spec
SRPM URL: https://in.waw.pl/~zbyszek/fedora/python-soupsieve-1.9.1-1.fc31.src.rpm


So... I need the python2 subpackage for bs4. A bunch of other packages depened on python2-bs4:
$ dnf repoquery --release=31 --whatrequires python2-beautifulsoup4
mote-0:0.6.2-10.fc30.noarch
packagedb-cli-0:2.14.1-9.fc30.noarch
python2-fedora-0:0.10.0-8.fc30.noarch
python2-fmn-lib-0:0.8.2-8.fc29.noarch
python2-webtest-0:2.0.30-3.fc30.noarch

$ dnf repoquery --disablerepo=\* --enablerepo=rawhide-source --arch=src --whatrequires python2-beautifulsoup4
chromium-0:73.0.3683.103-1.fc31.src
mote-0:0.6.2-10.fc30.src
python-fmn-lib-0:0.8.2-8.fc29.src
python-html5-parser-0:0.4.6-1.fc31.src
python-webtest-0:2.0.30-3.fc30.src

It seems like not including the python2 subpackage will make the bs4 upgrade very hard.

Comment 5 Zbigniew Jędrzejewski-Szmek 2019-06-11 17:04:04 UTC
https://pagure.io/fesco/issue/2145

Comment 6 Miro Hrončok 2019-06-11 23:23:39 UTC
As another note, please make the tests bcondable, to allow bootstrapping (such as when Python is updated).

Comment 7 Zbigniew Jędrzejewski-Szmek 2019-06-24 16:41:58 UTC
Still waiting for the FESCo ticket to be resolved. I'll ask for the repo to be created, but I won't import.

Comment 8 Zbigniew Jędrzejewski-Szmek 2019-06-24 16:51:12 UTC
Nvm, I see the review is not approved yet.

Comment 9 Kevin Fenzi 2019-07-14 01:27:02 UTC
Any news here? it's holding up new calibre... :)

Comment 10 Zbigniew Jędrzejewski-Szmek 2019-07-14 05:22:15 UTC
Fesco exception was granted, please approve.

Comment 11 Zbigniew Jędrzejewski-Szmek 2019-07-22 16:08:43 UTC
Ping.

Comment 12 Zbigniew Jędrzejewski-Szmek 2019-07-29 15:46:01 UTC
Ping.

Comment 13 Zbigniew Jędrzejewski-Szmek 2019-08-10 13:35:09 UTC
I'm resetting the assignee because of lack of response. If somebody else could pick up the review that'd be great.

Comment 14 Miro Hrončok 2019-08-10 13:45:31 UTC
=================================== FAILURES ===================================
________________________ TestDefined.test_defined_xhtml ________________________
self = <tests.test_level4.test_defined.TestDefined testMethod=test_defined_xhtml>
    def test_defined_xhtml(self):
        """Test defined XHTML."""
    
        markup = """
        <?xml version="1.0" encoding="UTF-8"?>
        <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
            "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
        <html lang="en" xmlns="http://www.w3.org/1999/xhtml">
        <head>
        </head>
        <body>
        <div id="0"></div>
        <div-custom id="1"></div-custom>
        <prefix:div id="2"></prefix:div>
        <!--
        lxml or BeautifulSoup seems to strip away the prefix.
        This is most likely because prefix with no namespace is not really valid.
        XML does allow colons in names, but encourages them to be used for namespaces.
        Do we really care that the prefix is wiped out in XHTML if there is no namespace?
        If we do, we should look into this in the future.
        -->
        <prefix:div-custom id="3"></prefix:div-custom>
        </body>
        </html>
        """
    
        self.assert_selector(
            markup,
            'body :defined',
            ['0', '2'],  # We should get 3, but we don't for reasons stated above.
>           flags=util.XHTML
        )
tests/test_level4/test_defined.py:63: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
tests/util.py:142: in assert_selector
    self.assertEqual(sorted(ids), sorted(expected_ids))
E   AssertionError: Lists differ: [u'0', u'1', u'2'] != [u'0', u'2']
E   
E   First differing element 1:
E   u'1'
E   u'2'
E   
E   First list contains 1 additional elements.
E   First extra element 2:
E   u'2'
E   
E   - [u'0', u'1', u'2']
E   ?        ------
E   
E   + [u'0', u'2']
----------------------------- Captured stdout call -----------------------------
----Running Selector Test----
(u'PATTERN: ', u'body :defined')
## PARSING: u'body :defined'
TOKEN: 'tag' --> u'body' at position 0
TOKEN: 'combine' --> u' ' at position 4
TOKEN: 'pseudo_class' --> u':defined' at position 5
## END PARSING
(u'\n====PARSER: ', u'xml')
(u'TAG: ', 'div')
(u'TAG: ', 'div-custom')
(u'TAG: ', 'div')
_____________________ TestDefinedQuirks.test_defined_xhtml _____________________
self = <tests.test_level4.test_defined.TestDefinedQuirks testMethod=test_defined_xhtml>
    def test_defined_xhtml(self):
        """Test defined XHTML."""
    
        markup = """
        <?xml version="1.0" encoding="UTF-8"?>
        <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
            "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
        <html lang="en" xmlns="http://www.w3.org/1999/xhtml">
        <head>
        </head>
        <body>
        <div id="0"></div>
        <div-custom id="1"></div-custom>
        <prefix:div id="2"></prefix:div>
        <!--
BUILDSTDERR:         lxml or Beauerror: Bad exit status from /var/tmp/rpm-tmp.8Xwbku (%check)
BUILDSTDERR:     Bad exit status from /var/tmp/rpm-tmp.8Xwbku (%check)
tifulSoup seems to strip away the prefix.
        This is most likely because prefix with no namespace is not really valid.
        XML does allow colons in names, but encourages them to be used for namespaces.
        Do we really care that the prefix is wiped out in XHTML if there is no namespace?
        If we do, we should look into this in the future.
        -->
        <prefix:div-custom id="3"></prefix:div-custom>
        </body>
        </html>
        """
    
        self.assert_selector(
            markup,
            'body :defined',
            ['0', '2'],  # We should get 3, but we don't for reasons stated above.
>           flags=util.XHTML
        )
tests/test_level4/test_defined.py:63: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
tests/util.py:142: in assert_selector
    self.assertEqual(sorted(ids), sorted(expected_ids))
E   AssertionError: Lists differ: [u'0', u'1', u'2'] != [u'0', u'2']
E   
E   First differing element 1:
E   u'1'
E   u'2'
E   
E   First list contains 1 additional elements.
E   First extra element 2:
E   u'2'
E   
E   - [u'0', u'1', u'2']
E   ?        ------
E   
E   + [u'0', u'2']
----------------------------- Captured stdout call -----------------------------
----Running Selector Test----
(u'PATTERN: ', u'body :defined')
## QUIRKS MODE: Throwing out the spec!
## PARSING: u'body :defined'
TOKEN: 'tag' --> u'body' at position 0
TOKEN: 'combine' --> u' ' at position 4
TOKEN: 'pseudo_class' --> u':defined' at position 5
## END PARSING
(u'\n====PARSER: ', u'xml')
(u'TAG: ', 'div')
(u'TAG: ', 'div-custom')
(u'TAG: ', 'div')
=============================== warnings summary ===============================
tests/test_api.py::TestSoupSieve::test_comments
  /builddir/build/BUILD/soupsieve-1.9.1/tests/test_api.py:37: DeprecationWarning: 'comments' is deprecated. 'comments' is not related to CSS selectors and will be removed in the future.
    comments = [sv_util.ustr(c).strip() for c in sv.comments(soup)]
tests/test_api.py::TestSoupSieve::test_compiled_comments
  /builddir/build/BUILD/soupsieve-1.9.1/tests/test_api.py:88: DeprecationWarning: 'comments' is deprecated. 'comments' is not related to CSS selectors and will be removed in the future.
    comments = [sv_util.ustr(c).strip() for c in pattern.comments(soup)]
tests/test_api.py::TestSoupSieve::test_compiled_icomments
  /builddir/build/BUILD/soupsieve-1.9.1/tests/test_api.py:113: DeprecationWarning: 'icomments' is deprecated. 'icomments' is not related to CSS selectors and will be removed in the future.
    comments = [sv_util.ustr(c).strip() for c in pattern.icomments(soup, limit=2)]
tests/test_api.py::TestSoupSieve::test_icomments
  /builddir/build/BUILD/soupsieve-1.9.1/tests/test_api.py:61: DeprecationWarning: 'icomments' is deprecated. 'icomments' is not related to CSS selectors and will be removed in the future.
    comments = [sv_util.ustr(c).strip() for c in sv.icomments(soup, limit=2)]
tests/test_api.py::TestInvalid::test_invalid_type_input_comments
tests/test_api.py::TestInvalidQuirks::test_invalid_type_input_comments
  /builddir/build/BUILD/soupsieve-1.9.1/tests/test_api.py:704: DeprecationWarning: 'comments' is deprecated. 'comments' is not related to CSS selectors and will be removed in the future.
    sv.comments('div', "not a tag", flags=flags)
-- Docs: https://docs.pytest.org/en/latest/warnings.html
== 2 failed, 645 passed, 2 skipped, 1 deselected, 6 warnings in 5.95 seconds ===

Comment 15 Kevin Fenzi 2019-08-14 22:36:18 UTC
To be clear, those test failures happen to this package now on rawhide... can you fix them up?

Comment 16 Zbigniew Jędrzejewski-Szmek 2019-08-16 06:41:42 UTC
I'm don't know who is "you" here. I started looking into those errors, but I didn't find any obvious solution. I'll return to it once I'm back from vacation.

Comment 17 Miro Hrončok 2019-08-17 08:29:28 UTC
BTW python-beautifulsoup4 is failing with:

BUILDSTDERR: ======================================================================
BUILDSTDERR: FAIL: test_nested_namespaces (tests.test_lxml.LXMLXMLTreeBuilderSmokeTest)
BUILDSTDERR: ----------------------------------------------------------------------
BUILDSTDERR: Traceback (most recent call last):
BUILDSTDERR:   File "bs4/testing.py", line 665, in test_nested_namespaces
BUILDSTDERR:     self.assertEqual(doc, soup.encode())
BUILDSTDERR: AssertionError: '<?xml version="1.0" encoding="utf-8"?>\n<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">\n<parent xmlns="http://ns1/">\n<child xmlns="http://ns2/" xmlns:ns3="http://ns3/">\n<grandchild ns3:attr="value" xmlns="http://ns4/"/>\n</child>\n</parent>' != '<?xml version="1.0" encoding="utf-8"?>\n<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">\n<parent xmlns:="http://ns1/">\n<child xmlns:="http://ns2/" xmlns:ns3="http://ns3/">\n<grandchild ns3:attr="value" xmlns:="http://ns4/"/>\n</child>\n</parent>'
BUILDSTDERR: ======================================================================
BUILDSTDERR: FAIL: test_real_xhtml_document (tests.test_lxml.LXMLXMLTreeBuilderSmokeTest)
BUILDSTDERR: A real XHTML document should come out *exactly* the same as it went in.
BUILDSTDERR: ----------------------------------------------------------------------
BUILDSTDERR: Traceback (most recent call last):
BUILDSTDERR:   File "bs4/testing.py", line 654, in test_real_xhtml_document
BUILDSTDERR:     soup.encode("utf-8"), markup)
BUILDSTDERR: AssertionError: '<?xml version="1.0" encoding="utf-8"?>\n<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN">\n<html xmlns:="http://www.w3.org/1999/xhtml">\n<head><title>Hello.</title></head>\n<body>Goodbye.</body>\n</html>' != '<?xml version="1.0" encoding="utf-8"?>\n<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN">\n<html xmlns="http://www.w3.org/1999/xhtml">\n<head><title>Hello.</title></head>\n<body>Goodbye.</body>\n</html>'
BUILDSTDERR: ----------------------------------------------------------------------
BUILDSTDERR: Ran 476 tests in 2.288s
BUILDSTDERR: FAILED (failures=2)
BUILDSTDERR: error: Bad exit status from /var/tmp/rpm-tmp.fHaY2V (%check)
BUILDSTDERR:     Bad exit status from /var/tmp/rpm-tmp.fHaY2V (%check)

Since lxml 4.4 https://apps.fedoraproject.org/koschei/build/6778909

Comment 18 Terje Røsten 2019-08-18 11:23:17 UTC
hi guys!

I have tested the beautifulsoup4 4.8.0 and python-soupsieve to 1.9.3 combo, it works fine with all tests enabled.

The problem is that beautifulsoup4 > 4.7.0 needs python-soupsieve.

I suggest these actions:

 1 - approve package and then import soupsieve with tests disabled (or error ignored), please push to fedora 31 too.
 2 - ping me, I then upgrade beautifulsoup4 to 4.8.0 in rawhide and f31.
 3 - rebuild soupsieve with tests enabled.

ok?

Comment 19 Zbigniew Jędrzejewski-Szmek 2019-08-18 12:07:39 UTC
Terje, could you submit the change for bs4 as PR in pagure? Then we know we are talking about the same thing ;)

When I try to build python-beautifulsoup4-4.8.0-1.fc31.src.rpm with python2-soupsieve-1.9.2-1.fc32.noarch, python3-soupsieve-1.9.2-1.fc32.noarch installed in rawhide mock, tests fail with:

======================================================================
FAIL: test_nested_namespaces (tests.test_lxml.LXMLXMLTreeBuilderSmokeTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "bs4/testing.py", line 841, in test_nested_namespaces
    self.assertEqual(doc, soup.encode())
AssertionError: '<?xml version="1.0" encoding="utf-8"?>\n<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">\n<parent xmlns="http://ns1/">\n<child xmlns="http://ns2/" xmlns:ns3="http://ns3/">\n<grandchild ns3:attr="value" xmlns="http://ns4/"/>\n</child>\n</parent>' != '<?xml version="1.0" encoding="utf-8"?>\n<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">\n<parent xmlns:="http://ns1/">\n<child xmlns:="http://ns2/" xmlns:ns3="http://ns3/">\n<grandchild ns3:attr="value" xmlns:="http://ns4/"/>\n</child>\n</parent>'

======================================================================
FAIL: test_real_xhtml_document (tests.test_lxml.LXMLXMLTreeBuilderSmokeTest)
A real XHTML document should come out *exactly* the same as it went in.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "bs4/testing.py", line 830, in test_real_xhtml_document
    soup.encode("utf-8"), markup)
AssertionError: '<?xml version="1.0" encoding="utf-8"?>\n<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN">\n<html xmlns:="http://www.w3.org/1999/xhtml">\n<head><title>Hello.</title></head>\n<body>Goodbye.</body>\n</html>' != '<?xml version="1.0" encoding="utf-8"?>\n<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN">\n<html xmlns="http://www.w3.org/1999/xhtml">\n<head><title>Hello.</title></head>\n<body>Goodbye.</body>\n</html>'

----------------------------------------------------------------------

And the failure seems valid:
>>> print(s1)
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<parent xmlns="http://ns1/">
<child xmlns="http://ns2/" xmlns:ns3="http://ns3/">
<grandchild ns3:attr="value" xmlns="http://ns4/"/>
</child>
</parent>
>>> print(s2)
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<parent xmlns:="http://ns1/">
<child xmlns:="http://ns2/" xmlns:ns3="http://ns3/">
<grandchild ns3:attr="value" xmlns:="http://ns4/"/>
</child>
</parent>

Note the xmlns:="..." assignments.

That said, I think we should build python-soupsieve in rawhide, i.e. do the step 1. from the list in previous comment.
@Miro, could you approve the package? We'll figure out the test failures later.

Comment 20 Zbigniew Jędrzejewski-Szmek 2019-08-18 12:09:36 UTC
Updated to latest version and with test results ignored:

Spec URL: https://in.waw.pl/~zbyszek/fedora/python-soupsieve.spec
SRPM URL: https://in.waw.pl/~zbyszek/fedora/python-soupsieve-1.9.2-1.fc31.src.rpm

Comment 21 Miro Hrončok 2019-08-18 12:10:55 UTC
I don't like the || : in %check. Could you bcond tests out instead?

Comment 22 Zbigniew Jędrzejewski-Szmek 2019-08-18 12:55:25 UTC
Updated in place with %bcond_with tests.

Comment 24 Miro Hrončok 2019-08-18 15:02:28 UTC
I won't be able to review this today.

Among other things, my mock is broken after f31 branching.

Comment 25 Zbigniew Jędrzejewski-Szmek 2019-08-18 19:25:15 UTC
Try 'sed -i s/30/32/g /etc/mock/fedora-rawhide-x86_64.cfg'. This worked here.

Comment 26 Miro Hrončok 2019-08-19 09:59:13 UTC
Package Review
==============

Package APPROVED.

Legend:
[x] = Pass, [!] = Fail, [-] = Not applicable, [?] = Not evaluated

Issues:
=======
- Package must not depend on deprecated() packages.
  Note: python2-devel is deprecated, you must not depend on it.
  Exception granted via https://pagure.io/fesco/issue/2145


===== MUST items =====

Generic:
[x]: Package is licensed with an open-source compatible license and meets
     other legal requirements as defined in the legal section of Packaging
     Guidelines.
[x]: License field in the package spec file matches the actual license.
     Note: Checking patched sources after %prep for licenses. Licenses
     found: "Unknown or generated", "Expat License".
[x]: License file installed when any subpackage combination is installed.
[x]: Package contains no bundled libraries without FPC exception.
[x]: Changelog in prescribed format.
[x]: Sources contain only permissible code or content.
[-]: Package contains desktop file if it is a GUI application.
[-]: Development files must be in a -devel package
[x]: Package uses nothing in %doc for runtime.
[x]: Package consistently uses macros (instead of hard-coded directory
     names).
[x]: Package is named according to the Package Naming Guidelines.
[x]: Package does not generate any conflict.
[x]: Package obeys FHS, except libexecdir and /usr/target.
[-]: If the package is a rename of another package, proper Obsoletes and
     Provides are present.
[x]: Requires correct, justified where necessary.
[x]: Spec file is legible and written in American English.
[-]: Package contains systemd file(s) if in need.
[x]: Package is not known to require an ExcludeArch tag.
[-]: Large documentation must go in a -doc subpackage. Large could be size
     (~1MB) or number of files.
     Note: Documentation size is 20480 bytes in 2 files.
[x]: Package complies to the Packaging Guidelines
[x]: Package successfully compiles and builds into binary rpms on at least
     one supported primary architecture.
[x]: Package installs properly.
[x]: Rpmlint is run on all rpms the build produces.
     Note: No rpmlint messages.
[x]: If (and only if) the source package includes the text of the
     license(s) in its own file, then that file, containing the text of the
     license(s) for the package is included in %license.
[x]: Package requires other packages for directories it uses.
[x]: Package must own all directories that it creates.
[x]: Package does not own files or directories owned by other packages.
[x]: Package uses either %{buildroot} or $RPM_BUILD_ROOT
[x]: Package does not run rm -rf %{buildroot} (or $RPM_BUILD_ROOT) at the
     beginning of %install.
[x]: Macros in Summary, %description expandable at SRPM build time.
[x]: Dist tag is present.
[x]: Package does not contain duplicates in %files.
[x]: Permissions on files are set properly.
[x]: Package use %makeinstall only when make install DESTDIR=... doesn't
     work.
[x]: Package is named using only allowed ASCII characters.
[x]: Package does not use a name that already exists.
[x]: Package is not relocatable.
[x]: Sources used to build the package match the upstream source, as
     provided in the spec URL.
[x]: Spec file name must match the spec package %{name}, in the format
     %{name}.spec.
[x]: File names are valid UTF-8.
[x]: Packages must not store files under /srv, /opt or /usr/local

Python:
[x]: Python eggs must not download any dependencies during the build
     process.
[x]: A package which is used by another package via an egg interface should
     provide egg info.
[!]: Package meets the Packaging Guidelines::Python - Python 2 exception granted
[x]: Package contains BR: python2-devel or python3-devel
[x]: Packages MUST NOT have dependencies (either build-time or runtime) on
     packages named with the unversioned python- prefix unless no properly
     versioned package exists. Dependencies on Python packages instead MUST
     use names beginning with python2- or python3- as appropriate.
[x]: Python packages must not contain %{pythonX_site(lib|arch)}/* in %files
[x]: Binary eggs must be removed in %prep

===== SHOULD items =====

Generic:
[-]: If the source package does not include license text(s) as a separate
     file from upstream, the packager SHOULD query upstream to include it.
[x]: Final provides and requires are sane (see attachments).
[-]: Fully versioned dependency in subpackages if applicable.
[?]: Package functions as described.
[?]: Latest version is packaged.
[-]: Package does not include license text files separate from upstream.
[-]: Description and summary sections in the package spec file contains
     translations for supported Non-English languages, if available.
[?]: Package should compile and build into binary rpms on all supported
     architectures.
[-]: %check is present and all tests pass.
[?]: Packages should try to preserve timestamps of original installed
     files.
[x]: Reviewer should test that the package builds in mock.
[x]: Buildroot is not present
[x]: Package has no %clean section with rm -rf %{buildroot} (or
     $RPM_BUILD_ROOT)
[x]: No file requires outside of /etc, /bin, /sbin, /usr/bin, /usr/sbin.
[x]: Packager, Vendor, PreReq, Copyright tags should not be in spec file
[x]: Sources can be downloaded from URI in Source: tag
[x]: SourceX is a working URL.
[x]: Spec use %global instead of %define unless justified.

===== EXTRA items =====

Generic:
[x]: Rpmlint is run on all installed packages.
     Note: There are rpmlint messages (see attachment).
[x]: Spec file according to URL is the same as in SRPM.


Rpmlint
-------
Checking: python2-soupsieve-1.9.2-1.fc31.noarch.rpm
          python3-soupsieve-1.9.2-1.fc31.noarch.rpm
          python-soupsieve-1.9.2-1.fc31.src.rpm
3 packages and 0 specfiles checked; 0 errors, 0 warnings.




Rpmlint (installed packages)
----------------------------
python2-soupsieve.noarch: W: invalid-url URL: https://github.com/facelessuser/soupsieve <urlopen error [Errno -2] Name or service not known>
python3-soupsieve.noarch: W: invalid-url URL: https://github.com/facelessuser/soupsieve <urlopen error [Errno -2] Name or service not known>
2 packages and 0 specfiles checked; 0 errors, 2 warnings.

False hit, no internet in my mock.

Source checksums
----------------
https://github.com/facelessuser/soupsieve/archive/1.9.2/python-soupsieve-1.9.2.tar.gz :
  CHECKSUM(SHA256) this package     : 355ebfafc7495eee6a5f292574ec896d2d4ad214fa653d93f16792b1c4e4f8e8
  CHECKSUM(SHA256) upstream package : 355ebfafc7495eee6a5f292574ec896d2d4ad214fa653d93f16792b1c4e4f8e8


Requires
--------
python2-soupsieve (rpmlib, GLIBC filtered):
    python(abi)
    python2.7dist(backports.functools-lru-cache)
    python2dist(backports.functools-lru-cache)

python3-soupsieve (rpmlib, GLIBC filtered):
    python(abi)



Provides
--------
python2-soupsieve:
    python2-soupsieve
    python2.7dist(soupsieve)
    python2dist(soupsieve)

python3-soupsieve:
    python-soupsieve
    python3-soupsieve
    python3.7dist(soupsieve)
    python3dist(soupsieve)

Comment 27 Zbigniew Jędrzejewski-Szmek 2019-08-19 14:06:38 UTC
Thanks!

Comment 28 Gwyn Ciesla 2019-08-19 14:34:47 UTC
(fedscm-admin):  The Pagure repository was created at https://src.fedoraproject.org/rpms/python-soupsieve

Comment 29 Zbigniew Jędrzejewski-Szmek 2019-08-19 20:36:14 UTC
Built in rawhide and branched.

Comment 30 Zbigniew Jędrzejewski-Szmek 2019-08-19 20:37:46 UTC
Terje, please update bs4.

Comment 31 Terje Røsten 2019-08-19 21:03:21 UTC
bs4 4.8.0 in rawhide + f31 now.

Comment 32 Zbigniew Jędrzejewski-Szmek 2019-08-19 21:24:13 UTC
We fucked this up. bs4 and soupsieve BR each other, so boostrap in f32-python doesn't work.

Comment 33 Miro Hrončok 2019-08-19 21:36:39 UTC
But not beyond all recognition: https://src.fedoraproject.org/rpms/python-soupsieve/c/8548ee4e3735cbd73c0b6aa63dc9626e7abbcd89?branch=master

beautifulsoup4 built.

Comment 34 Zbigniew Jędrzejewski-Szmek 2019-08-19 21:39:35 UTC
I see you also built soupsieve. Nice.


Note You need to log in before you can comment on or make changes to this bug.