Skip to content
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

Bump pygit2 from 0.28.2 to 1.6.1 #379

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

taylorjacklespriggs
Copy link

To be compatible with libgit2>=1.0

@taylorjacklespriggs
Copy link
Author

addresses #323

@taylorjacklespriggs
Copy link
Author

test results:

script/testenv
Requirement already satisfied: cffi in ./build/virtualenv/lib/python3.9/site-packages (1.12.3)
Requirement already satisfied: pycparser in ./build/virtualenv/lib/python3.9/site-packages (from cffi) (2.20)
WARNING: You are using pip version 21.2.4; however, version 21.3 is available.
You should consider upgrading via the '/Users/tjackles/gitfs/build/virtualenv/bin/python3.9 -m pip install --upgrade pip' command.
Requirement already satisfied: atomiclong==0.1.1 in ./build/virtualenv/lib/python3.9/site-packages (from -r requirements.txt (line 1)) (0.1.1)
Requirement already satisfied: cffi==1.12.3 in ./build/virtualenv/lib/python3.9/site-packages (from -r requirements.txt (line 2)) (1.12.3)
Requirement already satisfied: fusepy==3.0.1 in ./build/virtualenv/lib/python3.9/site-packages (from -r requirements.txt (line 3)) (3.0.1)
Requirement already satisfied: pycparser==2.20 in ./build/virtualenv/lib/python3.9/site-packages (from -r requirements.txt (line 4)) (2.20)
Requirement already satisfied: pygit2==1.6.1 in ./build/virtualenv/lib/python3.9/site-packages (from -r requirements.txt (line 5)) (1.6.1)
Requirement already satisfied: raven==6.10.0 in ./build/virtualenv/lib/python3.9/site-packages (from -r requirements.txt (line 6)) (6.10.0)
Requirement already satisfied: six==1.12.0 in ./build/virtualenv/lib/python3.9/site-packages (from -r requirements.txt (line 7)) (1.12.0)
Requirement already satisfied: mock==1.0.1 in ./build/virtualenv/lib/python3.9/site-packages (from -r test_requirements.txt (line 2)) (1.0.1)
Requirement already satisfied: pytest==4.6.5 in ./build/virtualenv/lib/python3.9/site-packages (from -r test_requirements.txt (line 3)) (4.6.5)
Requirement already satisfied: pytest-cov==2.8.1 in ./build/virtualenv/lib/python3.9/site-packages (from -r test_requirements.txt (line 4)) (2.8.1)
Requirement already satisfied: pluggy<1.0,>=0.12 in ./build/virtualenv/lib/python3.9/site-packages (from pytest==4.6.5->-r test_requirements.txt (line 3)) (0.13.1)
Requirement already satisfied: importlib-metadata>=0.12 in ./build/virtualenv/lib/python3.9/site-packages (from pytest==4.6.5->-r test_requirements.txt (line 3)) (4.8.1)
Requirement already satisfied: more-itertools>=4.0.0 in ./build/virtualenv/lib/python3.9/site-packages (from pytest==4.6.5->-r test_requirements.txt (line 3)) (8.10.0)
Requirement already satisfied: py>=1.5.0 in ./build/virtualenv/lib/python3.9/site-packages (from pytest==4.6.5->-r test_requirements.txt (line 3)) (1.10.0)
Requirement already satisfied: attrs>=17.4.0 in ./build/virtualenv/lib/python3.9/site-packages (from pytest==4.6.5->-r test_requirements.txt (line 3)) (21.2.0)
Requirement already satisfied: atomicwrites>=1.0 in ./build/virtualenv/lib/python3.9/site-packages (from pytest==4.6.5->-r test_requirements.txt (line 3)) (1.4.0)
Requirement already satisfied: packaging in ./build/virtualenv/lib/python3.9/site-packages (from pytest==4.6.5->-r test_requirements.txt (line 3)) (21.0)
Requirement already satisfied: wcwidth in ./build/virtualenv/lib/python3.9/site-packages (from pytest==4.6.5->-r test_requirements.txt (line 3)) (0.2.5)
Requirement already satisfied: coverage>=4.4 in ./build/virtualenv/lib/python3.9/site-packages (from pytest-cov==2.8.1->-r test_requirements.txt (line 4)) (6.0.2)
Requirement already satisfied: zipp>=0.5 in ./build/virtualenv/lib/python3.9/site-packages (from importlib-metadata>=0.12->pytest==4.6.5->-r test_requirements.txt (line 3)) (3.6.0)
Requirement already satisfied: pyparsing>=2.0.2 in ./build/virtualenv/lib/python3.9/site-packages (from packaging->pytest==4.6.5->-r test_requirements.txt (line 3)) (2.4.7)
WARNING: You are using pip version 21.2.4; however, version 21.3 is available.
You should consider upgrading via the '/Users/tjackles/gitfs/build/virtualenv/bin/python3.9 -m pip install --upgrade pip' command.
Initialized empty Git repository in /private/tmp/gitfs-tests/testing_repo.git/
Cloning into '/tmp/gitfs-tests/testing_repo'...
warning: You appear to have cloned an empty repository.
done.
[master (root-commit) 01e4f2e] Initial test commit
 Committer: Taylor Spriggs <[email protected]>
