[Bug 2164882] Review Request: python-pyrate-limiter - The request rate limiter using Leaky-bucket algorithm

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



https://bugzilla.redhat.com/show_bug.cgi?id=2164882



--- Comment #13 from Ben Beasley <code@xxxxxxxxxxxxxxxxxx> ---
(In reply to Steve Cossette from comment #12)
> So, building for f36/f37/rawhide worked. Epel9 didn't though:
> 
> DEBUG util.py:443:  No matches found for the following disable plugin
> patterns: local, spacewalk, versionlock
> DEBUG util.py:443:  No matching package to install: 'python3dist(django) >=
> 3.2.8'
> DEBUG util.py:443:  Not all dependencies satisfied
> DEBUG util.py:443:  Error: Some packages could not be found.
> 
> Seems this may be related:
> https://bugzilla.redhat.com/show_bug.cgi?id=2033064
> Though that bug seems to be stale. Does this sound right?

The Django dependency is only for integration tests in
tests/test_with_django.py. Right now you can’t run those because even Rawhide
has a too-old version of django-redis. So you should just omit the Django
BuildRequires using a conditional or as a change to the EPEL9 branch only,
e.g.:

diff --git a/python-pyrate-limiter.spec b/python-pyrate-limiter.spec
index f4fdc46..27095de 100644
--- a/python-pyrate-limiter.spec
+++ b/python-pyrate-limiter.spec
@@ -32,8 +32,11 @@ BuildRequires:  python3-devel
 # lower bounds for test dependencies, dealing with possible future test
 # failures if and when they happen.

+# The version of Django in EPEL9 is too old.
+%if ! 0%{?el9}
 # Django = "^3.2.8"
 BuildRequires:  %{py3_dist Django} >= 3.2.8
+%endif
 # pytest-xdist = "^2.5.0"
 BuildRequires:  %{py3_dist pytest-xdist} >= 0.12
 # django-redis = "^5.0.0"
@@ -86,6 +89,7 @@ rm '%{buildroot}%{python3_sitelib}/LICENSE'
 # Needs python3dist(fakeredis)
 ignore="${ignore-} --ignore=tests/test_02.py"
 # Needs python3dist(django-redis)
+# The version of Django in EPEL9 is too old.
 ignore="${ignore-} --ignore=tests/test_with_django.py"
 # Flaky failures in test_concurrency
 # https://github.com/vutran1710/PyrateLimiter/issues/94

Once you do that, you’ll encounter:

No matching package to install: 'python3dist(poetry) >= 0.12'

This is because pyproject.toml has

[build-system]
requires = ["poetry>=0.12"]
build-backend = "poetry.masonry.api"

and (full) poetry is not available in EPEL9. In fact, it should only need:

[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"

I asked upstream to switch: https://github.com/vutran1710/PyrateLimiter/pull/96

You can therefore fix this with:

# Use poetry-core for build-system instead of full Poetry
# https://github.com/vutran1710/PyrateLimiter/pull/96
Patch:          %{url}/pull/96.patch

I will follow up with a PR.


-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are always notified about changes to this product and component
https://bugzilla.redhat.com/show_bug.cgi?id=2164882
_______________________________________________
package-review mailing list -- package-review@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to package-review-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/package-review@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue




[Index of Archives]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite Conditions]     [KDE Users]

  Powered by Linux