diff --git a/python-pygit2-transfer-size.patch b/python-pygit2-transfer-size.patch new file mode 100644 index 0000000..ca799aa --- /dev/null +++ b/python-pygit2-transfer-size.patch @@ -0,0 +1,24 @@ +Submitted upstream: + +diff --git a/test/test_remote.py b/test/test_remote.py +index fd12c71107261bf9..d268019921369e99 100644 +--- a/test/test_remote.py ++++ b/test/test_remote.py +@@ -39,7 +39,6 @@ REMOTE_URL = 'https://github.com/libgit2/pygit2.git' + REMOTE_FETCHSPEC_SRC = 'refs/heads/*' + REMOTE_FETCHSPEC_DST = 'refs/remotes/origin/*' + REMOTE_REPO_OBJECTS = 30 +-REMOTE_REPO_BYTES = 2758 + REMOTE_FETCHTEST_FETCHSPECS = ["refs/tags/v1.13.2"] + REMOTE_REPO_FETCH_ALL_OBJECTS = 13276 + REMOTE_REPO_FETCH_HEAD_COMMIT_OBJECTS = 238 +@@ -215,7 +214,8 @@ def test_remote_refcount(testrepo): + def test_fetch(emptyrepo): + remote = emptyrepo.remotes[0] + stats = remote.fetch() +- assert stats.received_bytes == REMOTE_REPO_BYTES ++ assert stats.received_bytes > 2700 ++ assert stats.received_bytes < 2800 + assert stats.indexed_objects == REMOTE_REPO_OBJECTS + assert stats.received_objects == REMOTE_REPO_OBJECTS + diff --git a/python-pygit2.spec b/python-pygit2.spec index afce350..0e19f0b 100644 --- a/python-pygit2.spec +++ b/python-pygit2.spec @@ -8,6 +8,7 @@ Summary: Python bindings for libgit2 License: GPL-2.0-only WITH GCC-exception-2.0 URL: https://www.pygit2.org/ Source0: https://github.com/libgit2/pygit2/archive/v%{version}.tar.gz#/%{pkgname}-%{version}.tar.gz +Patch0: python-pygit2-transfer-size.patch # This patch lowers the Python-level dependency on cffi. Fedora package python-cffi-1.15.1-5 and # higher contain the patches needed for Python >= 3.12. # Remove when cffi >= 1.16.0 is available on all releases with Python 3.12.