Commit Graph

9172 Commits

Author SHA1 Message Date
meejah
a9128d89c3 Merge branch 'master' into 2916.grid-manager-integration-tests.2 2023-07-29 04:41:03 -06:00
Itamar Turner-Trauring
176fac7360 Work in Python 3.8. 2023-07-28 14:20:05 -04:00
Itamar Turner-Trauring
00b7e7e178 More type annotations. 2023-07-28 13:48:43 -04:00
Itamar Turner-Trauring
0d0e32646f More type annotations. 2023-07-28 13:42:00 -04:00
Itamar Turner-Trauring
d669099a35 Add more type annotations. 2023-07-28 13:31:53 -04:00
Itamar Turner-Trauring
919e6b339d Add type annotation to _authorized_route 2023-07-28 13:19:53 -04:00
Itamar Turner-Trauring
2b7f3d1707 Add type annotations to _authorization_decorator. 2023-07-28 11:28:13 -04:00
Itamar Turner-Trauring
849f4ed2a5 More annotations. 2023-07-28 11:14:09 -04:00
Itamar Turner-Trauring
aef6373915 Update unit tests to support HTTPS storage protocol on by default. 2023-07-26 14:05:15 -04:00
Itamar Turner-Trauring
0e72f3c97a Disable forcing Foolscap on client and server. 2023-07-26 13:45:56 -04:00
Itamar Turner-Trauring
46d10a6281 Ensure and test (and necessary refactor) that lack of content-type is same as
CBOR content-type, as per spec.
2023-07-25 15:31:30 -04:00
Itamar Turner-Trauring
bf2451bbcd Correct type. 2023-07-25 15:31:18 -04:00
Itamar Turner-Trauring
9abc3730a0 Revert "suppress the new click mypy errors", Click 8.1.6 fixed the issue.
This reverts commit dfd34cfc0b.
2023-07-21 11:03:48 -04:00
Jean-Paul Calderone
8b8903c44f
Merge pull request #1283 from exarkun/clean-up-tor-and-i2p-providers
Abstract over some configuration manipulation done by `write_node_config` in `create_node.py`

Fixes: ticket:4004
2023-07-21 09:31:05 -04:00
Itamar Turner-Trauring
a297d6be16
Merge pull request #1316 from exarkun/4049.skip-some-when-superuser
Skip some tests when run as superuser

Fixes ticket:4049
2023-07-21 09:30:01 -04:00
Jean-Paul Calderone
feb9643dfe skip permission-related tests if the environment is not suitable
posix superuser can do anything on the filesystem
2023-07-21 08:40:58 -04:00
Jean-Paul Calderone
2d688df299 get the node config types right 2023-07-21 08:19:27 -04:00
Jean-Paul Calderone
02a696d73b Make merge_config fail on overlapping configs
This isn't expected to happen.  If it does it would be nice to see it instead
of silently continue working with some config dropped on the floor.
2023-07-21 08:13:33 -04:00
Jean-Paul Calderone
da43acf52e more accurate docstring for dictutil.filter 2023-07-20 14:27:50 -04:00
Jean-Paul Calderone
4713573621 test for dictutil.filter 2023-07-20 14:27:30 -04:00
Jean-Paul Calderone
024b5e428a narrow the type annotation for another Listener method param 2023-07-20 14:23:31 -04:00
Jean-Paul Calderone
57facc6335 narrow the type of cli_config a bit
This has unfortunate interactions with the "stdout" attribute but I'm punting
on that.
2023-07-20 14:19:12 -04:00
Itamar Turner-Trauring
f7f30c78b7
Merge pull request #1315 from tahoe-lafs/4046.nurls-are-set
Make NURLs a set