Your name and email address were configured automatically based
on your username and hostname. Please check that they are accurate.
You can suppress this message by setting them explicitly. Run the
following command and follow the instructions in your editor to edit
your configuration file:

    git config --global --edit

After doing this, you may fix the identity used for this commit with:

    git commit --amend --reset-author

 2 files changed, 1 insertion(+)
 create mode 100644 me
 create mode 100644 testing
To /tmp/gitfs-tests/testing_repo.git
 * [new branch]      master -> master
Branch 'master' set up to track remote branch 'master' from 'origin'.
script/test
Obtaining file:///Users/tjackles/gitfs
Requirement already satisfied: atomiclong==0.1.1 in ./build/virtualenv/lib/python3.9/site-packages (from gitfs==0.5.2) (0.1.1)
Requirement already satisfied: cffi==1.12.3 in ./build/virtualenv/lib/python3.9/site-packages (from gitfs==0.5.2) (1.12.3)
Requirement already satisfied: fusepy==3.0.1 in ./build/virtualenv/lib/python3.9/site-packages (from gitfs==0.5.2) (3.0.1)
Requirement already satisfied: pycparser==2.20 in ./build/virtualenv/lib/python3.9/site-packages (from gitfs==0.5.2) (2.20)
Requirement already satisfied: pygit2==1.6.1 in ./build/virtualenv/lib/python3.9/site-packages (from gitfs==0.5.2) (1.6.1)
Requirement already satisfied: raven==6.10.0 in ./build/virtualenv/lib/python3.9/site-packages (from gitfs==0.5.2) (6.10.0)
Requirement already satisfied: six==1.12.0 in ./build/virtualenv/lib/python3.9/site-packages (from gitfs==0.5.2) (1.12.0)
Installing collected packages: gitfs
  Attempting uninstall: gitfs
    Found existing installation: gitfs 0.5.2
    Uninstalling gitfs-0.5.2:
      Successfully uninstalled gitfs-0.5.2
  Running setup.py develop for gitfs
Successfully installed gitfs-0.5.2
WARNING: You are using pip version 21.2.4; however, version 21.3 is available.
You should consider upgrading via the '/Users/tjackles/gitfs/build/virtualenv/bin/python3.9 -m pip install --upgrade pip' command.
============================= test session starts ==============================
platform darwin -- Python 3.9.7, pytest-4.6.5, py-1.10.0, pluggy-0.13.1
rootdir: /Users/tjackles/gitfs
plugins: cov-2.8.1
collected 222 items

