Commit Graph

1532 Commits

Author SHA1 Message Date
Brian Warner
7e22949b70 Merge branch 'remove-rendezvous'
Remove the mailbox/rendezvous server code (and tests), since that now lives
in the magic-wormhole-mailbox-server repository. Also remove the
munin (monitoring) plugins and the man page.

We declare magic-wormhole-mailbox-server as a dependency for the "[dev]"
extra (i.e. only for tests). A few tests needed updating to handle the new
structure, but this was mostly confined to test/common.py .

refs #240
2018-02-21 15:00:31 -08:00
Brian Warner
e7d0dbbb88 oops, typo 2018-02-21 01:57:07 -08:00
Brian Warner
9ae2307a72 fix tests 2018-02-21 00:38:19 -08:00
Brian Warner
37a7ed7adc WIP: remove unused server tests, minor syntax fixes. still fails. 2018-02-20 23:54:28 -08:00
Brian Warner
9957044a99 WIP: start replacing ServerBase with imported server
doesn't work yet at all
2018-02-20 23:46:29 -08:00
Brian Warner
77201966b4 remove server-related source files, munin plugins
setup.py: pin to magic-wormhole-mailbox-server 0.1.0, the current version
2018-02-20 23:46:29 -08:00
Brian Warner
d42ac47ac8 let tests override KEY_TIMER/VERIFY_TIMER to tolerate slow test hosts
I've seen intermittent failures in
test_cli.PregeneratedCode.test_text_subprocess where the host was slow (or
overloaded) enough that the "Waiting for sender.." pacifier message was
displayed, which flunks the test because we're looking for a specific output
string. We patch this 1-second timer in the non-subprocess tests, but you
can't patch across a process boundary.

This patch adds an undocumented environment variable that lets you override
the timer values. The test then sets it to something large.

For future consideration: another approach would be to change the test to
tolerate the extra message. This would be trickier to validate, though.
2018-02-20 18:14:57 -08:00
Brian Warner
e4e8216d2c tests: pin transit-relay to 0.1.1, that's the new version 2018-02-19 17:24:27 -08:00
Brian Warner
be41563ef4 README: fix pypi badge: we're magic-wormhole, not zfec 2018-02-17 19:37:25 -08:00
Brian Warner
dfca0209b3 README: add PyPI badge 2018-02-17 19:36:45 -08:00
Brian Warner
13b1539409 setup.py: remove the dependency on ipaddress
Do we still need this? Nothing in wormhole uses it.

refs #274
2018-02-15 17:02:19 -08:00
Brian Warner
43f45aa2c9 munin/wormhole_event_rate: fix calculation of 'scary' and 'incomplete'
I made a cut-and-paste error before, and these two values were derived from
'happy' instead of their own counts.
2018-02-15 11:55:31 -08:00
Brian Warner
6b6154bc29 NEWS: update for 0.10.5 2018-02-14 23:41:08 -08:00
Brian Warner
83d0d15a39 update to spake2-0.8, which loads much faster 2018-02-14 18:58:25 -08:00
Brian Warner
6061ec7869 _key: note places where we should use eventual-send
This will be necessary to avoid reentrancy hazards, in case the application
code makes other wormhole API calls from the callbacks for
get_unverified_key(), get_verifier(), or get_message().
2018-02-14 02:12:33 -08:00
Brian Warner
593b359166 Merge branch '280-input-threading'
closes #280
2018-02-14 02:12:04 -08:00
Brian Warner
af406a600e _rlcompleter: use blockingCallFromThread for all Helper APIs
We were missing two (the calls to choose_nameplate() and choose_words() that
happen after the input() function has finished, but while we're still inside
the thread that makes it safe for input() to block). This almost certainly
caused the crash seen in issue #280.

