49354df56e
When we send a directory, we build a temporary zipfile to linearize the contents for transmission. We store this zipfile inside a SpooledTemporaryFile, which will hold everything in RAM (for speed) until it reaches some size threshold, then moves everything over to disk (to avoid crashing your program as it runs out of memory). Unfortunately SpooledTemporaryFile doesn't have a default threshold size: if you don't specify one, it will never switch to the disk-based mode, and `wormhole send large_directory/` will just use up all your RAM until it crashes. I've been using this wrong for five years, since the very beginning of wormhole's ability to send directories. How embarrassing! This applies the simple fix: provide a `max_size=` argument, setting the threshold to 10 MB. Thanks to @blitz for the report (and my apologies to everyone else who reported this earlier, to whom I said it was fixed by using SpooledTemporaryFile, when clearly it was not). closes #379 |
||
---|---|---|
docs | ||
misc | ||
pyi | ||
src/wormhole | ||
.appveyor.yml | ||
.coveragerc | ||
.gitattributes | ||
.gitignore | ||
.travis.yml | ||
LICENSE | ||
MANIFEST.in | ||
NEWS.md | ||
README.md | ||
setup.cfg | ||
setup.py | ||
snapcraft.yaml | ||
tox.ini | ||
versioneer.py |
Magic Wormhole
Get things from one computer to another, safely.
This package provides a library and a command-line tool named wormhole
,
which makes it possible to get arbitrary-sized files and directories
(or short pieces of text) from one computer to another. The two endpoints are
identified by using identical "wormhole codes": in general, the sending
machine generates and displays the code, which must then be typed into the
receiving machine.
The codes are short and human-pronounceable, using a phonetically-distinct wordlist. The receiving side offers tab-completion on the codewords, so usually only a few characters must be typed. Wormhole codes are single-use and do not need to be memorized.
For complete documentation, please see https://magic-wormhole.readthedocs.io or the docs/ subdirectory.
License, Compatibility
This library is released under the MIT license, see LICENSE for details.
This library is compatible with python2.7, 3.5, 3.6, and 3.7.
Packaging, Installation
Magic Wormhole packages are included in many operating systems.
To install it without an OS package, follow the Installation docs.