Brian Warner
284b3e77e0
trailing-whitespace eradication, no functional changes
2007-11-01 15:25:09 -07:00
Brian Warner
1d8a4cdfe7
mutable: first pass at dirnodes, filenodes, new URIs. Some test coverage.
...
The URI typenames need revision, and only a few dirnode methods are
implemented. Filenodes are non-functional, but URI/key-management is in
place. There are a lot of classes with names like "NewDirectoryNode" that
will need to be rename once we decide what (if any) backwards compatibility
want to retain.
2007-11-01 15:15:29 -07:00
Zooko O'Whielacronx
5b476d73ee
setup: generalize the kludge of finding an executable (i.e. trial or twistd) when there might be only a .py script version of it available
2007-10-15 10:25:04 -07:00
Zooko O'Whielacronx
af0edec753
filter out "0.0.0.0" from detected IP addresses
2007-10-13 00:38:16 -07:00
Zooko O'Whielacronx
8fd98624a3
don't try to use bindann
...
It causes a mysterious misbehavior in Python import which causes the previous patch to fail (the patch to not run trial tests if dependencies can't be imported)
2007-09-13 19:14:46 -07:00
Brian Warner
56afda11d1
deletion phase2a: improve creation of renew/cancel secrets. Still fake though.
2007-08-27 19:00:18 -07:00
Brian Warner
739ae1ccde
deletion phase1: send renew/cancel-lease secrets, but my_secret is fake, and the StorageServer discards them
2007-08-27 17:28:51 -07:00
Zooko O'Whielacronx
9ad02dbe80
fix version class to preferred format and correct parsing
2007-08-16 15:38:01 -07:00
Zooko O'Whielacronx
5a1d4aa8b7
version_class.py: if you don't have pkg_resources for comparing version numbers, use distutils.version.LooseVersion
2007-08-16 16:16:41 -07:00
Zooko O'Whielacronx
a431811011
in-line doc edit: s/pyutil/allmydata.util/
2007-08-16 14:10:48 -07:00
Zooko O'Whielacronx
094b687d6e
import version class and make-version script from pyutil -- fixes win32 build, improves error handling, and eliminates unused features
2007-08-16 14:09:30 -07:00
Zooko O'Whielacronx
9b08691f51
fix iputil so that it doesn't launch dozens of processes when you give it a full path and so that it tries executables in preference order and stops as soon as one gives out a dotted-quad string
2007-08-09 10:56:47 -07:00
Brian Warner
e3eba2d6c5
remove unused imports: hush pyflakes warnings
2007-07-24 18:13:58 -07:00
Zooko O'Whielacronx
32c90c6468
switch from rfc 3548 base-32 to z-base-32 except for tubids/nodeids
2007-07-24 13:46:06 -07:00
Brian Warner
9c5ab89afe
truncate storage index to 128 bits, since it's derived from a 128 bit AES key
2007-07-22 19:48:44 -07:00
Brian Warner
9af506900b
upload: refactor to enable streaming upload. not all tests pass yet
2007-07-19 18:21:44 -07:00
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
Brian Warner
6587645f76
fix pyflakes warnings in figleaf
2007-01-04 18:04:43 -07:00
Brian Warner
7b2268ab39
improve figleaf: fix some line-numbering bugs, add an alphabetically-sorted index HTML page
2007-01-04 01:26:43 -07:00
Brian Warner
8a78065f16
modify figleaf2html to show module names instead of .py filenames, also add a --root argument to restrict coverage to a specific parent directory
2007-01-03 22:23:25 -07:00
Brian Warner
e8ee3365ef
move figleaf2html and figleaf_htmlizer.py into our tree, for easier customization
2007-01-03 22:06:51 -07:00
Brian Warner
f97eec893e
figleaf: move a copy into allmydata.util.figleaf, update Makefile/trial stuff
2007-01-03 21:38:29 -07:00
Zooko O'Whielacronx
f3f91105bd
import mathutil from pyutil
2006-12-29 13:50:42 -07:00
Brian Warner
3490378551
move all packages into src/, fix allmydata.Crypto build. Now you must perform a 'setup.py build' before using anything, and you must add the build directory (build/lib.linux-i686-2.4) to your PYTHONPATH before doing anything
2006-12-14 03:39:50 -07:00