Spec URL: https://gitlab.com/jyrj/python-fastapi-pagination/-/raw/main/python-fastapi-pagination.spec SRPM URL: https://gitlab.com/jyrj/python-fastapi-pagination/-/raw/main/python-fastapi_pagination-0.15.1-1.fc43.src.rpm Description: FastAPI Pagination provides extensible, efficient pagination utilities for FastAPI applications. It supports multiple pagination styles and includes adapters for various ORMs (SQLAlchemy, Tortoise, etc). The package builds cleanly and works with Python 3.14 and FastAPI 0.114+. Fedora Account System Username: jyrj
Additional Notes for Reviewer: Upstream test suite requires many optional, un-packaged Python dependencies (faker, dirty-equals, asyncpg, tortoise-orm, etc), as well as pytest database plugins. These optional dependencies are not required for the library's core functionality. Following Fedora Python SIG recommendations, the full upstream test suite was skipped. The package successfully builds in mock on Rawhide: mock -r fedora-rawhide-x86_64 python-fastapi_pagination-0.15.1-1.fc44.src.rpm No bundling, no compiled extensions, pure Python (noarch). Rationale for Inclusion in Fedora: FastAPI is widely used for modern Python web applications. fastapi-pagination is a popular extension package used in production APIs and is a valuable addition to Fedora’s Python ecosystem.
Copr build: https://copr.fedorainfracloud.org/coprs/build/9864664 (succeeded) Review template: https://download.copr.fedorainfracloud.org/results/@fedora-review/fedora-review-2418764-python-fastapi_pagination/fedora-rawhide-x86_64/09864664-python-fastapi_pagination/fedora-review/review.txt Please take a look if any issues were found. --- This comment was created by the fedora-review-service https://github.com/FrostyX/fedora-review-service If you want to trigger a new Copr build, add a comment containing new Spec and SRPM URLs or [fedora-review-service-build] string.
I am a new contributor and would like to request sponsorship as part of this package review.
fedora-review-service-build
Spec URL: https://gitlab.com/jyrj/python-fastapi-pagination/-/raw/main/python-fastapi-pagination.spec SRPM URL: https://gitlab.com/jyrj/python-fastapi-pagination/-/raw/main/python-fastapi_pagination-0.15.1-1.fc43.src.rpm [fedora-review-service-build] This is for generating a report, because the initial report was showing a 404 Not Found error
Copr build: https://copr.fedorainfracloud.org/coprs/build/9877905 (succeeded) Review template: https://download.copr.fedorainfracloud.org/results/@fedora-review/fedora-review-2418764-python-fastapi_pagination/fedora-rawhide-x86_64/09877905-python-fastapi_pagination/fedora-review/review.txt Please take a look if any issues were found. --- This comment was created by the fedora-review-service https://github.com/FrostyX/fedora-review-service If you want to trigger a new Copr build, add a comment containing new Spec and SRPM URLs or [fedora-review-service-build] string.
if you're skipping the tests, it doesn't really make sense to include BuildRequires for them, I don't think. You should at least include the minimal import check test - https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#pyproject_check_import . At least according to the docs, %pyproject_buildrequires is supposed to include runtime requirements: "-r: Include run-time requirements (this flag is not needed and exists for backward-compatibility reasons only, run-time requirements are included by default)." Does it not find those three run-time dependencies? If not, I wonder why not... aside from that this looks fairly good to me, but I'm not a sponsor so I can't sponsor you unfortunately.
> %pyproject_buildrequires is supposed to include runtime requirements It indeed does: $ rpm -qRp python-fastapi_pagination-0.15.1-1.fc44.src.rpm ... python3dist(fastapi) python3dist(fastapi) >= 0.93 ... python3dist(pydantic) python3dist(pydantic) >= 1.9.1 ... python3dist(typing-extensions) python3dist(typing-extensions) >= 4.8 ... Those dependencies MUST/SHOULD NOT be duplicated by manual dependencies in the spec file. https://docs.fedoraproject.org/en-US/packaging-guidelines/#_package_dependencies (says MUST NOT) https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#Automatically-generated-dependencies (says SHOULD NOT) > You should at least include the minimal import check test... Indeed, the guidelines actually mandate that: https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#_tests """ If a test suite exists upstream, it SHOULD be run in the %check section. If that is not possible with reasonable effort, at least a basic smoke test (such as importing the packaged module) MUST be run in %check. """ -------------- A couple of notes about the spec file: > %global srcname fastapi_pagination > %global importname fastapi_pagination OPINIONATED: I highly recommend avoiding that indirection. It makes the spec file harder to read. No guidelines prevent you from doing it, and if you prefer it this way, feel free to do so, but in my experience, it adds no benefit. > Name: python-%{srcname} > ... > %package -n python3-%{srcname} Hard to see, but this expands to python-fastapi_pagination and python3-fastapi_pagination SHOULD: Rename the package to python-fastapi-pagination with a python3-fastapi-pagination subpackage. https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#_library_naming """ If possible, the project name SHOULD be the same as the name of the main importable module, in lowercase, with underscores (_) replaced by dashes (-). """ > Release: 1%{?dist} > ... > > %changelog > * Wed Dec 03 2025 Jayaraj <jayarajevur> - 0.15.1-1 > - Initial Fedora package for fastapi-pagination SHOULD: The changelog should be generated automatically from git commit logs using the %autochangelog macro. https://docs.fedoraproject.org/en-US/packaging-guidelines/#changelogs > Source0: %{pypi_source %{srcname} %{version}} REDUNDANCY: There is no need to number a sole source. a Source: without the zero would do. There is no need to supply the version to %{pypi_source ...}. > BuildRequires: pyproject-rpm-macros REDUNDANCY: There is no need to BuildRequire this. No guidelines mandate that. The README for pyproject-rpm-macros explicitly says you should BuildRequire python3-devel to gett he macros on Fedora and EPEL 9+ (and this specfile does not work on EPEL < 9 anyway as it uses %generate_buildrequires). > %description > FastAPI Pagination provides easy, extensible pagination for FastAPI > applications. It supports ORM models including SQLAlchemy, Tortoise ORM, > and async DB layers, with multiple pagination strategies like limit-offset > and cursor pagination. > ... > %description -n python3-%{srcname} > FastAPI Pagination provides utilities for paginating API responses in FastAPI > applications with support for multiple ORMs and custom page types. QUESTION: Why do the descriptions differ? > %autosetup -n %{srcname}-%{version} SUGGESTION: Consider using -p1 from the start. It will make it easier to backport patches in the future. > %check > echo "Skipping tests (require faker, dirty-equals, asyncpg, etc.)" MUST: As already said, please run some kind of check, even very simple one. OPINIONATED: When there is no check at all, do not include a %check section just to echo nothing is done. A presence of a %check section usually indicates some check is present. > %license LICENSE REDUNDANCY: The license file is already included in %{pyproject_files}. Consider adding the -l flag to %pyproject_save_files to help asseritng that. https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#pyproject_save_files Not in the specfile -- Python extras: https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#Extras """ Python packages SHOULD have Provides for all extras the upstream project specifies, except... """ There are a lot of extras defined upstream: https://github.com/uriyyo/fastapi-pagination/blob/0.15.2/pyproject.toml#L28 SHOULD: Add %pyproject_extras_subpkg -n python3-fastapi-pagination sqlmodel,sqlalchemy,databases,orm,... (excluding those with unavailable dependencies). OPINIONATED: Also add those to %pyproject_buildrequires -x to avoid building metapackages with broken runtime dependencies.
Spec URL: https://gitlab.com/jyrj/python-fastapi-pagination/-/raw/main/python-fastapi-pagination.spec SRPM URL: https://gitlab.com/jyrj/python-fastapi-pagination/-/raw/main/python-fastapi-pagination-0.15.1-1.fc43.src.rpm Description: FastAPI Pagination provides easy, extensible pagination for FastAPI applications with support for multiple ORMs and async DB layers. Fedora Account System Username: jyrj [fedora-review-service-build] --- @awilliam Thank you for the initial review. @mhroncok Thank you for the detailed and extremely educational feedback. I have updated the package accordingly. Please let me know if further adjustments are needed. ✔ Changes made in response to review comments - Removed manual runtime dependencies; now relying entirely on the dependencies generated by %pyproject_buildrequires (per MUST/SHOULD NOT guidelines). - Added the required smoke test using %pyproject_check_import, as mandated by the Python Packaging Guidelines. - Updated naming: Main package: python-fastapi-pagination Subpackage: python3-fastapi-pagination Following the library naming guidelines (underscores → dashes). - Unified descriptions for both packages via a shared macro. - Replaced manual changelog entries with %autochangelog. - Removed redundant BuildRequires: pyproject-rpm-macros since python3-devel already provides the macros. - Added -p1 to %autosetup as suggested. - Added -l to %pyproject_save_files so license handling is automatic. - Added extras support: %pyproject_extras_subpkg -n python3-fastapi-pagination sqlalchemy (Only SQLAlchemy is enabled because other extras depend on packages not yet available in Fedora.) - Did not create extras subpackages for missing dependencies (databases, sqlakeyset, tortoise, odmantic, etc.) to avoid generating broken metapackages. - Verified the package builds cleanly in mock (rawhide-x86_64) with all checks passing.
There seems to be some problem with the following file. SRPM URL: https://gitlab.com/jyrj/python-fastapi-pagination/-/raw/main/python-fastapi_pagination-0.15.1-1.fc43.src.rpm Fetching it results in a 404 Not Found error. Please make sure the URL is correct and publicly available. --- This comment was created by the fedora-review-service https://github.com/FrostyX/fedora-review-service If you want to trigger a new Copr build, add a comment containing new Spec and SRPM URLs or [fedora-review-service-build] string.
> We exclude the 'ext' folder Please document the WHY rather than the WHAT. In this case, e.g. "The ext module contains extensions with unavailable optional dependencies" > %pyproject_extras_subpkg -n python3-fastapi-pagination sqlalchemy A similar comment could be added here. Something like "Many other extras omitted due to unavailable dependencies." I also highly recommend using `%pyproject_buildrequires -x sqlalchemy` now, to ensure the sqlalchemy extra does not gain new unavailable dependencies when the package is updated in the future. Anyway, the spec file is looking very nice now, good job.
Spec URL: https://gitlab.com/jyrj/python-fastapi-pagination/-/raw/main/python-fastapi-pagination.spec SRPM URL: https://gitlab.com/jyrj/python-fastapi-pagination/-/raw/main/python-fastapi-pagination-0.15.1-1.fc43.src.rpm Description: FastAPI Pagination provides easy, extensible pagination for FastAPI applications with support for multiple ORMs and async DB layers. Fedora Account System Username: jyrj (In reply to Miro Hrončok from comment #11) Thanks for the review! I've updated the spec with the requested clarifications: • Added a comment in the %check section explaining WHY the `ext` folder is excluded: “The ext module contains extensions with optional dependencies not available in Fedora.” • Added a comment above %pyproject_extras_subpkg noting that only the sqlalchemy extra is enabled and that other extras are omitted due to unavailable dependencies. • Updated %generate_buildrequires to: %pyproject_buildrequires -x sqlalchemy so the sqlalchemy extra cannot silently gain new unavailable dependencies in future versions. Thanks again for the helpful guidance!
Copr build: https://copr.fedorainfracloud.org/coprs/build/9889793 (failed) Build log: https://download.copr.fedorainfracloud.org/results/@fedora-review/fedora-review-2418764-python-fastapi-pagination/fedora-rawhide-x86_64/09889793-python-fastapi-pagination/builder-live.log.gz Please make sure the package builds successfully at least for Fedora Rawhide. - If the build failed for unrelated reasons (e.g. temporary network unavailability), please ignore it. - If the build failed because of missing BuildRequires, please make sure they are listed in the "Depends On" field --- This comment was created by the fedora-review-service https://github.com/FrostyX/fedora-review-service If you want to trigger a new Copr build, add a comment containing new Spec and SRPM URLs or [fedora-review-service-build] string.
> %generate_buildrequires > # Exclude unavailable extras when generating build requirements so the package > # won't break in future updates if upstream adds new dependencies to the sqlalchemy extra. > %pyproject_buildrequires -x sqlalchemy This comment is a tad confusing. What about: # BuildRequire the dependencies of the packaged extras, # so the package won't break in future updates if upstream adds new dependencies to them. However, I don't think this comment is needed. This is a standard practice.
Spec URL: https://gitlab.com/jyrj/python-fastapi-pagination/-/raw/main/python-fastapi-pagination.spec SRPM URL: https://gitlab.com/jyrj/python-fastapi-pagination/-/raw/main/python-fastapi-pagination-0.15.1-1.fc43.src.rpm Description: FastAPI Pagination provides easy, extensible pagination for FastAPI applications with support for multiple ORMs and async DB layers. Fedora Account System Username: jyrj [fedora-review-service-build] --- (In reply to Miro Hrončok from comment #14) > > %generate_buildrequires > > # Exclude unavailable extras when generating build requirements so the package > > # won't break in future updates if upstream adds new dependencies to the sqlalchemy extra. > > %pyproject_buildrequires -x sqlalchemy > > This comment is a tad confusing. What about: > > # BuildRequire the dependencies of the packaged extras, > # so the package won't break in future updates if upstream adds new > dependencies to them. > > > However, I don't think this comment is needed. This is a standard practice. I have removed that comment. Thank you for the suggestion. I couldn't keep `%pyproject_buildrequires -x sqlalchemy` but the build failed because python3dist(sqlakeyset) is not currently available in Fedora.
Created attachment 2118146 [details] The .spec file difference from Copr build 9889793 to 9889920
Copr build: https://copr.fedorainfracloud.org/coprs/build/9889920 (succeeded) Review template: https://download.copr.fedorainfracloud.org/results/@fedora-review/fedora-review-2418764-python-fastapi-pagination/fedora-rawhide-x86_64/09889920-python-fastapi-pagination/fedora-review/review.txt Please take a look if any issues were found. --- This comment was created by the fedora-review-service https://github.com/FrostyX/fedora-review-service If you want to trigger a new Copr build, add a comment containing new Spec and SRPM URLs or [fedora-review-service-build] string.
> I couldn't keep `%pyproject_buildrequires -x sqlalchemy` but the build failed because python3dist(sqlakeyset) is not currently available in Fedora. That is exactly the reason you tried to add it. It means you MUST not use `%pyproject_extras_subpkg -n python3-fastapi-pagination sqlalchemy` either. Keep those in sync. For example, I believe the following extras should be packageable: ormar (no dependencies), asyncpg (needs SQLAlchemy and asyncpg), %pyproject_extras_subpkg -n python3-fastapi-pagination ormar,asyncpg ... %pyproject_buildrequires -x ormar,asyncpg
Spec URL: https://gitlab.com/jyrj/python-fastapi-pagination/-/raw/main/python-fastapi-pagination.spec SRPM URL: https://gitlab.com/jyrj/python-fastapi-pagination/-/raw/main/python-fastapi-pagination-0.15.1-1.fc43.src.rpm Description: FastAPI Pagination provides easy, extensible pagination for FastAPI applications with support for multiple ORMs and async DB layers. Fedora Account System Username: jyrj [fedora-review-service-build] --- (In reply to Miro Hrončok from comment #18) > > I couldn't keep `%pyproject_buildrequires -x sqlalchemy` but the build failed because python3dist(sqlakeyset) is not currently available in Fedora. > > That is exactly the reason you tried to add it. It means you MUST not use > `%pyproject_extras_subpkg -n python3-fastapi-pagination sqlalchemy` either. > > > Keep those in sync. For example, I believe the following extras should be > packageable: ormar (no dependencies), asyncpg (needs SQLAlchemy and > asyncpg), > > %pyproject_extras_subpkg -n python3-fastapi-pagination ormar,asyncpg > ... > %pyproject_buildrequires -x ormar,asyncpg Thanks for the tip on -x, Miro! It was very helpful. it revealed a hidden dependency chain where the django extra pulls in databases, which is currently missing in Fedora (just like sqlakeyset for sqlalchemy). I have updated the spec to package only the extras that have all dependencies available (asyncpg, mongoengine, ormar). I also added detailed comments in the spec file explaining exactly which dependencies are missing for the excluded extras, so we can easily enable them in the future.
Created attachment 2118147 [details] The .spec file difference from Copr build 9889920 to 9890133
Copr build: https://copr.fedorainfracloud.org/coprs/build/9890133 (succeeded) Review template: https://download.copr.fedorainfracloud.org/results/@fedora-review/fedora-review-2418764-python-fastapi-pagination/fedora-rawhide-x86_64/09890133-python-fastapi-pagination/fedora-review/review.txt Please take a look if any issues were found. --- This comment was created by the fedora-review-service https://github.com/FrostyX/fedora-review-service If you want to trigger a new Copr build, add a comment containing new Spec and SRPM URLs or [fedora-review-service-build] string.
Apparently, I didn't know the use of the AI policy. I have used GenAI to change the tone and structure my comment, and took the assistance of GenAI for solving the dependency error. For instance, I kept track of PyPI requirements, then when I encountered a dependency issue, I took help from GenAI, for example, using it to give me dependencies that aren't prone to build errors (meaning analyzing the build effectively, making it easy for me to identify dependencies). @mhroncok , thanks for pointing this out. Let me know if this seems okay, or do I need to do more steps. Also, I would like to know how I can get sponsored.