Commit Graph

6813 Commits

Author SHA1 Message Date
Itamar Turner-Trauring
a0ff941fff Try to fix Python 3 again. 2020-09-18 13:36:54 -04:00
Itamar Turner-Trauring
e75beb6eae
Merge pull request #811 from tahoe-lafs/3415.storage-server-python-3
Port allmydata.storage.server to Python 3

Fixes ticket:3415
2020-09-18 13:32:36 -04:00
Jean-Paul Calderone
9682e68528
Merge pull request #805 from jaraco/3408.print-functions
Convert print statements to print functions, even when commented

Fixes: ticket:3408
2020-09-18 12:59:44 -04:00
Itamar Turner-Trauring
7b302871e4 Python 2 tests pass again. 2020-09-18 11:41:28 -04:00
Itamar Turner-Trauring
c5ce988c7e Merge branch '3416.test-encode-python-3' into 3419.test-encode-python-3-trying-again 2020-09-18 11:33:15 -04:00
Itamar Turner-Trauring
1a4744d1f7 Merge branch '3415.storage-server-python-3' into 3416.test-encode-python-3 2020-09-18 11:32:45 -04:00
Itamar Turner-Trauring
02cb451a6b Fix failing tests. 2020-09-17 16:06:26 -04:00
Itamar Turner-Trauring
3d79793ee8 Try to fix hashutil. 2020-09-17 15:38:08 -04:00
Itamar Turner-Trauring
6c85f392dd Fix another future newbytes leak that was breaking Foolscap. 2020-09-17 13:39:47 -04:00
Itamar Turner-Trauring
b784f9654c Merge branch '3415.storage-server-python-3' into 3416.test-encode-python-3 2020-09-17 13:12:46 -04:00
Itamar Turner-Trauring
9818512802 Fix newbytes leak. 2020-09-17 13:10:52 -04:00
Itamar Turner-Trauring
03fd566e2c Fix flake error. 2020-09-17 12:37:10 -04:00
Itamar Turner-Trauring
cecbc260fa Fix order. 2020-09-17 11:43:35 -04:00
Itamar Turner-Trauring
498e69c72e Some progress. 2020-09-16 14:57:55 -04:00
Itamar Turner-Trauring
2588e757e5 Only semi-break the web service. 2020-09-16 14:42:39 -04:00
Itamar Turner-Trauring
833bc72ac3 Merge remote-tracking branch 'origin/master' into 3416.test-encode-python-3 2020-09-16 14:40:40 -04:00
Itamar Turner-Trauring
e8743a607f Fix failing tests. 2020-09-16 14:37:16 -04:00
Itamar Turner-Trauring
bea1d657f3 Better debug output. 2020-09-16 14:37:11 -04:00
Itamar Turner-Trauring
b4116239b5 Merge remote-tracking branch 'origin/master' into 3415.storage-server-python-3 2020-09-16 11:27:03 -04:00
Itamar Turner-Trauring
7cb574f7c5 Port to Python 3. 2020-09-16 11:23:11 -04:00
Itamar Turner-Trauring
985e8a0244 More Python 3 changes. 2020-09-16 11:21:17 -04:00
Itamar Turner-Trauring
c035ea0698 It's better if extension keys are unicode (native strings for Python 3, same key
as bytes on Python 2) so as not to modify lots and lots and lots of code.
2020-09-16 11:20:08 -04:00
Itamar Turner-Trauring
7d8320b843 Python 3 fixes. 2020-09-16 11:13:23 -04:00
Sajith Sasidharan
0ca3192640 Merge 'origin/master' into 3382.remove-multi-format-page 2020-09-15 18:25:07 -04:00
Itamar Turner-Trauring
a552bb53a7 Merge remote-tracking branch 'origin/master' into 3409.allmydata-storage-immutable-python-3 2020-09-15 09:05:55 -04:00
Itamar Turner-Trauring
65d38055e4 Merge branch '3409.allmydata-storage-immutable-python-3' into 3415.storage-server-python-3 2020-09-14 14:48:24 -04:00
Itamar Turner-Trauring
31aa594290 Looks like float is fine for mean. 2020-09-14 14:47:26 -04:00
Itamar Turner-Trauring
d84a7a61f3 Port to Python 3. 2020-09-14 14:46:08 -04:00
Itamar Turner-Trauring
947cb1c11b Tiny bit more test coverage for server.py. 2020-09-14 14:40:02 -04:00
Itamar Turner-Trauring
1d508c74e8 Port to Python 3. 2020-09-14 14:13:07 -04:00
Itamar Turner-Trauring
6196a1c650 Port to Python 3. 2020-09-14 14:06:27 -04:00
Itamar Turner-Trauring
aef293fbca Port to Python 3. 2020-09-14 14:04:02 -04:00
Itamar Turner-Trauring
6983c79b26 Tests for allmydata.storage.common. 2020-09-14 14:03:02 -04:00
Itamar Turner-Trauring
4590c1d1f5 Port to Python 3. 2020-09-14 13:56:45 -04:00
Itamar Turner-Trauring
26a8a0bfc5 Make stats code deal with keys that are unicode. 2020-09-14 13:29:28 -04:00
Itamar Turner-Trauring
7de84e32a3 Port to Python 3. 2020-09-11 15:02:42 -04:00
Itamar Turner-Trauring
e86e0d761f Better test coverage for allmydata.storage.immutable. 2020-09-11 14:51:08 -04:00
Jason R. Coombs
5a40bf47f4 Convert print statements to print functions, even when commented. Fixes #3408. 2020-09-11 14:50:44 -04:00
Sajith Sasidharan
89d354dd66 Remove unused WebError import 2020-09-10 10:54:44 -04:00
Sajith Sasidharan
ebd20b7f22 Merge 'origin/master' into 3382.remove-multi-format-page 2020-09-10 10:09:38 -04:00
Jean-Paul Calderone
d104303c4f Return ErrorPage instead of raising WebError 2020-09-10 08:56:44 -04:00
Jason R. Coombs
d74d7e733c Merge branch 'master' into 3394.py38-tests 2020-09-09 21:42:32 -04:00
Itamar Turner-Trauring
4c90247d99
Merge pull request #799 from tahoe-lafs/3397.test-storage-python-3
Port allmydata.test.test_storage to Python 3

Fixes ticket:3397
2020-09-08 15:32:06 -04:00
Itamar Turner-Trauring
fad93f4144 Use existing utility. 2020-09-08 14:13:22 -04:00
Itamar Turner-Trauring
6957540156 Assert nodeid is bytes, to ease porting. 2020-09-08 14:10:13 -04:00
Itamar Turner-Trauring
6da338a86a Note it's been ported. 2020-09-08 14:09:35 -04:00
Sajith Sasidharan
e17e9fa7a9
Merge pull request #791 from sajith/3393.remove-nevow-106-workaround
Remove allmydata.web._nevow_106

Fixes: ticket:3393
2020-09-07 21:49:00 -04:00
Sajith Sasidharan
46b4c94e7c
Merge pull request #790 from sajith/3392.remove-web-rendering-mixin
Remove unused allmydata.test.common_web.WebRenderingMixin

Fixes: ticket:3392
2020-09-07 21:47:23 -04:00
Itamar Turner-Trauring
59f3a471cb Merge remote-tracking branch 'origin/master' into 3397.test-storage-python-3 2020-09-04 14:51:33 -04:00
Itamar Turner-Trauring
af4814ee7b Merge remote-tracking branch 'origin/master' into 3396.storage-tests-python-3 2020-09-04 13:27:35 -04:00
Itamar Turner-Trauring
f5a689f0e0 Extend timeout. 2020-09-01 12:46:16 -04:00
Itamar Turner-Trauring
0aec62b122 Fix lint. 2020-09-01 11:46:47 -04:00
Itamar Turner-Trauring
d195ae4323 Get rid of second, less lenient variant of ShouldFailMixin. 2020-09-01 11:43:24 -04:00
Itamar Turner-Trauring
3fa919834a Finish port to Python 3. 2020-08-31 13:20:57 -04:00
Itamar Turner-Trauring
1cfe58a52d All of test_storage passes on Python 3. 2020-08-31 13:17:52 -04:00
Itamar Turner-Trauring
2b37da9ca0 filter() is lazy in Python 3. 2020-08-31 11:59:39 -04:00
Itamar Turner-Trauring
6c52a03030 Fix indent. 2020-08-31 11:59:34 -04:00
Jason R. Coombs
a3f5a0d7ac Merge branch 'master' into 3394.py38-tests 2020-08-30 12:06:56 -04:00
Itamar Turner-Trauring
2ba0854e0d More passing tests. 2020-08-28 13:24:17 -04:00
Itamar Turner-Trauring
50007ac868 More passing tests. 2020-08-28 12:41:19 -04:00
Itamar Turner-Trauring
5ad5b79cdd More passing tests. 2020-08-28 10:53:52 -04:00
Itamar Turner-Trauring
1e5f7a9379 Merge branch '3374.codec-monitor-python-3-take-2' into 3397.test-storage-python-3 2020-08-28 10:25:45 -04:00
Sajith Sasidharan
9dc02881ef Use html.escape() instead of cgi.escape() 2020-08-27 21:52:48 -04:00
Sajith Sasidharan
894195dd37 Use html.escape() instead of escapeToXml() 2020-08-27 21:50:32 -04:00
Itamar Turner-Trauring
1a65dfa4ab Some potential progress. 2020-08-27 15:58:03 -04:00
Itamar Turner-Trauring
9ce43231b4 More passing tests. 2020-08-27 15:49:04 -04:00
Itamar Turner-Trauring
6007c1f67f Some tests are passing. 2020-08-27 15:36:54 -04:00
Itamar Turner-Trauring
c3494f1356 Enough changes to make allmydata.test.test_storage run on Python 3.
Still lots of failures, of course.
2020-08-27 15:19:49 -04:00
Itamar Turner-Trauring
f998e0e752 Merge remote-tracking branch 'origin/master' into 3396.storage-tests-python-3 2020-08-27 15:15:46 -04:00
Itamar Turner-Trauring
6f2f460bf3 Merge remote-tracking branch 'origin/master' into 3374.codec-monitor-python-3-take-2 2020-08-27 14:53:45 -04:00
Itamar Turner-Trauring
7da73c1a03
Merge pull request #772 from tahoe-lafs/3377.configutil-connection_status-python-3
Port configutil and connection_status to Python 3

Fixes ticket:3377
2020-08-27 14:51:26 -04:00
Sajith Sasidharan
d5b5177e13 Keep old comment 2020-08-27 12:56:04 -04:00
Sajith Sasidharan
2c8853b4c6 Test error code and message when resource format is unknown 2020-08-27 12:54:46 -04:00
Sajith Sasidharan
5e3eb1fbe5 Remove web.common.MultiFormatPage, again
Merged master, which had MultiFormatPage.  Accepted upstream changes,
and removed MultiFormatPage again, rather than manually fixing all the
merge conflicts.
2020-08-26 21:20:54 -04:00
Sajith Sasidharan
d79880bf91 Merge 'origin/master' into 3382.remove-multi-format-page 2020-08-26 21:18:44 -04:00
Itamar Turner-Trauring
36177574be Fix lint. 2020-08-26 11:01:04 -04:00
Itamar Turner-Trauring
b3460dcddc Fix lint. 2020-08-26 11:00:19 -04:00
Itamar Turner-Trauring
637e8a0544 Remove duplication. 2020-08-26 10:59:10 -04:00
Itamar Turner-Trauring
a758f32edf Try to make test_storage import on Python 3. 2020-08-26 10:53:02 -04:00
Itamar Turner-Trauring
431e939bb8 Finish porting test_storage_web to Python 3. 2020-08-26 10:38:52 -04:00
Itamar Turner-Trauring
3d18b24967 Port even more tests to Python 3. 2020-08-26 10:38:15 -04:00
Itamar Turner-Trauring
8682550961 More passing tests on Python 3. 2020-08-26 10:35:25 -04:00
Sajith Sasidharan
236d37900e Trim comment lines 2020-08-26 09:58:42 -04:00
Sajith Sasidharan
25f1a41886 Aim for minimal diffs in comments 2020-08-26 09:39:24 -04:00
Itamar Turner-Trauring
23671b02a4 Merge remote-tracking branch 'origin/master' into 3387.expirer-python-3 2020-08-25 13:57:32 -04:00
Sajith Sasidharan
82ee45c1ac Merge 'origin/master' into 3382.remove-multi-format-page 2020-08-25 13:54:05 -04:00
Sajith Sasidharan
f51c127d6d
Merge pull request #780 from sajith/3381.directory-deep-size-results-to-twisted-web
Port web.directory.DeepSizeResults to twisted web

