Skip to content

Remove six and upgrade development vagrant #337

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
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
VAGRANTFILE_API_VERSION = "2"

Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "ubuntu/bionic64"
config.vm.box = "ubuntu/focal64"
config.ssh.forward_agent = true
config.vm.provision "shell", path: "script/provision", privileged: false
end
4 changes: 1 addition & 3 deletions gitfs/cache/gitignore.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@
import os
import fnmatch

from six import string_types


class CachedIgnore(object):
def __init__(self, ignore=False, submodules=False, exclude=False, hard_ignore=None):
Expand Down Expand Up @@ -65,7 +63,7 @@ def _parse_ignore_file(self, ignore_file):
return items

def _parse_hard_ignore(self, hard_ignore):
if isinstance(hard_ignore, string_types):
if isinstance(hard_ignore, str):
return hard_ignore.split("|")
else:
return []
Expand Down
3 changes: 1 addition & 2 deletions gitfs/merges/accept_mine.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@


import pygit2
import six

from gitfs.log import log
from .base import Merger
Expand Down Expand Up @@ -132,7 +131,7 @@ def solve_conflicts(self, conflicts):
log.debug("AcceptMine: overwrite all file with our " "content")
with open(self.repository._full_path(ours.path), "w") as f:
data = self.repository.get(ours.id).data
f.write(six.text_type(data))
f.write(data)
self.repository.index.add(ours.path)
else:
log.info("AcceptMine: No conflicts to solve")
3 changes: 1 addition & 2 deletions gitfs/repository.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
GIT_BRANCH_LOCAL,
GIT_FILEMODE_BLOB_EXECUTABLE,
)
from six import iteritems

from gitfs.cache import CommitCache
from gitfs.log import log
Expand Down Expand Up @@ -94,7 +93,7 @@ def checkout(self, ref, *args, **kwargs):
self.ignore.update()

status = self._repo.status()
for path, status in iteritems(status):
for path, status in status.items():
# path is in current status, move on
if status == GIT_STATUS_CURRENT:
continue
Expand Down
5 changes: 2 additions & 3 deletions gitfs/utils/args.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@
from logging import Formatter, StreamHandler
from logging.handlers import TimedRotatingFileHandler, SysLogHandler
from collections import OrderedDict
from six import iteritems
from six.moves.urllib.parse import urlparse
from urllib.parse import urlparse

from gitfs.log import log
from gitfs.cache import lru_cache
Expand Down Expand Up @@ -144,7 +143,7 @@ def __getattr__(self, attr):
return getattr(self.__dict__["config"], attr)

def set_defaults(self, args):
for option, value in iteritems(self.DEFAULTS):
for option, value in self.DEFAULTS.items():
new_value = getattr(args, option, None)

if not new_value:
Expand Down
4 changes: 1 addition & 3 deletions gitfs/utils/decorators/not_in.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@
import inspect
from functools import wraps

from six import string_types

from fuse import FuseOSError


Expand All @@ -31,7 +29,7 @@ def __call__(self, f):
@wraps(f)
def decorated(their_self, *args, **kwargs):
# TODO: check for look_at in self first
if isinstance(self.look_at, string_types):
if isinstance(self.look_at, str):
self.look_at = getattr(their_self, self.look_at)

self.check_args(f, args)
Expand Down
2 changes: 1 addition & 1 deletion gitfs/worker/commit_queue.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

from six.moves.queue import Queue
from queue import Queue

from gitfs.log import log

Expand Down
4 changes: 1 addition & 3 deletions gitfs/worker/peasant.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,14 @@

from threading import Thread

from six import iteritems

from gitfs.log import log


class Peasant(Thread):
def __init__(self, *args, **kwargs):
super(Peasant, self).__init__()

for name, value in iteritems(kwargs):
for name, value in kwargs.items():
setattr(self, name, value)

def run(self):
Expand Down
2 changes: 1 addition & 1 deletion gitfs/worker/sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
# limitations under the License.
import random
import time
from queue import Empty

import pygit2
from six.moves.queue import Empty

from gitfs.worker.peasant import Peasant
from gitfs.merges import AcceptMine
Expand Down
1 change: 0 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,3 @@ fusepy==3.0.1
pycparser==2.19
pygit2==0.28.2
raven==6.10.0
six==1.12.0
10 changes: 10 additions & 0 deletions script/lextab.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# lextab.py. This file automatically created by PLY (version 3.10). Don't edit!
_tabversion = '3.10'
_lextokens = set(('MODEQUAL', 'LE', 'FLOAT', 'SHORT', 'TIMES', 'ANDEQUAL', 'MINUSMINUS', 'STRUCT', '_BOOL', 'ELLIPSIS', 'ELSE', 'SIGNED', 'UNION', 'INT', 'PPPRAGMASTR', 'XOREQUAL', 'LBRACKET', 'LOR', 'MOD', 'LSHIFT', 'COLON', 'MINUS', 'EQ', 'LONG', 'XOR', 'TYPEDEF', 'REGISTER', 'TYPEID', 'CHAR_CONST', 'STRING_LITERAL', 'LNOT', 'VOID', 'DIVEQUAL', 'OREQUAL', 'RBRACE', 'OR', 'PERIOD', 'CASE', 'WHILE', 'LBRACE', 'FLOAT_CONST', 'LSHIFTEQUAL', '__INT128', 'RSHIFTEQUAL', 'RETURN', 'RESTRICT', 'EXTERN', 'EQUALS', 'RBRACKET', 'PPHASH', 'GOTO', 'LAND', 'ID', 'FOR', 'RSHIFT', 'ENUM', 'IF', 'CONDOP', 'CONTINUE', 'NOT', 'INT_CONST_HEX', 'WSTRING_LITERAL', '_COMPLEX', 'BREAK', 'ARROW', 'MINUSEQUAL', 'UNSIGNED', 'COMMA', 'DOUBLE', 'PLUS', 'CONST', 'GE', 'PLUSPLUS', 'GT', 'SWITCH', 'DIVIDE', 'WCHAR_CONST', 'LPAREN', 'VOLATILE', 'LT', 'NE', 'RPAREN', 'PLUSEQUAL', 'CHAR', 'OFFSETOF', 'SEMI', 'AUTO', 'PPPRAGMA', 'INLINE', 'INT_CONST_DEC', 'DO', 'INT_CONST_OCT', 'DEFAULT', 'INT_CONST_BIN', 'AND', 'HEX_FLOAT_CONST', 'SIZEOF', 'TIMESEQUAL', 'STATIC'))
_lexreflags = 64
_lexliterals = ''
_lexstateinfo = {'INITIAL': 'inclusive', 'ppline': 'exclusive', 'pppragma': 'exclusive'}
_lexstatere = {'INITIAL': [('(?P<t_PPHASH>[ \\t]*\\#)|(?P<t_NEWLINE>\\n+)|(?P<t_LBRACE>\\{)|(?P<t_RBRACE>\\})|(?P<t_FLOAT_CONST>((((([0-9]*\\.[0-9]+)|([0-9]+\\.))([eE][-+]?[0-9]+)?)|([0-9]+([eE][-+]?[0-9]+)))[FfLl]?))|(?P<t_HEX_FLOAT_CONST>(0[xX]([0-9a-fA-F]+|((([0-9a-fA-F]+)?\\.[0-9a-fA-F]+)|([0-9a-fA-F]+\\.)))([pP][+-]?[0-9]+)[FfLl]?))|(?P<t_INT_CONST_HEX>0[xX][0-9a-fA-F]+(([uU]ll)|([uU]LL)|(ll[uU]?)|(LL[uU]?)|([uU][lL])|([lL][uU]?)|[uU])?)|(?P<t_INT_CONST_BIN>0[bB][01]+(([uU]ll)|([uU]LL)|(ll[uU]?)|(LL[uU]?)|([uU][lL])|([lL][uU]?)|[uU])?)|(?P<t_BAD_CONST_OCT>0[0-7]*[89])|(?P<t_INT_CONST_OCT>0[0-7]*(([uU]ll)|([uU]LL)|(ll[uU]?)|(LL[uU]?)|([uU][lL])|([lL][uU]?)|[uU])?)|(?P<t_INT_CONST_DEC>(0(([uU]ll)|([uU]LL)|(ll[uU]?)|(LL[uU]?)|([uU][lL])|([lL][uU]?)|[uU])?)|([1-9][0-9]*(([uU]ll)|([uU]LL)|(ll[uU]?)|(LL[uU]?)|([uU][lL])|([lL][uU]?)|[uU])?))|(?P<t_CHAR_CONST>\'([^\'\\\\\\n]|(\\\\(([a-zA-Z._~!=&\\^\\-\\\\?\'"])|(\\d+)|(x[0-9a-fA-F]+))))\')|(?P<t_WCHAR_CONST>L\'([^\'\\\\\\n]|(\\\\(([a-zA-Z._~!=&\\^\\-\\\\?\'"])|(\\d+)|(x[0-9a-fA-F]+))))\')|(?P<t_UNMATCHED_QUOTE>(\'([^\'\\\\\\n]|(\\\\(([a-zA-Z._~!=&\\^\\-\\\\?\'"])|(\\d+)|(x[0-9a-fA-F]+))))*\\n)|(\'([^\'\\\\\\n]|(\\\\(([a-zA-Z._~!=&\\^\\-\\\\?\'"])|(\\d+)|(x[0-9a-fA-F]+))))*$))|(?P<t_BAD_CHAR_CONST>(\'([^\'\\\\\\n]|(\\\\(([a-zA-Z._~!=&\\^\\-\\\\?\'"])|(\\d+)|(x[0-9a-fA-F]+))))[^\'\n]+\')|(\'\')|(\'([\\\\][^a-zA-Z._~^!=&\\^\\-\\\\?\'"x0-7])[^\'\\n]*\'))|(?P<t_WSTRING_LITERAL>L"([^"\\\\\\n]|(\\\\(([a-zA-Z._~!=&\\^\\-\\\\?\'"])|(\\d+)|(x[0-9a-fA-F]+))))*")|(?P<t_BAD_STRING_LITERAL>"([^"\\\\\\n]|(\\\\(([a-zA-Z._~!=&\\^\\-\\\\?\'"])|(\\d+)|(x[0-9a-fA-F]+))))*?([\\\\][^a-zA-Z._~^!=&\\^\\-\\\\?\'"x0-7])([^"\\\\\\n]|(\\\\(([a-zA-Z._~!=&\\^\\-\\\\?\'"])|(\\d+)|(x[0-9a-fA-F]+))))*")|(?P<t_ID>[a-zA-Z_$][0-9a-zA-Z_$]*)|(?P<t_STRING_LITERAL>"([^"\\\\\\n]|(\\\\(([a-zA-Z._~!=&\\^\\-\\\\?\'"])|(\\d+)|(x[0-9a-fA-F]+))))*")|(?P<t_ELLIPSIS>\\.\\.\\.)|(?P<t_LOR>\\|\\|)|(?P<t_PLUSPLUS>\\+\\+)|(?P<t_LSHIFTEQUAL><<=)|(?P<t_OREQUAL>\\|=)|(?P<t_PLUSEQUAL>\\+=)|(?P<t_RSHIFTEQUAL>>>=)|(?P<t_TIMESEQUAL>\\*=)|(?P<t_XOREQUAL>\\^=)|(?P<t_ANDEQUAL>&=)|(?P<t_ARROW>->)|(?P<t_CONDOP>\\?)|(?P<t_DIVEQUAL>/=)|(?P<t_EQ>==)|(?P<t_GE>>=)|(?P<t_LAND>&&)|(?P<t_LBRACKET>\\[)|(?P<t_LE><=)|(?P<t_LPAREN>\\()|(?P<t_LSHIFT><<)|(?P<t_MINUSEQUAL>-=)|(?P<t_MINUSMINUS>--)|(?P<t_MODEQUAL>%=)|(?P<t_NE>!=)|(?P<t_OR>\\|)|(?P<t_PERIOD>\\.)|(?P<t_PLUS>\\+)|(?P<t_RBRACKET>\\])|(?P<t_RPAREN>\\))|(?P<t_RSHIFT>>>)|(?P<t_TIMES>\\*)|(?P<t_XOR>\\^)|(?P<t_AND>&)|(?P<t_COLON>:)|(?P<t_COMMA>,)|(?P<t_DIVIDE>/)|(?P<t_EQUALS>=)|(?P<t_GT>>)|(?P<t_LNOT>!)|(?P<t_LT><)|(?P<t_MINUS>-)|(?P<t_MOD>%)|(?P<t_NOT>~)|(?P<t_SEMI>;)', [None, ('t_PPHASH', 'PPHASH'), ('t_NEWLINE', 'NEWLINE'), ('t_LBRACE', 'LBRACE'), ('t_RBRACE', 'RBRACE'), ('t_FLOAT_CONST', 'FLOAT_CONST'), None, None, None, None, None, None, None, None, None, ('t_HEX_FLOAT_CONST', 'HEX_FLOAT_CONST'), None, None, None, None, None, None, None, ('t_INT_CONST_HEX', 'INT_CONST_HEX'), None, None, None, None, None, None, None, ('t_INT_CONST_BIN', 'INT_CONST_BIN'), None, None, None, None, None, None, None, ('t_BAD_CONST_OCT', 'BAD_CONST_OCT'), ('t_INT_CONST_OCT', 'INT_CONST_OCT'), None, None, None, None, None, None, None, ('t_INT_CONST_DEC', 'INT_CONST_DEC'), None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, ('t_CHAR_CONST', 'CHAR_CONST'), None, None, None, None, None, None, ('t_WCHAR_CONST', 'WCHAR_CONST'), None, None, None, None, None, None, ('t_UNMATCHED_QUOTE', 'UNMATCHED_QUOTE'), None, None, None, None, None, None, None, None, None, None, None, None, None, None, ('t_BAD_CHAR_CONST', 'BAD_CHAR_CONST'), None, None, None, None, None, None, None, None, None, None, ('t_WSTRING_LITERAL', 'WSTRING_LITERAL'), None, None, None, None, None, None, ('t_BAD_STRING_LITERAL', 'BAD_STRING_LITERAL'), None, None, None, None, None, None, None, None, None, None, None, None, None, ('t_ID', 'ID'), (None, 'STRING_LITERAL'), None, None, None, None, None, None, (None, 'ELLIPSIS'), (None, 'LOR'), (None, 'PLUSPLUS'), (None, 'LSHIFTEQUAL'), (None, 'OREQUAL'), (None, 'PLUSEQUAL'), (None, 'RSHIFTEQUAL'), (None, 'TIMESEQUAL'), (None, 'XOREQUAL'), (None, 'ANDEQUAL'), (None, 'ARROW'), (None, 'CONDOP'), (None, 'DIVEQUAL'), (None, 'EQ'), (None, 'GE'), (None, 'LAND'), (None, 'LBRACKET'), (None, 'LE'), (None, 'LPAREN'), (None, 'LSHIFT'), (None, 'MINUSEQUAL'), (None, 'MINUSMINUS'), (None, 'MODEQUAL'), (None, 'NE'), (None, 'OR'), (None, 'PERIOD'), (None, 'PLUS'), (None, 'RBRACKET'), (None, 'RPAREN'), (None, 'RSHIFT'), (None, 'TIMES'), (None, 'XOR'), (None, 'AND'), (None, 'COLON'), (None, 'COMMA'), (None, 'DIVIDE'), (None, 'EQUALS'), (None, 'GT'), (None, 'LNOT'), (None, 'LT'), (None, 'MINUS'), (None, 'MOD'), (None, 'NOT'), (None, 'SEMI')])], 'ppline': [('(?P<t_ppline_FILENAME>"([^"\\\\\\n]|(\\\\(([a-zA-Z._~!=&\\^\\-\\\\?\'"])|(\\d+)|(x[0-9a-fA-F]+))))*")|(?P<t_ppline_LINE_NUMBER>(0(([uU]ll)|([uU]LL)|(ll[uU]?)|(LL[uU]?)|([uU][lL])|([lL][uU]?)|[uU])?)|([1-9][0-9]*(([uU]ll)|([uU]LL)|(ll[uU]?)|(LL[uU]?)|([uU][lL])|([lL][uU]?)|[uU])?))|(?P<t_ppline_NEWLINE>\\n)|(?P<t_ppline_PPLINE>line)', [None, ('t_ppline_FILENAME', 'FILENAME'), None, None, None, None, None, None, ('t_ppline_LINE_NUMBER', 'LINE_NUMBER'), None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, ('t_ppline_NEWLINE', 'NEWLINE'), ('t_ppline_PPLINE', 'PPLINE')])], 'pppragma': [('(?P<t_pppragma_NEWLINE>\\n)|(?P<t_pppragma_PPPRAGMA>pragma)|(?P<t_pppragma_STR>.+)', [None, ('t_pppragma_NEWLINE', 'NEWLINE'), ('t_pppragma_PPPRAGMA', 'PPPRAGMA'), ('t_pppragma_STR', 'STR')])]}
_lexstateignore = {'INITIAL': ' \t', 'ppline': ' \t', 'pppragma': ' \t'}
_lexstateerrorf = {'INITIAL': 't_error', 'ppline': 't_ppline_error', 'pppragma': 't_pppragma_error'}
_lexstateeoff = {}
21 changes: 9 additions & 12 deletions script/provision
Original file line number Diff line number Diff line change
@@ -1,27 +1,24 @@
#!/usr/bin/env bash

