Skip to content

Commit 0fa6ab4

Browse files
authored
Merge pull request #253 from jelmer/dulwich-python2
Use an older version of Dulwich on Python 2
2 parents 5e951f2 + 496c2b6 commit 0fa6ab4

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

klaus/repo.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -142,8 +142,8 @@ def get_tag_names(self):
142142

143143
def get_tag_and_branch_shas(self):
144144
"""Return a list of SHAs of all tags and branches."""
145-
tag_shas = self.get_refs_as_dict('refs/tags/').values()
146-
branch_shas = self.get_refs_as_dict('refs/heads/').values()
145+
tag_shas = self.get_refs_as_dict(b'refs/tags/').values()
146+
branch_shas = self.get_refs_as_dict(b'refs/heads/').values()
147147
return set(tag_shas) | set(branch_shas)
148148

149149
def history(self, commit, path=None, max_commits=None, skip=0):

setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ def install_data_files_hack():
1414

1515
install_data_files_hack()
1616

17-
requires = ['six', 'flask', 'Werkzeug>=0.15.0', 'pygments', 'dulwich>=0.19.3', 'httpauth', 'humanize']
17+
requires = ['six', 'flask', 'Werkzeug>=0.15.0', 'pygments', 'httpauth', 'humanize', 'dulwich>=0.19.3;python_version>="3.5"', 'dulwich>=0.19.3,<0.20;python_version<"3.5"']
1818

1919
setup(
2020
name='klaus',

tests/test_manpage.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ def test_covers_all_cli_options():
1313
manpage = force_unicode(subprocess.check_output(["man", "./klaus.1"]))
1414

1515
def assert_in_manpage(s):
16-
clean = lambda x: re.sub('(.\\x08)|\s', '', x)
16+
clean = lambda x: re.sub('(.\\x08)|\\s', '', x)
1717
assert clean(s) in clean(manpage), "%r not found in manpage" % s
1818

1919
mock_parser = mock.Mock()

0 commit comments

Comments
 (0)