Maciej Fijalkowski
13e292295e
Revert "futurize and make the tests pass back under py2"
...
This reverts commit 361de05980
.
2020-07-25 11:22:03 +02:00
Maciej Fijalkowski
361de05980
futurize and make the tests pass back under py2
2020-07-25 11:12:43 +02:00
Itamar Turner-Trauring
025afc1efe
Merge branch '3357.version_checks-py3' into 3356.iputil-python-3
2020-07-24 14:50:50 -04:00
Itamar Turner-Trauring
11cd30c425
Merge remote-tracking branch 'origin/master' into 3357.version_checks-py3
2020-07-24 14:50:39 -04:00
Itamar Turner-Trauring
e0d3e46683
Merge remote-tracking branch 'origin/master' into 3351.spans-python-3
2020-07-24 14:48:33 -04:00
Itamar Turner-Trauring
4c6a9a5610
Merge branch '3357.version_checks-py3' into 3356.iputil-python-3
2020-07-24 14:36:31 -04:00
Itamar Turner-Trauring
337a4381bb
Finish port to Python 3.
2020-07-24 14:31:36 -04:00
Itamar Turner-Trauring
65500de72f
Merge remote-tracking branch 'origin/master' into 3346.abbreviate-and-time_format-py3
2020-07-24 14:13:28 -04:00
Itamar Turner-Trauring
f84d51d795
Port to Python 3.
2020-07-24 14:12:10 -04:00
Itamar Turner-Trauring
45a891114b
Fix some things that prevent Python 3 imports.
2020-07-24 13:48:11 -04:00
Itamar Turner-Trauring
8bcd6dd34b
Merge branch 'master' into 3346.abbreviate-and-time_format-py3
2020-07-24 11:10:38 -04:00
Itamar Turner-Trauring
38648c0f8f
Fix indentation
2020-07-24 11:09:08 -04:00
Itamar Turner-Trauring
dd4737f20c
Merge branch 'master' into 3353.observer-and-pipeline-py3
2020-07-24 11:08:08 -04:00
Itamar Turner-Trauring
d23394b35c
Merge remote-tracking branch 'origin/master' into 3346.abbreviate-and-time_format-py3
2020-07-23 12:27:06 -04:00
Itamar Turner-Trauring
ab4393b50e
Document unicode.
2020-07-23 11:49:02 -04:00
Itamar Turner-Trauring
b0083e342b
Document being ported.
2020-07-23 11:47:06 -04:00
Itamar Turner-Trauring
64e4af2d05
Port to Python 3.
2020-07-22 13:17:49 -04:00
Itamar Turner-Trauring
0763f9f90b
Port to Python 3.
2020-07-22 10:36:50 -04:00
Itamar Turner-Trauring
b4e6686211
Port to Python 3.
2020-07-22 10:29:44 -04:00
Itamar Turner-Trauring
2f608e8216
Merge remote-tracking branch 'origin/master' into 3346.abbreviate-and-time_format-py3
2020-07-22 10:11:27 -04:00
Itamar Turner-Trauring
2391bd9733
Merge remote-tracking branch 'origin/master' into 3351.spans-python-3
2020-07-22 09:57:08 -04:00
Itamar Turner-Trauring
e9eb93468f
Finish port to Python 3.
2020-07-22 09:56:59 -04:00
Itamar Turner-Trauring
4018b772a3
Port abbreviate.py. As far as I can tell, all division is already float division.
2020-07-21 14:15:39 -04:00
Itamar Turner-Trauring
116f232e80
Port time_format to Python 3.
2020-07-21 14:08:31 -04:00
Itamar Turner-Trauring
7e8de10ea3
Merge branch '3342-base32-and-base62-to-python-3' into 3344.netstring-and-hashutil-to-python-3
2020-07-21 14:00:53 -04:00
Itamar Turner-Trauring
c229ba7196
Workaround future/pypy incompatibility.
2020-07-21 13:55:53 -04:00
Itamar Turner-Trauring
4c047b90e5
Manual steps of port to Python 3.
2020-07-16 15:46:23 -04:00
Itamar Turner-Trauring
e90d1f38d2
Make TimezoneMixin importable on Python 3.
2020-07-16 15:44:41 -04:00
Itamar Turner-Trauring
4da8e2ddee
Merge branch '3342-base32-and-base62-to-python-3' into 3344.netstring-and-hashutil-to-python-3
2020-07-16 14:42:09 -04:00
Itamar Turner-Trauring
2f693c47f9
Don't leak variable on Python 2.
2020-07-16 14:37:26 -04:00
Itamar Turner-Trauring
7abc54c429
Merge remote-tracking branch 'origin/master' into 3342-base32-and-base62-to-python-3
2020-07-16 14:21:42 -04:00
Jean-Paul Calderone
c493396148
Merge pull request #740 from tahoe-lafs/3340-unused-code-in-util
...
Delete some dead code.
Fixes: ticket:3340
2020-07-15 20:08:41 -04:00
Itamar Turner-Trauring
6af32fdfa7
Make sure the public API exposes native bytes, not Future bytes.
2020-07-15 15:59:46 -04:00
Itamar Turner-Trauring
ed6e1cb7ef
Fix formatting.
2020-07-15 15:51:09 -04:00
Itamar Turner-Trauring
ed8b10c12f
Finish porting to Python 3.
2020-07-15 15:00:29 -04:00
Itamar Turner-Trauring
fa5b5fa436
Manual part of port to Python 3.
2020-07-15 14:55:56 -04:00
Itamar Turner-Trauring
bb7d31c5e4
Futurize part of port to Python 3.
2020-07-15 11:19:57 -04:00
Itamar Turner-Trauring
60a1a24423
Manual portion of port to Python 3.
2020-07-15 11:13:59 -04:00
Itamar Turner-Trauring
093125ca43
Port to Python 3.
2020-07-15 11:05:23 -04:00
Itamar Turner-Trauring
3688291df2
Handy way to run Python 3 tests, until the ratchet is going.
2020-07-14 13:53:26 -04:00
Itamar Turner-Trauring
5fd01523cf
This module is not a thing.
2020-07-14 13:53:13 -04:00
Itamar Turner-Trauring
21a9ffef7a
Not strings.
2020-07-14 13:46:12 -04:00
Itamar Turner-Trauring
db41d5af6f
Merge pull request #743 from tahoe-lafs/3342-more-tests-for-base32-base62
...
Fixes https://tahoe-lafs.org/trac/tahoe-lafs/ticket/3343
2020-07-14 13:41:20 -04:00
Itamar Turner-Trauring
e0adb3b37d
Port to Python 3.
2020-07-14 13:35:46 -04:00
Itamar Turner-Trauring
b5db85afbe
Initial, manual steps of Python 3 port.
2020-07-14 11:53:40 -04:00
Itamar Turner-Trauring
3abb9e9db4
Rip out a whole bunch of code, either deleting or replacing with stdlib's base32 implementation.
2020-07-14 11:45:05 -04:00
Itamar Turner-Trauring
f3db64ad74
Port to Python 3.
2020-07-14 11:29:09 -04:00
Itamar Turner-Trauring
ab3737d686
Note this module has been ported to Python 3.
2020-07-14 11:28:51 -04:00
Itamar Turner-Trauring
9c428be0e2
Port base62 to Python 3.
2020-07-14 11:24:45 -04:00
Itamar Turner-Trauring
459d68118c
Merge branch '3342-more-tests-for-base32-base62' into 3342-base32-and-base62-to-python-3
2020-07-14 10:26:46 -04:00
Itamar Turner-Trauring
77ae087c77
Remove a2b_l and b2a_l from public API, to ease likely future switch to stdlib
...
base64's implementation.
2020-07-13 16:12:53 -04:00
Itamar Turner-Trauring
e23dbcdf56
Document current public API.
2020-07-13 15:41:01 -04:00
Itamar Turner-Trauring
1a3a1ffcaa
Restore eliot code.
2020-07-13 14:33:13 -04:00
Itamar Turner-Trauring
af916c3968
Merge branch 'master' into 3341-more-python-3-utils
2020-07-13 14:30:11 -04:00
Itamar Turner-Trauring
1e41df9f48
Add to list of ported modules.
2020-07-09 14:38:07 -04:00
Itamar Turner-Trauring
7d1fdd8284
Port modules to Python 3.
2020-07-09 14:32:16 -04:00
Itamar Turner-Trauring
0cf1117165
Move the tests for deferredutil into their own module.
2020-07-09 14:20:12 -04:00
Itamar Turner-Trauring
e108ecb4b0
Fix lint.
2020-07-09 13:56:25 -04:00
Itamar Turner-Trauring
af86066eab
Delete some dead code.
2020-07-09 13:52:06 -04:00
Itamar Turner-Trauring
12d5131568
Fix pyflakes issues.
2020-07-09 13:12:30 -04:00
Itamar Turner-Trauring
bd6ff36b2f
Fix typo.
2020-07-08 12:13:24 -04:00
Itamar Turner-Trauring
939648c04f
Add back missing function.
2020-07-08 12:13:19 -04:00
Itamar Turner-Trauring
229583c596
Switch to mathutil from pyutil (it has tests, and has already been ported to
...
Python 3).
2020-07-08 12:02:58 -04:00
Itamar Turner-Trauring
016c7754a6
Switch to use pyutil's assertutil implementation.
2020-07-08 11:57:10 -04:00
Itamar Turner-Trauring
f548593f37
Fix test_python3, and mark these two modules as being ported as well.
2020-07-06 14:18:18 -04:00
Itamar Turner-Trauring
b990334104
Add the builtins import to make Python 2 builtins match Python 3's.
2020-07-06 14:00:02 -04:00
Itamar Turner-Trauring
83b9bbf743
Switch definitely to _python3.py for listing modules, but also note if a module
...
has been ported in its docstring.
2020-07-03 13:28:36 -04:00
Itamar Turner-Trauring
12691eb597
Only install module mappings once.
2020-07-02 14:31:33 -04:00
Itamar Turner-Trauring
ad7f44db99
Listed ported modules.
2020-07-02 14:27:43 -04:00
Itamar Turner-Trauring
70a029fb81
Tests pass on both Python 2 and Python 3.
2020-07-02 14:26:35 -04:00
Itamar Turner-Trauring
99b62775e9
Initial list of ported modules.
2020-07-02 13:42:30 -04:00
meejah
2418e90bf0
CacheDirectoryManager is unused
2020-05-06 15:22:22 -06:00
meejah
4c3d0ea6cc
use 'with open' for more file-opens
2020-05-04 21:59:15 -06:00
Jean-Paul Calderone
6f1f30e4bf
pyflakes cleanups
2020-02-13 12:15:09 -05:00
Jean-Paul Calderone
ef73e18f3d
Remove the greater part of the implementation
2020-02-13 10:43:50 -05:00
Jean-Paul Calderone
f032cd50d0
Merge pull request #678 from tahoe-lafs/2239.remove-tahoesvc-and-pkgresutil
...
Remove tahoesvc and pkgresutil
Fixes: ticket:2239
2020-02-11 13:29:46 -05:00
Jean-Paul Calderone
0004782cfc
Remove the helper module
2020-01-13 15:34:34 -05:00
Jean-Paul Calderone
f6e7721dad
Remove tahoesvc and pkgresutil
2020-01-13 15:33:21 -05:00
Jean-Paul Calderone
21bf7fc25c
Merge remote-tracking branch 'origin/master' into integration/storage-economics
2019-08-16 15:39:31 -04:00
Jean-Paul Calderone
b7e3633056
Fix a lot of classic classes in Tahoe-LAFS
2019-08-13 16:55:40 -04:00
Jean-Paul Calderone
3b6e1e344b
Don't blow up the web status if we get an unrecognized announcement
2019-08-03 06:19:01 -04:00
Jean-Paul Calderone
fb4c5cf91f
Allow for dynamic configuration validation rules
2019-08-03 05:34:21 -04:00
meejah
c6d41b310a
str -> bytes
2019-07-08 14:16:37 -06:00
meejah
c2c2eda52e
bytes
2019-07-08 14:16:28 -06:00
meejah
a27a5ce581
test all error-cases, and some fixups
2019-06-17 21:56:06 -06:00
meejah
310fb60247
move AES to a helper-function style
2019-06-17 15:54:46 -06:00
heartsucker
96ba55dd5c
autopep8 on hashutil to make it more readable
2019-06-13 22:19:28 -06:00
heartsucker
9e31bfe2f4
update code/test to use new ed25512 module
2019-06-13 22:19:28 -06:00
heartsucker
3a5a0fb572
replaced uses of pycryptopp's ed25519 with our own
2019-06-13 22:18:55 -06:00
heartsucker
008825b0fd
replaced referecnes to pycryptopp AES with own wrapper
2019-06-13 22:18:55 -06:00
tpltnt
4c2f0db5d2
made OneShotObserverList a new-style class
2019-05-26 08:28:18 +02:00
tpltnt
c8f11dc2d3
ported old-style classes to new-style
2019-05-26 08:28:18 +02:00
Jean-Paul Calderone
b5659bd312
Some gc hinting and docs
2019-05-09 15:45:07 -06:00
Jean-Paul Calderone
b31acb790a
Try to clean up the fds created by listenOnUnused that might leak
2019-05-09 15:45:07 -06:00
meejah
fee6eb38a9
Merge pull request #603 from tahoe-lafs/3028-string-literals
...
updated string literal syntax for python3 compatibility
2019-04-26 17:39:38 +00:00
meejah
27a0a7400d
Merge pull request #600 from tahoe-lafs/3019-remove-tuple-unpacking
...
3019 remove tuple unpacking, Fixes: ticket:3019
2019-04-26 17:37:56 +00:00
heartsucker
05e0d19cca
updated string literal syntax for python3 compatibility
2019-04-25 11:18:33 +02:00
heartsucker
c0939e9b99
removed use of backticks for repr for python3 compatibility
2019-04-18 13:50:21 +02:00
heartsucker
a087a5be72
removed tuple unpacking in function definitons for python3 compatibility
2019-04-18 13:37:18 +02:00
Jean-Paul Calderone
9a30eaa83c
move listenOnUnused to a place where implementation code can use it
2019-04-16 11:26:15 -04:00
heartsucker
ae5e282e2f
update raise syntax for python3 compatibility
2019-04-05 11:39:10 +02:00
heartsucker
0750dbac38
updated all python files to use pep-3110 exception syntax for python3 compatibility
2019-04-04 11:57:58 +02:00
heartsucker
f4ff91a6c1
updated python2 long numeric literals for python3 compatibility
2019-04-03 10:04:02 +02:00
heartsucker
129ef22185
updated instances of octal literals to use the format 0o123 for python3 compatibility
2019-03-29 11:08:44 +01:00
heartsucker
64f4dfa8ca
replaced all remaining instances of the print statement with the print function
2019-03-24 14:14:00 +01:00
Jean-Paul Calderone
f7f9cf6abc
Merge pull request #576 from tahoe-lafs/3005.upstream-inline_callbacks
...
Use upstream inline_callbacks implementation.
Fixes: ticket:3005
2019-03-21 16:24:21 -04:00
Jean-Paul Calderone
1f254fbdcc
log the unicode instead of the localized byte string
2019-03-20 16:17:55 -04:00
Jean-Paul Calderone
e2d242d299
remove our implementation of inline_callbacks
...
re-publish Eliot's
2019-03-20 12:53:24 -04:00
Jean-Paul Calderone
1d0c862c54
convert some tests over to the new base class
...
in support of better logging
2019-03-14 11:24:35 -04:00
Jean-Paul Calderone
6ccd9f4b44
try to get some indication of fake behavior in the log
2019-03-14 11:23:16 -04:00
Jean-Paul Calderone
831452f776
Add missing import
2019-03-12 20:32:15 -04:00
Jean-Paul Calderone
0e3c4d40b8
Add some Eliot events related to fs notifications
2019-03-12 19:35:36 -04:00
Jean-Paul Calderone
39694fcfde
this include_args is basically useless
2019-03-07 13:30:54 -05:00
Jean-Paul Calderone
5de4f4094e
let it not return a Deferred
2019-03-07 13:30:47 -05:00
Jean-Paul Calderone
7d6e36d9c7
A basic implementation of the idea.
2019-03-07 13:07:02 -05:00
Jean-Paul Calderone
26a7cc4f21
The log directory may not yet exist.
2019-03-04 10:08:53 -05:00
Jean-Paul Calderone
fe60980ccc
and switch away from Windows drive separator...
2019-02-27 06:42:57 -05:00
Jean-Paul Calderone
d203fde9f6
Change away from the Windows directory separator for the escape char
2019-02-26 19:06:35 -05:00
Jean-Paul Calderone
25a62001dd
Improve the failure case user experience
...
And test it
2019-02-26 19:05:39 -05:00
Jean-Paul Calderone
ca82d4f83d
Merge remote-tracking branch 'origin/master' into 2972.magic-folder-eliot-logs
2019-02-26 13:33:39 -05:00
Jean-Paul Calderone
7fb695f956
Add user-facing help about destinations
2019-02-25 13:34:02 -05:00
Jean-Paul Calderone
4f238d0f64
Clarify possible usage here
2019-02-25 13:11:52 -05:00
Jean-Paul Calderone
abae1be9c6
Add helpers for configuring and using Eliot logging
2019-02-25 11:52:50 -05:00
Jean-Paul Calderone
f90a137552
Basic housekeeping previously missed
2019-02-25 08:57:38 -05:00
Jean-Paul Calderone
f1a7dcf309
A fair bit more Eliot conversion
2019-02-25 08:35:57 -05:00
Jean-Paul Calderone
3020fb979d
Hoist some of this to a shared module
2019-02-25 08:35:57 -05:00
Jean-Paul Calderone
6ca328ba94
Fix comparison of NummedObj against non-NummedObj
...
Previously this would explode with AttributeError.
2019-02-25 08:35:57 -05:00
Jean-Paul Calderone
19f06809e2
That was all nonsense. Throw it out.
2019-02-22 09:11:44 -05:00
Jean-Paul Calderone
e55ee7d044
Move generator context state to a generator context manager
2019-02-22 08:40:16 -05:00
Jean-Paul Calderone
05807ace40
Split the implementation helpers out of the test suite
2019-02-21 12:54:10 -05:00
meejah
136495e405
basedir fixup
2018-09-10 21:58:27 -06:00
meejah
7685fb34cd
pull 'basedir' entirely into _Config
...
Put all config-related methods into _Config; change
code to ask config for paths instead of using basedir;
add some better docstrings
2018-09-10 21:58:27 -06:00
meejah
739aaa3ef9
put create() methods in i2p_, tor_provider
...
Also Provider -> _Provider, improve docs and update tests
2018-09-10 21:58:27 -06:00
meejah
35810a5692
pull 'basedir' entirely into _Config
...
Put all config-related methods into _Config; change
code to ask config for paths instead of using basedir;
add some better docstrings
2018-08-25 02:10:44 -06:00
meejah
c9e00a988a
Merge pull request #475 from meejah/2909.backup-behavior.0
...
#2909 fix .backup file behavior and (some of) the incorrect .conflict cases (#2911 )
2018-05-01 15:52:10 -06:00
meejah
b54d5d88f8
unused var
2018-04-30 14:55:52 -06:00
meejah
c71116d45e
keep original exception behavior
2018-04-30 14:55:51 -06:00
meejah
c2aec93209
fix windows move_into_place logic
2018-04-30 14:55:51 -06:00
meejah
99c3d7f23f
this shouldn't have gotten removed
2018-04-30 14:55:51 -06:00
meejah
cc93a12a85
Test fixups
2018-04-30 14:55:51 -06:00
meejah
affb80e39e
test fixups
2018-04-30 14:55:51 -06:00
meejah
47b1787633
stop writing .backup files for normal overwrites
2018-04-30 14:55:51 -06:00
Jean-Paul Calderone
b623a4a199
Remove dead Tor TCP control port setup code.
...
If someone wants this I bet they can figure it out.
2018-04-26 15:32:27 -04:00
Jean-Paul Calderone
8d4d000132
Fix pre-release matching regex character class
...
Previously matched any single character from `abc|r` (with duplicate
specification of `c`). Now matches any single character from `abc` or
the two character sequence `rc`.
I guess this was the intent, anyway.
2018-04-26 15:20:27 -04:00
Jean-Paul Calderone
6b16afaa2e
Avoid using the list comprehension loop variable
...
It works fine but it relies on leaky scopes.
2018-04-26 15:16:00 -04:00
Brian Warner
5e62118e14
hush somewhat-real problems found by static analysis
...
These would have caused problems if a certain unlikely code path was taken:
mostly error-handling pathways.
2017-12-31 00:23:43 +01:00
Brian Warner
da4e7dcfbe
hush a bunch of not-really-problems caught by the lgtm.com static analyzer
...
This is all minor stuff: unreachable debug code (that should be commented-out
instead of in an 'if False:' block), unnecessary 'pass' and 'global'
statements, redundantly-initialized variables. No behavior changes. Nothing
here was actually broken, it just looked suspicious to the static analysis at
https://lgtm.com/projects/g/tahoe-lafs/tahoe-lafs/alerts/?mode=list .
2017-12-31 00:19:41 +01:00
meejah
87ad3cb8e9
fix 2880
...
- remember upload URI so we don't re-download
- account for empty files in "should_download"
- fix 'conflicted' asserts in tests
2017-12-05 12:02:16 -07:00
meejah
1b6f477549
Pull "config" handling out of Node and hide node-derivitives
...
This includes:
- refactor to create_client and _Client
- refactor to _IntroducerNode and create_introducer
2017-11-20 12:57:20 -07:00
Brian Warner
1f1afe65ec
tor_provider.get_listener(): return a real endpoint, instead of a descriptor
...
get_listener() is allowed to return either, and the Tor provider is currently
simple enough to not really need more than a basic descriptor, but have it
return a full Endpoint for use as an example of what I2P can do later.
2017-11-03 00:24:46 -07:00
Brian Warner
097abb42fa
tahoe.cfg: add tub.port=listen:i2p (and/or listen:tor)
...
This delegates the construction of the server Endpoint object to the i2p/tor
Provider, which can use the i2p/tor section of the config file to add options
which would be awkward to express as text in an endpoint descriptor string.
refs ticket:2889 (but note this merely makes room for a function to be
written that can process I2CP options, it does not actually handle such
options, so it does not close this ticket yet)
2017-11-03 00:24:46 -07:00
Brian Warner
d1fd43aa4f
tor/i2p: rename create_onion/create_dest to create_config
2017-11-03 00:24:46 -07:00
Brian Warner
8dd0a5f772
dictutil: remove unused move, subtract, del_if_present
2017-08-12 21:48:05 -07:00
Brian Warner
61b85dbf78
dictutil: remove unused ValueOrderedDict
2017-08-12 21:34:24 -07:00
Brian Warner
4f493b1a03
remove unused UtilDict
2017-08-12 21:31:47 -07:00
Brian Warner
a76d9e084f
dictutil: remove unused NumDict
2017-08-12 21:21:04 -07:00
Brian Warner
3afa38adb4
NummedObj: stop using dictutil.NumDict
2017-08-12 21:02:32 -07:00
Brian Warner
3f2f7dfb05
dictutil: fix bug in str(ValueOrderedDict), and improve test coverage
...
It looks like str() was meant to truncate the dict, but a missing i+=1 meant
that it never actually did. I also changed the format to include a clear
"..." in case we truncate it, to avoid confusion with a non-truncated dict of
the same size.
This also improves test coverage in subtract() and
NumDict.item_with_largest_value().
refs ticket:2891
2017-08-10 10:27:02 -07:00
meejah
05f48c3601
Various cleanups, fixes and improvements
...
Squashed all commits that were meejah's between
30d68fb499f300a393fa0ced5980229f4bb6efda
and
33c268ed3a8c63a809f4403e307ecc13d848b1ab
On the branch meejah:1382.markberger-rewrite-rebase.6 as
per review
2017-06-05 16:31:41 -06:00
David Stainton
e68b331bb1
Add servers of happiness hypothesis testing
...
Fix happiness test var names
Remove unused imports
Get rid of trailing whitespace
2017-06-05 16:26:46 -06:00
meejah
ef17ef2c62
fix happiness calculation
...
unit-test for happiness calculation
unused function
put old servers_of_happiness() calculation back for now
test for calculate_happiness
remove some redundant functions
2017-06-05 16:26:46 -06:00
David Stainton
42011e775d
Make correction to docstring for Tahoe2ServerSelector's _handle_existing_response
...
Add comments 10 and 8 from the servers of happiness spec
Fix bug in _filter_g3 for servers of happiness
Remove usage of HappinessUpload class
here we modifying the PeerSelector class.
we make sure to correctly calculate the happiness value
by ignoring keys who's value are None...
Remove HappinessUpload and tests
Replace helper servers_of_happiness
we replace it's previous implementation with a new
wrapper function that uses share_placement
2017-06-05 16:26:46 -06:00
Mark Berger
17cff7a176
Implements 'Servers of Happiness' algorithm for upload
...
This is Mark Berger's original commits, from ticket #1382
2017-06-05 16:26:46 -06:00
meejah
49ae2c5eb7
use @implementer instead of implements
...
Also, derive some more things from 'object'
2017-02-27 11:01:30 -07:00
str4d
998af5c26e
Pass I2P keyfile to foolscap
...
If no session management is performed, txi2p starts a process-wide session the
first time a connection (client or server) is opened; all subsequent connections
use that session and its configuration properties.
This commit ensures that the same properties are passed to both client and
server endpoints, so that the correct I2P Destination is started regardless of
whether the first connection made by Tahoe-LAFS is for a client or server.
Closes #2858 .
2017-01-17 20:12:32 -05:00
Brian Warner
5cbe580d90
improve ConnectionStatus and welcome-page display
...
* replace "last_details" with "non_connected_statuses" dict
* rename "last_connection_summary" to just "summary"
* for connected servers, show other hints in a tooltip
* for not-yet-connected servers, show all hints in a list
* build the list (in STAN) on the server side, not using IContainer
2016-12-09 18:41:38 -08:00
meejah
74209e643e
Show the connection-status of all hints until we're connected to one
2016-12-09 18:41:38 -08:00
Brian Warner
48fc14bd30
add IConnectionStatus and implementation
...
also a function to build one from a foolscap.Reconnector
2016-12-08 15:41:37 -08:00
Brian Warner
8d008967e7
tor_provider: use new Foolscap API to provide better status
2016-12-08 15:41:37 -08:00
str4d
6071c2b6f8
Implement i2p_provider and --listen=i2p
...
Closes ticket:2838
2016-10-23 20:30:01 -05:00
Lukas Pirl
1491e9fab1
added /sbin/ip as possible binary to detect local IP address
...
fixes IP detection for RHEL flavors
Signed-off-by: Lukas Pirl <git@lukas-pirl.de>
2016-10-12 12:46:12 +02:00
meejah
2ecb8171eb
flip remote/local around for Onion-service 'ports' lines
2016-10-09 01:21:52 -04:00
meejah
eb6c6bee9e
tor's output, for debugging
2016-10-09 01:21:52 -04:00
meejah
646fad69ed
ControlPort needs "unix:" prefix for Tor, and allocate SOCKSPort
2016-10-09 01:21:52 -04:00
Brian Warner
a1741ce4dc
rewrite tor_provider
...
This uses a unix-domain control port, and includes test coverage.
create_onion() displays pacifier messages, since the allocate-onion step
takes around 35 seconds
2016-10-09 01:21:47 -04:00
Brian Warner
8f9ad009bb
move torutil.py to util/tor_provider.py
2016-10-09 00:57:02 -04:00
Brian Warner
5ef04ef59e
add hashutil.permute_server_hash
...
which uses SHA1 to combine the file's storage index (known as "peer
selection index" in this context) and each server's "server permutation
seed". This is the only thing in tahoe that uses SHA1.
With this change, we stop importing sha1 from anywhere else.
2016-09-26 20:42:42 -07:00
meejah
2732c37941
Check for unknown config options
...
The list of valid sections + config-items came from
grep'ing the source for `.get_config`
2016-09-06 15:05:46 -06:00
Brian Warner
57e7f7bb7c
import/delegate-to foolscap's allocate_tcp_port
...
(instead of using a copy). Foolscap-0.12.3 fixes a problem with
allocate_tcp_port() that was causing intermittent test failures. I think
it makes more sense to use Foolscap's copy (and fixes) than to keep
re-copying it into Tahoe each time it changes.
If/when we manage to stop depending upon foolscap for server RPC, we can
re-copy this back into tahoe's source tree.
refs ticket:2795
2016-09-01 22:39:03 -07:00
meejah
87acfe968e
pyflakes warnings
2016-07-21 12:35:59 -07:00
meejah
304da362f7
remove prints
2016-07-21 12:35:59 -07:00
Daira Hopwood
504e0d02f3
refactor to use context managers
2016-07-21 12:35:59 -07:00
Daira Hopwood
b949082f8e
Change type of mtime and ctime stored in magicfolderdb to integer nanoseconds.
...
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2016-07-21 12:35:59 -07:00
meejah
a50d0e5c8b
WIP and debugging things
...
Conflicts:
src/allmydata/test/test_magic_folder.py
2016-07-21 12:35:59 -07:00
meejah
e6104cd1a2
Replace _lazy_tail with iterative loop, cleanup tests ( #2412 )
...
* uses @inlineCallbacks to turn the _lazy_tail recursion into
a "real" looking loop;
* remove the need for "immediate" vs delayed iteration of said loop;
* make it easier for the unit-tests to control the behavior of the
uploader/downloader;
* consolidates (some) setup/teardown code into the setUp and tearDown
hooks provided by unittest so unit-tests aren't doing that themselves
* re-factors some of the unit-tests to use an @inlineCallbacks style
so they're easier to follow and debug
This doesn't tackle the "how to know when our inotify events have arrived"
problem the unit-tests still have, nor does it eliminate the myriad bits
of state that get added to tests via all the MixIns.
2016-07-21 12:35:59 -07:00
David Stainton
d2ae4255c8
Add daira's implementation of make_dirs_with_absolute_mode
2016-07-21 12:35:59 -07:00
David Stainton
cd390b90e4
remove superfluous trailing comma from make_dirs_with_absolute_mode def
2016-07-21 12:35:59 -07:00
David Stainton
ba35d7262b
Add unit test and make corrections to make_dirs_with_absolute_mode
2016-07-21 12:35:59 -07:00
David Stainton
ee44732d03
Break out our chmod while loop into fielutils.py
2016-07-21 12:35:59 -07:00
Daira Hopwood
b53efdbf8b
Fix a corner case for to_filepath on Windows to make it consistent with Unix.
...
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2016-07-21 12:35:59 -07:00
Daira Hopwood
b6b638efd1
Depend on FilePath.asTextMode().
...
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2016-07-21 12:35:59 -07:00
Daira Hopwood
903c6f1d6c
Fix check for initial '-' in argv_to_abspath.
...
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2016-07-21 12:35:59 -07:00
David Stainton
16275cb8f6
Teach magic-folder join to use argv_to_abspath
...
- also we modify argv_to_abspath to through a usage error
if the name starts with a '-'
- add a test
currently the tests fail
2016-07-21 12:35:59 -07:00
Daira Hopwood
e03a1e3361
WIP.
...
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2016-07-21 12:35:59 -07:00
Daira Hopwood
7b4067850f
Unicode path fixes for drop-upload.
...
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2016-07-21 12:35:59 -07:00
Brian Warner
2c5f7ed425
factor out yamlutil.py
...
The yaml.SafeLoader.add_constructor() should probably only be done once,
and moving this all into a module gives us an opportunity to test it
directly.
2016-07-19 17:31:41 -07:00
Brian Warner
3402f75454
copy fixed allocate_tcp_port() from foolscap
...
The old copy had a bug which occasionally returns a port that was
actually in use, causing intermittent test failures (when large numbers
of ports were allocated). I finally figured out how to fix it in
Foolscap, so this is just a copy of the updated function.
closes ticket:2795
2016-07-06 19:20:32 -07:00
Daira Hopwood
dd02f31a3b
Fix missing import
2016-05-04 07:54:42 -07:00
David Stainton
3524729fb1
Add make_dirs_with_absolute_mode to fileutils
2016-05-04 07:54:42 -07:00
Daira Hopwood
50747e2ca0
Strip any long path marker in the input to flush_volume.
...
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2016-05-04 07:54:42 -07:00