Commit Graph

1532 Commits

Author SHA1 Message Date
Brian Warner
5d712395ef Merge branch 'py37'
Enable py37 in travis-ci
2018-07-27 14:33:25 -07:00
Brian Warner
454bf1eaf6 simplify .travis.yml 2018-07-27 14:26:31 -07:00
Brian Warner
d6866e11fe update allow_failures 2018-07-27 14:17:16 -07:00
Brian Warner
2bf9370c68 travis: use different dists/sudo for different python versions 2018-07-27 14:05:30 -07:00
Brian Warner
d893f7d39a try dist:xenial 2018-07-11 17:05:43 -07:00
Brian Warner
43bf219735 travis: use sudo=true and group=edge to get bionic
which maybe can install py37
2018-07-11 16:36:50 -07:00
Brian Warner
9d220bea73 travis: try "dist: xenial"
I don't think this will actually work
2018-07-11 16:13:29 -07:00
Brian Warner
ef32b23fe9 travis: move to 'trusty' dist
the old 'precise' environment doesn't have py3.7 available
2018-07-11 13:30:46 -07:00
Brian Warner
1181a7dba7 travis: require py37 to pass 2018-07-11 13:23:04 -07:00
Brian Warner
3f099cc51f setup.py: bump to txtorcon-18.0.2 to fix py3.4 2018-07-02 23:57:11 -07:00
Brian Warner
5ccda71467 Merge branch 'fix-py37'
I tested this locally (on MacOS) against python3.7.0, and it now works. This
will appear broken on travis/appveyor until those CI environments add support
for py3.7 (but the failures should be ignored since py3.7 is in the
'allowed_failures' list).

closes #306
2018-07-01 14:34:41 -07:00
Brian Warner
eacc6fe450 travis/appveyor: allow failures of the py3.7 build
until they're actually supported by both systems. Neither has a py3.7 image
available yet.
2018-07-01 14:33:28 -07:00
Brian Warner
4531513602 cmd_send/receive: work around python3.7.0 bug
See https://bugs.python.org/issue26175 . tempfile.SpooledTemporaryFile
doesn't fully implement the IOBase abstract class, which breaks because
py3.7.0's new zipfile module tries to delegate .seekable down to the wrapped
file and causes an AttributeError.

refs #306
2018-07-01 14:27:32 -07:00
Brian Warner
47e4c436a8 tox/travis/appveyor: enable testing on py3.7 2018-07-01 10:29:48 -07:00
Brian Warner
5dd41cead3 setup.py: update to latest mailbox-server 0.3.1 2018-06-23 19:31:29 -07:00
Brian Warner
206005670f NEWS: update with recent changes 2018-06-16 17:31:37 -07:00
Brian Warner
b06eda5f11 setup.py: update to newly-released mailbox-server 0.2.0 2018-06-16 17:26:53 -07:00
Brian Warner
2413af5f87 delete Dockerfile: broken, and I think it's for the server anyways
The servers were moved out to separate repos (magic-wormhole-mailbox-server
and magic-wormhole-transit-relay), and I think this Dockerfile was building
an image mostly to run the mailbox server.

It might make sense in the future to have a Docker image for just the client,
in which case it'll be time to bring these Dockerfiles back with different
contents.

refs #295
2018-06-16 16:55:33 -07:00
Brian Warner
7278925b11 Merge PR296: require pep8 formatting 2018-06-16 16:46:44 -07:00
Brian Warner
41fabd39ba test_machines: remove no-longer relevant comment
The flake8 config excludes E741, which would complain about using
'l' (lower-case ell) as a variable name. We use this for the Lister object in
one test that uses single-character variable names for all the machines ('b'
for Boss, 'm' for Mailbox, etc). That comment was added before excluding
E741. If we ever restore that warning, we might want to rename the variable.
2018-06-16 16:33:27 -07:00
Brian Warner
fc177726e1 cli.py: move timing check back to top
We care about how long it takes to import all the wormhole-specific things,
to investigate user-perceived latency from the time the command is launched
to the time they can actually interact with it. So we need to record
`time.time()` before doing the rest of the imports, even though pep8 says all
imports should be done before any non-importing statements.
2018-06-16 16:27:11 -07:00
Brian Warner
1444e32746 extreme measures to appease last pep8 complaint
a singly-parenthesized 'if' condition will always line up with the 'then'
body, won't it
2018-06-16 16:22:40 -07:00
Brian Warner
dada79d85c fix remaining pep8 complaints 2018-06-16 16:19:38 -07:00
Brian Warner
b216c0adf3 tox: increase flake8 complexity limit to 40, we can lower later 2018-06-16 16:19:38 -07:00
Brian Warner
b5b8cd1260 Merge branch 'master' into pr296 2018-06-16 16:09:38 -07:00
Brian Warner
1011197dce Merge PR304: fix long description on PyPI 2018-06-16 11:10:40 -07:00
Brian Warner
5335cfb8b6 Merge PR300: use pywin32 instead of pypiwin32 2018-06-16 11:09:32 -07:00
Marius Gedminas
21dbf00a7f
Add long_description_content_type to setup.py
The new PyPI code discards long_description when it's not valid ReStructuredText.  Luckily it also supports Markdown, but you have to [specify the content type](https://packaging.python.org/tutorials/packaging-projects/#creating-setup-py) explicitly in that case.

(IIRC for this to work correctly you also have to use sufficiently recent versions of setuptools and twine to upload releases.)

Should fix #303.
2018-06-12 14:08:34 +03:00
Ofek Lev
16c48a54f1
update Windows dependency 2018-06-02 17:36:15 -04:00
Thomas Waldmann
a333a02366 use pyinstaller to build wormhole fat/standalone binary
tested with/on:
- ubuntu linux 18.04 amd64
- pyinstaller 3.3.1 (pip install pyinstaller)
- python 3.6.5

There is a good chance it also works on FreeBSD, maybe also on macOS.

The change in __main__.py was required because otherwise it complains about
__main__ not being a package when trying the dot-relative import.
2018-06-02 18:05:45 +02:00
Brian Warner
6f42433c57 docs/api: minor rephrasings 2018-05-28 23:42:04 -07:00
Vasudev Kamath
aac5980bf4 Enable checking for pep8 confirmance in tox
Also make sure to ignore E741 naming a variable as l will raise this error and
reason is l is similar to 1 and people might get confused. For me it doesn't
look like an error hence ignored in tox.ini
2018-04-21 13:00:25 +05:30
Vasudev Kamath
12dcd6a184 Make code pep-8 compliant 2018-04-21 13:00:08 +05:30
Brian Warner
355cc01aee Merge PR293: include client version in server BIND message 2018-04-03 17:11:53 -07:00
Brian Warner
5c84f6a373 wormhole: slightly different way to unicode-encode the version
(this is somewhat more in line with how this distinction is made elsewhere in
the code)
2018-04-03 17:10:46 -07:00
Brian Warner
0dd3a12546 cosmetic changes, remove debug print 2018-04-03 17:05:33 -07:00
Baime
1197e5fb6d fix py 3.x versioneer issue 2018-03-23 18:19:31 +01:00
Baime
e77a2d605b bind passes tuple, fixed implementation issues 2018-03-23 17:33:48 +01:00
Brian Warner
7b39e42df7 setup.py: add classifiers and long_description 2018-03-22 00:32:06 -07:00
Baeumla
82dc4a4e2e py 2.7 3.x fix 2018-03-09 10:20:03 +01:00
Baeumla
0322d341e8 py 2.7 fix 2018-03-09 09:31:59 +01:00
Baeumla
4f8aa5a69e report clinet version on bind 2018-03-08 11:54:27 +01:00
Baeumla
86edf01070 rendevouz server documentation update 2018-03-07 09:25:53 +01:00
Brian Warner
c5ae678417 Merge branch 'observers-4'
This factors out the various "get me a Deferred which fires when/if we
compute a value" code from the _DeferredWormhole API calls: get_code,
get_unverified_key, get_versions, get_message, etc. It uses an eventual-send
for each one, which will protect against surprises when an application
invokes an wormhole API from within a previous API's callback: without this,
the internal wormhole state isn't guaranteed to be coherent, and crashes
could result.
2018-02-26 18:32:49 -08:00
Brian Warner
be47f53e7c wormhole: switch to observers for all APIs
Tests can pass an EventualQueue into wormhole.create(), to override the
default. This lets the tests flush the queue without using a haphazard
real-time delay.

closes #23

(in fact, we added multiple-Deferreds-per-API a while ago, but this does it
in a much cleaner fashion, and with the safety of an eventual-send)
2018-02-26 17:50:40 -08:00
Brian Warner
caabb3510c add OneShotObserver and SequenceObserver, with tests
This factors out the various "give me a Deferred for an value that may or may
not eventually be successfully generated" routines in _DeferredWormhole. It
uses an eventual-send to fire the Deferreds to avoid plan-coordination
hazards when the attached callbacks then call back into the Wormhole object
before the rest of the state transition has finished.
2018-02-26 17:50:40 -08:00
Brian Warner
43965d5289 add eventual-send queue
We defer starting a new timer until we've completely emptied the queue, since
we know we'll get to any new events added inside one of our callbacks. The
old design in Foolscap (which copied the list, cleared the original, then
fired everything in the copy) didn't look at these new events. OTOH, this
pop(0)-until-empty approach makes it easier to get into an infinite loop (any
callback which queues a new callback will get priority over anything else).
But the code is simpler.
2018-02-26 17:50:40 -08:00
Brian Warner
323044e9f5 stop supporting py3.4 on windows
Python.org is still supporting 3.4, but the lastest pypiwin32 stopped
providing binary wheels for windows for 3.4, so we can't run the appveyor CI
tests any more. It might still work there, but you'll have to find a way to
build pypiwin32 yourself.

We still support py3.4 on non-windows platforms.
2018-02-26 17:23:27 -08:00
Brian Warner
1c21119a73 add test_ipaddrs, adapted from tahoe's test_iputil 2018-02-22 21:32:44 -08:00
Brian Warner
9cb763e83a add "pragma: no cover" to set_trace() and debug code
we've got some tests to exercise this, so it shouldn't bitrot completely, but
there are some branches-not-taken warnings that I think are spurious
2018-02-22 09:42:43 -08:00