Commit Graph

10485 Commits

Author SHA1 Message Date
Jean-Paul Calderone
e7101b1711 Turn exceptions into error pages like Nevow does 2020-09-24 10:23:05 -04:00
Jean-Paul Calderone
34bade4091 Use the newly introduced helper instead of our own internal thing 2020-09-24 10:22:07 -04:00
Jean-Paul Calderone
ed049da34f Add a helper that can render a Page or a Resource 2020-09-24 10:21:18 -04:00
Ross Patterson
827cba21a3 Merge branch '3421.makefile-housekeeping' 2020-09-23 11:24:51 -07:00
Ross Patterson
2645675649 build(make): Exclude changelog entry from NEWS
This includes only developer-oriented changes.
2020-09-23 10:31:42 -07: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
a413eb8626 Use BeautifulSoup in RenderSlashUri tests 2020-09-23 08:32:19 -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
6d9e1a7a47
Merge pull request #821 from sajith/3426.return-errorpage-from-status
3426 Return ErrorPage from web.status

Fixes ticket:3426
2020-09-22 08:32:16 -04:00
Sajith Sasidharan
136a70217c Remove unused import 2020-09-21 20:44:49 -04:00
Sajith Sasidharan
fd5436b867 Expect ErrorPage in RenderSlashUri tests 2020-09-21 18:34:53 -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
c34dc78875 Merge 'origin/master' into 3423.return-errorpage-from-filenode 2020-09-21 16:22:57 -04:00
Jean-Paul Calderone
58c99d0c0c
Merge pull request #815 from tahoe-lafs/3422.directory-weberror
Handle exceptions raised by getChild and render_* in directory.py

Fixes: ticket:3422
2020-09-21 16:04:39 -04:00
Jean-Paul Calderone
0e139114f7 add a limited amount of missing test coverage for humanize_exception 2020-09-21 14:07:11 -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
Itamar Turner-Trauring
139bcb1500
Merge pull request #814 from tahoe-lafs/3419.test-encode-python-3-trying-again
Port test_encode to Python 3

Fixes ticket:3419
2020-09-21 11:52:34 -04:00
Itamar Turner-Trauring
7c6e3104ac
Merge pull request #812 from tahoe-lafs/3416.test-encode-python-3
Port allmydata.test.no_network to Python 3

Fixes ticket:3416
2020-09-21 11:51:34 -04:00
Itamar Turner-Trauring
a4da6c3dbe Clarify comment. 2020-09-21 10:35:56 -04:00
Itamar Turner-Trauring
02b4ec8101 Get rid of stray print(). 2020-09-21 10:33:16 -04:00
Jean-Paul Calderone
b200d20430 minor cleanups/rearranging 2020-09-18 15:01:53 -04:00
Ross Patterson
52015df7e4 build(make): Add changelog entry for PR 2020-09-18 11:59:40 -07:00
Ross Patterson
d0d11a5444 fix(style): Wrong Python version for codechecks
On systems where the default Python is Python 3 (such as on recent Debian/Ubuntu
versions), then `$ tox -e codechecks` has a ton of failures related to Python 3
compatibility.  This explicitly forces it to use Python 2.7 until we have Python 3
compatibility.
2020-09-18 11:59:40 -07:00
Jean-Paul Calderone
97872118a5 derived function below 2020-09-18 14:50:45 -04:00
Jean-Paul Calderone
8f3a32a22c news fragment 2020-09-18 14:49:39 -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
Itamar Turner-Trauring
8ef2252bd4 Finish porting to Python 3. 2020-09-18 14:32:19 -04:00
Itamar Turner-Trauring
c3bb367a93 Tests pass on Python 3. 2020-09-18 14:31:23 -04:00
Itamar Turner-Trauring
050388ee12 Work better on Python 3, until Nevow is gone. 2020-09-18 14:31:21 -04:00
Jean-Paul Calderone
059bb2250b Add a BadRequest resource to help with BAD REQUEST 2020-09-18 14:10:09 -04:00
Itamar Turner-Trauring
cb24c3eccf Merge branch '3416.test-encode-python-3' into 3419.test-encode-python-3-trying-again 2020-09-18 13:38:44 -04:00
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
Ross Patterson
b4b996c3e7 build(make): Cleanup remnant coverage bits
I don't see anything in here that I can find references to elsewhere and we're certainly
running test coverage reports in tox and on CI now.
2020-09-17 16:09:53 -07:00
Ross Patterson
51338bd874 build(make): Add targets for running tests
Fully parallelize the build of the environments since they tend to be network I/O
bound.  Parallelize the run of tests to use all CPU cores.
2020-09-17 16:08:20 -07: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
Ross Patterson
d8df630729 build(make): Add missing phony target declarations
I also prefer having a `.PHONY: ...` declaration for each phony target, as is done in
the rest of the `./Makefile`, because it makes is easier when removing or refactoring
targets not to forget to also remove or adjust the `.PHONY: ...` declaration.
2020-09-17 12:36:55 -07:00
Ross Patterson
775a3dba33 build(make): Fix missing target name
From context, I'm assuming this is just an omission.
2020-09-17 12:33:13 -07:00
Ross Patterson
735ff1e709 build(make): Improve and clarify Makefile org
This is opinionated, so I understand if community members disagree and I'm happy to back
this out.

It's conventional (and I prefer) to group variables toward the top of the `./Makefile`
so I've done that.

I also prefer separating task-oriented "phony" targets above any "real" targets (whose
recipes create/update actual build artifacts on the filesystem).  The task-oriented
targets tend to be a better starting point for any developers approaching the
`./Makefile` to understand where to get started.
2020-09-17 12:25:34 -07:00