Update the tests to match: CodeInputter.finish must now be called with
deferToThread from inside tests, or the internal blockingCallFromThread must
be stubbed out.
2018-02-14 01:13:30 -08:00
Brian Warner
3847339f43 _input: reject attempts to call Helper from a non-main thread
This causes two threads to use the reactor at the same time, with horrible
results. The _rlcompleter code currently violates this requirement, causing
occasional failures if the messages arrive in just the wrong way (refs #280).
2018-02-14 00:56:18 -08:00
Brian Warner
dce01174eb improve debug_set_trace: add Allocate and Input events
Also log events at the beginning and end of Input.choose_nameplate and
Input.choose_words, since those are the two big locally-driven (UI) triggers
that cause multiple messages to be fired and lots of work to happen.
2018-02-14 00:56:14 -08:00
Brian Warner
2fadadc4db NEWS: update for 0.10.4 release 2018-01-28 16:04:50 -08:00
Brian Warner
c6fbaf5a4d _version.py: hush lgtm.com alert
This needs to be upstreamed into Versioneer, as it will disappear the next
time we upgrade.
2018-01-02 08:19:08 +01:00
Brian Warner
624072c111 hush more lgtm.com -discovered static-analysis problems 2018-01-02 08:18:45 +01:00
Brian Warner
443c402f60 remove WormholeClosedError, simplify control paths in cmd_send/receive
lgtm.com noticed some unreachable code paths, and it turns out that nothing
in the rest of the code base could ever raise WormholeClosedError (I guess it
was leftover from before the big API refactoring). Both sender and receiver
are simpler without the unnecessary checks and state variables.
2018-01-01 16:56:18 +01:00
Brian Warner
e13f3e3e13 hush some unreachable-code errors found by lgtm.com
This comments out some "if 0: debug()" stuff I keep around to investigate
problems, since lgtm thinks of it as accidentally-unreachable code.

I also deleted a server usage command
entirely (src/wormhole/server/cmd_usage.py show_usage) which was disabled
while I rewrote that schema: the new plan is to move the server into a new
repository altogether, and use a completely different approach to the
usage database.
2018-01-01 16:53:18 +01:00
Jonathan Lange
cb67511848 Do not refer to transit server in Dockerfile
https://github.com/warner/magic-wormhole/pull/263 removed the transit server,
breaking the Dockerfile.

This fixes the Dockerfile to run just the rendezvous server.
2018-01-01 13:07:36 +00:00
Brian Warner
80852fb2de Merge PR267: improve sender-side instruction text 2017-12-19 15:07:33 -08:00
Brian Warner
67253bde55 test_cli: make timers more reliable
A slow Travis-CI host caused one the 1.0s KEY_TIMER to fire by accident,
making the test fail because it wasn't expecting to see the "please be
patient" message. Fixed this by increasing the timeout to a very large value
when we aren't explicitly testing it.
2017-12-19 13:41:05 -08:00
Brian Warner
c7c7c0381c update -0 and --text output too 2017-12-19 12:54:16 -08:00
David Harrigan
9b1f99b994 Change the send command output to help copy and pasting to others
A tiny update to show the command to execute along with the code required on
the same line, rather than split across two lines. This small change helps
when sending the information to others using copy and paste.

Fixes #266

-=david=-
2017-12-14 21:13:12 +00:00
Brian Warner
1bbd756fa6 test_transit: fix the miscaptured-loop-variable bug I always make 2017-12-01 13:00:05 -08:00
Brian Warner
8a7c6faf4a more test simplification with assertNoResult 2017-11-29 16:54:03 -06:00
Brian Warner
8227d963a3 test_transit: simplify by using successResultOf/failureResultOf 2017-11-29 15:03:03 -06:00
Brian Warner
f03c8bc516 docs/client-protocol: update comment on ordering
thanks jml for the catch
2017-11-25 12:44:20 -06:00
Brian Warner
c769ff7bbe docs: get version from Versioneer, instead of hard-coding it 2017-11-13 14:18:20 -08:00
Brian Warner
9d4c6aad3b Merge branch 'remove-transit'
This removes the Transit Relay server from "wormhole-server", since it's been
split out into it's own package:

* https://github.com/warner/magic-wormhole-transit-relay
* https://pypi.python.org/pypi/magic-wormhole-transit-relay/0.1.0

The magic-wormhole tests now import that external
magic-wormhole-transit-relay package to exercise the client-side
functionality, as well as for the integration tests that do end-to-end
transfers. A normal "pip install magic-wormhole" will no longer include
transit-relay functionality.

The next step will be to remove the Rendezvous Server functionality too,
following the same path (create a new package, copy the server code into it,
get it working, remove that code from magic-wormhole, rewrite the tests to
import the external package).
2017-11-13 14:15:03 -08:00
Brian Warner
73764830ac setup.py: pin transit-relay to 0.1.0 since tests look inside it 2017-11-13 12:14:08 -08:00
Brian Warner
7e17dcfef1 more Transit-removal changes 2017-11-13 12:07:38 -08:00
Brian Warner
d87792a7c7 finish removing Transit from code and CLI command args 2017-11-13 12:03:21 -08:00
Brian Warner
a804365536 remove most of Transit server, use external package instead 2017-11-13 11:34:17 -08:00
Brian Warner
08e911e1f3 README: add readthedocs badge 2017-11-12 15:43:50 -08:00
Brian Warner
aa04a17ea5 oops, forgot to commit welcome.md 2017-11-12 15:41:11 -08:00
Brian Warner
1bd14d8854 Merge branch 'docs': move to readthedocs 2017-11-12 15:22:56 -08:00
Brian Warner
3f3be8c7aa move most of README into docs, add more pointers 2017-11-12 15:21:56 -08:00
Brian Warner
346cfa13e2 enable markdown (but use index.rst), small headline tweaks 2017-11-12 15:12:36 -08:00
Brian Warner
aefc79b034 run sphinx-quickstart 2017-11-12 10:24:56 -08:00
Brian Warner
d1a829d86f server.py: tolerate (disabled) --transit=
We were unconditionally asking the Transit server object for get_stats(),
which doesn't work if there isn't one.
2017-11-07 20:50:40 -06:00
Brian Warner
a4cca39c0e README: add appveyor status badge (windows tests) 2017-11-02 11:44:55 -07:00
Brian Warner
5894cd2d8b Merge branch '251-slash'
closes #251
2017-11-01 22:16:53 -07:00
Brian Warner
1c5f29337e add notes, make test TODO instead of SKIP 2017-11-01 17:46:09 -07:00
Brian Warner
d727531e6d send: use normpath() on argument to remove trailing slashes
This ought to help with #251, where bash-on-windows makes it easy to add a
forward-slash, and os.path.normpath() knows how to remove them, but os.sep is
a backslash.
2017-11-01 17:46:09 -07:00