export PYTHON_VERSION=python3.7

function python {
$PYTHON_VERSION "$@"
}

echo "I am provisioning..."
sudo sh -c 'date > /etc/vagrant_provisioned_at'

echo "Installing dependencies"
sudo add-apt-repository ppa:presslabs/gitfs
sudo add-apt-repository -y ppa:presslabs/gitfs
sudo apt-get update
sudo DEBIAN_FRONTEND=noninteractive apt-get install -y -q python-virtualenv python-dev libffi-dev build-essential git-core "$PYTHON_VERSION-dev" libgit2-dev "$PYTHON_VERSION-venv" libfuse-dev libfuse2
sudo DEBIAN_FRONTEND=noninteractive apt-get install -y -q python3-dev python3-venv libffi-dev build-essential git-core libgit2-dev libfuse-dev libfuse2

echo "Configuring fuse"
sudo groupadd fuse
sudo adduser "$USER" fuse
sudo adduser vagrant fuse
sudo sh -c "echo 'user_allow_other' >> /etc/fuse.conf"

echo "Configure virtualenv"
python -m venv /home/vagrant/gitfs
echo "source $HOME/gitfs/bin/activate" >> "$HOME/.bashrc"
python3 -m venv /home/vagrant/gitfs
echo "source /home/vagrant/gitfs/bin/activate" >> "$HOME/.bashrc"

echo Installing whell
/home/vagrant/gitfs/bin/pip install -q 'wheel'

echo Installing cffi
/home/vagrant/gitfs/bin/pip install -q 'cffi'
Expand All @@ -34,4 +31,4 @@ git config --global user.email "vagrant@localhost"
git config --global user.name "Vagrant"

echo Installing gitfs
"$HOME/gitfs/bin/pip" install -q -e /vagrant
/home/vagrant/gitfs/bin/pip install -q -e /vagrant
338 changes: 338 additions & 0 deletions script/yacctab.py

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion test_requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
-r requirements.txt
mock==1.0.1
pytest==4.6.5
pytest-cov==2.8.1
3 changes: 1 addition & 2 deletions tests/integrations/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
import time

import pytest
from six import string_types


class Sh(object):
Expand Down Expand Up @@ -165,7 +164,7 @@ def __call__(self, expected, **kwargs):
def log_context(gitfs_log):
gitfs_log.clear()
yield
if isinstance(expected, string_types):
if isinstance(expected, str):
gitfs_log.expect(expected, **kwargs)
else:
gitfs_log.expect_multiple(expected, **kwargs)
Expand Down
4 changes: 1 addition & 3 deletions tests/integrations/commit/test_read.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@
import os
from datetime import datetime

from six import iteritems

from tests.integrations.base import BaseTest


Expand All @@ -41,7 +39,7 @@ def test_stats(self):

attrs = {"st_uid": os.getuid(), "st_gid": os.getgid(), "st_mode": 0o100444}

for name, value in iteritems(attrs):
for name, value in attrs.items():
assert getattr(stats, name) == value

st_time = "{} {}".format(self.today, "-".join(commit.split("-")[:-1]))
Expand Down
4 changes: 1 addition & 3 deletions tests/integrations/current/test_read.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@

import os

from six import iteritems

from tests.integrations.base import BaseTest


Expand Down Expand Up @@ -46,5 +44,5 @@ def test_get_correct_stats(self):
"st_atime": real_stats.st_atime,
}

for name, value in iteritems(attrs):
for name, value in attrs.items():
assert getattr(stats, name) == value
6 changes: 2 additions & 4 deletions tests/integrations/history/test_read.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@
import os
from datetime import datetime

from six import iteritems

from tests.integrations.base import BaseTest


Expand All @@ -37,7 +35,7 @@ def test_stats(self):

attrs = {"st_uid": os.getuid(), "st_gid": os.getgid(), "st_mode": 0o40555}

for name, value in iteritems(attrs):
for name, value in attrs.items():
assert getattr(stats, name) == value