Fixes ticket:4046
2023-07-20 11:45:55 -04:00
Itamar Turner-Trauring
8e51643ed3 Test for upgrading from Foolscap to HTTP. 2023-07-19 13:03:24 -04:00
Itamar Turner-Trauring
aa144fc623 Make NURLs a set. 2023-07-19 12:40:07 -04:00
Jean-Paul Calderone
40665d824d remove unused import 2023-07-19 12:04:16 -04:00
Jean-Paul Calderone
ee8155729d clean up some type annotations 2023-07-19 12:03:18 -04:00
Jean-Paul Calderone
911b54267b StaticProviders don't need to change 2023-07-19 11:54:22 -04:00
Jean-Paul Calderone
72c18579e2 another docstring 2023-07-19 11:54:18 -04:00
Jean-Paul Calderone
c1c0b60862 remove hard-coded tor/i2p in hide-ip support 2023-07-19 11:42:38 -04:00
Jean-Paul Calderone
e6b3b65810 add some missing docstrings 2023-07-19 11:35:51 -04:00
Jean-Paul Calderone
9d7fb6cb08 Merge remote-tracking branch 'origin/master' into clean-up-tor-and-i2p-providers 2023-07-19 09:32:58 -04:00
Itamar Turner-Trauring
7bcd90cd91
Merge pull request #1310 from tahoe-lafs/4038-correct-ticket
Point to correct tickets

Fixes ticket:4038
2023-07-18 11:57:34 -04:00
meejah
6c5cb02ee5 shush mypy 2023-07-17 17:11:00 -06:00
meejah
96c465352a Merge branch 'master' into 2916.grid-manager-integration-tests.2 2023-07-13 17:40:18 -06:00
Jean-Paul Calderone
c6daeaf4a3
Merge pull request #1313 from exarkun/4045.typechecks-vs-click
suppress the new click type checking errors

Also address an importlib_resources / towncrier incompatibility.

Fixes: ticket:4045
2023-07-11 20:05:19 -04:00
Jean-Paul Calderone
eef52fa59f remove unused imports 2023-07-11 16:32:33 -04:00
Jean-Paul Calderone
79512a93e7 Adjust the temp factory return type
BinaryIO is a subclass of IO[bytes] so it doesn't check out as
the return type of a callable we pass around.

Switch to the superclass instead.
2023-07-11 16:30:54 -04:00
Jean-Paul Calderone
c838967a54 Improve the name and type annotation of the tempfile factory 2023-07-11 16:15:56 -04:00
Itamar Turner-Trauring
71134db007
Merge branch 'master' into clean-up-tor-and-i2p-providers 2023-07-11 15:45:39 -04:00
Jean-Paul Calderone
dfd34cfc0b suppress the new click mypy errors 2023-07-07 16:26:31 -04:00
Jean-Paul Calderone
4b23b779e4 Reduce the amount of test suite gymnastics with new WebishServer API
Instead of forcing the test suite to try to discover the location of an
unnamed temporary file, let it just assert that the file is created in the
directory specified in the temporary file factory.
2023-07-07 16:04:37 -04:00
Itamar Turner-Trauring
bc78dbc25c Point to correct ticket 2023-07-05 10:21:40 -04:00
Itamar Turner-Trauring
c4e6ea6379 Merge remote-tracking branch 'origin/master' into 2916.grid-manager-integration-tests.2 2023-07-03 10:55:33 -04:00
Itamar Turner-Trauring
a7f45ab355 If this ever does get called, make the error less obscure. 2023-06-26 11:09:32 -04:00
Itamar Turner-Trauring
5f9e784964 Better explanation 2023-06-26 09:06:28 -04:00
Itamar Turner-Trauring
d697e8dab5 Merge remote-tracking branch 'origin/master' into 4035-new-mypy 2023-06-26 09:03:53 -04:00
Itamar Turner-Trauring
0fb6c5ac18
Merge pull request #1305 from tahoe-lafs/3910-http-storage-server-tor-support
HTTP storage server supports .onion addresses, and corresponding client support

Fixes ticket:3910
2023-06-26 09:01:59 -04:00
Itamar Turner-Trauring
ea953f3ba1 Merge remote-tracking branch 'origin/3910-http-storage-server-tor-support' into 4035-new-mypy 2023-06-26 08:50:35 -04:00
meejah
75b9c59846 refactor 2023-06-22 01:59:02 -06:00
meejah
122e0a73a9 more-generic testing hook 2023-06-22 01:29:55 -06:00
Jean-Paul Calderone
592e77beca allow list as a generic container annotation 2023-06-20 08:12:14 -04:00
Jean-Paul Calderone
7257851565 python 2/3 porting boilerplate cleanup 2023-06-20 07:46:43 -04:00
Jean-Paul Calderone
02fba3b2b6 factor some duplication out of the tests 2023-06-20 07:45:51 -04:00
meejah
357c9b003f flake8 2023-06-19 17:55:36 -06:00
meejah
2fcb190c2f add tests for both close-stdin cases 2023-06-19 17:53:57 -06:00
meejah
db9597ee19 add --allow-stdin-close option 2023-06-19 16:07:31 -06:00
Itamar Turner-Trauring
8d99ddc542 Pacify mypy 2023-06-15 17:14:08 -04:00
Itamar Turner-Trauring
bf5213cb01 Pacify mypy 2023-06-14 18:01:52 -04:00
Itamar Turner-Trauring
96afb0743a Pacify mypy 2023-06-14 17:57:25 -04:00
Itamar Turner-Trauring
0f8100b1e9 Fix whitespace 2023-06-14 17:52:01 -04:00
Itamar Turner-Trauring
ce1839f203 Pacify mypy 2023-06-14 17:51:54 -04:00
Itamar Turner-Trauring
9306f5edab Fix mypy issues 2023-06-14 17:48:13 -04:00
Itamar Turner-Trauring
27243ccfdf Fix mypy issues 2023-06-14 17:45:15 -04:00
Itamar Turner-Trauring
44b752c87d Fix mypy issues 2023-06-14 17:43:39 -04:00
Itamar Turner-Trauring
af323d2bbb Get the code working again. 2023-06-14 17:05:51 -04:00
Itamar Turner-Trauring
55d62d609b Fix some mypy errors. 2023-06-14 16:54:09 -04:00
Itamar Turner-Trauring
11e0151838 Fix some type issues in storage_client.py 2023-06-14 16:02:04 -04:00
Itamar Turner-Trauring
65775cd6bd Not used externally. 2023-06-14 14:54:24 -04:00
Itamar Turner-Trauring
ff1c1f700e Remove unused methods. 2023-06-14 14:52:54 -04:00
Itamar Turner-Trauring
f42fb1e551 Unused import 2023-06-14 14:16:35 -04:00
Itamar Turner-Trauring
054c893539 Pacify mypy 2023-06-14 14:16:10 -04:00
Itamar Turner-Trauring
cab24e4c7b Another service name issue. 2023-06-14 14:12:39 -04:00
Itamar Turner-Trauring
3b5c6695d5 Pacify mypy. 2023-06-14 14:09:51 -04:00
Itamar Turner-Trauring
1fd81116cb Fix mypy complaint. 2023-06-14 14:08:30 -04:00
Itamar Turner-Trauring
257aa289cd Remote interfaces don't interact well with mypy. 2023-06-14 14:04:45 -04:00
Itamar Turner-Trauring
8493b42024 Fix types. 2023-06-14 14:02:24 -04:00
Itamar Turner-Trauring
b45ee20ba8 MyPy fixes for allmydata.storage. 2023-06-14 11:07:48 -04:00
Itamar Turner-Trauring
a99361b404 Merge branch '3910-http-storage-server-tor-support' into 4035-new-mypy 2023-06-14 09:56:15 -04:00
Jean-Paul Calderone
cb082b2094 Merge remote-tracking branch 'origin/master' into 3998-new-pyopenssl 2023-06-13 10:35:51 -04:00
Itamar Turner-Trauring
20d4175abc Fix typecheck complaint 2023-06-06 12:18:02 -04:00
Itamar Turner-Trauring
a977180baf Fix lint 2023-06-06 12:15:31 -04:00
Itamar Turner-Trauring
e8744f91e5 Hook up HTTP storage for servers listening on .onion addresses 2023-06-06 12:06:51 -04:00
Itamar Turner-Trauring
74a121da74 Fix bug which meant object could not be created. 2023-06-06 11:47:36 -04:00
Itamar Turner-Trauring
5af0ead5b9 Refactor HTTP client creation to be more centralized. 2023-06-06 10:58:16 -04:00
Itamar Turner-Trauring
940600e0ed Link to ticket. 2023-06-05 12:54:51 -04:00
Itamar Turner-Trauring
96670ded65 Switch to using officially support constants, now part of pyOpenSSL's public
API.

The cryptography APIs we were previously using were not supported and aren't
available in all releases.
2023-06-01 17:27:21 -04:00
Itamar Turner-Trauring
f4a099c801 Merge remote-tracking branch 'origin/master' into 4029-http-storage-client-respects-request-to-use-tor 2023-05-23 14:53:55 -04:00
Itamar Turner-Trauring
d510103f96
Merge pull request #1301 from tahoe-lafs/4027-invalid-unicode
Invalid unicode in Authorization header should give better response

Fixes ticket:4027
2023-05-23 14:53:22 -04:00
Itamar Turner-Trauring
41131ca755
Merge pull request #1302 from tahoe-lafs/4028-more-integration
Fix another integration test failure

Fixes ticket:4028
2023-05-23 14:51:07 -04:00
Itamar Turner-Trauring
b03db14d70 Merge branch '4028-more-integration' into 4027-invalid-unicode 2023-05-23 14:08:09 -04:00
Itamar Turner-Trauring
652c179602 Remove comment. 2023-05-23 14:08:03 -04:00
Itamar Turner-Trauring
1e46e36ee2 More direct approach. 2023-05-23 13:46:32 -04:00
Itamar Turner-Trauring
d15ea8cb52 Shutdown more immediately. 2023-05-23 13:24:29 -04:00
Itamar Turner-Trauring
71cb357f45 Upstream code should make sure this doesn't happen. 2023-05-22 13:03:46 -04:00
Itamar Turner-Trauring
084499dd4b Fix lint. 2023-05-22 13:02:58 -04:00
Itamar Turner-Trauring
1ed440812a Add a safety check. 2023-05-22 13:00:20 -04:00
Itamar Turner-Trauring
546a51355a Merge branch '4028-more-integration' into 4029-http-storage-client-respects-request-to-use-tor 2023-05-22 11:43:12 -04:00
Itamar Turner-Trauring
0ccee4e958 Hook up the Tor-based Agent when necessary. 2023-05-19 13:59:18 -04:00
Itamar Turner-Trauring
2e0e0467fb Hook up HTTP storage client Tor support. 2023-05-18 11:14:51 -04:00
Itamar Turner-Trauring
47991f23fa More refactoring to make it easier to get a txtorcon.Tor instance. 2023-05-18 11:05:38 -04:00
Itamar Turner-Trauring
34accd694c Refactor to return something more useful. 2023-05-18 10:51:31 -04:00
Itamar Turner-Trauring
ffecdf8c77 Switch to non-deprecated API. 2023-05-18 10:18:46 -04:00
Itamar Turner-Trauring
3cf03a5c33 More glue to connect Tor up to the HTTP-based storage client. 2023-05-18 09:28:58 -04:00
Itamar Turner-Trauring
f83b73b5f3 Make Tor provider available at the right place to enable it for HTTP storage
client connections.
2023-05-16 10:44:34 -04:00
Itamar Turner-Trauring
ba9946e6ea Fix tests. 2023-05-10 16:34:02 -04:00
Itamar Turner-Trauring
c92c93e6d5 Clean up cached HTTP connections on shutdown. 2023-05-10 16:31:53 -04:00
Itamar Turner-Trauring
a1e49b75c0 Merge remote-tracking branch 'origin/master' into 4009-more-logging 2023-05-09 16:52:42 -04:00
Itamar Turner-Trauring
1c9de67104 Nicer error messages, useful for debugging. 2023-05-09 16:47:32 -04:00
Itamar Turner-Trauring
40b930c02c Another test. 2023-05-09 16:47:28 -04:00
Itamar Turner-Trauring
fea2450c60 Test and fix for really bad authorization header. 2023-05-09 10:53:17 -04:00
Itamar Turner-Trauring
2e22df60fe Try with fewer persistent HTTP connections. 2023-05-08 13:33:34 -04:00
Itamar Turner-Trauring
05a3fd9acf Merge remote-tracking branch 'origin/master' into 4016-http-storage-content-type 2023-05-04 12:49:03 -04:00
Itamar Turner-Trauring
61dc1e4d43 Merge remote-tracking branch 'origin/master' into 4009-more-logging 2023-05-03 17:34:26 -04:00
Itamar Turner-Trauring
3cc80ae283 Merge remote-tracking branch 'origin/master' into 4016-http-storage-content-type 2023-05-03 17:02:22 -04:00
Itamar Turner-Trauring
84a6db3e88 Merge remote-tracking branch 'origin/master' into 4022-freezing-test 2023-05-03 16:43:52 -04:00
Itamar Turner-Trauring
f1f3c122da
Merge pull request #1292 from tahoe-lafs/4015-more-linting
More linting, using ruff