Fixes: ticket:3381
2020-08-25 13:52:15 -04:00
Itamar Turner-Trauring
b3c1302643 Merge remote-tracking branch 'origin/master' into 3387.expirer-python-3 2020-08-25 12:31:12 -04:00
Itamar Turner-Trauring
d5ba10544e Keep interfaces more backwards compatible. 2020-08-25 12:08:59 -04:00
Itamar Turner-Trauring
37ca3c5181 This should be bytes, as it's encoded as URI extension which still expects bytes. 2020-08-25 11:55:12 -04:00
Itamar Turner-Trauring
6726c6ec5b Merge remote-tracking branch 'origin/master' into 3374.codec-monitor-python-3-take-2 2020-08-25 11:48:31 -04:00
Itamar Turner-Trauring
43f95238d8 Merge remote-tracking branch 'origin/master' into 3377.configutil-connection_status-python-3 2020-08-25 11:44:48 -04:00
Itamar Turner-Trauring
2cc21e9893 Finish the port. 2020-08-24 13:57:46 -04:00
Itamar Turner-Trauring
0e15712e34 Tests pass on Python 2 and 3. 2020-08-24 13:53:27 -04:00
Itamar Turner-Trauring
388f27d206 Some more porting, tests pass on Python 2. 2020-08-24 13:41:58 -04:00
Itamar Turner-Trauring
e22bed447b Some updates for URI tests. 2020-08-24 13:10:17 -04:00
Itamar Turner-Trauring
625e2611c1 Address some review comments. 2020-08-24 11:59:52 -04:00
Jason R. Coombs
160f2b9628 Add TODO reflecting transient state of the check. 2020-08-24 11:46:48 -04:00
Sajith Sasidharan
57fdead1c3 Remove allmydata.web._nevow_106 2020-08-22 17:21:24 -04:00
Sajith Sasidharan
fa36fb9ab9 Remove unused allmydata.test.common_web.WebRenderingMixin 2020-08-22 16:47:19 -04:00
Jason R. Coombs
8b553d2045 Add Python 3 compatibility for code paths relevant to 'tahoe --version'. 2020-08-21 19:55:34 -04:00
Jason R. Coombs
2d29265d71 Bypass Python 3 check when running under tox. 2020-08-21 19:55:34 -04:00
Jason R. Coombs
480bec6d0d Rename 'ShortReadOnlySFTPFile.async' to '.async_' for compatibility with Python 3.7 and later. 2020-08-21 19:55:34 -04:00
Itamar Turner-Trauring
71cac5dd44 Merge remote-tracking branch 'origin/master' into 3387.expirer-python-3 2020-08-20 14:56:35 -04:00
Itamar Turner-Trauring
6fd8ae1cc9 Finish port to Python 3. 2020-08-20 14:55:49 -04:00
Itamar Turner-Trauring
9089a1226a
Merge pull request #785 from tahoe-lafs/3386.storage-crawler-python-3
Port allmydata.storage.crawler to Python 3

