Itamar Turner-Trauring
55698cc8f2
Merge remote-tracking branch 'origin/master' into 3566.web-tests-python-3-part-2
2020-12-22 13:21:49 -05:00
Itamar Turner-Trauring
74c08883f5
Another passing test on Python 3.
2020-12-22 11:36:52 -05:00
Itamar Turner-Trauring
0534979e61
Another passing test on Python 3.
2020-12-22 11:03:23 -05:00
Itamar Turner-Trauring
c25dd57768
Make sure we can handle bytes, plus a couple other fixes.
2020-12-21 13:12:01 -05:00
Itamar Turner-Trauring
a2f042845d
Another passing test.
2020-12-21 10:58:09 -05:00
Itamar Turner-Trauring
d8197d9554
Another passing test.
2020-12-21 10:52:31 -05:00
Itamar Turner-Trauring
15c7af8e72
Another passing test.
2020-12-21 10:29:59 -05:00
Itamar Turner-Trauring
98c71e51e1
More progress towards passing tests.
2020-12-21 10:04:27 -05:00
Itamar Turner-Trauring
c71acf93fd
Bytes, alas.
2020-12-18 16:10:23 -05:00
Itamar Turner-Trauring
f964ae1782
Docstrings.
2020-12-18 15:43:27 -05:00
Itamar Turner-Trauring
b24a9f7083
Trying to get test_grid working on Python 3.
2020-12-18 11:21:04 -05:00
Jason R. Coombs
51b0b201b4
Expand comment to provide more context.
2020-12-18 10:33:30 -05:00
Itamar Turner-Trauring
b5f2afe39c
WIP porting test_status.py.
2020-12-16 14:13:46 -05:00
Itamar Turner-Trauring
67c0a4ac84
Port another test module to Python 3.
2020-12-16 13:53:49 -05:00
Itamar Turner-Trauring
acc36c34d0
Tests pass on Python 2 and Python 3.
2020-12-16 11:13:32 -05:00
Jean-Paul Calderone
e8e928aced
Remove the web view onto the removed metrics
2020-12-10 18:24:00 -05:00
Itamar Turner-Trauring
27102c0d89
Merge remote-tracking branch 'origin/master' into 3514.test-introducer-python-3
2020-11-30 16:47:21 -05:00
Jason R. Coombs
6ea9003436
Declare MultiFormatResource.formatDefault as optional string for subclass overrides.
2020-11-29 15:19:11 -05:00
Jason R. Coombs
bc3508ce60
Ignore type checks on cmp usage (awaiting Python 3 porting)
2020-11-29 14:01:05 -05:00
Jason R. Coombs
8da82e9ed5
Add workaround for Shoobx/mypy-zope#26 .
2020-11-29 13:57:46 -05:00
Jean-Paul Calderone
c694e8c7e2
Delete allmydata.version_checks and related functionality
...
It is not Tahoe-LAFS' job to manage package installation in this way.
Instead, we can declare our dependencies in setup.py and rely on installation
management tools and packagers to create a suitable execution environment.
Making this statement in the past required going much further out on a limb
than it does today. This code has served its purpose and can now be retired.
2020-11-23 15:10:18 -05:00
Itamar Turner-Trauring
53a6882f21
Some progress on Python 3 passing tests, some going backwards.
2020-11-20 12:02:22 -05:00
Itamar Turner-Trauring
d30014f8f5
The Resource dictionary is keyed by bytes, so storing unicode means you don't
...
get the cached resource!
2020-11-03 11:14:25 -05:00
Itamar Turner-Trauring
3edc1cb29e
The dictionary is unicode, not bytes.
2020-11-03 10:41:02 -05:00
Jean-Paul Calderone
e97b5f6bb4
document get_arg req parameter
2020-10-22 07:22:51 -04:00
Jean-Paul Calderone
e3b1d4f536
enforce the type requirement
2020-10-22 07:17:52 -04:00
Jean-Paul Calderone
c8b9a0265a
get_root
docs
2020-10-22 07:16:57 -04:00
Jean-Paul Calderone
62f5fb9d28
Make sure the JSON is given back as bytes
2020-10-21 12:27:08 -04:00
Jean-Paul Calderone
37016f4ab5
pyflakes
2020-10-21 12:21:44 -04:00
Jean-Paul Calderone
c31300fd0d
Handle interrupted connections
2020-10-21 12:21:01 -04:00
Jean-Paul Calderone
14b9dc090d
Replace some ctx
names with req
2020-10-21 10:12:48 -04:00
Jean-Paul Calderone
7eecf51dc5
Just talk about rendering, not Nevow
2020-10-21 10:02:22 -04:00
Jean-Paul Calderone
6500f742dc
Twisted Web handles UnsupportedMethod for us
2020-10-21 10:02:10 -04:00
Jean-Paul Calderone
2ba34a4759
Talk about Nevow as a proper noun where necessary
2020-10-21 10:01:46 -04:00
Jean-Paul Calderone
a577f1e48d
pyflakes
2020-10-21 09:49:03 -04:00
Jean-Paul Calderone
c8db069960
Get rid of no-longer used Nevow exception handler
2020-10-21 09:45:41 -04:00
Jean-Paul Calderone
304a9880e6
De-Nevow `get_root
`
2020-10-21 08:50:53 -04:00
Jean-Paul Calderone
743ead71a4
De-Nevow `get_arg
`
2020-10-21 08:50:37 -04:00
Jean-Paul Calderone
7ca8ede88c
Merge remote-tracking branch 'origin/master' into 3428.dont-return-deferred-to-twistedweb.2
2020-10-21 07:35:10 -04:00
Jean-Paul Calderone
f602382244
Comments about __get__ calls
2020-10-21 07:34:27 -04:00
Jean-Paul Calderone
e8761c98ad
A comment about what _finish
is here for
2020-10-21 07:25:48 -04:00
Jean-Paul Calderone
dbe2d4efd7
It isn't the root, it's wherever we actually are
2020-10-21 07:22:00 -04:00
Jean-Paul Calderone
a91dba5f5b
_finish docstring
2020-10-21 07:18:41 -04:00
Jean-Paul Calderone
a9e9efb336
direct tests for @render_exception
2020-10-19 14:26:12 -04:00
Jean-Paul Calderone
b68c08cff9
Yank direct support for URLPath from common.py
2020-10-19 12:33:15 -04:00
Jean-Paul Calderone
84acf4e50f
Accept unicode return values and encode them to UTF-8
...
Nevow accepts unicode in most places it accepts bytes and does the usual
sloppy Python 2 thing, lets one or the other get implicitly re-coded,
typically using the ascii codec.
We'll go with UTF-8 because that fails less often than ASCII. We may want to
clean up the code at some point so we're not accidentally slinging both bytes
and text around as if they were the same thing.
2020-10-18 10:58:09 -04:00
Jean-Paul Calderone
85bb0a7834
Get rid of the original token-based authorization helper
...
It was only used by magic-folder and that's gone now. We have a different
authorization helper for other things now, allmydata.web.private.
2020-10-16 14:14:15 -04:00
Jean-Paul Calderone
292f136547
pyflakes
2020-10-16 13:21:07 -04:00
Jean-Paul Calderone
a22426011b
import and naming cleanups post-merge
2020-10-16 12:49:36 -04:00
Jean-Paul Calderone
32051f93b9
Merge remote-tracking branch 'origin/master' into 3428.dont-return-deferred-to-twistedweb.2
2020-10-16 10:37:54 -04:00
Jean-Paul Calderone
a73a919a20
flakes
2020-10-16 10:22:42 -04:00
Jean-Paul Calderone
31207e4b6b
don't double-apply the renderer logic
...
since that leads to double-finishing requests too
2020-10-16 09:53:24 -04:00
Jean-Paul Calderone
0faa24d344
Add a mess of eliot logging to request handling
2020-10-16 09:53:19 -04:00
Jean-Paul Calderone
0339ba97b9
Turn getChild None and Deferred results into something Twisted Web can manage
2020-10-16 09:52:41 -04:00
Jean-Paul Calderone
fa02e46033
maybeDeferred always returns a Deferred
2020-10-16 09:52:33 -04:00
Jean-Paul Calderone
d38ae4d6dd
Stop reading server module attributes all the time
...
It jumps through a ton of deprecation machinery that is at least tedious in
the debugger, if not wasteful at runtime.
2020-10-16 09:52:18 -04:00
Jean-Paul Calderone
df949868b6
Stop explicitly finishing and then returning a string
2020-10-16 09:51:50 -04:00
Jean-Paul Calderone
69c7c40510
handle Deferred from render
2020-10-16 09:51:42 -04:00
Itamar Turner-Trauring
c0f486a9f6
Work on Python 3.
2020-10-13 09:51:25 -04:00
Itamar Turner-Trauring
50925fcec1
Get rid of more no-longer-needed moves.
2020-10-13 09:49:39 -04:00
Itamar Turner-Trauring
3ea18ca3fc
As better alternative to common_py3, make common.py import on Python 3.
2020-10-13 09:45:03 -04:00
Itamar Turner-Trauring
c680b1d971
Lint fixes.
2020-10-05 11:38:53 -04:00
Itamar Turner-Trauring
96231fab5f
Support bytes in JSON output.
2020-10-05 11:01:11 -04:00
Itamar Turner-Trauring
963f9ba94b
Closer to passing tests.
2020-10-02 11:01:24 -04:00
Itamar Turner-Trauring
f8f8329d70
More passing tests on Python 3.
2020-10-02 10:48:54 -04:00
Itamar Turner-Trauring
18e1c290a7
Reorganize code so allmydata.web.check_results can import without Nevow being installed.
2020-10-02 10:28:55 -04:00
Sajith Sasidharan
769f87c24d
Remove unused import
2020-09-28 20:39:13 -04:00
Jean-Paul Calderone
76ecae2e44
Merge remote-tracking branch 'origin/master' into 3382.remove-multi-format-page
2020-09-28 15:09:29 -04:00
Sajith Sasidharan
65f206e39b
Merge pull request #816 from sajith/3427.return-error-page-from-unlinked
...
Return ErrorPage from unlinked
Fixes ticket:3427
2020-09-25 13:30:02 -04:00
Sajith Sasidharan
569ac924ec
Merge pull request #825 from sajith/3436.remove-web-common-getxmlfile
...
Remove unused web.common.getxmlfile()
Fixes ticket:3436
2020-09-25 12:54:51 -04:00
Jean-Paul Calderone
dc15f19ee0
Merge remote-tracking branch 'origin/master' into 3382.remove-multi-format-page
2020-09-25 09:37:02 -04:00
Sajith Sasidharan
c2e9d6057f
Merge pull request #819 from sajith/3425.return-errorpage-from-root
...
Return ErrorPage from web.root
Fixes ticket:3425
2020-09-23 10:18:44 -04:00
Sajith Sasidharan
e6a5dda7e1
Rearrange imports
2020-09-22 21:14:00 -04:00
Sajith Sasidharan
22a1721b62
Remove unused web.common.getxmlfile()
2020-09-22 21:05:17 -04:00
Sajith Sasidharan
9aee312d8c
Merge pull request #822 from sajith/3429.return-errorpage-from-check-results
...
Return ErrorPage from web.check_results
Fixes ticket:3429
2020-09-22 20:40:00 -04:00
Sajith Sasidharan
4e4c5f9b7f
Merge pull request #820 from sajith/3424.return-errorpage-from-operations
...
Return ErrorPage from web.operations
Fixes ticket:3424
2020-09-22 20:38:34 -04:00
Sajith Sasidharan
da78bc05d0
Merge pull request #818 from sajith/3423.return-errorpage-from-filenode
...
Return ErrorPage from filenode
Fixes ticket:3423
2020-09-22 20:37:55 -04:00
Sajith Sasidharan
0f118bdd67
Return error page from unlinked
2020-09-22 12:23:40 -04:00
Sajith Sasidharan
18e56e41fc
Return error page when an exception is raised from web.check_results
2020-09-21 18:18:29 -04:00
Sajith Sasidharan
20101f8146
Return ErrorPage when an exception is raised in web.status
2020-09-21 16:51:27 -04:00
Sajith Sasidharan
c16cf00c6b
Return an error page when an exception is raised from web.root
2020-09-21 16:37:36 -04:00
Sajith Sasidharan
e8f7643a8f
Return ErrorPage when web.operations raises an exception
2020-09-21 16:26:51 -04:00
Sajith Sasidharan
199fbfcc1c
Return error pages when an exception is raised in filenode
2020-09-21 13:24:01 -04:00
Sajith Sasidharan
c674198074
Rearrage imports
2020-09-21 13:03:51 -04:00
Jean-Paul Calderone
b200d20430
minor cleanups/rearranging
2020-09-18 15:01:53 -04:00
Jean-Paul Calderone
97872118a5
derived function below
2020-09-18 14:50:45 -04:00
Jean-Paul Calderone
e648965fb6
Add helpers to implement the desired exception behavior and use them
2020-09-18 14:49:19 -04:00
Jean-Paul Calderone
059bb2250b
Add a BadRequest resource to help with BAD REQUEST
2020-09-18 14:10:09 -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
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
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
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
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
625e2611c1
Address some review comments.
2020-08-24 11:59:52 -04:00
Sajith Sasidharan
57fdead1c3
Remove allmydata.web._nevow_106
2020-08-22 17:21:24 -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
9d34ab587a
test_storage_web now runnable on Python 3 (even if it doesn't pass).
2020-08-20 14:17:06 -04:00
Sajith Sasidharan
c66d38e191
Make web.directory.DeepSizeResults a MultiFormatResource
2020-08-18 08:37:59 -04:00
Itamar Turner-Trauring
2cc2cb6a7f
Rename to_str() to the more accurate to_bytes().
2020-08-14 13:49:48 -04:00