Fixes ticket:4015
2023-05-02 13:29:02 -04:00
Itamar Turner-Trauring
22715abc85 This is fine. 2023-05-02 12:17:55 -04:00
Itamar Turner-Trauring
9f78fd5c7f Use even fewer nodes. 2023-05-02 12:11:31 -04:00
Itamar Turner-Trauring
d4f2038fd1 Rearrange nodes so it's possible to create even fewer. 2023-05-02 12:11:23 -04:00
Itamar Turner-Trauring
8fa89bd985 Run a little faster. 2023-05-02 12:05:40 -04:00
Itamar Turner-Trauring
5c2f18dfec Set a higher timeout. 2023-05-02 12:03:14 -04:00
Itamar Turner-Trauring
b5c5ed50d4 Merge remote-tracking branch 'origin/master' into clean-up-tor-and-i2p-providers 2023-05-02 09:50:21 -04:00
Itamar Turner-Trauring
57b93b2230 Merge remote-tracking branch 'origin/master' into 4015-more-linting 2023-05-01 12:54:51 -04:00
Itamar Turner-Trauring
c455fcfc5a Merge remote-tracking branch 'origin/master' into 4009-more-logging 2023-05-01 12:53:00 -04:00
Itamar Turner-Trauring
bc2506c3e2 Merge remote-tracking branch 'origin/master' into 3999.structure-config-manipulation 2023-05-01 12:52:18 -04:00
Itamar Turner-Trauring
8c8e24a3b9 Black reformat. 2023-05-01 11:50:05 -04:00
Itamar Turner-Trauring
2292d64fcd Set a better content type for data downloads. 2023-05-01 11:49:09 -04:00
Itamar Turner-Trauring
fbd6dbda47 text/html is a bad default content type. 2023-05-01 11:42:02 -04:00
Itamar Turner-Trauring
5f19605075 During testing, ensure we're not getting text/html unexpectedly. 2023-05-01 11:41:51 -04:00
Itamar Turner-Trauring
6d961eada9
Merge pull request #1289 from tahoe-lafs/4012.add-timeout-to-http-client
Add timeout to the blocking http client

Fixes ticket:4012
2023-04-27 09:13:44 -04:00
Itamar Turner-Trauring
a559e8447e Merge remote-tracking branch 'origin/master' into 4009-more-logging 2023-04-27 09:08:58 -04:00
Itamar Turner-Trauring
f9a1eedaea Make timeout optional, enable it only for integration tests. 2023-04-25 12:31:37 -04:00
Itamar Turner-Trauring
558e3bf797 Fix unnecessary conversion. 2023-04-25 08:46:57 -04:00
Itamar Turner-Trauring
ebed5100b9 Switch to longer timeout so it's unlikely to impact users. 2023-04-25 08:16:12 -04:00
Itamar Turner-Trauring
5da5a82a8c Get rid of default mutable arguments. 2023-04-17 13:08:21 -04:00
Itamar Turner-Trauring
bed2d33427 Fix lint. 2023-04-17 10:01:26 -04:00
Itamar Turner-Trauring
2d81ddc297 Don't call str() on bytes. 2023-04-14 11:15:47 -04:00
Itamar Turner-Trauring
3395ee8fc5 Add logging for mutable operations. 2023-04-14 11:05:03 -04:00
Itamar Turner-Trauring
2e06990c5c Remove bad assertion. 2023-04-14 11:04:53 -04:00
Itamar Turner-Trauring
e4e6831497 Add logging to the rest of the immutable API operations. 2023-04-14 10:58:27 -04:00
Itamar Turner-Trauring
2916984114 More modernization. 2023-04-14 10:29:25 -04:00
Itamar Turner-Trauring
1823dd4c03 Switch to a slightly larger block size. 2023-04-14 10:24:00 -04:00
Itamar Turner-Trauring
67702572a9 Do a little modernization. 2023-04-14 10:22:14 -04:00
Itamar Turner-Trauring
d7ee1637df Set a timeout. 2023-04-14 10:22:06 -04:00
Itamar Turner-Trauring
d8f176bb8f Type check fixes. 2023-04-13 13:49:19 -04:00
Itamar Turner-Trauring
aca35a553d Add logging to more immutable methods. 2023-04-13 13:30:38 -04:00
Itamar Turner-Trauring
41032e1e83 Merge branch '4005-more-http-storage-logging' into 4009-more-logging 2023-04-13 13:21:34 -04:00
Itamar Turner-Trauring
464b476190 Work on 3.8. 2023-04-13 13:11:17 -04:00
Itamar Turner-Trauring
28ff24b3a7 Add logging to immutable creation. 2023-04-13 10:40:35 -04:00
Itamar Turner-Trauring
d05b5788f6 Merge branch '4005-more-http-storage-logging' into 4009-more-logging 2023-04-13 10:35:58 -04:00
Itamar Turner-Trauring
4c2f241361 Add logging for limited_content(). 2023-04-13 10:28:29 -04:00
Itamar Turner-Trauring
e0ca48b707 Add logging to add_or_renew_lease(). 2023-04-13 09:54:36 -04:00
Itamar Turner-Trauring
af845a40c6 Fix type annotations, removing Deferred in particular. 2023-04-13 09:38:33 -04:00
Itamar Turner-Trauring
64dbeeab8f Add logging to get_version(). 2023-04-13 09:33:18 -04:00
meejah
175473df40 longer timeouts, forget less 2023-04-13 00:37:32 -06:00
meejah
9472841c39 enable tor, i2p services 2023-04-12 23:01:28 -06:00
Itamar Turner-Trauring
840ed0bf47 Unused imports. 2023-04-12 17:04:00 -04:00
Itamar Turner-Trauring
174609116e
Merge pull request #1284 from tahoe-lafs/3880-http-storage-logging
HTTP storage logging, part 1

Fixes ticket:3880
2023-04-12 17:00:57 -04:00
Itamar Turner-Trauring
3997eaaf90 Fix type annotations. 2023-04-12 17:00:31 -04:00
Itamar Turner-Trauring
2a7616e0be Get tests passing again. 2023-04-12 16:43:46 -04:00
Itamar Turner-Trauring
cebf62176e WIP add logging to decode_cbor. 2023-04-10 11:40:59 -04:00
Itamar Turner-Trauring
68f9243323 Merge branch '3880-http-storage-logging' into 4005-more-http-storage-logging 2023-04-10 11:31:04 -04:00
Itamar Turner-Trauring
4d4649f5c2
Apply suggestions from code review
Co-authored-by: Jean-Paul Calderone <exarkun@twistedmatrix.com>
2023-04-10 11:28:26 -04:00
Jean-Paul Calderone
7cd0c9d724 Merge remote-tracking branch 'origin/master' into clean-up-tor-and-i2p-providers 2023-04-05 08:37:58 -04:00
Jean-Paul Calderone
590b20431a
Merge pull request #1282 from exarkun/4003.test_connection_status-demock
Remove `mock` use from allmydata/test/test_connection_status.py

Fixes: ticket:4003
2023-04-03 12:18:05 -04:00
Itamar Turner-Trauring
e19aeb5aea Correct the annotation. 2023-04-03 11:40:48 -04:00
Itamar Turner-Trauring
5e3fa04a3a Reformat with black. 2023-04-03 11:30:22 -04:00
Itamar Turner-Trauring
57ec669e1e Add logging for request(). 2023-04-03 11:29:57 -04:00
Itamar Turner-Trauring
3b3ea5409c Type says we should only pass in DecodedURL. 2023-04-03 11:26:08 -04:00
Itamar Turner-Trauring
41939e2b28 Add some type annotations. 2023-04-03 11:11:24 -04:00
Itamar Turner-Trauring
b81fad2970 Make sure tests have the same error testing infrastructure as the real thing. 2023-04-03 10:37:49 -04:00
Jean-Paul Calderone
2f3091a065 pass mypy strict on the new module 2023-03-29 10:00:38 -04:00
Jean-Paul Calderone
00ecb65c01 remove unused import 2023-03-29 09:47:25 -04:00
Jean-Paul Calderone
74ebda771a Make tahoe create-node use the new listener protocol 2023-03-29 09:46:54 -04:00
Jean-Paul Calderone
c52eb69505 Make the I2P and Tor providers implement the Listener protocol 2023-03-29 09:28:01 -04:00
Jean-Paul Calderone
e15970a484 Add a couple simple Listeners that we need 2023-03-29 09:26:59 -04:00
Jean-Paul Calderone
ed237b0dba improve the Listener protocol somewhat 2023-03-29 09:26:13 -04:00
Jean-Paul Calderone
cbfbfe8b1e top-of-file cleanups 2023-03-28 16:30:55 -04:00
Jean-Paul Calderone
fdf8519ed5 Define a protocol for listener/transport providers 2023-03-28 16:29:52 -04:00
Jean-Paul Calderone
ecfa76ac32 Python 3.8 compatibility 2023-03-28 13:22:08 -04:00
Itamar Turner-Trauring
d36adf33a4 Refactor; failing tests for some reason. 2023-03-28 13:06:43 -04:00
Itamar Turner-Trauring
e8c72e6753 Not sure if per method logging is worth it, will start from assumption that HTTP
logging is enough.
2023-03-28 12:55:41 -04:00
Itamar Turner-Trauring
80d8e5b465 The function should return a coroutine. 2023-03-28 11:13:21 -04:00
Jean-Paul Calderone
3ea9e97606 Python 3.8 compatibility 2023-03-28 09:01:03 -04:00
Jean-Paul Calderone
6d4278b465 Factor some repetition out of the tests 2023-03-28 08:53:21 -04:00
Jean-Paul Calderone
8e63fe2fdd Remove the unused mock import 2023-03-28 08:52:55 -04:00
Jean-Paul Calderone
9a8430c90f Remove porting boilerplate 2023-03-28 08:52:44 -04:00
Jean-Paul Calderone
32cd54501d Pass a time function instead of patching the global 2023-03-28 08:52:31 -04:00
Jean-Paul Calderone
6b7ea29d88 use foolscap.reconnector.Reconnector where one is required
Unfortunately we need to touch a private attribute directly to shove our
expected info into it.  This isn't so bad though.  Foolscap isn't moving much
and we're not touching anything complex, just setting a simple model
attribute.
2023-03-28 08:40:25 -04:00
Jean-Paul Calderone
e2c6cc49d5 use foolscap.info.ConnectionInfo where one is required
It's *right* there.  Just use it!
2023-03-28 08:37:22 -04:00
Jean-Paul Calderone
2f106aa02a use foolscap.reconnector.ReconnectionInfo where one is required
It's *right* there.  Just use it!
2023-03-28 08:35:31 -04:00
Itamar Turner-Trauring
bd7c61cc5c Split up the state management logic from the server pinging logic. 2023-03-27 16:58:15 -04:00
Itamar Turner-Trauring
7838f25bf8 Clean up with simpler idiom. 2023-03-27 14:54:36 -04:00
Itamar Turner-Trauring
0995772b24 Explain why we ignore type check. 2023-03-27 14:54:27 -04:00
Itamar Turner-Trauring
4211fd8525 Revert to old code. 2023-03-27 13:41:30 -04:00
Itamar Turner-Trauring
4a396309d2 Merge remote-tracking branch 'origin/master' into 3880-http-storage-logging 2023-03-27 13:35:30 -04:00
Itamar Turner-Trauring
e7c71e66a3 Merge remote-tracking branch 'origin/master' into 3978-connection-status-http-storage 2023-03-27 10:41:17 -04:00
Itamar Turner-Trauring
ee75bcd26b Fix lint. 2023-03-24 15:20:48 -04:00
Itamar Turner-Trauring
06dc32a6c0 Fix lint. 2023-03-24 15:20:11 -04:00