Commit Graph

14736 Commits

Author SHA1 Message Date
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 83b5807ca1 Add newsfragment 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 88accc23c3 Update newsfragment 2020-07-09 16:05:29 -04:00
Sajith Sasidharan c043d1bead Add newsfragment 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 8efc12a3ef Use newer version of pyutil. 2020-07-09 13:21:02 -04:00
Itamar Turner-Trauring 12d5131568 Fix pyflakes issues. 2020-07-09 13:12:30 -04:00
Itamar Turner-Trauring 0469c15e5d Merge remote-tracking branch 'origin/master' into 3339-assertutil-python-3 2020-07-09 09:36:13 -04:00
Itamar Turner-Trauring 354e994f6d
Merge pull request #733 from tahoe-lafs/3324-humanreadable-python-3
Port humanreadable.py to Python 3
2020-07-08 17:53:40 -04:00
Itamar Turner-Trauring 28f219ad3e Update to version that supports _python3.py variant of port list. 2020-07-08 16:46:54 -04:00
Itamar Turner-Trauring 98c8b2fd00 Revert changes obsoleted by #3338. 2020-07-08 14:53:38 -04:00
Itamar Turner-Trauring e4b8cc4fbd Merge remote-tracking branch 'origin/master' into 3324-humanreadable-python-3 2020-07-08 14:52:24 -04:00
Itamar Turner-Trauring 834c7b4d06
Merge pull request #738 from tahoe-lafs/3338.future-0-18-2
Provide future 0.18.2 for the Nix builds
2020-07-08 14:50:42 -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
Jean-Paul Calderone 7e16148f83
news fragment 2020-07-08 13:20:42 -04:00
Jean-Paul Calderone 1cbf798127
Package Future 0.18.2 for us 2020-07-08 13:20:07 -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 f75ff70924 News fragment. 2020-07-08 12:21:33 -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
Itamar Turner-Trauring 0bc8a441a9 Add pyutil as direct dependency; it was previously indirect dependency via zfec. 2020-07-08 11:56:53 -04:00
Sajith Sasidharan 81216f18bf Remove some whitespace 2020-07-08 10:15:33 -04:00
Itamar Turner-Trauring 3d80a6c17e New packages so we can get future 0.18.2. 2020-07-08 10:11:28 -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 238b17098e Add future in another place. 2020-07-07 11:28:11 -04:00
Itamar Turner-Trauring e6268f3dd5 Add additional dependencies. 2020-07-07 11:13:45 -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
Jean-Paul Calderone bb452a6c60
Merge pull request #731 from tahoe-lafs/2755.code-of-conduct
Formally adopt a code of conduct.
2020-07-07 09:59:55 -04:00