Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 2095974 - Review Request: python-openapi-schema-validator - OpenAPI schema validator for Python
Summary: Review Request: python-openapi-schema-validator - OpenAPI schema validator fo...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Maxwell G
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On: 2095005
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-06-11 14:09 UTC by Ben Beasley
Modified: 2022-07-07 00:45 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-07-07 00:45:09 UTC
Type: ---
Embargoed:
maxwell: fedora-review+


Attachments (Terms of Use)

Description Ben Beasley 2022-06-11 14:09:42 UTC
Spec URL: https://music.fedorapeople.org/python-openapi-schema-validator.spec
SRPM URL: https://music.fedorapeople.org/python-openapi-schema-validator-0.2.3-1.fc36.src.rpm

Description:

Openapi-schema-validator is a Python library that validates schema against:

  • OpenAPI Schema Specification v3.0 which is an extended subset of the JSON
    Schema Specification Wright Draft 00.
  • OpenAPI Schema Specification v3.1 which is an extended superset of the JSON
    Schema Specification Draft 2020-12.

Fedora Account System Username: music

COPR builds:

F37: https://copr.fedorainfracloud.org/coprs/music/moto/build/4510808/

Comment 1 Maxwell G 2022-06-29 03:23:33 UTC
The %py3_dist and description comments from https://bugzilla.redhat.com/show_bug.cgi?id=2095005#c1 also apply here.

It might be worthwhile to note that the license is specifically the BSD 3-Clause variant in a comment above the license field so you can easily change it when we transition to SPDX license identifiers.

The LICENSE file is duplicated in `%{python3_sitelib}` but not automatically marked with %license. I'm not sure if this is a poetry (configuration or in general) or a pyproject-rpm-macros bug.

Comment 2 Maxwell G 2022-06-29 03:24:11 UTC
Package Review
==============

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



===== 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: There is no build directory. Running licensecheck on vanilla
     upstream sources. No licenses found. Please check the source files for
     licenses manually.
