Brian Warner
ea3c3e6780
import simplejson directly, and remove our local copies of the component .py files from util/json*
2007-07-10 15:49:32 -07:00
Brian Warner
ad038497db
import the decoder portion of simplejson-1.7.1 too
2007-07-10 13:12:40 -07:00
Brian Warner
72fc8c5cb8
web: use real JSON instead of the fake stubs
...
Also include the encoder portion of Bob Ippolito's simplejson-1.7.1 as
allmydata.util.json_encoder . simplejson is distributed under a more liberal
license than Tahoe (looks to be modified BSD), so redistributing it should be ok.
2007-07-08 00:17:11 -07:00
Brian Warner
9ddb929651
fileutil: add du() function
2007-07-03 15:49:45 -07:00
Brian Warner
bc2603c818
vdrive: protect dirnode contents with an HMAC
2007-06-26 12:36:21 -07:00
Brian Warner
fb02488a8e
vdrive: switch to URI:DIR and URI:DIR-RO, providing transitive readonlyness
2007-06-25 13:23:51 -07:00
Brian Warner
956d5ae256
rename fileid/verifierid to plaintext_hash/crypttext_hash
2007-06-09 20:46:04 -07:00
Brian Warner
c9ef291c02
rename thingA to 'uri extension'
2007-06-08 15:59:16 -07:00
Brian Warner
c049941529
move almost all hashing to SHA256, consolidate into hashutil.py
...
The only SHA-1 hash that remains is used in the permutation of nodeids,
where we need to decide if we care about performance or long-term security.
I suspect that we could use a much weaker hash (and faster) hash for
this purpose. In the long run, we'll be doing thousands of such hashes
for each file uploaded or downloaded (one per known peer).
2007-06-07 21:47:21 -07:00
Brian Warner
2db17df833
iputil.get_local_ip_for: tolerate running on a disconnected host
2007-06-07 19:23:33 -07:00
Brian Warner
ea78b4b605
check_memory: getting closer, now we have memusage numbers for uploads of 10kB and 10MB files
2007-05-29 17:39:39 -07:00
Zooko O'Whielacronx
763cfc7874
amdlib.util: merge in changes to humanreadable.py that were made in pyutil
2007-05-25 15:49:57 -07:00
Zooko O'Whielacronx
80b09b6d54
add in-line doc that Josh wrote as he was trying to understand this code
2007-05-23 15:11:23 -07:00
Zooko O'Whielacronx
9cd1757799
refactor iputil and make it return addresses in descending order of goodness instead of in a set
...
Actually of course iputil can't tell exactly how good they are, and a wise user
of iputil will try all of them. But you can't try all of them simultaneously,
so you might as well try the best ones first.
2007-05-22 14:06:37 -07:00
Zooko O'Whielacronx
e0bedb64ea
manually merge recent changes to pyutil's copy of "version.py" with allmydata's copy of "version.py"
2007-05-09 16:04:05 -07:00
Brian Warner
9bd213abe7
version.py: handle both '0.2.0' and '0.2.0-1', remove 'tags' for now
2007-05-03 20:31:27 -07:00
Brian Warner
0650e5543f
figleaf_htmlizer: when all counts are zero, claim 0% instead of 100%, since it probably means that coverage checking has failed completely
2007-05-01 11:07:28 -07:00
Brian Warner
82b3554c2f
testutil.py: remove unused import, appease pyflakes
2007-04-27 08:11:34 -07:00
Zooko O'Whielacronx
5121a8d4a2
make testutil more flexible about what platform it runs on
2007-04-26 22:16:48 -07:00
Brian Warner
f4beff38c4
sort coverage tables by lines uncovered, rather than percentages
2007-04-24 11:49:26 -07:00
Brian Warner
e7a41aa9f7
testutil.py: hush a pyflakes warning
2007-04-23 21:21:50 -07:00
Brian Warner
8307aaccb6
testutil: make SignalMixin actually be a mixin (and not inherit from TestCase), use it from all tests that start notes and thus exec ifconfig
2007-04-23 21:15:02 -07:00
Brian Warner
76e0ec3214
figleaf: add number-of-uncovered-lines to the HTML output
2007-04-19 11:09:33 -07:00
Zooko O'Whielacronx
be8744caf8
copy version.py from pyutil
2007-04-19 13:47:36 -07:00
Brian Warner
073333c791
iputil/testutil: fix pyflakes errors/warnings
2007-04-18 18:33:37 -07:00
Zooko O'Whielacronx
a154641462
iputil.list_async_addresses now "works" on cygwin
2007-04-18 17:30:08 -07:00
Zooko O'Whielacronx
47bdfdf419
copy testutil from pyutil
2007-04-18 17:28:36 -07:00
Zooko O'Whielacronx
c5b9d2929d
copy repeatable_random from pyutil
2007-04-18 17:27:33 -07:00
Zooko O'Whielacronx
723f4078a3
pyutil: fileutil.open_or_create()
2007-04-17 20:14:26 -07:00
Brian Warner
a5a30d6bee
iputil.py: remove unused import
2007-04-16 17:08:00 -07:00
Zooko O'Whielacronx
f4de079ba0
pyutil: iputil: fix netbsd, irix, sunos
2007-04-18 07:40:26 -07:00
Zooko O'Whielacronx
234951041f
oops -- the previous commit of iputil wasn't the right version
...
Too bad synchronizing pyutil and allmydata.util includes a manual step.
2007-04-16 15:12:01 -07:00
Zooko O'Whielacronx
ac4d23d336
port iputil to Windows (and Irix, and NetBSD, and Solaris 2, ...)
2007-04-16 14:59:13 -07:00
Brian Warner
dd673370ec
figleaf output: include a stats.out for parsing by a munin plugin
2007-04-06 17:41:01 -07:00
Brian Warner
654854635a
chunk: add IncompleteHashTree for download purposes, plus tests
2007-04-06 09:09:57 -07:00
Brian Warner
8bc248a515
remove util.ring, no longer used. also remove test_ring.py
2007-03-31 20:38:43 -07:00
Zooko O'Whielacronx
62456b2a01
import fileutil, some of which came from amdlib.util and some of which came from the pyutil library
2007-03-30 12:12:23 -07:00
Zooko O'Whielacronx
17299fc96e
new upload and storage server
2007-03-29 20:19:52 -07:00
Zooko O'Whielacronx
99a046ab51
hashutil: convenience methods for tagged and encoded hashes
...
In various cases, including Merkle Trees, it is useful to tag and encode the inputs to your secure hashes to prevent security flaws due to ambiguous meanings of hash values.
2007-03-29 18:11:30 -07:00
Brian Warner
929d725577
add OneShotObserverList from the amdlib tree
2007-03-08 15:07:38 -07:00
Brian Warner
751587f376
iputil: switch to a scapy-inspired SIOCGIFADDR approach, very linux-specific now
2007-03-07 20:03:47 -07:00
Brian Warner
eccb3258ae
iputil: use the subprocess module instead of os.popen
2007-03-07 19:29:00 -07:00
Brian Warner
b5bf2baa9b
iputil: use explicit /sbin/ifconfig, to avoid depending upon PATH
2007-03-07 18:47:40 -07:00
Brian Warner
2c261ce996
change node startup to put all local addresses in the PBURL, including 127.0.0.1. This should facilitate testing on both connected and disconnected systems.
2007-03-07 18:43:17 -07:00
Brian Warner
18325251bf
iputil: add get_local_addresses(), an attempt to enumerate all IPv4 addresses on this host. This is pretty unix-specific for right now (it calls ifconfig)
2007-03-07 18:22:30 -07:00
Brian Warner
f2956c257b
util.iputil: try to survive not having a global network connection at all
2007-03-07 18:21:42 -07:00
Zooko O'Whielacronx
1373789463
add mathutil.next_power_of_k() and mathutil.ave()
2007-02-01 15:55:26 -07:00
Brian Warner
fed539a16d
add better error reporting to NotEnoughPeersError
2007-01-16 18:47:52 -07:00
Brian Warner
3209fd5e09
rearrange encode/upload, add URIs, switch to ReplicatingEncoder
...
Added metadata to the bucket store, which is used to hold the share number
(but the bucket doesn't know that, it just gets a string).
Modified the codec interfaces a bit.
Try to pass around URIs to/from download/upload instead of verifierids.
URI format is still in flux.
Change the current (primitive) file encoder to use a ReplicatingEncoder
because it provides ICodecEncoder. We will be moving to the (less primitive)
file encoder (currently in allmydata.encode_new) eventually, but for now
this change lets us test out PyRS or zooko's upcoming C-based RS codec in
something larger than a single unit test. This primitive file encoder only
uses a single segment, and has no merkle trees.
Also added allmydata.util.deferredutil for a DeferredList wrapper that
errbacks (but only when all component Deferreds have fired) if there were
any errors, which unfortunately is not a behavior available from the standard
DeferredList.
2007-01-15 21:22:22 -07:00
Brian Warner
42c0d2e336
disable figleaf tracing during py_ecc, since it takes *forever*, especially on the slow buildslave
2007-01-05 18:12:04 -07:00