18 Commits

Author SHA256 Message Date
512f6561b8 Accepting request 1302433 from devel:languages:python
OBS-URL: https://build.opensuse.org/request/show/1302433
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-pygit2?expand=0&rev=43
2025-09-02 16:00:44 +00:00
572e3841f5 - Update to 1.18.2
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pygit2?expand=0&rev=102
2025-09-02 13:10:02 +00:00
9ddaca0bf1 Remove *.obs* files
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pygit2?expand=0&rev=101
2025-08-11 17:57:46 +00:00
57f128a6d6 [info=75d2cb71414110ccf67c23dc7b67ee0b99448d5a8d76a34fc70cd03e01433d4d]
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pygit2?expand=0&rev=100
2025-05-05 06:38:29 +00:00
OBS User unknown
c98ed5ffcb [info=a5914906eaa05210f799fdf6fdcc42fdc17a603d103035bf6c26729334b00c0c]
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pygit2?expand=0&rev=99
2025-02-04 08:51:26 +00:00
81dd1f631f Accepting request 1241225 from devel:Factory:git-workflow:staging:mcepl:python-pygit2:3
update_to_1.17.0

Update to pygit2 1.17.0 and make sure it builds with libgit2 1.9.

(Depends on sr#1241223 and relates to sr#1241224).

(🤖: Submission of python-pygit2 via #3 by mcepl)

OBS-URL: https://build.opensuse.org/request/show/1241225
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-pygit2?expand=0&rev=42
2025-01-30 13:52:04 +00:00
Git SCM Staging
b5a252c929 [info=d67fc870797df105dad42333f76e4a60bb1a26f372e11185d7754fd82a722a07]
OBS-URL: https://build.opensuse.org/package/show/devel:Factory:git-workflow:staging:mcepl:python-pygit2:3/python-pygit2?expand=0&rev=1
2025-01-29 16:29:33 +00:00
OBS User unknown
b9267b7763 [info=c0760b117fc40c177bf755bf33d8afcf98ad5dfa5af50e0556b3773a03b56f59]
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pygit2?expand=0&rev=98
2024-11-05 14:42:22 +00:00
2321e9b12e Accepting request 1221428 from devel:Factory:git-workflow:staging:mcepl:python-pygit2:2
Update to 1.16.0

- Update to 1.16.0:
  - Add support for Python 3.13
  - Drop support for Python 3.9
  - New Repository.hashfile(...)
  - New Option.GET_MWINDOW_FILE_LIMIT and
    Option.SET_MWINDOW_FILE_LIMIT
  - Fix overriding certificate_check(...) callback via argument
    to RemoteCallbacks(...)
  - Add py.typed
  - Fix discover_repository(...) annotation
- Add const-parents.patch to fix FTBFS (gh#libgit2/pygit2!1324).


(🤖: Submission of python-pygit2 via #2 by mcepl)

OBS-URL: https://build.opensuse.org/request/show/1221428
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-pygit2?expand=0&rev=41
2024-11-05 14:42:16 +00:00
Git SCM Staging
c42d629af5 [info=8f774c3b9f40d04f66a46759d57c82ef5d71a8e1989bc375a9493ec49c78810e]
OBS-URL: https://build.opensuse.org/package/show/devel:Factory:git-workflow:staging:mcepl:python-pygit2:2/python-pygit2?expand=0&rev=4
2024-11-05 12:48:56 +00:00
Git SCM Staging
878a18abd8 [info=3e07cb6faef98760b11addef0c42d0d294cfa921029306ca19a987bbda9ba12b]
OBS-URL: https://build.opensuse.org/package/show/devel:Factory:git-workflow:staging:mcepl:python-pygit2:2/python-pygit2?expand=0&rev=3
2024-11-05 12:45:09 +00:00
Git SCM Staging
0de7481d05 [info=f5cc8fe3ef04e9b1df5cb981df4c43ac7d52c00b4080d07075cb899be178dcae]
OBS-URL: https://build.opensuse.org/package/show/devel:Factory:git-workflow:staging:mcepl:python-pygit2:2/python-pygit2?expand=0&rev=2
2024-11-05 12:44:06 +00:00
Git SCM Staging
2aac036740 [info=196021276a72dada032fdf877abaa053e1818855548022aef73e40a9617bd4ca]
OBS-URL: https://build.opensuse.org/package/show/devel:Factory:git-workflow:staging:mcepl:python-pygit2:2/python-pygit2?expand=0&rev=1
2024-11-05 11:34:35 +00:00
b00627d4f2 [info=5ddd6ee66d4d50758a67277b320de87769a4722ab143b2f24cbb0e0d52f5aada]
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pygit2?expand=0&rev=97
2024-09-24 10:18:34 +00:00
3ccebb27e5 Accepting request 1191651 from devel:languages:python
OBS-URL: https://build.opensuse.org/request/show/1191651
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-pygit2?expand=0&rev=40
2024-08-05 15:24:04 +00:00
1a8eca658b Accepting request 1191647 from home:glaubitz:branches:devel:languages:python
* New `Repository.revert(...)`
  * New optional `depth` argument in submodules `add()` and `update()` methods
  * Now `Submodule.url` returns `None` when the submodule does not have a url
  * Fix use after free bug in error reporting
  * Fix `Submodule.head_id` when the submodule is not in the current HEAD tree
  * Fix `Submodule.open()` when subclassing `Repository`
  * Fix error in the test suite when running with address sanitizer
  * Annotations and documentation fixes
- Fix version number for previous changelog entry

- Update to 1.15.0

OBS-URL: https://build.opensuse.org/request/show/1191647
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pygit2?expand=0&rev=95
2024-08-05 11:55:41 +00:00
beb653974d Accepting request 1181735 from devel:languages:python
OBS-URL: https://build.opensuse.org/request/show/1181735
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-pygit2?expand=0&rev=39
2024-06-20 14:47:12 +00:00
7905637b01 Accepting request 1181724 from home:glaubitz:branches:devel:languages:python
- Update to 1.15.1
  * Many deprecated features have been removed, see below
  * Upgrade to libgit2 v1.8.1
  * New `push_options` optional argument in `Repository.push(...)`
  * New support comparison of `Oid` with text string
  * Fix `CheckoutNotify.IGNORED`
  * Use default error handler when decoding/encoding paths
  * Remove setuptools runtime dependency
  * Coding style with ruff
  * Add wheels for ppc64le
  * Fix tests on EPEL8 builds for s390x
  * Deprecate `IndexEntry.hex`, use `str(IndexEntry.id)`
  * Remove deprecated `oid.hex`, use `str(oid)`
  * Remove deprecated `object.hex`, use `str(object.id)`
  * Remove deprecated `object.oid`, use `object.id`
  * Remove deprecated `Repository.add_submodule(...)`, use `Repository.submodules.add(...)`
  * Remove deprecated `Repository.lookup_submodule(...)`, use `Repository.submodules[...]`
  * Remove deprecated `Repository.init_submodules(...)`, use `Repository.submodules.init(...)`
  * Remove deprecated `Repository.update_submodule(...)`, use `Repository.submodules.update(...)`
  * Remove deprecated constants `GIT_OBJ_XXX`, use `ObjectType`
  * Remove deprecated constants `GIT_REVPARSE_XXX`, use `RevSpecFlag`
  * Remove deprecated constants `GIT_REF_XXX`, use `ReferenceType`
  * Remove deprecated `ReferenceType.OID`, use instead `ReferenceType.DIRECT`
  * Remove deprecated `ReferenceType.LISTALL`, use instead `ReferenceType.ALL`
  * Remove deprecated support for passing dicts to repository\'s `merge(...)`,
    `merge_commits(...)` and `merge_trees(...)`. Instead pass `MergeFlag` for `flags`, and
    `MergeFileFlag` for `file_flags`.
  * Remove deprecated support for passing a string for the favor argument to repository\'s
    `merge(...)`, `merge_commits(...)` and `merge_trees(...)`. Instead pass `MergeFavor`.
- Drop patches for issues fixed upstream

OBS-URL: https://build.opensuse.org/request/show/1181724
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pygit2?expand=0&rev=93
2024-06-19 11:29:50 +00:00
9 changed files with 149 additions and 465 deletions

View File

@@ -1,67 +0,0 @@
From 51d35d010b9dcee199be5eb3785246ca9ef418e9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=2E=20David=20Ib=C3=A1=C3=B1ez?= <jdavid.ibp@gmail.com>
Date: Thu, 21 Mar 2024 10:53:59 +0100
Subject: [PATCH] Fix CI
(cherry picked from commit 3eba911fb5fcc4d431d31848a66f117df8275af2)
---
src/blob.c | 1 +
src/filter.c | 1 +
test/test_credentials.py | 10 ++++++----
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/src/blob.c b/src/blob.c
index e69a8f7..a1f40df 100644
--- a/src/blob.c
+++ b/src/blob.c
@@ -28,6 +28,7 @@
#define PY_SSIZE_T_CLEAN
#include <Python.h>
#include <git2.h>
+#include <git2/sys/errors.h>
#include "diff.h"
#include "error.h"
#include "object.h"
diff --git a/src/filter.c b/src/filter.c
index a1b220e..5e51a20 100644
--- a/src/filter.c
+++ b/src/filter.c
@@ -28,6 +28,7 @@
#define PY_SSIZE_T_CLEAN
#include <Python.h>
#include <git2.h>
+#include <git2/sys/errors.h>
#include <git2/sys/filter.h>
#include "diff.h"
#include "error.h"
diff --git a/test/test_credentials.py b/test/test_credentials.py
index 2d1166c..04e2185 100644
--- a/test/test_credentials.py
+++ b/test/test_credentials.py
@@ -26,6 +26,7 @@
"""Tests for credentials"""
from pathlib import Path
+import platform
import pytest
@@ -161,10 +162,11 @@ def test_fetch_certificate_check(testrepo):
remote.fetch(callbacks=MyCallbacks())
# libgit2 uses different error message for Linux and Windows
- # TODO test one or the other depending on the platform
- assert str(exc.value) in (
- 'user rejected certificate for github.com', # httpclient
- 'user cancelled certificate check') # winhttp
+ value = str(exc.value)
+ if platform.system() == 'Windows':
+ assert value == 'user cancelled certificate check' # winhttp
+ else:
+ assert value == 'user rejected certificate for github.com' # httpclient
# TODO Add GitError.error_code
#assert exc.value.error_code == pygit2.GIT_ERROR_HTTP
--
2.44.0

View File

@@ -1,171 +0,0 @@
From 0f8a1a91db0825daa0d25549f15791bcee0f9a94 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=2E=20David=20Ib=C3=A1=C3=B1ez?= <jdavid.ibp@gmail.com>
Date: Sun, 24 Mar 2024 09:09:36 +0100
Subject: [PATCH] Fix leaks in fetch_refspecs and push_refspecs
Also use git_strarray_dispose instead of deprecated git_strarray_free.
And fix a couple of build warnings in git_commit_create.
(cherry picked from commit c7c65cf12547eeadb46cfb30531285e1afcbd708)
---
pygit2/decl/strarray.h | 2 +-
pygit2/remotes.py | 16 +++-------------
pygit2/utils.py | 15 ++++++++++-----
src/repository.c | 10 ++++------
4 files changed, 18 insertions(+), 25 deletions(-)
diff --git a/pygit2/decl/strarray.h b/pygit2/decl/strarray.h
index a9b249f..fdbf2aa 100644
--- a/pygit2/decl/strarray.h
+++ b/pygit2/decl/strarray.h
@@ -3,4 +3,4 @@ typedef struct git_strarray {
size_t count;
} git_strarray;
-void git_strarray_free(git_strarray *array);
+void git_strarray_dispose(git_strarray *array);
diff --git a/pygit2/remotes.py b/pygit2/remotes.py
index 3c4748c..37a6ca3 100644
--- a/pygit2/remotes.py
+++ b/pygit2/remotes.py
@@ -222,7 +222,6 @@ class Remote:
specs = ffi.new('git_strarray *')
err = C.git_remote_get_fetch_refspecs(specs, self._remote)
check_error(err)
-
return strarray_to_strings(specs)
@property
@@ -232,7 +231,6 @@ class Remote:
specs = ffi.new('git_strarray *')
err = C.git_remote_get_push_refspecs(specs, self._remote)
check_error(err)
-
return strarray_to_strings(specs)
def push(self, specs, callbacks=None, proxy=None):
@@ -294,14 +292,12 @@ class RemoteCollection:
def __len__(self):
names = ffi.new('git_strarray *')
-
try:
err = C.git_remote_list(names, self._repo._repo)
check_error(err)
-
return names.count
finally:
- C.git_strarray_free(names)
+ C.git_strarray_dispose(names)
def __iter__(self):
cremote = ffi.new('git_remote **')
@@ -323,15 +319,13 @@ class RemoteCollection:
def _ffi_names(self):
names = ffi.new('git_strarray *')
-
try:
err = C.git_remote_list(names, self._repo._repo)
check_error(err)
-
for i in range(names.count):
yield names.strings[i]
finally:
- C.git_strarray_free(names)
+ C.git_strarray_dispose(names)
def names(self):
"""An iterator over the names of the available remotes."""
@@ -386,11 +380,7 @@ class RemoteCollection:
problems = ffi.new('git_strarray *')
err = C.git_remote_rename(problems, self._repo._repo, to_bytes(name), to_bytes(new_name))
check_error(err)
-
- ret = strarray_to_strings(problems)
- C.git_strarray_free(problems)
-
- return ret
+ return strarray_to_strings(problems)
def delete(self, name):
"""Remove a remote from the configuration
diff --git a/pygit2/utils.py b/pygit2/utils.py
index 638c199..f4e3fc8 100644
--- a/pygit2/utils.py
+++ b/pygit2/utils.py
@@ -26,7 +26,7 @@
import os
# Import from pygit2
-from .ffi import ffi
+from .ffi import ffi, C
def maybe_string(ptr):
@@ -73,11 +73,16 @@ def ptr_to_bytes(ptr_cdata):
def strarray_to_strings(arr):
- l = [None] * arr.count
- for i in range(arr.count):
- l[i] = ffi.string(arr.strings[i]).decode('utf-8')
+ """
+ Return a list of strings from a git_strarray pointer.
- return l
+ Free the strings contained in the git_strarry, this means it won't be usable after
+ calling this function.
+ """
+ try:
+ return [ffi.string(arr.strings[i]).decode('utf-8') for i in range(arr.count)]
+ finally:
+ C.git_strarray_dispose(arr)
class StrArray:
diff --git a/src/repository.c b/src/repository.c
index cf7597c..1f6db24 100644
--- a/src/repository.c
+++ b/src/repository.c
@@ -1069,8 +1069,7 @@ Repository_create_commit(Repository *self, PyObject *args)
err = git_commit_create(&oid, self->repo, update_ref,
py_author->signature, py_committer->signature,
- encoding, message, tree, parent_count,
- (const git_commit**)parents);
+ encoding, message, tree, parent_count, parents);
if (err < 0) {
Error_set(err);
goto out;
@@ -1152,8 +1151,7 @@ Repository_create_commit_string(Repository *self, PyObject *args)
err = git_commit_create_buffer(&buf, self->repo,
py_author->signature, py_committer->signature,
- encoding, message, tree, parent_count,
- (const git_commit**)parents);
+ encoding, message, tree, parent_count, parents);
if (err < 0) {
Error_set(err);
goto out;
@@ -1313,7 +1311,7 @@ Repository_raw_listall_references(Repository *self, PyObject *args)
}
out:
- git_strarray_free(&c_result);
+ git_strarray_dispose(&c_result);
return py_result;
}
@@ -2182,7 +2180,7 @@ Repository_list_worktrees(Repository *self, PyObject *args)
}
out:
- git_strarray_free(&c_result);
+ git_strarray_dispose(&c_result);
return py_result;
}
--
2.44.0

Binary file not shown.

3
pygit2-1.18.2.tar.gz Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:eca87e0662c965715b7f13491d5e858df2c0908341dee9bde2bc03268e460f55
size 797200

View File

@@ -1,133 +0,0 @@
--- pygit2-1.14.1/build.sh 2024-03-31 00:04:31.748162119 +0100
+++ pygit2-1.14.1/build.sh 2024-03-31 00:04:44.734562399 +0100
@@ -22,14 +22,14 @@
#
# sh build.sh
#
-# Build libgit2 1.7.2 (will use libssh2 if available), then build pygit2
+# Build libgit2 1.8.0 (will use libssh2 if available), then build pygit2
# inplace:
#
-# LIBGIT2_VERSION=1.7.2 sh build.sh
+# LIBGIT2_VERSION=1.8.0 sh build.sh
#
-# Build libssh2 1.11.0 and libgit2 1.7.2, then build pygit2 inplace:
+# Build libssh2 1.11.0 and libgit2 1.8.0, then build pygit2 inplace:
#
-# LIBSSH2_VERSION=1.11.0 LIBGIT2_VERSION=1.7.2 sh build.sh
+# LIBSSH2_VERSION=1.11.0 LIBGIT2_VERSION=1.8.0 sh build.sh
#
# Build inplace and run the tests:
#
--- pygit2-1.14.1/Makefile 2024-03-31 00:04:31.748162119 +0100
+++ pygit2-1.14.1/Makefile 2024-03-31 00:04:44.734562399 +0100
@@ -1,7 +1,7 @@
.PHONY: build html
build:
- OPENSSL_VERSION=3.1.5 LIBSSH2_VERSION=1.11.0 LIBGIT2_VERSION=1.7.2 sh build.sh
+ OPENSSL_VERSION=3.1.5 LIBSSH2_VERSION=1.11.0 LIBGIT2_VERSION=1.8.0 sh build.sh
html: build
make -C docs html
--- pygit2-1.14.1/pygit2/decl/config.h 2024-03-31 00:04:31.751495384 +0100
+++ pygit2-1.14.1/pygit2/decl/config.h 2024-03-31 00:04:44.734562399 +0100
@@ -6,17 +6,19 @@
GIT_CONFIG_LEVEL_XDG = 3,
GIT_CONFIG_LEVEL_GLOBAL = 4,
GIT_CONFIG_LEVEL_LOCAL = 5,
- GIT_CONFIG_LEVEL_APP = 6,
- GIT_CONFIG_HIGHEST_LEVEL = -1,
+ GIT_CONFIG_LEVEL_WORKTREE = 6,
+ GIT_CONFIG_LEVEL_APP = 7,
+ GIT_CONFIG_HIGHEST_LEVEL = -1
} git_config_level_t;
typedef struct git_config_entry {
const char *name;
const char *value;
+ const char *backend_type;
+ const char *origin_path;
unsigned int include_depth;
git_config_level_t level;
void (*free)(struct git_config_entry *entry);
- void *payload;
} git_config_entry;
void git_config_entry_free(git_config_entry *);
--- pygit2-1.14.1/pygit2/decl/remote.h 2024-03-31 00:04:31.751495384 +0100
+++ pygit2-1.14.1/pygit2/decl/remote.h 2024-03-31 00:04:44.734562399 +0100
@@ -57,6 +57,7 @@
git_proxy_options proxy_opts;
git_remote_redirect_t follow_redirects;
git_strarray custom_headers;
+ git_strarray remote_push_options;
} git_push_options;
int git_push_options_init(
@@ -80,7 +81,8 @@
int version;
git_remote_callbacks callbacks;
git_fetch_prune_t prune;
- int update_fetchhead;
+ unsigned int update_fetchhead : 1,
+ report_unchanged : 1;
git_remote_autotag_option_t download_tags;
git_proxy_options proxy_opts;
int depth;
--- pygit2-1.14.1/pygit2/enums.py 2024-03-31 00:04:31.751495384 +0100
+++ pygit2-1.14.1/pygit2/enums.py 2024-03-31 00:05:38.713455156 +0100
@@ -65,16 +65,16 @@
"Normal blame, the default"
TRACK_COPIES_SAME_FILE = _pygit2.GIT_BLAME_TRACK_COPIES_SAME_FILE
- "Not yet implemented and reserved for future use (as of libgit2 1.7.1)."
+ "Not yet implemented and reserved for future use (as of libgit2 1.8.0)."
TRACK_COPIES_SAME_COMMIT_MOVES = _pygit2.GIT_BLAME_TRACK_COPIES_SAME_COMMIT_MOVES
- "Not yet implemented and reserved for future use (as of libgit2 1.7.1)."
+ "Not yet implemented and reserved for future use (as of libgit2 1.8.0)."
TRACK_COPIES_SAME_COMMIT_COPIES = _pygit2.GIT_BLAME_TRACK_COPIES_SAME_COMMIT_COPIES
- "Not yet implemented and reserved for future use (as of libgit2 1.7.1)."
+ "Not yet implemented and reserved for future use (as of libgit2 1.8.0)."
TRACK_COPIES_ANY_COMMIT_COPIES = _pygit2.GIT_BLAME_TRACK_COPIES_ANY_COMMIT_COPIES
- "Not yet implemented and reserved for future use (as of libgit2 1.7.1)."
+ "Not yet implemented and reserved for future use (as of libgit2 1.8.0)."
FIRST_PARENT = _pygit2.GIT_BLAME_FIRST_PARENT
"Restrict the search of commits to those reachable following only the first parents."
@@ -251,6 +251,9 @@
LOCAL = _pygit2.GIT_CONFIG_LEVEL_LOCAL
"Repository specific configuration file; $WORK_DIR/.git/config on non-bare repos"
+ WORKTREE = _pygit2.GIT_CONFIG_LEVEL_WORKTREE
+ 'Worktree specific configuration file; $GIT_DIR/config.worktree'
+
APP = _pygit2.GIT_CONFIG_LEVEL_APP
"Application specific configuration file; freely defined by applications"
--- pygit2-1.14.1/src/pygit2.c 2024-03-31 00:04:31.754828649 +0100
+++ pygit2-1.14.1/src/pygit2.c 2024-03-31 00:04:44.734562399 +0100
@@ -792,6 +792,7 @@
ADD_CONSTANT_INT(m, GIT_CONFIG_LEVEL_XDG);
ADD_CONSTANT_INT(m, GIT_CONFIG_LEVEL_GLOBAL);
ADD_CONSTANT_INT(m, GIT_CONFIG_LEVEL_LOCAL);
+ ADD_CONSTANT_INT(m, GIT_CONFIG_LEVEL_WORKTREE);
ADD_CONSTANT_INT(m, GIT_CONFIG_LEVEL_APP);
ADD_CONSTANT_INT(m, GIT_CONFIG_HIGHEST_LEVEL);
--- pygit2-1.14.1/src/types.h 2024-03-31 00:04:31.754828649 +0100
+++ pygit2-1.14.1/src/types.h 2024-03-31 00:04:44.734562399 +0100
@@ -33,8 +33,8 @@
#include <git2.h>
#include <git2/sys/filter.h>
-#if !(LIBGIT2_VER_MAJOR == 1 && LIBGIT2_VER_MINOR == 7)
-#error You need a compatible libgit2 version (1.7.x)
+#if !(LIBGIT2_VER_MAJOR == 1 && LIBGIT2_VER_MINOR == 8)
+#error You need a compatible libgit2 version (1.8.x)
#endif
/*

View File

@@ -1,23 +0,0 @@
From dabd40c54fa3a086a5b1b1dd0f2fb86a689eef69 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=2E=20David=20Ib=C3=A1=C3=B1ez?= <jdavid.ibp@gmail.com>
Date: Fri, 17 May 2024 09:53:05 +0200
Subject: [PATCH] Update to libgit2 1.8.1
---
pygit2/decl/remote.h | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/pygit2/decl/remote.h b/pygit2/decl/remote.h
index 6a4ee90b..64b96442 100644
--- a/pygit2/decl/remote.h
+++ b/pygit2/decl/remote.h
@@ -81,8 +81,7 @@ typedef struct {
int version;
git_remote_callbacks callbacks;
git_fetch_prune_t prune;
- unsigned int update_fetchhead : 1,
- report_unchanged : 1;
+ unsigned int update_fetchhead;
git_remote_autotag_option_t download_tags;
git_proxy_options proxy_opts;
int depth;

View File

@@ -1,46 +0,0 @@
From 31ea782852a318214149d24b73fc0e6ebe4210c6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=2E=20David=20Ib=C3=A1=C3=B1ez?= <jdavid.ibp@gmail.com>
Date: Fri, 17 May 2024 09:29:14 +0200
Subject: [PATCH] Update to libgit2 1.8.1
---
.github/workflows/tests.yml | 8 ++++----
Makefile | 2 +-
appveyor.yml | 2 +-
build.sh | 8 ++++----
docs/install.rst | 14 +++++++-------
pyproject.toml | 4 ++--
6 files changed, 19 insertions(+), 19 deletions(-)
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,7 @@
.PHONY: build html
build:
- OPENSSL_VERSION=3.1.5 LIBSSH2_VERSION=1.11.0 LIBGIT2_VERSION=1.8.0 sh build.sh
+ OPENSSL_VERSION=3.1.5 LIBSSH2_VERSION=1.11.0 LIBGIT2_VERSION=1.8.1 sh build.sh
html: build
make -C docs html
--- a/build.sh
+++ b/build.sh
@@ -22,14 +22,14 @@
#
# sh build.sh
#
-# Build libgit2 1.8.0 (will use libssh2 if available), then build pygit2
+# Build libgit2 1.8.1 (will use libssh2 if available), then build pygit2
# inplace:
#
-# LIBGIT2_VERSION=1.8.0 sh build.sh
+# LIBGIT2_VERSION=1.8.1 sh build.sh
#
-# Build libssh2 1.11.0 and libgit2 1.8.0, then build pygit2 inplace:
+# Build libssh2 1.11.0 and libgit2 1.8.1, then build pygit2 inplace:
#
-# LIBSSH2_VERSION=1.11.0 LIBGIT2_VERSION=1.8.0 sh build.sh
+# LIBSSH2_VERSION=1.11.0 LIBGIT2_VERSION=1.8.1 sh build.sh
#
# Build inplace and run the tests:
#

View File

@@ -1,3 +1,139 @@
-------------------------------------------------------------------
Tue Sep 2 10:47:35 UTC 2025 - Sangeetha Thackarajan <sangeetha.thackarajan@suse.com>
- Update to 1.18.2
1.18.2 (2025-08-16)
-------------------------
- Add support for almost all global options
- Now it's possible to set `Submodule.url = url`
- New `RemoteCallbacks.push_negotiation(...)`
- New optional boolean argument `connect` in `Remote.ls_remotes(...)`
- New `Remote.list_heads(...)` returns a list of `RemoteHead` objects
- Documentation fixes
- Typing improvements
Deprecations:
- `Remote.ls_remotes(...)` is deprecated, use `Remote.list_heads(...)`
1.18.1 (2025-07-26)
-------------------------
- Update wheels to libgit2 1.9.1 and OpenSSL 3.3
- New `Index.remove_directory(...)`
- New `Index.add_conflict(...)`
- Now `Repository.merge_file_from_index(...)` returns a `MergeFileResult` object when
called with `use_deprecated=False`
- Typing improvements
Deprecations:
- At some point in the future `use_deprecated=False` in `Repository.merge_file_from_index(..., use_deprecated=False)` will be the default.
1.18.0 (2025-04-24)
-------------------------
- Upgrade Linux Glibc wheels to `manylinux_2_28`
- Add `RemoteCallbacks.push_transfer_progress(...)` callback
- New `bool(oid)`
- Now `Repository.merge(...)` accepts a commit or reference object
- New `threads` optional argument in `Remote.push(...)`
- New `proxy` optional argument in `clone_repository(...)`
- New optional arguments `context_lines` and `interhunk_lines` in `Blob.diff(...)` ; and
now `Repository.diff(...)` honors these two arguments when the objects diffed are blobs.
- Now `Tree.diff_to_workdir(...)` accepts keyword arguments, not just positional.
- Fix when a reference name has non UTF-8 chars
- Fix condition check in `Repository.remotes.rename(...)`
- Add codespell workflow, fix a number of typos
- Documentation and typing
- CI: Use ARM runner for tests and wheels
- Build and CI updates
Deprecations:
- Passing str to `Repository.merge(...)` is deprecated,
instead pass an oid object (or a commit, or a reference)
Breaking changes:
- Keyword argument `flag` has been renamed to `flags` in `Blob.diff(...)` and
`Blob.diff_to_buffer(...)`
-------------------------------------------------------------------
Wed Jan 29 13:52:23 UTC 2025 - Matej Cepl <mcepl@cepl.eu>
- Remove upstreamed const-parents.patch.
-------------------------------------------------------------------
Tue Jan 28 09:21:54 UTC 2025 - Markéta Machová <mmachova@suse.com>
- Update to 1.17.0
* Upgrade to libgit2 1.9
* Add certificate_check callback to Remote.ls_remotes(...)
* Fix build with GCC 14
* Documentation: fix typo in Repository.status(...) docstring
* Fix tests with Python 3.13.1
-------------------------------------------------------------------
Tue Nov 5 10:50:38 UTC 2024 - Matej Cepl <mcepl@cepl.eu>
- Update to 1.16.0:
- Add support for Python 3.13
- Drop support for Python 3.9
- New Repository.hashfile(...)
- New Option.GET_MWINDOW_FILE_LIMIT and
Option.SET_MWINDOW_FILE_LIMIT
- Fix overriding certificate_check(...) callback via argument
to RemoteCallbacks(...)
- Add py.typed
- Fix discover_repository(...) annotation
- Add const-parents.patch to fix FTBFS (gh#libgit2/pygit2!1324).
-------------------------------------------------------------------
Mon Aug 5 11:21:06 UTC 2024 - John Paul Adrian Glaubitz <adrian.glaubitz@suse.com>
- Update to 1.15.1
* New `Repository.revert(...)`
* New optional `depth` argument in submodules `add()` and `update()` methods
* Now `Submodule.url` returns `None` when the submodule does not have a url
* Fix use after free bug in error reporting
* Fix `Submodule.head_id` when the submodule is not in the current HEAD tree
* Fix `Submodule.open()` when subclassing `Repository`
* Fix error in the test suite when running with address sanitizer
* Annotations and documentation fixes
- Fix version number for previous changelog entry
-------------------------------------------------------------------
Wed Jun 19 10:53:06 UTC 2024 - John Paul Adrian Glaubitz <adrian.glaubitz@suse.com>
- Update to 1.15.0
* Many deprecated features have been removed, see below
* Upgrade to libgit2 v1.8.1
* New `push_options` optional argument in `Repository.push(...)`
* New support comparison of `Oid` with text string
* Fix `CheckoutNotify.IGNORED`
* Use default error handler when decoding/encoding paths
* Remove setuptools runtime dependency
* Coding style with ruff
* Add wheels for ppc64le
* Fix tests on EPEL8 builds for s390x
* Deprecate `IndexEntry.hex`, use `str(IndexEntry.id)`
* Remove deprecated `oid.hex`, use `str(oid)`
* Remove deprecated `object.hex`, use `str(object.id)`
* Remove deprecated `object.oid`, use `object.id`
* Remove deprecated `Repository.add_submodule(...)`, use `Repository.submodules.add(...)`
* Remove deprecated `Repository.lookup_submodule(...)`, use `Repository.submodules[...]`
* Remove deprecated `Repository.init_submodules(...)`, use `Repository.submodules.init(...)`
* Remove deprecated `Repository.update_submodule(...)`, use `Repository.submodules.update(...)`
* Remove deprecated constants `GIT_OBJ_XXX`, use `ObjectType`
* Remove deprecated constants `GIT_REVPARSE_XXX`, use `RevSpecFlag`
* Remove deprecated constants `GIT_REF_XXX`, use `ReferenceType`
* Remove deprecated `ReferenceType.OID`, use instead `ReferenceType.DIRECT`
* Remove deprecated `ReferenceType.LISTALL`, use instead `ReferenceType.ALL`
* Remove deprecated support for passing dicts to repository\'s `merge(...)`,
`merge_commits(...)` and `merge_trees(...)`. Instead pass `MergeFlag` for `flags`, and
`MergeFileFlag` for `file_flags`.
* Remove deprecated support for passing a string for the favor argument to repository\'s
`merge(...)`, `merge_commits(...)` and `merge_trees(...)`. Instead pass `MergeFavor`.
- Drop patches for issues fixed upstream
* Fix-CI.patch
* Fix-leaks-in-fetch_refspecs-and-push_refspecs.patch
* pygit2-Upgrade_to_libgit2_v1_8_0.patch
* pygit2-Upgrade_to_libgit2_v1_8_1-2.patch
* pygit2-Upgrade_to_libgit2_v1_8_1.patch
- Disable test test_push_options which currently segfaults
- Update BuildRequires from setup.py
------------------------------------------------------------------- -------------------------------------------------------------------
Fri May 17 10:57:08 UTC 2024 - Dirk Müller <dmueller@suse.com> Fri May 17 10:57:08 UTC 2024 - Dirk Müller <dmueller@suse.com>

View File

@@ -1,7 +1,8 @@
# #
# spec file for package python-pygit2 # spec file for package python-pygit2
# #
# Copyright (c) 2024 SUSE LLC # Copyright (c) 2025 SUSE LLC
# Copyright (c) 2025 SUSE LLC and contributors
# Copyright (c) 2019 Neal Gompa <ngompa13@gmail.com>. # Copyright (c) 2019 Neal Gompa <ngompa13@gmail.com>.
# #
# All modifications and additions to the file contributed by third parties # All modifications and additions to the file contributed by third parties
@@ -19,24 +20,15 @@
%{?sle15_python_module_pythons} %{?sle15_python_module_pythons}
Name: python-pygit2 Name: python-pygit2
Version: 1.14.1 Version: 1.18.2
Release: 0 Release: 0
Summary: Python bindings for libgit2 Summary: Python bindings for libgit2
License: GPL-2.0-only License: GPL-2.0-only
URL: https://github.com/libgit2/pygit2 URL: https://github.com/libgit2/pygit2
Source: https://files.pythonhosted.org/packages/source/p/pygit2/pygit2-%{version}.tar.gz Source: https://files.pythonhosted.org/packages/source/p/pygit2/pygit2-%{version}.tar.gz
# PATCH-FIX-UPSTREAM pygit2-Upgrade_to_libgit2_v1_8_0.patch gh#libgit2/pygit2@6d539d76b53b BuildRequires: %{python_module base >= 3.10}
Patch0: pygit2-Upgrade_to_libgit2_v1_8_0.patch
# PATCH-FIX-UPSTREAM - fixup for the libgit 1.8 support
Patch1: Fix-CI.patch
# PATCH-FIX-UPSTREAM
Patch2: pygit2-Upgrade_to_libgit2_v1_8_1.patch
# PATCH-FIX-UPSTREAM
Patch3: pygit2-Upgrade_to_libgit2_v1_8_1-2.patch
# PATCH-FIX-UPSTREAM - happens to eliminate bogus pointer casts
Patch4: Fix-leaks-in-fetch_refspecs-and-push_refspecs.patch
BuildRequires: %{python_module cached-property} BuildRequires: %{python_module cached-property}
BuildRequires: %{python_module cffi >= 1.4.0} BuildRequires: %{python_module cffi >= 1.17.0}
BuildRequires: %{python_module devel} BuildRequires: %{python_module devel}
BuildRequires: %{python_module pip} BuildRequires: %{python_module pip}
BuildRequires: %{python_module pytest} BuildRequires: %{python_module pytest}
@@ -45,11 +37,11 @@ BuildRequires: %{python_module wheel}
BuildRequires: ca-certificates BuildRequires: ca-certificates
BuildRequires: ca-certificates-mozilla BuildRequires: ca-certificates-mozilla
BuildRequires: fdupes BuildRequires: fdupes
BuildRequires: libgit2-devel >= 1.1 BuildRequires: libgit2-devel >= 1.9.0
BuildRequires: libopenssl-devel BuildRequires: libopenssl-devel
BuildRequires: python-rpm-macros BuildRequires: python-rpm-macros
Requires: python-cached-property Requires: python-cached-property
%requires_eq python-cffi Requires: python-cffi >= 1.17.0
%python_subpackages %python_subpackages
%description %description
@@ -57,12 +49,6 @@ Bindings for libgit2, a linkable C library for the Git version-control system.
%prep %prep
%autosetup -p1 -n pygit2-%{version} %autosetup -p1 -n pygit2-%{version}
%if %{?pkg_vcmp:%pkg_vcmp libgit2-devel < 1.8}%{!?pkg_vcmp:1}
%patch -P 3 -p1 -R
%patch -P 2 -p1 -R
%patch -P 1 -p1 -R
%patch -P 0 -p1 -R
%endif
# do not add options to pytest # do not add options to pytest
rm pytest.ini rm pytest.ini
@@ -80,7 +66,9 @@ export CFLAGS="%{optflags} -fno-strict-aliasing"
rm -rf pygit2 rm -rf pygit2
# test_no_context_lines failing on big endian # test_no_context_lines failing on big endian
# https://github.com/libgit2/pygit2/issues/812 # https://github.com/libgit2/pygit2/issues/812
%pytest_arch -k 'not test_no_context_lines' donttest="test_no_context_lines"
donttest="$donttest or test_push_options"
%pytest_arch -k "not ($donttest)"
%files %{python_files} %files %{python_files}
%license COPYING %license COPYING