[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.
[x]: 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 10240 bytes in 1 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: There are rpmlint messages (see attachment).
[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 must not depend on deprecated() packages.
[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:
[ ]: Binary eggs must be removed in %prep
     Note: Cannot find any build in BUILD directory (--prebuilt option?)
[ ]: Python eggs must not download any dependencies during the build
     process.
[ ]: A package which is used by another package via an egg interface should
     provide egg info.
[ ]: 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

===== 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.
     Note: No Requires: %{name}%{?_isa} = %{version}-%{release} in
     python3-openapi-schema-validator , python3-openapi-schema-
     validator+rfc3339-validator , python3-openapi-schema-validator+strict-
     rfc3339 , python3-openapi-schema-validator+isodate
The is a noarch package.
[?]: Package functions as described.
[!]: Latest version is packaged.
https://github.com/p1c2u/openapi-schema-validator/releases/tag/0.3.0
[x]: Package does not include license text files separate from upstream.
[-]: Sources are verified with gpgverify first in %prep if upstream
     publishes signatures.
     Note: gpgverify is not used.
[x]: Package should compile and build into binary rpms on all supported
     architectures.
Submitter included a COPR with builds for all arches!
[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
-------
Cannot parse rpmlint output:


Rpmlint (installed packages)
----------------------------
Cannot parse rpmlint output:


Source checksums
----------------
https://github.com/p1c2u/openapi-schema-validator/archive/0.2.3/openapi-schema-validator-0.2.3.tar.gz :
  CHECKSUM(SHA256) this package     : 3e4a2a53d8302127aefbee02c8784b3e648f8a5dd71f757aa98c83dc1a09a705
  CHECKSUM(SHA256) upstream package : 3e4a2a53d8302127aefbee02c8784b3e648f8a5dd71f757aa98c83dc1a09a705


Requires
--------
python3-openapi-schema-validator (rpmlib, GLIBC filtered):
    (python3.11dist(jsonschema) < 5~~ with python3.11dist(jsonschema) >= 3)
    python(abi)

python3-openapi-schema-validator+rfc3339-validator (rpmlib, GLIBC filtered):
    python(abi)
    python3-openapi-schema-validator
    python3.11dist(rfc3339-validator)

python3-openapi-schema-validator+strict-rfc3339 (rpmlib, GLIBC filtered):
    python(abi)
    python3-openapi-schema-validator
    python3.11dist(strict-rfc3339)

python3-openapi-schema-validator+isodate (rpmlib, GLIBC filtered):
    python(abi)
    python3-openapi-schema-validator
    python3.11dist(isodate)



Provides
--------
python3-openapi-schema-validator:
    python-openapi-schema-validator
    python3-openapi-schema-validator
    python3.11-openapi-schema-validator
    python3.11dist(openapi-schema-validator)
    python3dist(openapi-schema-validator)

python3-openapi-schema-validator+rfc3339-validator:
    python-openapi-schema-validator+rfc3339-validator
    python3-openapi-schema-validator+rfc3339-validator
    python3.11-openapi-schema-validator+rfc3339-validator
    python3.11dist(openapi-schema-validator[rfc3339-validator])
    python3dist(openapi-schema-validator[rfc3339-validator])

python3-openapi-schema-validator+strict-rfc3339:
    python-openapi-schema-validator+strict-rfc3339
    python3-openapi-schema-validator+strict-rfc3339
    python3.11-openapi-schema-validator+strict-rfc3339
    python3.11dist(openapi-schema-validator[strict-rfc3339])
    python3dist(openapi-schema-validator[strict-rfc3339])

python3-openapi-schema-validator+isodate:
    python-openapi-schema-validator+isodate
    python3-openapi-schema-validator+isodate
    python3.11-openapi-schema-validator+isodate
    python3.11dist(openapi-schema-validator[isodate])
    python3dist(openapi-schema-validator[isodate])



Generated by fedora-review 0.8.0 (e988316) last change: 2022-04-07
Command line :/usr/bin/fedora-review -b 2095974 -L /home/gotmax/Sync/git-repos/packaging/fedora_rpms/review.repos/2095005-python-rfc3339-validator/results/repo
Buildroot used: fedora-rawhide-x86_64
Active plugins: Shell-api, Python, Generic
Disabled plugins: Java, PHP, Perl, Haskell, C/C++, SugarActivity, Ocaml, fonts, R
Disabled flags: EPEL6, EPEL7, DISTTAG, BATCH, EXARCH

Built with local dependencies:
    /home/gotmax/Sync/git-repos/packaging/fedora_rpms/review.repos/2095005-python-rfc3339-validator/results/repo/python3-rfc3339-validator-0.1.4-1.fc37.noarch.rpm

Comment 3 Ben Beasley 2022-06-29 14:06:26 UTC
Thank you for the review!

-----

> The %py3_dist and description comments from https://bugzilla.redhat.com/show_bug.cgi?id=2095005#c1 also apply here.

For the reasons noted in bug 2095005, I’ll opt to leave the dependencies as they are, and I’ll fix the descriptions.

-----

> It might be worthwhile to note that the license is specifically the BSD 3-Clause variant in a comment above the license field so you can easily change it when we transition to SPDX license identifiers.

You’re right; it’s a drop in the bucket of license files I’ll have to audit and classify, but I might as well start here.

-----

> The LICENSE file is duplicated in `%{python3_sitelib}` but not automatically marked with %license. I'm not sure if this is a poetry (configuration or in general) or a pyproject-rpm-macros bug.

The pyproject-rpm-macros automatically mark license files in dist-info if and only if they have been listed as “License-File” in the metadata, and this is the responsibility of the build system selected by upstream—in this case, poetry-core. However, since this metadata field is defined from PEP 639[1], which is still in draft status, support is quite uneven.

- While setuptools usually “gets it right” in common cases with typically-named license files, there are still issues[2]; the result should still be manually verified with “rpm -qL -p …”; and in my opinion, we can’t really assign too much blame to Python package upstreams when setuptools’s magic doesn’t work out.
- The relevant support in poetry seems to be stalled for now[3].
- In hatchling, the support is there, but upstream wants to wait to enable it until PyPI supports core metadata version 2.3[4].
- I’m not sure what the status of support in other systems like flit/flit-core is.

So, overall, this is mostly at the mercy of PEP 639 finalization and the choices of various Python build system upstreams, and we can expect that a large minority of packages will still need manual %license entries and duplicate license files for the time being.

-----

New Spec URL: https://music.fedorapeople.org/20220629/python-openapi-schema-validator.spec
New SRPM URL: https://music.fedorapeople.org/20220629/python-openapi-schema-validator-0.2.3-1.fc36.src.rpm

[1] https://peps.python.org/pep-0639/
[2] https://github.com/pypa/setuptools/issues/2739
[3] https://github.com/python-poetry/poetry/issues/1350
[4] https://github.com/pypa/hatch/issues/193

Comment 4 Ben Beasley 2022-06-29 14:08:19 UTC
Hmm, I just noticed:

> [!]: Latest version is packaged.
> https://github.com/p1c2u/openapi-schema-validator/releases/tag/0.3.0

It seems this was released in the last few days. Please expect another update shortly with the latest version.

Comment 5 Ben Beasley 2022-06-29 16:07:47 UTC
Upstream release notes: https://github.com/p1c2u/openapi-schema-validator/releases/tag/0.3.0
Upstream source diff: https://github.com/p1c2u/openapi-schema-validator/compare/0.2.3...0.3.0

New Spec URL: https://music.fedorapeople.org/20220629_2/python-openapi-schema-validator.spec
New SRPM URL: https://music.fedorapeople.org/20220629_2/python-openapi-schema-validator-0.3.0-1.fc36.src.rpm

COPR builds:

F37: https://copr.fedorainfracloud.org/coprs/music/moto/build/4586070/

-----

Note that I have investigated the DeprecationWarning messages in the tests, and I have confirmed that the deprecated <validator>.iter_errors(…, schema=<not None>) call is happening only inside the jsonschema implementation, as a result of calls to <validator>.validate(instance, schema), which is *not* deprecated. There is therefore nothing for *this* package’s upstream to fix. Presumably jsonschema’s upstream will respect their own deprecation in due time.

Comment 6 Maxwell G 2022-06-29 17:59:49 UTC
Package approved! Thanks for addressing the issues I brought up and for the license file explanation. I thought it was something about poetry not supporting it to begin with, but I wasn't sure about the specifics.

Comment 7 Ben Beasley 2022-07-06 12:58:42 UTC
Thank you for the careful review!

Repository requested: https://pagure.io/releng/fedora-scm-requests/issue/45525

Comment 8 Gwyn Ciesla 2022-07-06 21:00:23 UTC
(fedscm-admin):  The Pagure repository was created at https://src.fedoraproject.org/rpms/python-openapi-schema-validator

Comment 9 Fedora Update System 2022-07-07 00:43:29 UTC
FEDORA-2022-62f2e4c7a6 has been submitted as an update to Fedora 37. https://bodhi.fedoraproject.org/updates/FEDORA-2022-62f2e4c7a6

Comment 10 Fedora Update System 2022-07-07 00:45:09 UTC
FEDORA-2022-62f2e4c7a6 has been pushed to the Fedora 37 stable repository.
If problem still persists, please make note of it in this bug report.


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