From 8eb37d3b44ef82d9a90e5b934fd997453fc9c841 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jelmer=20Vernoo=C4=B3?= Date: Sun, 24 Apr 2016 15:05:56 +0000 Subject: [PATCH] Update NEWS, README.md to reflect fixing of #295. Re-enable compat tests for web on Python3. --- NEWS | 2 ++ README.md | 1 - dulwich/tests/compat/test_web.py | 12 +++--------- dulwich/tests/utils.py | 2 -- 4 files changed, 5 insertions(+), 12 deletions(-) diff --git a/NEWS b/NEWS index 2a05dc6ae..cf6afa1dc 100644 --- a/NEWS +++ b/NEWS @@ -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. diff --git a/README.md b/README.md index 5f63dffd6..7f3f6e377 100644 --- a/README.md +++ b/README.md @@ -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). diff --git a/dulwich/tests/compat/test_web.py b/dulwich/tests/compat/test_web.py index b170a95f0..cbf7eb3f3 100644 --- a/dulwich/tests/compat/test_web.py +++ b/dulwich/tests/compat/test_web.py @@ -37,9 +37,6 @@ SkipTest, skipIf, ) -from dulwich.tests.utils import ( - skipIfPY3, - ) from dulwich.web import ( make_wsgi_chain, HTTPGitApplication, @@ -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. @@ -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'] @@ -121,7 +117,6 @@ 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.""" @@ -129,8 +124,8 @@ class SmartWebSideBand64kTestCase(SmartWebTestCase): 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): @@ -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.""" diff --git a/dulwich/tests/utils.py b/dulwich/tests/utils.py index 4090081d8..4d8cf1f29 100644 --- a/dulwich/tests/utils.py +++ b/dulwich/tests/utils.py @@ -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.")