-
-
Notifications
You must be signed in to change notification settings - Fork 404
Implement (almost) all global options #1409
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
@@ -145,7 +145,7 @@ class StrArray: | |||
|
|||
__array: 'GitStrrayC | ffi.NULL_TYPE' | |||
__strings: list['None | ArrayC[char]'] | |||
__arr: 'ArrayC[char]' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A strarray is an array of strings, not a single string.
@@ -178,7 +178,7 @@ if [ -n "$LIBGIT2_VERSION" ]; then | |||
wget https://github.com/libgit2/libgit2/archive/refs/tags/v$LIBGIT2_VERSION.tar.gz -N -O $FILENAME.tar.gz | |||
tar xf $FILENAME.tar.gz | |||
cd $FILENAME | |||
mkdir build -p | |||
mkdir -p build |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Otherwise this fails on macOS where mkdir
doesn't use the GNU version.
I can reproduce the openssl segfault on Ubuntu with:
So far I had a test with a dummy cert there, which looks like it's harmful. Let me adjust this one test to add an actual cert. |
This pull request is split into two commits, doing those things:
Commit 1: moves option handling from the Python C API to CFFI
This simplifies future edits and removes some static typing weirdness around the
_pygit2.pyi
file needing Python-level enums to express the C-level functional API.Mostly, this moves pygit2 in the direction of being more CFFI, which will eventually lead to beautiful things like not needing to push new wheels every time a new version of Python comes out (i.e. #1046).
This diff is actually red (more lines removed than added).
Commit 2: implements all remaining options
...save for
GIT_OPT_SET_ALLOCATOR
, which I'm pretty confident is useless for Python users, and next to impossible to get right.But other options that were missing so far are handled, including three network related that I was really looking forward to:
SET_SERVER_TIMEOUT
,SET_SERVER_CONNECT_TIMEOUT
, andENABLE_HTTP_EXPECT_CONTINUE
.All new options have a corresponding test.