forked from douban/pygit2
-
Notifications
You must be signed in to change notification settings - Fork 0
sync upstream #1
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
Open
tclh123
wants to merge
1,786
commits into
tclh123:master
Choose a base branch
from
libgit2:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Changelog, readme, etc.
ReferenceType.OID and LISTALL were also deprecated (in favor of DIRECT and ALL) to keep in sync with libgit2's own deprecated enums.
On Fedora 40, this test fails with: __________________________________ test_fetch __________________________________ emptyrepo = pygit2.Repository('/tmp/pytest-of-mockbuild/pytest-0/test_fetch0/emp tyrepo/.git/') def test_fetch(emptyrepo): remote = emptyrepo.remotes[0] stats = remote.fetch() > assert stats.received_bytes == REMOTE_REPO_BYTES E assert 2760 == 2758 E + where 2760 = <pygit2.remote.TransferProgress object at 0xf60a7db0>.received_bytes test/test_remote.py:218: AssertionError Probably due to zlib-ng/zlib differences.
It would be great to have ppc64le manylinux wheels available on PyPI.
The change from wimglenn@aab211a incorrectly made setuptools a runtime dependency of pygit2. It is not a runtime dependency, it is only a build dependency (pkg_resources / setuptools are not used outside of the installer script setup.py). It should be possible to use pygit2 without needing setuptools installed.
On EPEL8 builds for s390x this transfers ~3040 bytes: __________________________________ test_fetch __________________________________ emptyrepo = pygit2.Repository('/tmp/pytest-of-mockbuild/pytest-0/test_fetch0/emptyrepo/.git/') def test_fetch(emptyrepo): remote = emptyrepo.remotes[0] stats = remote.fetch() assert stats.received_bytes > 2700 > assert stats.received_bytes < 2800 E assert 3041 < 2800 E + where 3041 = <pygit2.remotes.TransferProgress object at 0x3ffa8668dd0>.received_bytes test/test_remote.py:218: AssertionError Would be too easy if this were deterministic. Signed-off-by: Nils Philippsen <[email protected]>
Also use git_strarray_dispose instead of deprecated git_strarray_free. And fix a couple of build warnings in git_commit_create.
To emphasize that the StrArray() context manager returns a pointer, implement its ptr() property and use it whenever calling a C function that takes a pointer to a git_strarray structure as a parameter.
Enable the StrArray() context manager to be used for assigning a list of strings to a pre-existing git_strarray structure. This is useful when some other structure contains a git_strarray (rather than a pointer to it).
Add a new keyword argument to Remote.push() that is a counterpart of `git push --push-option=<string>`. Fixes #1126
And small coding improvements related to git_strarray
This is a first step according to the documentation https://mypy.readthedocs.io/en/stable/existing_code.html#getting-to-strict
This commit adds a setter for the url property of the Submodule class. The new setter leverages 'git_submodule_set_url' from libgit2.
Since the minium declared python version is 3.10 we don't need the Union and Option and many type imports should be done from collections.abc. so i ran fd --extension py --type f --exec pyupgrade --py310-plus on the repo. All changes are automated, i.e. no manual edit.
This hopefully helps with future typings.
Just for the future reference used this asnwer from so https://stackoverflow.com/questions/79371127/module-does-not-explicitly-export-attribute-attr-defined
This was straight forward using legacy ParamSpec syntax: https://mypy.readthedocs.io/en/stable/generics.html#declaring-decorators
Not all fixes done yet.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.