Skip to content

Commit

Permalink
Update NEWS, README.md to reflect fixing of jelmer#295.
Browse files Browse the repository at this point in the history
Re-enable compat tests for web on Python3.
  • Loading branch information
jelmer committed Apr 24, 2016
1 parent 18884ba commit 8eb37d3
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 12 deletions.
2 changes: 2 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
references, making the behaviour more consistent with that of
DiskObjectStore. (Félix Mattrat, Jelmer Vernooij)

* Fix ``dulwich.web`` on Python3. (#295, Jonas Haag)

CHANGES

* Drop support for Python 2.6.
Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,3 @@ Supported versions of Python
----------------------------

At the moment, Dulwich supports (and is tested on) CPython 2.6, 2.7, 3.4, 3.5 and Pypy.
The ``dulwich.web`` module is currently broken on Python 3 (issue #295).
12 changes: 3 additions & 9 deletions dulwich/tests/compat/test_web.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,6 @@
SkipTest,
skipIf,
)
from dulwich.tests.utils import (
skipIfPY3,
)
from dulwich.web import (
make_wsgi_chain,
HTTPGitApplication,
Expand Down Expand Up @@ -81,7 +78,6 @@ def _start_server(self, repo):


@skipIf(sys.platform == 'win32', 'Broken on windows, with very long fail time.')
@skipIfPY3
class SmartWebTestCase(WebTests, CompatTestCase):
"""Test cases for smart HTTP server.
Expand All @@ -91,7 +87,7 @@ class SmartWebTestCase(WebTests, CompatTestCase):
min_git_version = (1, 6, 6)

def _handlers(self):
return {'git-receive-pack': NoSideBand64kReceivePackHandler}
return {b'git-receive-pack': NoSideBand64kReceivePackHandler}

def _check_app(self, app):
receive_pack_handler_cls = app.handlers[b'git-receive-pack']
Expand Down Expand Up @@ -121,16 +117,15 @@ def capabilities(cls):


@skipIf(sys.platform == 'win32', 'Broken on windows, with very long fail time.')
@skipIfPY3
class SmartWebSideBand64kTestCase(SmartWebTestCase):
"""Test cases for smart HTTP server with side-band-64k support."""

# side-band-64k in git-receive-pack was introduced in git 1.7.0.2
min_git_version = (1, 7, 0, 2)

def setUp(self):
self.o_uph_cap = patch_capabilities(UploadPackHandler, ("no-done",))
self.o_rph_cap = patch_capabilities(ReceivePackHandler, ("no-done",))
self.o_uph_cap = patch_capabilities(UploadPackHandler, (b"no-done",))
self.o_rph_cap = patch_capabilities(ReceivePackHandler, (b"no-done",))
super(SmartWebSideBand64kTestCase, self).setUp()

def tearDown(self):
Expand Down Expand Up @@ -167,7 +162,6 @@ def _check_app(self, app):


@skipIf(sys.platform == 'win32', 'Broken on windows, with very long fail time.')
@skipIfPY3
class DumbWebTestCase(WebTests, CompatTestCase):
"""Test cases for dumb HTTP server."""

Expand Down
2 changes: 0 additions & 2 deletions dulwich/tests/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -360,5 +360,3 @@ def restore_showwarning():
warnings.showwarning = original_showwarning

return caught_warnings, restore_showwarning

skipIfPY3 = skipIf(sys.version_info[0] == 3, "Feature not yet ported to python3.")

0 comments on commit 8eb37d3

Please sign in to comment.