tests/test_mount.py .....                                                [  2%]
tests/test_router.py ..........                                          [  6%]
tests/cache/test_base.py .....                                           [  9%]
tests/cache/test_commits.py .F                                           [  9%]
tests/cache/test_gitignore.py ...                                        [ 11%]
tests/cache/test_lru.py ....                                             [ 13%]
tests/cache/test_node.py .                                               [ 13%]
tests/integrations/commit/test_read.py ..                                [ 14%]
tests/integrations/commit/test_write.py .                                [ 14%]
tests/integrations/current/test_read.py ...                              [ 16%]
tests/integrations/current/test_write.py Uncaught exception from FUSE operation releasedir, returning errno.EINVAL.
Traceback (most recent call last):
  File "/Users/tjackles/gitfs/build/virtualenv/lib/python3.9/site-packages/fuse.py", line 734, in _wrapper
    return func(*args, **kwargs) or 0
  File "/Users/tjackles/gitfs/build/virtualenv/lib/python3.9/site-packages/fuse.py", line 980, in releasedir
    return self.operations('releasedir', self._decode_optional_path(path),
  File "/Users/tjackles/gitfs/gitfs/router.py", line 139, in __call__
    view, relative_path = self.get_view(path)
  File "/Users/tjackles/gitfs/gitfs/router.py", line 211, in get_view
    raise ValueError("Found no view for '{}'".format(path))
ValueError: Found no view for '-'
.Uncaught exception from FUSE operation releasedir, returning errno.EINVAL.
Traceback (most recent call last):
  File "/Users/tjackles/gitfs/build/virtualenv/lib/python3.9/site-packages/fuse.py", line 734, in _wrapper
    return func(*args, **kwargs) or 0
  File "/Users/tjackles/gitfs/build/virtualenv/lib/python3.9/site-packages/fuse.py", line 980, in releasedir
    return self.operations('releasedir', self._decode_optional_path(path),
  File "/Users/tjackles/gitfs/gitfs/router.py", line 139, in __call__
    view, relative_path = self.get_view(path)
  File "/Users/tjackles/gitfs/gitfs/router.py", line 211, in get_view
    raise ValueError("Found no view for '{}'".format(path))
ValueError: Found no view for '-'
Uncaught exception from FUSE operation releasedir, returning errno.EINVAL.
Traceback (most recent call last):
  File "/Users/tjackles/gitfs/build/virtualenv/lib/python3.9/site-packages/fuse.py", line 734, in _wrapper
    return func(*args, **kwargs) or 0
  File "/Users/tjackles/gitfs/build/virtualenv/lib/python3.9/site-packages/fuse.py", line 980, in releasedir
    return self.operations('releasedir', self._decode_optional_path(path),
  File "/Users/tjackles/gitfs/gitfs/router.py", line 139, in __call__
    view, relative_path = self.get_view(path)
  File "/Users/tjackles/gitfs/gitfs/router.py", line 211, in get_view
    raise ValueError("Found no view for '{}'".format(path))
ValueError: Found no view for '-'
...................            [ 25%]
tests/integrations/history/test_read.py ....                             [ 27%]
tests/integrations/history/test_write.py .                               [ 27%]
tests/integrations/index/test_read.py .                                  [ 27%]
tests/integrations/index/test_write.py .                                 [ 28%]
tests/integrations/repository/test_repository.py .....                   [ 30%]
tests/mergers/test_accept_mine.py ......                                 [ 33%]
tests/mergers/test_base.py .                                             [ 33%]
tests/repository/test_repository.py ...........................          [ 45%]
tests/utils/test_args.py .                                               [ 46%]
tests/utils/test_commit_list.py ......                                   [ 49%]
tests/utils/test_decorators.py ...                                       [ 50%]
tests/utils/test_not_in.py ...                                           [ 51%]
tests/utils/test_path_utils.py .                                         [ 52%]
tests/utils/test_strptime.py ..                                          [ 53%]
tests/views/test_commit.py ...............                               [ 59%]
tests/views/test_current.py .........................                    [ 71%]
tests/views/test_history.py .............                                [ 77%]
tests/views/test_index.py ...                                            [ 78%]
tests/views/test_passthrough.py ........................                 [ 89%]
tests/views/test_read_only.py ....                                       [ 90%]
tests/views/test_view.py .                                               [ 91%]
tests/workers/test_fetch.py ...                                          [ 92%]
tests/workers/test_peasant.py .                                          [ 93%]
tests/workers/test_queue.py .......                                      [ 96%]
tests/workers/test_sync.py ........                                      [100%]

=================================== FAILURES ===================================
__________________________ TestCommitCache.test_cache __________________________

self = <tests.cache.test_commits.TestCommitCache object at 0x10abe6130>

    def test_cache(self):
        mocked_repo = MagicMock()
        mocked_commit = MagicMock()
    
        mocked_repo.lookup_reference().resolve().target = "head"
        mocked_repo.walk.return_value = [mocked_commit]
        mocked_commit.commit_time = 1411135000
        mocked_commit.hex = "1111111111"
    
        cache = CommitCache(mocked_repo)
        cache.update()
    
        cache["2014-09-20"] = Commit(1, 1, "1111111111")
        assert sorted(cache.keys()) == ["2014-09-19", "2014-09-20"]
        asserted_time = datetime.fromtimestamp(mocked_commit.commit_time)
        asserted_time = "{}-{}-{}".format(
            asserted_time.hour, asserted_time.minute, asserted_time.second
        )
>       assert repr(cache["2014-09-19"]) == "[%s-1111111111]" % asserted_time
E       AssertionError

tests/cache/test_commits.py:53: AssertionError
=============================== warnings summary ===============================
gitfs/cache/base.py:18
  /Users/tjackles/gitfs/gitfs/cache/base.py:18: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated since Python 3.3, and in 3.10 it will stop working
    class Cache(collections.MutableMapping):

tests/views/test_current.py::TestCurrentView::test_rename
tests/views/test_current.py::TestCurrentView::test_rename_in_git_dir
tests/views/test_current.py::TestCurrentView::test_symlink
tests/views/test_current.py::TestCurrentView::test_write_in_git_dir
tests/views/test_current.py::TestCurrentView::test_write_in_modules_dir
tests/views/test_current.py::TestCurrentView::test_write_to_large_file
tests/views/test_current.py::TestCurrentView::test_write
tests/views/test_current.py::TestCurrentView::test_mkdir
tests/views/test_current.py::TestCurrentView::test_mkdir_in_git_dir
tests/views/test_current.py::TestCurrentView::test_create_in_git_dir
tests/views/test_current.py::TestCurrentView::test_chmod_in_git_dir
tests/views/test_current.py::TestCurrentView::test_chmod
tests/views/test_current.py::TestCurrentView::test_chmod_on_dir
tests/views/test_current.py::TestCurrentView::test_fsync_a_file_from_git_dir
tests/views/test_current.py::TestCurrentView::test_fsync
tests/views/test_current.py::TestCurrentView::test_unlink_from_git_dir
tests/views/test_current.py::TestCurrentView::test_unlink
tests/views/test_current.py::TestCurrentView::test_open
  /Users/tjackles/gitfs/gitfs/utils/decorators/not_in.py:47: DeprecationWarning: inspect.getargspec() is deprecated since Python 3.0, use inspect.signature() or inspect.getfullargspec()
    args = inspect.getargspec(f)

-- Docs: https://docs.pytest.org/en/latest/warnings.html

---------- coverage: platform darwin, python 3.9.7-final-0 -----------
Name                                        Stmts   Miss  Cover   Missing
-------------------------------------------------------------------------
gitfs/__init__.py                               4      2    50%   19-21
gitfs/__main__.py                               2      2     0%   19-21
gitfs/cache/__init__.py                         4      0   100%
gitfs/cache/base.py                            46      0   100%
gitfs/cache/commits.py                         38      2    95%   53, 59
gitfs/cache/decorators/__init__.py              1      0   100%
gitfs/cache/decorators/lru.py                  49      2    96%   6-7
gitfs/cache/gitignore.py                       57      5    91%   62-64, 69, 90
gitfs/cache/lru.py                             64      4    94%   18-19, 67, 88
gitfs/cache/node.py                             2      0   100%
gitfs/events/__init__.py                       15      0   100%
gitfs/log.py                                    2      0   100%
gitfs/merges/__init__.py                        1      0   100%
gitfs/merges/accept_mine.py                    77      4    95%   109-111, 138
gitfs/merges/base.py                            5      0   100%
gitfs/mounter.py                               51      7    86%   77-82, 127-128, 147, 160
gitfs/repository.py                           191     16    92%   68, 82, 116, 125-126, 200-201, 255-262, 403-404, 413, 418
gitfs/router.py                               106      0   100%
gitfs/routes.py                                11      9    18%   22-42
gitfs/utils/__init__.py                         3      0   100%
gitfs/utils/args.py                            99     19    81%   83, 92, 102-110, 113-126, 142, 160, 162, 179, 182, 188
gitfs/utils/commits.py                         21      0   100%
gitfs/utils/decorators/__init__.py              0      0   100%
gitfs/utils/decorators/not_in.py               32      0   100%
gitfs/utils/decorators/retry.py                18      0   100%
gitfs/utils/decorators/while_not.py            21      1    95%   34
gitfs/utils/decorators/write_operation.py      19      3    84%   29, 35-36
gitfs/utils/path.py                            14      0   100%
gitfs/utils/strptime.py                        62      2    97%   74-75
gitfs/views/__init__.py                         6      0   100%
gitfs/views/commit.py                          57      0   100%
gitfs/views/current.py                        195     37    81%   64-73, 150, 192, 203, 228-243, 265-267, 271, 278-279, 288-297, 301, 306
gitfs/views/history.py                         45      0   100%
gitfs/views/index.py                           17      0   100%
gitfs/views/passthrough.py                    100      4    96%   63, 90, 159, 162
gitfs/views/read_only.py                       36      0   100%
gitfs/views/view.py                            10      0   100%
gitfs/worker/__init__.py                        3      0   100%
gitfs/worker/commit_queue.py                   25      0   100%
gitfs/worker/fetch.py                          29      6    79%   34-35, 49-53
gitfs/worker/peasant.py                        13      4    69%   31-34
gitfs/worker/sync.py                          129     22    83%   67-68, 72-77, 102, 113-120, 123, 150-152, 173-175, 212
-------------------------------------------------------------------------
TOTAL                                        1680    151    91%

Required test coverage of 90.0% reached. Total coverage: 91.01%
============== 1 failed, 221 passed, 19 warnings in 11.97 seconds ==============
make: *** [test] Error 1

This appears to be the same result I get when running tests on the master branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants