Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Use an older version of Dulwich on Python 2 #253

Merged
merged 3 commits into from
Jun 20, 2020
Merged
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
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