Fixes ticket:3386
2020-08-20 14:52:30 -04:00
Itamar Turner-Trauring
b3890a1a45 Finish porting (expirer-only) tests to Python 3. 2020-08-20 14:49:58 -04:00
Itamar Turner-Trauring
0912d5adfc Expirer pass on Python 3. 2020-08-20 14:43:10 -04:00
Itamar Turner-Trauring
5d2bdf5883 Explicit bytes. 2020-08-20 14:32:41 -04:00
Itamar Turner-Trauring
8136b21f46 Skip the tests we aren't porting just yet. 2020-08-20 14:24:21 -04:00
Itamar Turner-Trauring
9d34ab587a test_storage_web now runnable on Python 3 (even if it doesn't pass). 2020-08-20 14:17:06 -04:00
Itamar Turner-Trauring
eee3978243 Explain a bit better. 2020-08-20 13:34:00 -04:00
Itamar Turner-Trauring
f227b1b241
Merge pull request #779 from tahoe-lafs/3378.encodingutil-python-3-part-2
Fixes ticket:3378

Port encodingutil to Python 3, part 2
2020-08-20 13:24:33 -04:00
Itamar Turner-Trauring
46b498f99c Merge remote-tracking branch 'origin/master' into 3377.configutil-connection_status-python-3 2020-08-20 13:22:14 -04:00
Itamar Turner-Trauring
be9f02cb13 Should be explicitly bytes. 2020-08-20 13:15:24 -04:00
Itamar Turner-Trauring
5fc95d569f Improve explanations. 2020-08-20 12:39:38 -04:00
Itamar Turner-Trauring
71d33469da Merge remote-tracking branch 'origin/master' into 3378.encodingutil-python-3-part-2 2020-08-20 12:36:36 -04:00
Sajith Sasidharan
ce994ff246 Use twisted's escapeToXml 2020-08-19 15:42:01 -04:00
Sajith Sasidharan
9882d22101 Check for WebError when rendering resource in unknown format 2020-08-19 15:22:06 -04:00
Sajith Sasidharan
d87ffb5ad0 Begone, (most) nevow imports! 2020-08-19 15:22:06 -04:00
Sajith Sasidharan
d2bcebecaa Render resource in a simpler manner 2020-08-19 15:21:28 -04:00
Sajith Sasidharan
320830cf90 Reuse MultiFormatPage tests for MultiFormatResource 2020-08-19 15:21:06 -04:00
Itamar Turner-Trauring
733b2cab36 Remove unnecessary import. 2020-08-19 13:26:57 -04:00
Itamar Turner-Trauring
8279be38c1 Finish porting to Python 3. 2020-08-19 13:25:11 -04:00
Itamar Turner-Trauring
35ac5a62e7 Tests now pass on Python 3 too. 2020-08-19 12:15:39 -04:00
Itamar Turner-Trauring
ff582c5129 Some progress towards running crawler on Python 3. 2020-08-19 11:38:59 -04:00
Itamar Turner-Trauring
e971ccf58e Unbreak so tests pass on Python 2 again. 2020-08-19 11:12:29 -04:00
Itamar Turner-Trauring
e044309bd3 Finish port to Python 3. 2020-08-19 11:03:54 -04:00
Itamar Turner-Trauring
14f349e846 Manual porting to Python 3. 2020-08-19 11:02:26 -04:00
Itamar Turner-Trauring
416ab64335 Fix an import. 2020-08-19 10:50:44 -04:00
Itamar Turner-Trauring
41ad4aea91 Make imports work. 2020-08-18 13:10:57 -04:00
Itamar Turner-Trauring
80b9a9b3ce Split the test module in two. 2020-08-18 13:03:36 -04:00
Sajith Sasidharan
d5853ccb60 Remove web.common.MultiFormatPage 2020-08-18 08:48:02 -04:00
Sajith Sasidharan
c66d38e191 Make web.directory.DeepSizeResults a MultiFormatResource 2020-08-18 08:37:59 -04:00
Itamar Turner-Trauring
97c3be0509 Make quote_* and friends return unicode. 2020-08-17 13:29:49 -04:00
Itamar Turner-Trauring
f95f9c481e Explanation. 2020-08-17 12:04:52 -04:00
Itamar Turner-Trauring
af5e9eaf67 A better name. 2020-08-17 11:29:27 -04:00
Itamar Turner-Trauring
03ed0fd66f Another function that should be a no-op on Python 3. 2020-08-17 11:29:09 -04:00
Itamar Turner-Trauring
81ba354357 Merge remote-tracking branch 'origin/master' into 3373.happinessutil-python-3 2020-08-17 10:45:12 -04:00
Itamar Turner-Trauring
2cc2cb6a7f Rename to_str() to the more accurate to_bytes(). 2020-08-14 13:49:48 -04:00
Itamar Turner-Trauring
4ddbd8dbbf Merge branch '3376.encodingutil-python-3' into 3377.configutil-connection_status-python-3 2020-08-14 13:13:23 -04:00
Itamar Turner-Trauring
2fc8f896b3 Merge remote-tracking branch 'origin/master' into 3376.encodingutil-python-3 2020-08-14 13:09:08 -04:00
Jean-Paul Calderone
bc787975da
Merge pull request #777 from tahoe-lafs/3372.ratchet-by-module.python3.6
Ratchet by module, not by individual test (in python3.6)

Fixes: ticket:3372
2020-08-14 11:55:30 -04:00
Jean-Paul Calderone
76e5c40fc6
Add a module to the test suite which contains all of the other ported modules 2020-08-14 11:21:32 -04:00
meejah
8f1b712a8f
Merge pull request #729 from sajith/3316.check-results-nevow-to-twisted-web
Replace nevow with twisted.web.template in web.check_results
2020-08-13 23:10:19 +00:00
Itamar Turner-Trauring
a3714a9970 Fix whitespace. 2020-08-13 16:32:32 -04:00
Itamar Turner-Trauring
b0c4f6d2ab Fix Python 2 tests. 2020-08-13 16:30:27 -04:00
Itamar Turner-Trauring
6e24defe4b Merge branch '3376.encodingutil-python-3' into 3377.configutil-connection_status-python-3 2020-08-13 15:53:02 -04:00
Itamar Turner-Trauring
8167e85f7b Fix flake8 with __all__. 2020-08-13 15:11:14 -04:00
Itamar Turner-Trauring
2157da524d This needs an encoding too. 2020-08-13 15:04:44 -04:00
Itamar Turner-Trauring
e113cba8d0 Address review comments. 2020-08-13 15:02:59 -04:00
Itamar Turner-Trauring
cdccb93179 Flake fixes. 2020-08-12 15:52:12 -04:00
Itamar Turner-Trauring
5c9294ebf1 Port to Python 3. 2020-08-12 15:46:15 -04:00
Itamar Turner-Trauring
5a0fa7ff73 Test unicode_to_argv(). 2020-08-12 15:40:52 -04:00
Itamar Turner-Trauring
b25f62d189 Clarifications. 2020-08-12 15:40:45 -04:00
Itamar Turner-Trauring
e03c2a759f Port test_encodingutil.py to Python 3. 2020-08-12 15:14:04 -04:00
Itamar Turner-Trauring
b04a65fc16 And more progress to Python 3. 2020-08-12 14:54:07 -04:00
Itamar Turner-Trauring
e9d67b8d0f Even more progress towards Python 3 support. 2020-08-12 14:32:22 -04:00
Itamar Turner-Trauring
f7e28ffb0b More progress towards Python 3. 2020-08-12 14:18:02 -04:00
Itamar Turner-Trauring
53bdc10e19 Some steps towards Python 3 support. 2020-08-12 13:10:10 -04:00
Itamar Turner-Trauring
e13c0cf4d3 Reorganize imports to make Python 3 support easier. 2020-08-12 10:23:30 -04:00
Itamar Turner-Trauring
5dde21f966 Merge remote-tracking branch 'origin/3358.fileutil-to-python-3' into 3376.encodingutil-python-3 2020-08-12 10:15:45 -04:00
Itamar Turner-Trauring
3c5f4f7ddf Merge remote-tracking branch 'origin/master' into 3376.encodingutil-python-3 2020-08-12 10:15:41 -04:00
Itamar Turner-Trauring
14b273953a Better fix, maybe. 2020-08-12 10:10:18 -04:00
Maciej Fijalkowski
c21acc64f0 merge master 2020-08-12 15:42:00 +02:00
Itamar Turner-Trauring
9ad5602477 Fix test failures. 2020-08-11 16:50:42 -04:00
Itamar Turner-Trauring
10378541d7 Use Python 2 ConfigParser, so correct exceptions get raised. 2020-08-11 16:40:00 -04:00
Itamar Turner-Trauring
11b934120c Port to Python 3. 2020-08-11 15:49:59 -04:00
Itamar Turner-Trauring
babe2dbc85 Port to Python 3. 2020-08-11 15:45:52 -04:00
Itamar Turner-Trauring
e24c21bef7 Make configutil tests more standalone, and less repetitive. 2020-08-11 15:38:58 -04:00
Itamar Turner-Trauring
80c7739096 Merge branch '3370.happiness-upload-python-3' into 3373.happinessutil-python-3 2020-08-11 14:54:39 -04:00
Itamar Turner-Trauring
504258622c Docstring. 2020-08-11 14:54:12 -04:00
Itamar Turner-Trauring
202a7cf975 Merge remote-tracking branch 'origin/master' into 3370.happiness-upload-python-3 2020-08-11 14:53:34 -04:00
Itamar Turner-Trauring
a08cde9a4d Port to Python 3. 2020-08-11 14:30:16 -04:00
Itamar Turner-Trauring
243d02ecb1 Port to Python 3. 2020-08-11 14:08:51 -04:00
Itamar Turner-Trauring
1c9e4ec842 Move connection_status tests into their own module. 2020-08-11 14:04:52 -04:00
Itamar Turner-Trauring
39fc75a3fd Tweaks in preparation for Python 3 support. 2020-08-10 13:39:55 -04:00
Itamar Turner-Trauring
24772616c2 Bytes not strings. 2020-08-07 14:13:20 -04:00
Itamar Turner-Trauring
0a2b797c49 Lint fix. 2020-08-07 13:32:12 -04:00
Itamar Turner-Trauring
0e034e06b7 Port to Python 3. 2020-08-07 13:28:14 -04:00
Itamar Turner-Trauring
b82e2ad1c5 Tests for allmydata.monitor. 2020-08-07 13:26:44 -04:00
Itamar Turner-Trauring
9c0b5eac2b Additional testing. 2020-08-07 13:10:55 -04:00
Itamar Turner-Trauring
5384768f76 Port to Python 3. 2020-08-07 13:08:53 -04:00
Itamar Turner-Trauring
7516a5526e Port to Python 3. 2020-08-07 12:57:46 -04:00
Itamar Turner-Trauring
5d70a78cce
Merge pull request #761 from tahoe-lafs/3365.log-python-3
Fixes ticket:3365

Port allmydata.util.log to Python 3
2020-08-07 12:40:58 -04:00
Itamar Turner-Trauring
b08a78e5b4 Docstring. 2020-08-07 11:52:26 -04:00
Itamar Turner-Trauring
6c77a227ff Port to Python 3. 2020-08-07 11:47:24 -04:00
Itamar Turner-Trauring
44143d1b08 Move tests for happinessutil.py into test_happiness.py. 2020-08-07 11:37:44 -04:00
Itamar Turner-Trauring
4d2193fe13 Fix the module name. 2020-08-07 11:12:12 -04:00
Itamar Turner-Trauring
fb9bf5511f Passing tests. 2020-08-07 11:09:41 -04:00
Chad Whitacre
49c631b4c8 Sort the thing we said we'd sort 2020-08-07 08:43:54 -04:00
Sajith Sasidharan
f4cfc0c613 Assign a ticket to unimplemented functionality 2020-08-07 07:19:28 -04:00
Sajith Sasidharan
c52bc6a781 Document "deep check and repair" renderer element 2020-08-07 07:19:28 -04:00
Sajith Sasidharan
36352ee182 Reuse "servers with corrupt shares" from base class 2020-08-07 07:19:28 -04:00
Sajith Sasidharan
c0109b70b6 Remove methods common to base class 2020-08-06 22:43:09 -04:00
Sajith Sasidharan
76777cd4e1 Inherit "deep check and repair" page from "deep check" page 2020-08-06 22:43:09 -04:00
Sajith Sasidharan
3e11779976 Do some error checking 2020-08-06 22:43:04 -04:00
Itamar Turner-Trauring
0622b86b91 Merge remote-tracking branch 'origin/master' into 3370.happiness-upload-python-3 2020-08-06 17:03:43 -04:00
Itamar Turner-Trauring
f53ea4579d Merge remote-tracking branch 'origin/master' into 3365.log-python-3 2020-08-06 17:03:27 -04:00
Itamar Turner-Trauring
d8f74770eb Port to Python 3. 2020-08-06 16:38:19 -04:00
Itamar Turner-Trauring
c6d4ec0295 Port the test module to Python 3. 2020-08-06 16:33:04 -04:00
Itamar Turner-Trauring
32945b85f6 Drop int. 2020-08-06 16:14:39 -04:00
Itamar Turner-Trauring
dab690a757 Flake fixes. 2020-08-06 16:13:10 -04:00
Itamar Turner-Trauring
9669e4eaa7 Drop int. 2020-08-06 16:12:26 -04:00
Maciej Fijalkowski
9b9d530155 Fix some typos. Add docstring 2020-08-06 16:07:50 +02:00
Maciej Fijalkowski
b71ae461a6 use less hacks in yaml tests 2020-08-06 16:06:01 +02:00
Maciej Fijalkowski
57fdd9f6b4 s/unicode/str/ (from future.builtins import str kind of str) 2020-08-06 15:11:41 +02:00
Itamar Turner-Trauring
70851fe753 Death to newint. 2020-08-05 11:53:23 -04:00
Itamar Turner-Trauring
11c7841cd7
Merge pull request #760 from tahoe-lafs/3364.crypto-python-3
Fixes ticket:3364

Port allmydata.crypto to Python 3
2020-08-05 11:26:30 -04:00
Itamar Turner-Trauring
0bef1eb4e2 Support prefix that is bytes. 2020-08-05 11:25:40 -04:00
Itamar Turner-Trauring
ff7cf4d731 Test improvements. 2020-08-04 15:15:32 -04:00
Itamar Turner-Trauring
ce33101d08 Remove unused import. 2020-08-04 15:03:06 -04:00
Maciej Fijalkowski
d8bcbb901e I think default mode is text 2020-08-04 12:26:43 +02:00
Maciej Fijalkowski
d53f67bc41 add assert for write_atomically 2020-08-04 11:15:32 +02:00
Itamar Turner-Trauring
2a623e0b05 Port to Python 3. 2020-08-03 14:13:16 -04:00
Itamar Turner-Trauring
622ed2f971 Standalone logging tests, most of them new, and an attempt to fix the parent
msgid logic so it's a little less broken.
2020-08-03 14:09:28 -04:00
Itamar Turner-Trauring
02daa12031 Move logging tests into their own, Python 3-compatible, module. 2020-08-03 11:33:29 -04:00
Itamar Turner-Trauring
1703230a2a Use nummedobj from pyutil. 2020-08-03 11:33:21 -04:00
Itamar Turner-Trauring
bfbca87f26 Missing from previous PR. 2020-08-03 11:31:02 -04:00
Itamar Turner-Trauring
24729dbd61 Port to Python 3. 2020-08-03 11:06:46 -04:00
Itamar Turner-Trauring
cd50ac434a Port to Python 3. 2020-08-03 10:59:51 -04:00
Itamar Turner-Trauring
5815547661 Remove an unnecessary conversion that breaks Python 3. 2020-08-03 10:58:37 -04:00
Itamar Turner-Trauring
3330737656 Be a bit stricter about expected outputs. 2020-08-03 10:56:47 -04:00
Itamar Turner-Trauring
34e3052814 Don't use global state for testing. 2020-08-03 10:43:21 -04:00
Maciej Fijalkowski
c178c55178 remove this import 2020-08-02 12:03:59 +02:00
Maciej Fijalkowski
bf37413e05 address the review (mostly) 2020-08-02 11:16:18 +02:00
Jean-Paul Calderone
27b6737eaf
Merge remote-tracking branch 'origin/master' into 3358.fileutil-to-python-3
with fijal
2020-07-30 13:38:47 -04:00
Maciej Fijalkowski
ecb3ee023d add a dummy commit 2020-07-30 09:36:11 +02:00
Maciej Fijalkowski
7618b295cb Revert "merge master (I think properly)"
This reverts commit 6140b5ff52, reversing
changes made to da87bd7e7f.
2020-07-30 09:29:20 +02:00
Maciej Fijalkowski
6140b5ff52 merge master (I think properly) 2020-07-29 21:09:23 +02:00
Itamar Turner-Trauring
5e308260b1 Port to Python 3. 2020-07-29 14:49:48 -04:00
Itamar Turner-Trauring
0a1e365ed1 Tests for gcutil. 2020-07-29 14:46:49 -04:00
Itamar Turner-Trauring
9c16a0554e Get rid of unused code. 2020-07-29 14:38:58 -04:00
Maciej Fijalkowski
bfead0630d leave a comment explaining why we removed open 2020-07-29 19:56:29 +02:00
Maciej Fijalkowski
724bf7de75 remove open from imported builtins 2020-07-29 19:56:01 +02:00
Itamar Turner-Trauring
9e4eda6912
Merge pull request #756 from tahoe-lafs/3359.statistics-python-3
Port statistics and dictutil to Python 3

Fixes ticket:3359
2020-07-29 13:16:17 -04:00
Maciej Fijalkowski
93c474c39b make test_util pass under both pythons 2020-07-29 09:00:50 +02:00
Sajith Sasidharan
951250f9ff Remove unused FAVICON_MARKUP 2020-07-28 16:13:58 -04:00
Sajith Sasidharan
4007fb4de7 Rearrange imports 2020-07-28 16:12:48 -04:00
Itamar Turner-Trauring
17b15ae085 Add another test. 2020-07-28 11:25:34 -04:00
Itamar Turner-Trauring
e954314fe5 Don't expose Python 3 dicts to innocent, unsuspecting Python 2 code. 2020-07-28 11:23:40 -04:00
Itamar Turner-Trauring
9ca1fdef81 Note it's ported. 2020-07-28 11:12:17 -04:00
Itamar Turner-Trauring
8c9c691c02 Fix typo. 2020-07-28 11:11:27 -04:00
Itamar Turner-Trauring
cc494e3d39 Document that API returns native strings. 2020-07-28 11:11:05 -04:00
Itamar Turner-Trauring
4dae5d867c Add retry logic, listenOnUnused is potentially flaky. 2020-07-28 11:09:02 -04:00
Sajith Sasidharan
0f28a93879 Remove unused import 2020-07-28 08:08:48 -04:00
Sajith Sasidharan
fb5f9f0c89 Merge 'origin/master' into 3316.check-results-nevow-to-twisted-web 2020-07-28 07:54:21 -04:00
Sajith Sasidharan
ca6cf887f7 Test JSON rendering synchronously 2020-07-28 07:26:11 -04:00
Sajith Sasidharan
1b7a35e773 Do not strip tags where it is not necessary 2020-07-28 07:18:57 -04:00
Sajith Sasidharan
e6867a1355 Use docstring to describe a class 2020-07-28 07:15:39 -04:00
Sajith Sasidharan
adca146a1b Use space as separator when removing tags 2020-07-28 07:10:44 -04:00
Sajith Sasidharan
80802a74cd Use BeautifulSoup to remove tags 2020-07-28 06:53:52 -04:00
Sajith Sasidharan
9f5c58c173 Use super() 2020-07-28 06:27:40 -04:00
Itamar Turner-Trauring
cbbe260a4e Windows doesn't like Unicode strings in os.environ in Python 2.7. 2020-07-27 16:19:36 -04:00
Itamar Turner-Trauring
94d489ff46 Fix trailing whitespace. 2020-07-27 16:01:12 -04:00
Itamar Turner-Trauring
79ae478a48 Port to Python 3. 2020-07-27 15:56:31 -04:00
Itamar Turner-Trauring
bde2f1394d Move dictutil tests out. 2020-07-27 15:53:26 -04:00
Itamar Turner-Trauring
2ca223a67c Port to Python 3. 2020-07-27 15:34:28 -04:00
Itamar Turner-Trauring
8d84be77d8 Port to Python 3. 2020-07-27 15:31:31 -04:00
Itamar Turner-Trauring
b140d1f1af Move statistics tests out. 2020-07-27 15:29:01 -04:00
Itamar Turner-Trauring
d8bf811b92 Native string all the things. 2020-07-27 15:20:35 -04:00
Itamar Turner-Trauring
74fe9ccf56 Foolscap expects a native string. 2020-07-27 15:16:34 -04:00
Itamar Turner-Trauring
ce8a575808 Test for specific ports. 2020-07-27 15:16:25 -04:00
Itamar Turner-Trauring
d91b4f0e40 Fix some tests and flake issues. 2020-07-27 15:12:09 -04:00
Itamar Turner-Trauring
361e75804c Merge remote-tracking branch 'origin/master' into 3356.iputil-python-3 2020-07-27 13:07:12 -04:00
Itamar Turner-Trauring
817355d17e Minimal testing for listenOnUnused. 2020-07-27 13:06:41 -04:00
Itamar Turner-Trauring
e681ca1cb9
Merge pull request #754 from tahoe-lafs/3357.version_checks-py3
Port version_checks to Python 3

Fixes ticket:3357
2020-07-27 12:36:28 -04:00
Itamar Turner-Trauring
9919d2c9a7 Record port status. 2020-07-27 11:46:03 -04:00
Itamar Turner-Trauring
436c2e77e4 Automated port to Python 3. 2020-07-27 11:44:58 -04:00
Itamar Turner-Trauring
fce7221481 Some steps to manually port to Python 3. 2020-07-27 11:42:20 -04:00
Itamar Turner-Trauring
1f34e62987 Port test module to Python 3. 2020-07-27 11:14:01 -04:00
Maciej Fijalkowski
13e292295e Revert "futurize and make the tests pass back under py2"
This reverts commit 361de05980.
2020-07-25 11:22:03 +02:00
Maciej Fijalkowski
361de05980 futurize and make the tests pass back under py2 2020-07-25 11:12:43 +02:00
Itamar Turner-Trauring
bf13401979 Move SignalMixin to common_py3.py. 2020-07-24 14:58:08 -04:00
Itamar Turner-Trauring
025afc1efe Merge branch '3357.version_checks-py3' into 3356.iputil-python-3 2020-07-24 14:50:50 -04:00
Itamar Turner-Trauring
11cd30c425 Merge remote-tracking branch 'origin/master' into 3357.version_checks-py3 2020-07-24 14:50:39 -04:00
Itamar Turner-Trauring
e80f138868 Fix indent. 2020-07-24 14:48:56 -04:00
Itamar Turner-Trauring
e0d3e46683 Merge remote-tracking branch 'origin/master' into 3351.spans-python-3 2020-07-24 14:48:33 -04:00
Itamar Turner-Trauring
4c6a9a5610 Merge branch '3357.version_checks-py3' into 3356.iputil-python-3 2020-07-24 14:36:31 -04:00
Itamar Turner-Trauring
337a4381bb Finish port to Python 3. 2020-07-24 14:31:36 -04:00
Itamar Turner-Trauring
65500de72f Merge remote-tracking branch 'origin/master' into 3346.abbreviate-and-time_format-py3 2020-07-24 14:13:28 -04:00
Itamar Turner-Trauring
f84d51d795 Port to Python 3. 2020-07-24 14:12:10 -04:00
Itamar Turner-Trauring
04db52b9e4 Some manual tweaks to be more likely to work with Python 3.
The Linux distribution porting code was obsolete (using Python APIs not present
in Python 3, /etc/lsb-release isn't a thing on Fedora 31, for example), so
replaced it with maintained third-party library.
2020-07-24 14:06:12 -04:00
Itamar Turner-Trauring
45a891114b Fix some things that prevent Python 3 imports. 2020-07-24 13:48:11 -04:00
Itamar Turner-Trauring
135ade02b1 Start porting. 2020-07-24 13:47:56 -04:00
Itamar Turner-Trauring
8bcd6dd34b
Merge branch 'master' into 3346.abbreviate-and-time_format-py3 2020-07-24 11:10:38 -04:00
Itamar Turner-Trauring
38648c0f8f
Fix indentation 2020-07-24 11:09:08 -04:00
Itamar Turner-Trauring
dd4737f20c
Merge branch 'master' into 3353.observer-and-pipeline-py3 2020-07-24 11:08:08 -04:00
Itamar Turner-Trauring
d23394b35c Merge remote-tracking branch 'origin/master' into 3346.abbreviate-and-time_format-py3 2020-07-23 12:27:06 -04:00
Itamar Turner-Trauring
ab4393b50e Document unicode. 2020-07-23 11:49:02 -04:00
Itamar Turner-Trauring
cab1b02ba2 Use constants, since we have them. 2020-07-23 11:47:12 -04:00
Itamar Turner-Trauring
b0083e342b Document being ported. 2020-07-23 11:47:06 -04:00
Itamar Turner-Trauring
eb688dfd7e Fix lint. 2020-07-22 13:22:50 -04:00
Itamar Turner-Trauring
64e4af2d05 Port to Python 3. 2020-07-22 13:17:49 -04:00
Itamar Turner-Trauring
15254d08fc A few more explicit byte strings. 2020-07-22 13:11:05 -04:00
Itamar Turner-Trauring
85c8ca6d77 Merge branch '3344.netstring-and-hashutil-to-python-3' into 3354.hashtree-to-python-3 2020-07-22 13:09:58 -04:00
Itamar Turner-Trauring
5129e1ef14 Explicitly mark bytestrings. 2020-07-22 13:08:24 -04:00
Itamar Turner-Trauring
e48aecfa1a Move parsing tests to better location, and fix them. 2020-07-22 12:55:16 -04:00
Itamar Turner-Trauring
0763f9f90b Port to Python 3. 2020-07-22 10:36:50 -04:00
Itamar Turner-Trauring
e427163ec8 Move pipeline tests into their own module. 2020-07-22 10:33:23 -04:00
Itamar Turner-Trauring
b4e6686211 Port to Python 3. 2020-07-22 10:29:44 -04:00
Itamar Turner-Trauring
2f608e8216 Merge remote-tracking branch 'origin/master' into 3346.abbreviate-and-time_format-py3 2020-07-22 10:11:27 -04:00
Itamar Turner-Trauring
51e9c2183c Add missing file. 2020-07-22 10:00:15 -04:00
Itamar Turner-Trauring
2391bd9733 Merge remote-tracking branch 'origin/master' into 3351.spans-python-3 2020-07-22 09:57:08 -04:00
Itamar Turner-Trauring
e9eb93468f Finish port to Python 3. 2020-07-22 09:56:59 -04:00
Itamar Turner-Trauring
3a8bafafc3 Merge remote-tracking branch 'origin/master' into 3344.netstring-and-hashutil-to-python-3 2020-07-22 09:36:34 -04:00
Itamar Turner-Trauring
ab24e9abb1 Manual porting to Python 3. 2020-07-21 15:14:52 -04:00
Itamar Turner-Trauring
d6f24af424 Move span tests into their own module. 2020-07-21 15:14:39 -04:00
Itamar Turner-Trauring
fa567841b5 Merge remote-tracking branch 'origin/master' into 3342-base32-and-base62-to-python-3 2020-07-21 14:40:33 -04:00
Itamar Turner-Trauring
6de05941b9 Remove unnecessary imports. 2020-07-21 14:27:08 -04:00
Itamar Turner-Trauring
4018b772a3 Port abbreviate.py. As far as I can tell, all division is already float division. 2020-07-21 14:15:39 -04:00
Itamar Turner-Trauring
116f232e80 Port time_format to Python 3. 2020-07-21 14:08:31 -04:00
Itamar Turner-Trauring
7e8de10ea3 Merge branch '3342-base32-and-base62-to-python-3' into 3344.netstring-and-hashutil-to-python-3 2020-07-21 14:00:53 -04:00
Itamar Turner-Trauring
c229ba7196 Workaround future/pypy incompatibility. 2020-07-21 13:55:53 -04:00
meejah
30a91a1106 public RSA exponent 17 -> 65537 2020-07-21 00:29:35 -06:00
Sajith Sasidharan
e145c7b00d
Merge pull request #722 from sajith/3254.status-status-nevow-to-twisted-web
Replace nevow with twisted.web.template in status.Status

Fixes: ticket:3254
2020-07-20 11:28:18 -04:00
Sajith Sasidharan
26ca9ae724
Merge pull request #726 from sajith/3313.operations-ophandle-table-nevow-to-twisted
Replace nevow with twisted.web in operations.OphandleTable

Fixes: ticket:3313
2020-07-19 08:14:32 -04:00
Sajith Sasidharan
c58cf56e83 Remove unused imports 2020-07-18 08:34:25 -04:00
Sajith Sasidharan
0f835e94f5 Merge 'origin/master' into 3254.status-status-nevow-to-twisted-web 2020-07-18 07:53:36 -04:00
Sajith Sasidharan
6dec821271
Merge pull request #720 from sajith/3288.status-download-nevow-to-twisted-web
Replace nevow with twisted.web.template in status.DownloadStatusPage

Fixes: ticket:3288
2020-07-18 07:22:37 -04:00
Sajith Sasidharan
879a8012a0 Remove unused import 2020-07-18 06:48:36 -04:00
Sajith Sasidharan
c198c006e3 Avoid over-long lines 2020-07-17 21:02:24 -04:00
Sajith Sasidharan
fe07ab39da Use docstrings 2020-07-17 16:22:23 -04:00
Sajith Sasidharan
c14197e1bc Make FakeDownloadStatus an instance of DownloadStatus
The real DownloadStatus is easy enough to instantiate.  Might as well
use that, cutting some crufty code here.
2020-07-17 16:13:07 -04:00
Sajith Sasidharan
293efd7c9f Use actual status counter number when testing 2020-07-17 13:50:06 -04:00
Sajith Sasidharan
8fd0cf7eb6 Add a test for checking status page links 2020-07-17 13:21:53 -04:00
Sajith Sasidharan
828ec53e24 Update status page test case
Link to upload status 0 should contain `/status/` prefix, or it will
navigate to `/up-0` instead of `/status/up-0`, resulting in a 404 not
found message.  Same with other statuses too.
2020-07-17 13:21:53 -04:00
Sajith Sasidharan
5c886b1b2d Format link to status page child node correctly
Some Nevow-ism accidentally escaped earlier: link to `/status/up-0`
and so on were actually rendered as `/up-0` and so on.
2020-07-17 13:21:53 -04:00
Sajith Sasidharan
2d19c383ca Rename a variable for clarity 2020-07-17 13:21:53 -04:00
Sajith Sasidharan
02d8bd061a Test for trailing slashes after /status/
Both `/status` and `/status/` are treated alike; any additional
trailing slashes will be rejected.
2020-07-17 13:21:53 -04:00
Sajith Sasidharan
372cc00a25 Reject non-existent child nodes of /status
Requests on both `/status` and `/status/` will be served with the same
status page, but `/status//`, `/status///` and so on will be processed
further down, resulting in a 40x response.
2020-07-17 09:46:21 -04:00
Sajith Sasidharan
fe165cc99d Do the right thing, not the simple thing
Seems that NixOS CI is saying that the simple thing is not the right
thing: "GET /status/down-0" etc all resulted in 404 responses on
NixOS.  So we perhaps should use the actual counter value.
2020-07-16 19:07:51 -04:00
Sajith Sasidharan
06c8bbfb19 Use clearer names for tests 2020-07-16 17:25:25 -04:00
Sajith Sasidharan
66dd2d3658 Use docstrings 2020-07-16 17:19:50 -04:00
Sajith Sasidharan
8db60e3486 Do the simple thing when testing status subpaths 2020-07-16 17:16:18 -04:00
Sajith Sasidharan
95642ae02c Use a helper to check status subpath results 2020-07-16 17:13:36 -04:00
Sajith Sasidharan
e48d930621 Clarify intention of a test case 2020-07-16 16:56:41 -04:00
Sajith Sasidharan
6a2ce9efc6 Use docstrings 2020-07-16 16:55:12 -04:00
Itamar Turner-Trauring
a4620bf176 Automated port of the test module. 2020-07-16 15:58:39 -04:00
Itamar Turner-Trauring
4c047b90e5 Manual steps of port to Python 3. 2020-07-16 15:46:23 -04:00
Itamar Turner-Trauring
e90d1f38d2 Make TimezoneMixin importable on Python 3. 2020-07-16 15:44:41 -04:00
Itamar Turner-Trauring
554be90b7e Unnecessary code, and was triggering flake8. 2020-07-16 15:27:36 -04:00
Itamar Turner-Trauring
72272cbf0b Move out tests for time_format. 2020-07-16 15:15:26 -04:00
Itamar Turner-Trauring
545848f164 Move abbreviate tests into their own module. 2020-07-16 14:57:09 -04:00
Itamar Turner-Trauring
4da8e2ddee Merge branch '3342-base32-and-base62-to-python-3' into 3344.netstring-and-hashutil-to-python-3 2020-07-16 14:42:09 -04:00
Itamar Turner-Trauring
8d143af43e Another assertion. 2020-07-16 14:40:30 -04:00
Itamar Turner-Trauring
2f693c47f9 Don't leak variable on Python 2. 2020-07-16 14:37:26 -04:00
Itamar Turner-Trauring
efbae9b3e3 Hard code some known values, generated on the master branch preceding these
changes.
2020-07-16 14:33:53 -04:00
Itamar Turner-Trauring
7abc54c429 Merge remote-tracking branch 'origin/master' into 3342-base32-and-base62-to-python-3 2020-07-16 14:21:42 -04:00
Jean-Paul Calderone
0ce6e562cb
Merge pull request #742 from chadwhitacre/3325.add-py36-to-ci
Add py36 to CI

Fixes: ticket:3325
2020-07-15 20:11:39 -04:00
Jean-Paul Calderone
c493396148
Merge pull request #740 from tahoe-lafs/3340-unused-code-in-util
Delete some dead code.

Fixes: ticket:3340
2020-07-15 20:08:41 -04:00
Sajith Sasidharan
80bf5f0a53 Remove an unused import 2020-07-15 19:19:51 -04:00
Sajith Sasidharan
7f93e28a7c Parameterize classes used in check/repair tests 2020-07-15 18:43:52 -04:00
Sajith Sasidharan
2d7095866a Expand "deep check and repair results" page test 2020-07-15 17:10:48 -04:00
Sajith Sasidharan
a13ec344b9 Correct usage of SlotsSequenceElement 2020-07-15 17:10:41 -04:00
Sajith Sasidharan
8fedbd52c2 Expand "deep check and repair" test 2020-07-15 16:58:39 -04:00
Sajith Sasidharan
6969366370 Document, use, and test "join pathstring" method 2020-07-15 16:40:05 -04:00
Sajith Sasidharan
589e143a4a Add an empty renderer 2020-07-15 16:24:11 -04:00
Sajith Sasidharan
e6eb866cef Add missing "header" renderer
It does not do much here, but it is good to be consistent
2020-07-15 16:21:46 -04:00
Sajith Sasidharan
b5a465cc8d Format "all objects" table correctly 2020-07-15 16:20:36 -04:00
Sajith Sasidharan
07c24dbe59 Add a missing super() call 2020-07-15 16:14:10 -04:00
Itamar Turner-Trauring
6af32fdfa7 Make sure the public API exposes native bytes, not Future bytes. 2020-07-15 15:59:46 -04:00
Itamar Turner-Trauring
ed6e1cb7ef Fix formatting. 2020-07-15 15:51:09 -04:00
Itamar Turner-Trauring
ed8b10c12f Finish porting to Python 3. 2020-07-15 15:00:29 -04:00
Itamar Turner-Trauring
4800992de6 Type check assertions. 2020-07-15 14:58:58 -04:00
Itamar Turner-Trauring
fa5b5fa436 Manual part of port to Python 3. 2020-07-15 14:55:56 -04:00
Sajith Sasidharan
69afd292c2 Use a different format for path
Seems that _join_pathstring() is the wrong thing to use here.
2020-07-15 13:43:50 -04:00
Sajith Sasidharan
3c079bef73 Expand "deep check results" test 2020-07-15 13:35:22 -04:00
Sajith Sasidharan
f547509332 Use table headers correctly 2020-07-15 13:24:32 -04:00
Sajith Sasidharan
ddfe20c8ab Use SlotsSequenceElement correctly 2020-07-15 13:24:20 -04:00
Itamar Turner-Trauring
bb7d31c5e4 Futurize part of port to Python 3. 2020-07-15 11:19:57 -04:00
Itamar Turner-Trauring
60a1a24423 Manual portion of port to Python 3. 2020-07-15 11:13:59 -04:00
Itamar Turner-Trauring
e3e29598e4 A couple of missing explicit byte strings. 2020-07-15 11:13:52 -04:00
Itamar Turner-Trauring
cfb11f7f4c More explicit testing of types. 2020-07-15 11:08:06 -04:00
Itamar Turner-Trauring
093125ca43 Port to Python 3. 2020-07-15 11:05:23 -04:00
Itamar Turner-Trauring
d316ad3ebd A more explicit test. 2020-07-15 11:02:49 -04:00
Itamar Turner-Trauring
2b89674052 Everything must be bytes. 2020-07-15 11:01:45 -04:00
Itamar Turner-Trauring
9ed91eabb3 Split out hashutil tests into their own module. 2020-07-15 10:58:05 -04:00
Sajith Sasidharan
1ed722494c Add a FakeServer class for testing 2020-07-15 10:35:56 -04:00
Sajith Sasidharan
6322404b1e Update "deep check results renderer" test 2020-07-14 21:44:41 -04:00
Sajith Sasidharan
99ce9ff198 Correct argument to SlotsSequenceElement 2020-07-14 21:42:28 -04:00
Sajith Sasidharan
ef26d66e79 Use correct twisted web template directives 2020-07-14 20:50:12 -04:00
Sajith Sasidharan
b4b820ed7b Use a helper method to get monitor counter 2020-07-14 20:47:23 -04:00
Itamar Turner-Trauring
3688291df2 Handy way to run Python 3 tests, until the ratchet is going. 2020-07-14 13:53:26 -04:00
Itamar Turner-Trauring
5fd01523cf This module is not a thing. 2020-07-14 13:53:13 -04:00
Itamar Turner-Trauring
21a9ffef7a Not strings. 2020-07-14 13:46:12 -04:00
Itamar Turner-Trauring
a81e859b82 Fix flake error. 2020-07-14 13:44:56 -04:00
Itamar Turner-Trauring
27d8eb47fc Test improvements. 2020-07-14 13:44:00 -04:00
Itamar Turner-Trauring
db41d5af6f
Merge pull request #743 from tahoe-lafs/3342-more-tests-for-base32-base62
Fixes https://tahoe-lafs.org/trac/tahoe-lafs/ticket/3343
2020-07-14 13:41:20 -04:00
Itamar Turner-Trauring
e0adb3b37d Port to Python 3. 2020-07-14 13:35:46 -04:00
Itamar Turner-Trauring
b5db85afbe Initial, manual steps of Python 3 port. 2020-07-14 11:53:40 -04:00
Itamar Turner-Trauring
3abb9e9db4 Rip out a whole bunch of code, either deleting or replacing with stdlib's base32 implementation. 2020-07-14 11:45:05 -04:00
Itamar Turner-Trauring
f3db64ad74 Port to Python 3. 2020-07-14 11:29:09 -04:00
Itamar Turner-Trauring
ab3737d686 Note this module has been ported to Python 3. 2020-07-14 11:28:51 -04:00
Itamar Turner-Trauring
9c428be0e2 Port base62 to Python 3. 2020-07-14 11:24:45 -04:00
Itamar Turner-Trauring
b1e732fb9a Port test_base62 to Python 3. 2020-07-14 10:34:53 -04:00
Itamar Turner-Trauring
e34a01d547 A couple more asserts. 2020-07-14 10:28:22 -04:00
Itamar Turner-Trauring
459d68118c Merge branch '3342-more-tests-for-base32-base62' into 3342-base32-and-base62-to-python-3 2020-07-14 10:26:46 -04:00
Itamar Turner-Trauring
f378edd9d8 Fix missing import. 2020-07-14 10:20:51 -04:00
Sajith Sasidharan
54e952ceda Test for 404 responses from status page subpaths 2020-07-14 09:01:31 -04:00
Chad Whitacre
329bfe05f9 Make a crucial relative import explicit 2020-07-13 22:27:59 -04:00
Sajith Sasidharan
abd539588f Rename nested functions for clarity
... and also to remove embarrassing copy-pasta mistakes.
2020-07-13 20:52:12 -04:00
Sajith Sasidharan
b48556c2cb Add tests for status subpages
Coverage tests for the coverage gods
2020-07-13 20:44:30 -04:00
Itamar Turner-Trauring
ead2a79cf7 Everything should be bytes. 2020-07-13 16:21:15 -04:00
Itamar Turner-Trauring
6464e226c6 Hypothesis-based roundtrip test. 2020-07-13 16:19:48 -04:00
Itamar Turner-Trauring
828e6bc28a Minimal tests for could_be_base32_encoded(). 2020-07-13 16:18:13 -04:00
Itamar Turner-Trauring
77ae087c77 Remove a2b_l and b2a_l from public API, to ease likely future switch to stdlib
base64's implementation.
2020-07-13 16:12:53 -04:00
Itamar Turner-Trauring
e23dbcdf56 Document current public API. 2020-07-13 15:41:01 -04:00
Itamar Turner-Trauring
bbfd39e6c0 Test larger variety of inputs using hypothesis. 2020-07-13 15:30:11 -04:00
Itamar Turner-Trauring
a8a7d48c12 Everything must be bytes. 2020-07-13 15:25:07 -04:00
Itamar Turner-Trauring
f27cba181e Move existing base32 tests out of test_util.py. 2020-07-13 15:22:03 -04:00
Itamar Turner-Trauring
1a3a1ffcaa Restore eliot code. 2020-07-13 14:33:13 -04:00
Itamar Turner-Trauring
af916c3968
Merge branch 'master' into 3341-more-python-3-utils 2020-07-13 14:30:11 -04:00
Sajith Sasidharan
144001f380 Use a better assert in status subpath test 2020-07-11 08:30:39 -04:00
Sajith Sasidharan
6eba2fb2e6 Test "deep check results" page
These are some basic tests -- let's see if this improves test
coverage, and by how much.
2020-07-11 07:59:28 -04:00
Sajith Sasidharan
b49a3eaf3a Check for a non-standard property on request 2020-07-10 21:46:23 -04:00
Sajith Sasidharan
267b89ae5b Remove unused import 2020-07-10 16:34:16 -04:00
Sajith Sasidharan
69ae9e6d32 Merge 'origin/master' into 3316.check-results-nevow-to-twisted-web 2020-07-10 16:33:06 -04:00
Sajith Sasidharan
f9dc2509de Test "deep check and repair" page 2020-07-10 08:00:04 -04:00
Sajith Sasidharan
427f99621f Do more null checks 2020-07-10 06:56:29 -04:00
Sajith Sasidharan
d4a02aa1cd Remove a print statement 2020-07-09 17:14:55 -04:00
Sajith Sasidharan
5276ea5b37 Merge branch 'master' into 3254.status-status-nevow-to-twisted-web 2020-07-09 17:09:50 -04:00
Sajith Sasidharan
956c2c535d Remove unused import 2020-07-09 17:09:12 -04:00
Sajith Sasidharan
a56d077d3d Test HTML document generated by web.status.Status 2020-07-09 16:59:04 -04:00
Sajith Sasidharan
8331e7d8ec Remove now-unnecessary UploadResultsPage.render_UPLOAD 2020-07-09 16:05:31 -04:00
Sajith Sasidharan
44ecfdad09 Make UploadResultsPage a Resource 2020-07-09 16:05:31 -04:00
Sajith Sasidharan
62e803db25 Make UploadStatusPage a Resource 2020-07-09 16:05:31 -04:00
Sajith Sasidharan
38fe7dd3f5 Remove unused import 2020-07-09 16:05:31 -04:00
Sajith Sasidharan
f30dcc7ec6 Make Element the superclass of UploadResultsRendererMixin 2020-07-09 16:05:31 -04:00
Sajith Sasidharan
4b560d10cc Move time formatter tests
UploadResultsRendererMixin no longer has render_time(); moving tests
for render_time() as tests for abbreviate_time() to a more appropriate
place.
2020-07-09 16:05:31 -04:00
Sajith Sasidharan
9c14eec1e0 Avoid use of RateAndTimeMixin in UploadResultsRendererMixin 2020-07-09 16:05:31 -04:00
Sajith Sasidharan
118ea4267c Render abbreviated rate and time values 2020-07-09 16:05:31 -04:00
Sajith Sasidharan
c0d83def22 Document UploadResultsPage parameter 2020-07-09 16:05:31 -04:00
Sajith Sasidharan
0af8df7203 Document UploadStatusPage 2020-07-09 16:05:31 -04:00
Sajith Sasidharan
855668b188 Remove unused imports 2020-07-09 16:05:31 -04:00
Sajith Sasidharan
a0655c18d6 Handle "t=upload" in UploadResultsPage POST handling 2020-07-09 16:05:31 -04:00
Sajith Sasidharan
6b4d27bec1 Use twisted web template in UploadResultsRendererMixin 2020-07-09 16:05:31 -04:00
Sajith Sasidharan
2ab7b15f8b Make UploadResultsPage a MultiFormatResource 2020-07-09 16:05:31 -04:00
Sajith Sasidharan
71fd4f5d10 Use twisted template tags in upload results page template 2020-07-09 16:05:31 -04:00
Sajith Sasidharan
e6f0f9d038 Make UploadStatusPage a MultiFormatResource 2020-07-09 16:05:31 -04:00
Sajith Sasidharan
d24babe873 Use twisted template tags in upload status page template 2020-07-09 16:05:30 -04:00
Sajith Sasidharan
96fbff684f Use an inner JSONRequest class with renderJSON
Once nevow is removed from web/common.py, we can simplify
renderJSON(), like so:

  def renderJSON():
      req = Request()
      req.args = {"t": ["json"]}
      req.fields = {}
      return resource.render(req)

But for now we have to live with an inner class that implements the
nevow.inevow.IRequest interface.
2020-07-09 16:05:30 -04:00
Sajith Sasidharan
92e83f268b Declare JSON request interface using @implementer
"zope.interface.implements(IRequest)" is deprectated in favor of
"@zope.interface.implementer(IRequest)" decorator.
2020-07-09 16:05:30 -04:00
Sajith Sasidharan
d449306b19 Use DummyRequest in storage tests
Using twisted.web.server.Request causes test_new_style_classes to
fail like so:

  Traceback (most recent call last):
  Failure: testtools.testresult.real._StringException: Traceback (most recent call last):
    File ".tox/coverage/lib/python2.7/site-packages/allmydata/test/test_python2_regressions.py", line 69, in test_new_style_classes
      "Expected to find no classic classes.",
    File ".tox/coverage/lib/python2.7/site-packages/testtools/testcase.py", line 502, in assertThat
      raise mismatch_error
  testtools.matchers._impl.MismatchError: !=:
  reference = set([])
  actual    = set([<class allmydata.test.test_storage.JSONRequest at 0x7fd938040bb0>])
  : Expected to find no classic classes.

Seems that `DummyRequest` is an acceptable new style class.
2020-07-09 16:05:30 -04:00
Sajith Sasidharan
6b61b75658 Refactor storage test helpers
Rewrite `renderSynchronously()` to use `renderDeferred()`
2020-07-09 16:05:30 -04:00
Sajith Sasidharan
bdfa667a22 Add docstrings to storage test helpers 2020-07-09 16:05:30 -04:00
Sajith Sasidharan
7e26dd42e9 Remove redundant render_json() method 2020-07-09 16:05:30 -04:00
Sajith Sasidharan
6379601722 Wrap renderer results in tags 2020-07-09 16:05:30 -04:00
Sajith Sasidharan
0af744610f Avoid using nevow FakeRequest in storage test.
Use twisted.web.server.Request instead, with a DummyChannel.

There's still one line of inevitable nevow now, because of code in
web/common.py; but that should be easily replaceable once we switch
that over.
2020-07-09 16:05:30 -04:00
Sajith Sasidharan
de5d04ab79 Remove an extraneous directive
`t:data` is not really a Twisted template directive.  Added my
mistake, removing now.
2020-07-09 16:05:30 -04:00
Sajith Sasidharan
a056f18ca9 Remove StorageStatus.renderHTTP
This was added to please the test suite. Pleased to remove it!
2020-07-09 16:05:30 -04:00
Sajith Sasidharan
a6e6c5cee0 Get rid of WebRenderingMixin in storage test 2020-07-09 16:05:30 -04:00
Sajith Sasidharan
8d31791940 Use a helper to exercise render() in storage test cases 2020-07-09 16:05:30 -04:00
Sajith Sasidharan
7126d3247c Prefix member variable with "_" 2020-07-09 16:05:30 -04:00
Sajith Sasidharan
0d9ec2b206 Use slots to render storage stats table 2020-07-09 16:05:30 -04:00
Sajith Sasidharan
9dd9d98b8c Give the suite the precise string it wants 2020-07-09 16:05:30 -04:00
Sajith Sasidharan
1469af0f3b Use BeautifulSoup to check favicon in storage page 2020-07-09 16:05:30 -04:00
Sajith Sasidharan
56e2fa3f24 Use <t:transparent> to render node nickname and id
CI did not like the old way, but it passed in my system.  Odd.
2020-07-09 16:05:30 -04:00
Sajith Sasidharan
0bd386384e Mark format_recovered as static method 2020-07-09 16:05:30 -04:00
Sajith Sasidharan
bc8a86e106 Use Unicode strings to render space 2020-07-09 16:05:30 -04:00
Sajith Sasidharan
0b4c235fbd Remove redundant None-checks on self.storage
When no storage is up, `storage_running()` renderer will return a big
honking `no storage server running` message, and no further renderers
will be invoked.  Therefore the extra defense is probably not
required.

(I tested this hypothesis.  The extra defense is not required, unless
there's something I have not seen.)
2020-07-09 16:05:30 -04:00
Sajith Sasidharan
db0e6407dc Use successResultOf in renderSynchronously
Get rid of [].append trick when dealing with the deferred.
2020-07-09 16:05:30 -04:00
Sajith Sasidharan
ee8e730727 Move renderSynchronously to test suite 2020-07-09 16:05:30 -04:00
Sajith Sasidharan
92f6e4bfe5 Use explicit None-check on self.storage 2020-07-09 16:05:30 -04:00
Sajith Sasidharan
affe10b3e9 Return result from renderHTTP
Bogus renderHTTP, but test failures are now down to three. We just
need to handle requests for JSON now.
2020-07-09 16:05:30 -04:00
Sajith Sasidharan
6b5e530cb3 Add a docstring 2020-07-09 16:05:30 -04:00
Sajith Sasidharan
abb8834be1 Rename function for clarity 2020-07-09 16:05:30 -04:00
Sajith Sasidharan
e67fa7cd95 Add docstrings to StorageStatusElement 2020-07-09 16:05:30 -04:00
Sajith Sasidharan
ac9a73eddb Use parentheses in test suite's import statement 2020-07-09 16:05:30 -04:00
Sajith Sasidharan
62a997ce20 Use parentheses in import statement 2020-07-09 16:05:30 -04:00
Sajith Sasidharan
1be736e4d1 Fix test_storage.WebStatus.test_no_server failure 2020-07-09 16:05:30 -04:00
Sajith Sasidharan
8dd4029428 Use <t:transparent /> within table cells 2020-07-09 16:05:30 -04:00
Sajith Sasidharan
6ccb9d29cb Use render_space methods to render space 2020-07-09 16:05:30 -04:00
Sajith Sasidharan
dbc6b2afa0 Drop unused ctx argument from render_space methods 2020-07-09 16:05:30 -04:00
Sajith Sasidharan
d5af7c0d2e Refactor so that test_util pass 2020-07-09 16:05:30 -04:00
Sajith Sasidharan
923219e54a Use right syntax for twisted.web.template tags 2020-07-09 16:05:29 -04:00
Sajith Sasidharan
42c3e276a3 Check storage server status before using it 2020-07-09 16:05:29 -04:00
Sajith Sasidharan
d1f17e1019 Second version of renderSynchronously 2020-07-09 16:05:29 -04:00
Sajith Sasidharan
805b880c2e Add missing flattenString import 2020-07-09 16:05:29 -04:00
Sajith Sasidharan
75488c4aff Add StorageStatus::renderSynchronously
Related to ticket:3247

test_storage.py wants a `StorageStatus::renderSynchronously()` method
and a `StorageStatus::renderHTTP()` method.  Let us begin with the
goofy first-cut.

Both these methods are not only wrong, but they will also not please
the test suite.  However error messages produced in CI can be shared,
and that way I can hopefully get unstuck.
2020-07-09 16:05:29 -04:00
Sajith Sasidharan
aad3557d2b Use twisted.web.template in web/storage.py
Related to ticket:3247.  Nevow usage has been removed, and generated
page looks the same as its former self, but tests are failing because
test_storage.py assumes that we're using nevow.
2020-07-09 16:05:29 -04:00
meejah
7a37eeee67 assert -> Exception 2020-07-09 16:05:29 -04:00
meejah
5cfb350771 streap -> stream 2020-07-09 16:05:29 -04:00
meejah
1f4b619fda unused imports 2020-07-09 16:05:29 -04:00
meejah
77a2f11694 more-testtools-y asserts 2020-07-09 16:05:29 -04:00
meejah
1ce760b237 testtool's asserts 2020-07-09 16:05:29 -04:00
meejah
26d7a3a957 Get rid of ?replace= handling entirely and more-correctly support /uri variants 2020-07-09 16:05:29 -04:00
meejah
e0287a7bfe use attr.s 2020-07-09 16:05:29 -04:00
meejah
af70911e2f embetter docstring 2020-07-09 16:05:29 -04:00
meejah
d91996aa82 better docstring 2020-07-09 16:05:29 -04:00
meejah
eaf96b22fe replciate Tahoe's behavior for replace=true/false 2020-07-09 16:05:29 -04:00
meejah
a3f4cc6983 symbols, not magic-numbers 2020-07-09 16:05:29 -04:00
meejah
0f6b4c33ac match query args 2020-07-09 16:05:29 -04:00
meejah
66f61c514b assert -> ValueError 2020-07-09 16:05:29 -04:00
meejah
bd858f8fef assert -> raise 2020-07-09 16:05:29 -04:00
meejah
835341f2c2 more docstring 2020-07-09 16:05:29 -04:00
meejah
6fd0d61d5e comment 2020-07-09 16:05:29 -04:00
meejah
10715fa26b docstring 2020-07-09 16:05:29 -04:00
meejah
9420777810 cleanup, docstrings 2020-07-09 16:05:29 -04:00
meejah
e481e37beb housekeeping 2020-07-09 16:05:29 -04:00
meejah
9d5e438c2d use real parser 2020-07-09 16:05:29 -04:00
meejah
683c8d3e4f actually returns CREATED for new data 2020-07-09 16:05:29 -04:00
meejah
b01995f158 use hypothesis -- which doesn't know about Deferred, so need testtools too 2020-07-09 16:05:29 -04:00
meejah
0cc020b5f2 copyright, header 2020-07-09 16:05:29 -04:00
meejah
1710530b6b key -> kind 2020-07-09 16:05:29 -04:00
meejah
c0ce716430 handle more inputs in test body-producer 2020-07-09 16:05:29 -04:00
meejah
02a663c244 new-style classes only 2020-07-09 16:05:29 -04:00
meejah
18b62bf746 unused imports 2020-07-09 16:05:29 -04:00
meejah
05140a5881 simple test of testing/web 2020-07-09 16:05:29 -04:00
meejah
66116020fb simplify tahoe web fakes 2020-07-09 16:05:29 -04:00
meejah
95531fa729 synchronous-only up/download tahoe code to keep treq.testing happy 2020-07-09 16:05:29 -04:00
meejah
ab7936db56 actual usable agent 2020-07-09 16:05:29 -04:00
meejah
6e2285ed2c proof-of-concept verified-fake for testing 2020-07-09 16:05:29 -04:00
Sajith Sasidharan
b956d9a58c Decode name before null check
Make the diff against master a tad bit smaller.
2020-07-09 16:05:29 -04:00
Sajith Sasidharan
fccc331671 Make "Refresh" link work
This seems to be a subtle difference from nevow: with `href="."`,
rendered link target will be `/uri/`, so clicking "Refresh" will
result in an error message like so: "GET /uri requires uri=".

With `href=""`, the rendered link target will be `/uri/URI:...`, which
is what we need.
2020-07-09 16:05:29 -04:00
Sajith Sasidharan
378b20c51a Reject trailing empty path piece in URIs 2020-07-09 16:05:29 -04:00
Sajith Sasidharan
d3d0d02855 Reject URIs that contain empty segments 2020-07-09 16:05:29 -04:00
Sajith Sasidharan
5892eae580 Render self in DirectoryNodeHandler.getChild()
We need self.render_POST() etc. to be invoked when we have a request
such as "POST /uri/URI:DIR:..."; throwing an error here is probably
not the right thing to do.
2020-07-09 16:05:29 -04:00
Sajith Sasidharan
7444d6b7a9 Correct arguments to super()
This was incidentally found when looking at some test failures:
super(type, object) is the right invocation, and not the other way
around.
2020-07-09 16:05:29 -04:00
Sajith Sasidharan
4dd6c86950 Use twisted web directives in web.operations.ReloadMixin 2020-07-09 16:05:28 -04:00
Itamar Turner-Trauring
1e41df9f48 Add to list of ported modules. 2020-07-09 14:38:07 -04:00
Sajith Sasidharan
2e160c1526 Test for failure caused by invalid path
A hyphen is expected when rendering /status page child nodes:
"/status/up" is wrong; "/status/up-0" is right.
2020-07-09 14:37:37 -04:00
Sajith Sasidharan
54248f334e Use WebError, not RuntimeError, to indicate error
Several problems with using RuntimeError to signal error here:

- It dumps a rather unhelpful webpage at the user.
- The exception backtrace on Tahoe console is not quite necessary here.
- It really is not a runtime error: it is just an expected failure.
- But mainly, testing for RuntimeError is harder.
2020-07-09 14:35:14 -04:00
Itamar Turner-Trauring
7d1fdd8284 Port modules to Python 3. 2020-07-09 14:32:16 -04:00
Itamar Turner-Trauring
0cf1117165 Move the tests for deferredutil into their own module. 2020-07-09 14:20:12 -04:00
Itamar Turner-Trauring
e108ecb4b0 Fix lint. 2020-07-09 13:56:25 -04:00
Itamar Turner-Trauring
af86066eab Delete some dead code. 2020-07-09 13:52:06 -04:00
Itamar Turner-Trauring
12d5131568 Fix pyflakes issues. 2020-07-09 13:12:30 -04:00
Sajith Sasidharan
7bee9ff540 Untabify again 2020-07-08 13:56:52 -04:00
Sajith Sasidharan
4d22390b59 Untabify 2020-07-08 13:29:01 -04:00
Sajith Sasidharan
51d6307b45 Fail better when timings data isn't available 2020-07-08 13:08:35 -04:00
Sajith Sasidharan
112cfc1da5 Test if download status page can be rendered partially 2020-07-08 13:08:35 -04:00
Sajith Sasidharan
c187e2752b Parameterize FakeDownloadResults and FakeDownloadStatus 2020-07-08 13:08:35 -04:00
Itamar Turner-Trauring
9e3bc3e888 These tests are no longer necessary, since we are no longer implementing this
code ourselves.

Before deleting the tests I ensured they either passed, or the failure were due
to slightly different string formatting in pyutil's assertutil.

As such I believe pyutil has the same behavior.
2020-07-08 12:16:26 -04:00
Itamar Turner-Trauring
bd6ff36b2f Fix typo. 2020-07-08 12:13:24 -04:00
Itamar Turner-Trauring
939648c04f Add back missing function. 2020-07-08 12:13:19 -04:00
Itamar Turner-Trauring
229583c596 Switch to mathutil from pyutil (it has tests, and has already been ported to
Python 3).
2020-07-08 12:02:58 -04:00
Itamar Turner-Trauring
016c7754a6 Switch to use pyutil's assertutil implementation. 2020-07-08 11:57:10 -04:00
Sajith Sasidharan
81216f18bf Remove some whitespace 2020-07-08 10:15:33 -04:00
Sajith Sasidharan
d6ea30b935 Test more markup rendered by DownloadStatusElement 2020-07-07 22:20:49 -04:00
Sajith Sasidharan
0db56f99cf Add some tests for DownloadStatusElement 2020-07-07 20:49:58 -04:00
Sajith Sasidharan
7757756a41 Use correct tag type 2020-07-07 20:45:30 -04:00
Sajith Sasidharan
0c4d24a2ac Avoid use of deferred within an Element
This causes the final HTML to be rendered funny, with a bunch of
"<Deferred current result=...>", which is clearly not what we want.
2020-07-07 20:24:56 -04:00
Sajith Sasidharan
7877d8a5cc Use an accessor 2020-07-07 19:55:14 -04:00
Itamar Turner-Trauring
3d0e4df5ce Lint fixes. 2020-07-07 11:30:01 -04:00
Itamar Turner-Trauring
e06d41442a Merge remote-tracking branch 'origin/master' into 3324-humanreadable-python-3 2020-07-07 11:03:33 -04:00
Sajith Sasidharan
a3bf4e0269 Remove an unused import 2020-07-06 20:18:22 -04:00
Sajith Sasidharan
e6eb387707 Remove status.RateAndTimeMixin
Both UploadResultsRenderer and DownloadResultsRenderer do not use
RateAndTimeMixin anymore: safe to remove it now.

Tests for methods formerly in RateAndTimeMixin have been moved to
test.web.test_util: specifically test_abbreviate_rate() and
test_abbreviate_time().
2020-07-06 17:11:30 -04:00
Sajith Sasidharan
4a47e8311f Merge 'origin/master' into 3288.status-download-nevow-to-twisted-web 2020-07-06 16:38:23 -04:00
Sajith Sasidharan
25f5e659fc
Merge pull request #721 from sajith/3287.status-upload-nevow-to-twisted-web
Replace nevow with twisted.web.template in status.UploadStatusPage

Fixes: ticket:3287
2020-07-06 16:20:40 -04:00
Sajith Sasidharan
61aef4caef
Merge pull request #690 from sajith/3247.storage-py-neovw-to-twt
Use twisted.web.template in web/storage.py

Fixes: ticket:3247
2020-07-06 16:18:34 -04:00
Itamar Turner-Trauring
f548593f37 Fix test_python3, and mark these two modules as being ported as well. 2020-07-06 14:18:18 -04:00
Itamar Turner-Trauring
b990334104 Add the builtins import to make Python 2 builtins match Python 3's. 2020-07-06 14:00:02 -04:00
Itamar Turner-Trauring
83b9bbf743 Switch definitely to _python3.py for listing modules, but also note if a module
has been ported in its docstring.
2020-07-03 13:28:36 -04:00
Itamar Turner-Trauring
140cb80ff7 Clarify comment. 2020-07-03 13:15:57 -04:00
Itamar Turner-Trauring
12691eb597 Only install module mappings once. 2020-07-02 14:31:33 -04:00
Itamar Turner-Trauring
ad7f44db99 Listed ported modules. 2020-07-02 14:27:43 -04:00
Itamar Turner-Trauring
70a029fb81 Tests pass on both Python 2 and Python 3. 2020-07-02 14:26:35 -04:00
Itamar Turner-Trauring
c207a0c932 Port test_humanreadable.py to Python 3. 2020-07-02 14:10:38 -04:00
Itamar Turner-Trauring
99b62775e9 Initial list of ported modules. 2020-07-02 13:42:30 -04:00
Itamar Turner-Trauring
b7f88b278f Split out tests for humanreadable into their own module, so we can port just
humanreadable.py in isolation.
2020-07-02 13:40:40 -04:00
meejah
ffd24b9c7f
Merge pull request #728 from meejah/ticket3317-verified-fakes
Ticket 3317: start of verified fakes
2020-06-30 19:40:39 +00:00
meejah
80359e02e6 assert -> Exception 2020-06-30 08:17:34 -06:00
meejah
a9f4210014 streap -> stream 2020-06-30 08:15:58 -06:00
Sajith Sasidharan
f9e864c51c Use simpler syntax to update map 2020-06-24 08:15:18 -04:00
Sajith Sasidharan
88d3fa7415 Remove now-unnecessary UploadResultsPage.render_UPLOAD 2020-06-23 21:54:23 -04:00
Sajith Sasidharan
dfbb8e7743 Make UploadResultsPage a Resource 2020-06-23 21:53:39 -04:00
Sajith Sasidharan
6ab7f26faf Make UploadStatusPage a Resource 2020-06-23 21:28:31 -04:00
Sajith Sasidharan
00e852c465 Make DownloadStatus an object
PythonTwoRegressions.test_new_style_classes would be unhappy without
this.
2020-06-23 20:54:49 -04:00
Sajith Sasidharan
36ecd8f384 Use render_GET()
Implementing `render_METHOD()` is preferred over overriding render()
2020-06-23 20:54:49 -04:00
Sajith Sasidharan
b14c0a0495 Make DownloadStatusPage a Resource
No need of this being a MultiFormatResource, because it renders just
HTML.
2020-06-23 20:54:49 -04:00
meejah
aedc58ef51 unused imports 2020-06-19 17:22:42 -06:00
meejah
f0ac5a2cef more-testtools-y asserts 2020-06-19 17:19:30 -06:00
meejah
57eb875354 testtool's asserts 2020-06-19 17:16:39 -06:00
meejah
ef71fc2bfc Get rid of ?replace= handling entirely and more-correctly support /uri variants 2020-06-19 17:15:01 -06:00
Sajith Sasidharan
982ad8942e Comment about nevow.url usage in web.operations.OphandleTable 2020-06-18 18:30:18 -04:00
Sajith Sasidharan
2d2e8a5872 Add comments to web.operations.OphandleTable 2020-06-18 18:29:39 -04:00
Sajith Sasidharan
bbee23b493 Rename a parameter for clarity
"context" is nevow terminology, whereas these are really requests.
2020-06-18 18:29:39 -04:00
Sajith Sasidharan
5ec78641db Make web.operations.OphandleTable a twisted web Resource 2020-06-18 18:29:27 -04:00
Sajith Sasidharan
6f8af688dd Rearrange imports 2020-06-18 18:01:18 -04:00
Sajith Sasidharan
dfb477a2b1 Remove unused import 2020-06-17 22:09:50 -04:00
Sajith Sasidharan
e121cc0a84 Use the right names
Missed this in testing because this code was not reached in testing.
2020-06-17 22:09:50 -04:00
Sajith Sasidharan
4f213e93be Remove an unused variable 2020-06-17 22:04:08 -04:00
Sajith Sasidharan
0483fc91c1 Remove unused import 2020-06-17 22:04:08 -04:00
Sajith Sasidharan
c3440ce213 Use a helper to query monitor counters 2020-06-17 21:53:11 -04:00
Sajith Sasidharan
47f9147e16 Rename a class for consistency's sake 2020-06-17 21:46:40 -04:00
Sajith Sasidharan
fe1b0cb7ed Rename class variables 2020-06-17 21:18:14 -04:00
Sajith Sasidharan
22977352bb Document parameters of ResultsRenderer classes 2020-06-17 21:18:14 -04:00
Sajith Sasidharan
79be795566 Remove unused want_json() 2020-06-17 21:18:14 -04:00
Sajith Sasidharan
23a51117d2 Rename r to check_results 2020-06-17 21:18:14 -04:00
Sajith Sasidharan
fae4f44404 Prefer req to ctx 2020-06-17 21:18:14 -04:00
Sajith Sasidharan
cdb3747470 Remove nevow imports 2020-06-17 21:18:14 -04:00
Sajith Sasidharan
de99912641 Replace ctx references with req references 2020-06-17 21:18:14 -04:00
Sajith Sasidharan
1ee756c8df Use Beautiful Soup to check for favicon 2020-06-17 21:18:14 -04:00
Sajith Sasidharan
2e60408bf6 Wrap counters in <span> tags
Unless the rendered page contains strings of the form "Objects
Checked: <span>n</span>" etc, test_POST_DIRURL_deepcheck will not
pass.
2020-06-17 21:18:14 -04:00
Sajith Sasidharan
33ddac879c Remove unused code 2020-06-17 21:18:14 -04:00
Sajith Sasidharan
8094b3144d Use SlotsSequenceElement to render all objects 2020-06-17 21:18:14 -04:00
Sajith Sasidharan
4e594b09bf Use SlotsSequenceElement to render corrupt shares 2020-06-17 21:18:14 -04:00
Sajith Sasidharan
46cb3b6bc3 Use SlotsSequenceElement to render servers with corrupt shares 2020-06-17 21:18:14 -04:00
Sajith Sasidharan
c41bca24f5 Use SlotsSequenceElement to render deep check results problems 2020-06-17 21:18:14 -04:00
Sajith Sasidharan
bbd6bde478 Use SlotsSequenceElement to render remaining corrupt shares
This was previously not implemented; leaving it as such.
2020-06-17 21:18:14 -04:00
Sajith Sasidharan
19f6ec7102 Use SlotsSequenceElement to render servers with corrupt shares
This was previously not implemented; leaving it as such.
2020-06-17 21:18:14 -04:00
Sajith Sasidharan
e0c686bb92 Use SlotsSequenceElement to render post-repair problems 2020-06-17 21:18:14 -04:00
Sajith Sasidharan
f168dcd19c Use SlotsSequenceElement to render pre-repair problems 2020-06-17 21:18:14 -04:00
Sajith Sasidharan
c7aa789a22 Fix "class has no children attribute" error 2020-06-17 21:18:14 -04:00
Sajith Sasidharan
cfb1560d15 Render "all objects" table using SlotsSequenceElement 2020-06-17 21:18:14 -04:00
Sajith Sasidharan
3783349ea7 Add span tags to "deep check and repair results" template
Tests expect <span> tags around these numbers, let us add those.
2020-06-17 21:18:14 -04:00
Sajith Sasidharan
c4be4b566c Make TestRequest an object
Wouldn't pass PythonTwoRegressions.test_new_style_classes without
this.
2020-06-17 21:18:14 -04:00
Sajith Sasidharan
048840ac99 Stringify numbers 2020-06-17 21:18:14 -04:00
Sajith Sasidharan
c44a167a66 Remove WebRenderingMixin from WebResultsRendering 2020-06-17 21:18:14 -04:00
Sajith Sasidharan
02cd42c130 Simplify WebResultsRendering.test_literal 2020-06-17 21:18:14 -04:00
Sajith Sasidharan
77120ba70c Update tests for ResultsRenderer classes 2020-06-17 21:18:14 -04:00
Sajith Sasidharan
0d1269264a Stringify numbers in DeepCheckResultsRenderer 2020-06-17 21:18:14 -04:00
Sajith Sasidharan
7237fef630 Add property client to CheckAndRepairResultsRendererElement 2020-06-17 21:18:14 -04:00
Sajith Sasidharan
19db5fb312 Update "deep check and repair results" template 2020-06-17 21:18:14 -04:00
Sajith Sasidharan
e4efcdd925 Make DeepCheckAndRepairResultsRenderer a MultiFormatResource 2020-06-17 21:18:14 -04:00
Sajith Sasidharan
842b2b6be5 Use twisted tags in "deep check and repair results" template 2020-06-17 21:18:14 -04:00
Sajith Sasidharan
27e5ce090a Update deep check results template 2020-06-17 21:18:14 -04:00
Sajith Sasidharan
c33c0a884d Make DeepCheckResultsRenderer a MultiFormatResource 2020-06-17 21:18:14 -04:00
Sajith Sasidharan
9dcaa104c5 Use twisted tags in deep check results template 2020-06-17 21:18:14 -04:00
Sajith Sasidharan
0eea108123 Make CheckAndRepairResultsRenderer a MultiFormatResource 2020-06-17 21:18:14 -04:00
Sajith Sasidharan
d9005fcccc Use twisted tags in check and repair results template 2020-06-17 21:18:14 -04:00
Sajith Sasidharan
80e9f48551 Add line breaks in a comment 2020-06-17 21:18:14 -04:00
Sajith Sasidharan
6f1601aeeb Stringify numbers before wrapping them up in tags 2020-06-17 21:18:14 -04:00
Sajith Sasidharan
d2540b89d3 Use twisted web tags in ResultsBase 2020-06-17 21:18:14 -04:00
Sajith Sasidharan
8e37bb1ebb Make ResultsBase a base class of CheckResultsRendererElement 2020-06-17 21:18:14 -04:00
Sajith Sasidharan
fea4e516f3 Make CheckResultsRenderer a MultiFormatResource 2020-06-17 21:18:14 -04:00
Sajith Sasidharan
9d104f5893 Use twisted tags in check results template file 2020-06-17 21:18:14 -04:00
Sajith Sasidharan
cbc414725c Use "output" as format argument
Nearly everywhere else the query argument for output format is "t";
but here "t" is used for operations, and "output" is used for output
format.

The test suite will fail without this.
2020-06-17 21:18:14 -04:00
Sajith Sasidharan
c15001269f Avoid using a Python keyword as a renderer name 2020-06-17 21:18:14 -04:00
Sajith Sasidharan
3901559e34 Make LiteralCheckResultsRenderer a MultiFormatResource 2020-06-17 21:18:14 -04:00
Sajith Sasidharan
ebf23a4f0e Use twisted web tags in literal check results template 2020-06-17 21:18:14 -04:00
Sajith Sasidharan
950d111793 Use POST target paths without pre-existing query arguments
`action="."` on `/uri/URI:DIR2:$DIRCAP` will render as `/uri/`, which
is not the result we want.
2020-06-17 21:16:38 -04:00
Sajith Sasidharan
55170dcd2b Rearrange imports 2020-06-17 15:45:08 -04:00
Sajith Sasidharan
7a23c8ed6c
Merge pull request #724 from sajith/3312.webui-directory-fix
Fix for "the webapi does not allow empty pathname components"

Fixes: ticket:3312
2020-06-17 10:55:21 -04:00
meejah
6a37f32eef use attr.s 2020-06-13 17:28:28 -06:00
meejah
939f60f620 embetter docstring 2020-06-13 17:22:17 -06:00
meejah
d221787541 better docstring 2020-06-13 02:03:19 -06:00
meejah
02a543515f replciate Tahoe's behavior for replace=true/false 2020-06-13 01:55:14 -06:00
meejah
0cbdbd9ebe symbols, not magic-numbers 2020-06-13 01:14:45 -06:00
meejah
b952ef066c match query args 2020-06-13 00:46:55 -06:00
meejah
24899dae8e assert -> ValueError 2020-06-13 00:41:22 -06:00
meejah
76040b53f5 assert -> raise 2020-06-13 00:39:57 -06:00
meejah
9f6fcde2f1 more docstring 2020-06-13 00:39:12 -06:00
meejah
a38188164f comment 2020-06-12 23:08:04 -06:00
meejah
c64e78634d docstring 2020-06-12 23:06:33 -06:00
meejah
23b17ca02e cleanup, docstrings 2020-06-12 23:05:32 -06:00
meejah
e79534abe8 housekeeping 2020-06-12 23:01:02 -06:00
meejah
fa597e1735 use real parser 2020-06-12 22:57:38 -06:00
meejah
949b09ce27 actually returns CREATED for new data 2020-06-12 22:08:36 -06:00
meejah
776ee5f91c use hypothesis -- which doesn't know about Deferred, so need testtools too 2020-06-12 22:04:12 -06:00
meejah
05ea0a2fe9 copyright, header 2020-06-12 22:04:03 -06:00
meejah
318dc5092d key -> kind 2020-06-11 19:57:21 -06:00
meejah
0e5422c24b handle more inputs in test body-producer 2020-06-11 19:57:11 -06:00
meejah
36d9bf5d09 new-style classes only 2020-06-11 15:34:47 -06:00
meejah
00e7d01a1a unused imports 2020-06-11 15:34:40 -06:00
meejah
86a90084bb simple test of testing/web 2020-06-11 14:14:42 -06:00
meejah
fc2203e421 simplify tahoe web fakes 2020-06-11 13:26:09 -06:00
meejah
3e973197ac synchronous-only up/download tahoe code to keep treq.testing happy 2020-06-03 11:32:22 -06:00
Sajith Sasidharan
4fa2e6ad97 Use twisted web directives in web.operations.ReloadMixin 2020-06-02 11:56:59 -04:00
meejah
1faa81c7c4 actual usable agent 2020-06-01 09:06:46 -06:00
Sajith Sasidharan
dd14da4a55 Decode name before null check
Make the diff against master a tad bit smaller.
2020-05-29 21:48:04 -04:00
Sajith Sasidharan
dce73f7c2f Make "Refresh" link work
This seems to be a subtle difference from nevow: with `href="."`,
rendered link target will be `/uri/`, so clicking "Refresh" will
result in an error message like so: "GET /uri requires uri=".

With `href=""`, the rendered link target will be `/uri/URI:...`, which
is what we need.
2020-05-29 21:44:10 -04:00
Sajith Sasidharan
31eba00d0f Reject trailing empty path piece in URIs 2020-05-29 21:38:43 -04:00
Sajith Sasidharan
0633623ecc Reject URIs that contain empty segments 2020-05-29 21:38:43 -04:00
Sajith Sasidharan
b6e00d09f9 Render self in DirectoryNodeHandler.getChild()
We need self.render_POST() etc. to be invoked when we have a request
such as "POST /uri/URI:DIR:..."; throwing an error here is probably
not the right thing to do.
2020-05-29 09:22:15 -04:00
Sajith Sasidharan
cf4b3ba008 Correct arguments to super()
This was incidentally found when looking at some test failures:
super(type, object) is the right invocation, and not the other way
around.
2020-05-29 09:20:18 -04:00
meejah
d50ca9af55 proof-of-concept verified-fake for testing 2020-05-26 18:33:04 -06:00
Sajith Sasidharan
d3f43d31d9 Remove unused import 2020-05-23 06:17:06 -04:00
Sajith Sasidharan
93d015e468 Document status.Status 2020-05-22 22:24:09 -04:00
Sajith Sasidharan
a6e32135e8 Update status page child route handler and table renderers
Drop nevow-isms and use twisted.web's way of doing things.
2020-05-22 22:15:45 -04:00
Sajith Sasidharan
3357f4c5ce Make Status a MultiFormatResource 2020-05-22 22:12:22 -04:00
Sajith Sasidharan
81dc63b511 Use twisted template tags in status page template 2020-05-22 22:12:22 -04:00
Sajith Sasidharan
03d529c22a Remove unused import 2020-05-22 21:33:30 -04:00
Sajith Sasidharan
9520ad71eb Rearrange imports 2020-05-22 21:24:21 -04:00
Sajith Sasidharan
f8562530be Make Element the superclass of UploadResultsRendererMixin 2020-05-22 21:11:42 -04:00
Sajith Sasidharan
b0e3325d03 Move time formatter tests
UploadResultsRendererMixin no longer has render_time(); moving tests
for render_time() as tests for abbreviate_time() to a more appropriate
place.
2020-05-22 20:49:34 -04:00
Sajith Sasidharan
91f8d939f8 Avoid use of RateAndTimeMixin in UploadResultsRendererMixin 2020-05-22 20:22:59 -04:00
Sajith Sasidharan
aecd90858a Render abbreviated rate and time values 2020-05-22 19:39:32 -04:00
Sajith Sasidharan
7be1883910 Document UploadResultsPage parameter 2020-05-22 19:39:32 -04:00
Sajith Sasidharan
5fdd61b146 Document UploadStatusPage 2020-05-22 19:39:32 -04:00
Sajith Sasidharan
54ac2d224a Remove unused imports 2020-05-22 19:39:32 -04:00
Sajith Sasidharan
7a82fd671f Handle "t=upload" in UploadResultsPage POST handling 2020-05-22 19:39:32 -04:00
Sajith Sasidharan
3bfa5a5c29 Use twisted web template in UploadResultsRendererMixin 2020-05-22 19:39:32 -04:00
Sajith Sasidharan
57b1203d17 Make UploadResultsPage a MultiFormatResource 2020-05-22 19:39:32 -04:00
Sajith Sasidharan
6470718691 Use twisted template tags in upload results page template 2020-05-22 19:39:32 -04:00
Sajith Sasidharan
41300097c8 Make UploadStatusPage a MultiFormatResource 2020-05-22 19:39:32 -04:00
Sajith Sasidharan
aac8dee8a0 Use twisted template tags in upload status page template 2020-05-22 19:39:32 -04:00
Sajith Sasidharan
aec6e5a9d4 Force a CircleCI build 2020-05-18 20:05:16 -04:00
Sajith Sasidharan
c23fedbcfe Add related ticket to comment about refactoring 2020-05-18 16:56:32 -04:00
Sajith Sasidharan
0b3db59742 Add related ticket to comment about unimplemented method 2020-05-18 16:56:32 -04:00
Sajith Sasidharan
993b1e225f Use transparent tags to render values 2020-05-18 11:01:14 -04:00
Sajith Sasidharan
c5342d8ae6 Add comments about events tables 2020-05-14 16:48:43 -04:00
Sajith Sasidharan
ab4811eaa0 Move tests for abbreviate time/rate methods to utils tests
RateAndTimeMixin.render_time() is really abbreviate_time(), and
RateAndTimeMixin.render_rate() is really abbreviate_rate().  This
change moves the tests to their rightful place, and exercises them
using the right names.

We're also trying to avoid use of mixins.  RateAndTimeMixin will
eventually go.
2020-05-14 16:09:54 -04:00
Sajith Sasidharan
88e8854ad4 Wrap renderer results in tags 2020-05-14 16:09:54 -04:00
Sajith Sasidharan
68df408229 Add a note about unimplemented DownloadStatus method 2020-05-14 16:09:54 -04:00
Sajith Sasidharan
1fa77d8983 Avoid use of DownloadResultsRendererMixin 2020-05-14 16:09:54 -04:00
Sajith Sasidharan
1f1f3b5f61 Remove unused render_timeline_link()
As it turns out, nothing is using this method.
2020-05-14 16:09:54 -04:00
Sajith Sasidharan
f3edc8a48c Add a note about rendering download events tables 2020-05-14 16:09:54 -04:00
Sajith Sasidharan
b02cfa5bbe Use more descriptive variable names 2020-05-14 16:09:54 -04:00
Sajith Sasidharan
7e02502268 Add comments to DownloadStatusPage 2020-05-14 16:09:54 -04:00
Sajith Sasidharan
e0241655e5 Update results renderer 2020-05-14 16:09:54 -04:00
Sajith Sasidharan
c5b2073bf0 Avoid use of RateAndTimeMixin methods in DownloadStatusElement 2020-05-14 16:09:54 -04:00
Sajith Sasidharan
c4b63ada55 Update events tables renderer 2020-05-14 16:09:29 -04:00
Sajith Sasidharan
c14c437152 Make DownloadStatusPage a MultiFormatResource 2020-05-14 10:21:19 -04:00
Sajith Sasidharan
8a632b6668 Use twisted tags in download status page template 2020-05-14 10:14:52 -04:00
Sajith Sasidharan
a203f9c8d8 Reformat download status page template 2020-05-14 10:14:52 -04:00
Sajith Sasidharan
538503c0f8
Merge pull request #717 from sajith/3289.status-publish-nevow-to-twisted-web
Replace nevow with twisted.web.template in status.PublishStatusPage

Fixes: ticket:3289
2020-05-14 10:09:57 -04:00
Sajith Sasidharan
78c214b7ff
Merge pull request #716 from sajith/3290.status-retrieve-nevow-to-twisted-web
Replace nevow with twisted.web.template in status.RetrieveStatusPage

Fixes: ticket:3290
2020-05-13 19:39:23 -04:00
Sajith Sasidharan
79a44eac33 Correct docstring to ":param <type> <name>" format 2020-05-13 19:29:41 -04:00
Sajith Sasidharan
9d5d338993 Correct docstring to ":param <type> <name>" format 2020-05-13 19:04:10 -04:00
Sajith Sasidharan
d87dfaf5a0
Merge pull request #714 from sajith/3291.status-mapupdate-nevow-to-twisted-web
Replace nevow with twisted.web.template in status.MapupdatePage

Fixes: ticket:3291
2020-05-13 18:22:16 -04:00
Sajith Sasidharan
ebe80221d5 Add missing "param:" to init method docstring 2020-05-13 17:45:08 -04:00
Sajith Sasidharan
2e0e210c14 Make PublishStatusPage comment a docstring 2020-05-13 17:43:55 -04:00
Sajith Sasidharan
5aa0dd4085 Rename a variable for readability
Noticed in code review: `l` can be confused with `1` for many
typefaces.
2020-05-13 17:12:08 -04:00
Sajith Sasidharan
812f03934a Add missing "param:" to docstring 2020-05-13 17:09:53 -04:00
Sajith Sasidharan
4af2e4b4df Drop an unbalanced quote 2020-05-13 17:08:26 -04:00
Sajith Sasidharan
62760c0997 Make RetrieveStatusPage comment a docstring 2020-05-13 17:07:09 -04:00
Sajith Sasidharan
8e17d203cf Add missing "param:" to docstring 2020-05-13 16:59:52 -04:00
Sajith Sasidharan
c18488872c Make comment on MapupdateStatusPage a docstring 2020-05-13 16:54:39 -04:00
meejah
466369dd69
Merge pull request #669 from meejah/make-pypy-work
Make pypy work
2020-05-13 12:44:23 -06:00
Sajith Sasidharan
3fad9a127c Remove web.common.RenderMixin
Fixes: ticket:3308
2020-05-12 07:40:22 -04:00
Sajith Sasidharan
0ae045ea16 Add comments to PublishStatusPage 2020-05-11 12:47:48 -04:00
Sajith Sasidharan
9e200fc014 Render publish problems only when there are problems 2020-05-11 11:43:04 -04:00
Sajith Sasidharan
0fba615afb Remove RateAndTimeMixin from PublishStatusPage 2020-05-11 11:43:04 -04:00
Sajith Sasidharan
fdf6449ba8 Use MultiFormatResource to implement PublishStatusPage 2020-05-11 11:43:04 -04:00
Sajith Sasidharan
89c4210090 Use twisted tags in publish status template page 2020-05-11 11:43:01 -04:00
Sajith Sasidharan
65cd0e8ecd Reformat publish status template page 2020-05-11 10:38:15 -04:00
Sajith Sasidharan
3aaa87d2ba Add notes to RetrieveStatusPage 2020-05-07 13:15:05 -04:00
Sajith Sasidharan
07f14a19f8 Drop RateAndTimeMixin from RetrieveStatusElement 2020-05-07 11:37:21 -04:00
Sajith Sasidharan
a544e8a55f Stringify tag parameters 2020-05-07 10:55:08 -04:00
Sajith Sasidharan
de41302743 Update RetrieveStatusPage to use twisted renderers 2020-05-07 09:34:42 -04:00
Sajith Sasidharan
5fa7c4c446 Update markup in retrieve status template page 2020-05-07 09:32:01 -04:00
Sajith Sasidharan
d2375e4fe2 Reformat retrieve status page template 2020-05-06 22:42:32 -04:00
meejah
2418e90bf0 CacheDirectoryManager is unused 2020-05-06 15:22:22 -06:00
meejah
1549e7eb18 simplify (for line in f.readlines() -> for line in f) 2020-05-06 15:16:34 -06:00
Sajith Sasidharan
13bbda1529 Render privkey only when there's a privkey 2020-05-06 13:21:26 -04:00
Sajith Sasidharan
008812d6c8 Render abbreviated time in map update results 2020-05-06 13:11:53 -04:00
Sajith Sasidharan
0c6889274d Render problems only when there's a problem list 2020-05-06 13:10:31 -04:00
Sajith Sasidharan
bbbca6c000 Drop a newline
Party for consistency, partly in order to trigger a CircleCI run.
2020-05-06 10:41:58 -04:00
Sajith Sasidharan
8a71567137 Avoid use of RateAndTimeMixin in MapupdateStatusPage 2020-05-06 09:29:57 -04:00
Sajith Sasidharan
86871363ea Add notes to MapupdateStatusPage 2020-05-06 09:06:56 -04:00
Sajith Sasidharan
1602c66250 Render map update status using twisted.web.template
Fixes: ticket:3291
2020-05-06 09:06:56 -04:00
meejah
6eade15b4e put WeakKeyDictionary use back 2020-05-05 14:49:16 -06:00
Sajith Sasidharan
3b0ace1710
Merge pull request #708 from sajith/3293.status-helper-nevow-to-twisted-web
Render helper status page using twisted.web.template

Fixes: ticket:3293
2020-05-05 16:00:24 -04:00
meejah
d4f29e7d6c restore old code, run the GC 2020-05-05 13:57:17 -06:00
meejah
b54dc1e5d5 whitespace (1 line per import) 2020-05-05 13:56:59 -06:00
Sajith Sasidharan
5e4f2d88f1
Merge pull request #710 from sajith/3305.root-from-nevow-to-twisted-web
Move root.Root from nevow to twisted.web.template

Fixes: ticket:3305
2020-05-05 15:56:21 -04:00
Sajith Sasidharan
ab298dab9c Make ErrorBoom a new style class
ErrorBoom won't pass PythonTwoRegressions.test_new_style_classes()
check otherwise.
2020-05-05 12:56:19 -04:00
Sajith Sasidharan
edd4cab42b Replace nevow with twisted.web in test.web.test_grid 2020-05-05 11:51:28 -04:00