Bug 2545828 - Review Request: python-pfzy - Python port of the fzy fuzzy string matching algorithm
Summary: Review Request: python-pfzy - Python port of the fzy fuzzy string matching al...
Keywords:
Status: NEW
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Nobody's working on this, feel free to take it
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2026-10-05 08:22 UTC by Clement Verna
Modified: 2026-10-21 14:08 UTC (History)
1 user (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Clement Verna 2026-10-05 08:22:25 UTC
Spec URL:   https://cverna.fedorapeople.org/rpms/python-pfzy/python-pfzy.spec
SRPM URL:   https://cverna.fedorapeople.org/rpms/python-pfzy/python-pfzy-0.3.4-1.fc46.src.rpm
rpmlint:    https://cverna.fedorapeople.org/rpms/python-pfzy/rpmlint.txt
Source URL: https://github.com/kazhala/pfzy/archive/0.3.4/pfzy-0.3.4.tar.gz
            https://github.com/kazhala/pfzy

Fedora Account System Username: cverna

Package Name:    python-pfzy
Version:         0.3.4
Release:         1%{?dist}
License:         MIT
URL:             https://github.com/kazhala/pfzy
BuildArch:       noarch
Binary RPM:      python3-pfzy

Description:
Python port of the fzy fuzzy string matching algorithm.
It provides an asynchronous fuzzy match function, the fzy scoring algorithm
and a simple exact-match scorer, all of them returning the matched positions.

Why it is being packaged:
python-pfzy is a runtime dependency of python-inquirerpy, which in turn is a
runtime dependency of lola (https://github.com/LobsterTrap/lola). Neither exists in Fedora today.

Source checksums (sha256):
4a36126e045da6471c53e9ea36424296307a1841bd828a41574d7a4aa58dbcea  pfzy-0.3.4.tar.gz

The archive of the release tag is used rather than the PyPI sdist, as the
Python packaging guidelines ask ("Source files from PyPI"): the sdist omits
the test suite that the tag archive ships.

Build:
mock -r fedora-rawhide-aarch64 (aarch64), Fedora Rawhide (f46): builds clean.
%check runs upstream's pytest suite from tests/: 6 tests pass, two of them
async (hence BuildRequires: python3dist(pytest-asyncio)).

The suite is invoked as "%pytest tests" so that the --doctest-modules option
upstream sets in pyproject.toml does not collect the legacy setup.py at the
repository root.

The tag archive is used as Source precisely because it carries these tests,
which the PyPI sdist omits (Python packaging guidelines, "Source files from
PyPI").

rpmlint output (also attached, python-pfzy-rpmlint.txt):
  spec:    0 errors, 0 warnings
  srpm:    0 errors, 0 warnings
  binary:  0 errors, 0 warnings

Self-review against ReviewGuidelines.adoc:
- rpmlint: run on spec, srpm and binary rpm, output above.
- naming: python-* prefix for a library, source name is the canonical project
  name with the python- prefix (Python guidelines, "Library naming").
- spec file name matches %{name}: python-pfzy.spec.
- spec written in American English, summary <= 80 columns, no trailing period.
- license: MIT, matches the LICENSE file in the sdist; installed as %license
  through %pyproject_save_files -l (a missing license file fails the build).
- sources match upstream (sha256 above).
- builds successfully on aarch64.
- BuildRequires: python3-devel (plus pyproject-rpm-macros, setuptools/poetry
  backend pulled in by %pyproject_buildrequires).
- no locales, no bundled libraries, no shared libraries, no scriptlets.
- %files: %{pyproject_files} (modules, dist-info, license) plus %doc README.md;
  the package owns only directories under %{python3_sitelib}.
- man page: not applicable, the package ships no executables.


Assisted-by: AI

Comment 1 ergün 2026-10-21 14:08:37 UTC
This is an informal review; I am not a sponsored packager yet, so I cannot
set the fedora-review flag.

I rebuilt the SRPM in a fedora:rawhide container (Python 3.15) and checked:

- Source matches upstream: SHA256 4a36126e045da6471c53e9ea36424296307a1841bd828a41574d7a4aa58dbcea
  for both the tarball in the SRPM and
  https://github.com/kazhala/pfzy/archive/0.3.4/pfzy-0.3.4.tar.gz
- 0.3.4 is the latest upstream release (GitHub and PyPI)
- License: MIT. LICENSE is the MIT text, licensecheck finds nothing else,
  and the file is installed through %pyproject_save_files -l
- Not already packaged in Fedora (no python3dist(pfzy) in rawhide)
- Builds; %check passes (6 tests)
- rpmlint on the SRPM and the noarch RPM: 0 errors, 0 warnings
- Requires is only python(abi) = 3.15, which matches upstream (no runtime
  dependencies); Provides are sane
- The package owns %{python3_sitelib}/pfzy and its dist-info; README.md is in %doc
- It installs, and works as described:
    asyncio.run(pfzy.fuzzy_match("ab", ["abc", "xyz", "aXb"]))
    -> [{'value': 'abc', 'indices': [0, 1]}, {'value': 'aXb', 'indices': [0, 2]}]

Suggestions (none of them blocking):

1. The modules have doctests (pfzy/match.py, pfzy/score.py), and upstream
   enables them with --doctest-modules. Scoping %check to tests/ skips them.
   With

       %pytest tests pfzy

   setup.py is still not collected, and the doctests run as well: 12 tests
   pass instead of 6 (verified with a local rebuild).

2. Consider adding %pyproject_check_import to %check.

3. Minor: the BuildRequires are under %package -n python3-pfzy. That works,
   but they are usually placed in the main preamble.

Otherwise the package looks good to me.


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