Skip to content

Commit

Permalink
Merge pull request #253 from jelmer/dulwich-python2
Browse files Browse the repository at this point in the history
Use an older version of Dulwich on Python 2
  • Loading branch information
jonashaag authored Jun 20, 2020
2 parents 5e951f2 + 496c2b6 commit 0fa6ab4
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions klaus/repo.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,8 @@ def get_tag_names(self):

def get_tag_and_branch_shas(self):
"""Return a list of SHAs of all tags and branches."""
tag_shas = self.get_refs_as_dict('refs/tags/').values()
branch_shas = self.get_refs_as_dict('refs/heads/').values()
tag_shas = self.get_refs_as_dict(b'refs/tags/').values()
branch_shas = self.get_refs_as_dict(b'refs/heads/').values()
return set(tag_shas) | set(branch_shas)

def history(self, commit, path=None, max_commits=None, skip=0):
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def install_data_files_hack():

install_data_files_hack()

requires = ['six', 'flask', 'Werkzeug>=0.15.0', 'pygments', 'dulwich>=0.19.3', 'httpauth', 'humanize']
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"']

setup(
name='klaus',
Expand Down
2 changes: 1 addition & 1 deletion tests/test_manpage.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def test_covers_all_cli_options():
manpage = force_unicode(subprocess.check_output(["man", "./klaus.1"]))

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

mock_parser = mock.Mock()
Expand Down

0 comments on commit 0fa6ab4

Please # to comment.