ctime = self._get_commit_time(0)
Expand All @@ -52,7 +50,7 @@ def test_stats_with_commits(self):
stats = os.stat(directory)

attrs = {"st_uid": os.getuid(), "st_gid": os.getgid(), "st_mode": 0o40555}
for name, value in iteritems(attrs):
for name, value in attrs.items():
assert getattr(stats, name) == value

st_time = "{} {}".format(self.today, "-".join(commit.split("-")[:-1]))
Expand Down
4 changes: 1 addition & 3 deletions tests/test_mount.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,12 @@
import sys
from mock import MagicMock, patch, call

from six import iteritems

from gitfs.mounter import prepare_components, parse_args, start_fuse, get_credentials


class EmptyObject(object):
def __init__(self, **kwargs):
for name, value in iteritems(kwargs):
for name, value in kwargs.items():
setattr(self, name, value)


Expand Down
4 changes: 1 addition & 3 deletions tests/utils/test_args.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@

from mock import MagicMock, patch, call

from six import iteritems

from gitfs.utils.args import Args


Expand Down Expand Up @@ -74,7 +72,7 @@ def test_args(self):
"not_magic": "False",
"ssh_user": "user",
}
for name, value in iteritems(asserted_results):
for name, value in asserted_results.items():
assert value == getattr(args, name)

assert args.config == mocked_args
Expand Down
4 changes: 1 addition & 3 deletions tests/utils/test_decorators.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@
import pytest
from mock import MagicMock, patch, call

from six import iteritems

from gitfs.utils.decorators.retry import retry
from gitfs.utils.decorators.while_not import while_not

Expand All @@ -37,7 +35,7 @@ def decorated(*args, **kwargs):

class EmptyMock(object):
def __init__(self, **kwargs):
for name, value in iteritems(kwargs):
for name, value in kwargs.items():
setattr(self, name, value)


Expand Down
1 change: 0 additions & 1 deletion tests/views/test_passthrough.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
import os

from fuse import FuseOSError
from six.moves import builtins
from pytest import raises

from gitfs.views import PassthroughView
Expand Down
3 changes: 2 additions & 1 deletion tests/workers/test_sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,11 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from queue import Empty

from _pygit2 import GitError

from mock import MagicMock, patch, call
from six.moves.queue import Empty
import pygit2
import pytest

Expand Down