Age | Commit message (Collapse) | Author |
|
|
|
This commit removes the dep introduced in 5e12233 by just importing some tiny
bit of dirspec code.
The previous change was introduced because:
* pyxdg did not account for Mac OS specifics, i.e. using ~/Library/
directory structure instead of .config (see:
https://leap.se/code/issues/3574).
* dirspec does the correct thing for xdg on Mac OS.
* u1db depends on dirspec anyway.
The problem is that dirspec is not maintained and published on pypi, what
forces us to download it from an URL and add exceptions to be able to pip
install it.
As we are removing dependence on u1db on other modules, we can also remove it
here. To workaround the Mac OS problem, we just add some code from dirspec to
ensure we get the correct directory on Mac OS.
|
|
|
|
|
|
|
|
|
|
otherwise the context.term() does not return
|
|
ad-hoc register/trigger mechanism used for service composition.
to be used in bitmask.core and bitmask.bonafide in the first place.
|
|
|
|
|
|
We don't really need a thread to make use of the ZAP authenticator.
Document bug fix after authenticator thread is gone
|
|
1. refactor the zmq_connect/bind methods to use the txzmq addEndpoints
mechanism, which cleans up the code a bit. it uses the underlying
bindOrConnect method.
2. wrap the addEndpoints call in a helper function that ensures that
doRead is called afterward.
I'm not fully comfortable with us still using the AuthenticatorThread, I
believe we could go witha txzmq-based authenticator for curve.
|
|
|
|
Always use tcp channels and disable curve encryption on the zmq
connections.
- Closes: #7899, #7239
- Related: #7919
|
|
Reorder blocks of events, and comment about which user-specific info
it's being emitted with them.
|
|
|
|
|
|
- See https://leap.se/code/issues/7536
- Actual root cause not identified yet
|
|
|
|
-Resolves: #7524
|
|
Since we need to write a file we have to consider whether we are
running in 'standalone' mode or not to use the right path prefix.
- Related: #7512
|
|
|
|
- Breaks tests in dependent repos like soledad otherwise,
because server.key could not be found
|
|
to make simpler the import of the tx client
- Related: #7274
|
|
|
|
|
|
In case the http client loses connection, it has to clear
it's timeout or the reactor will be left in a dirty state
Fixing this solves a problem with some of the tests in Soledad
that were trying to run on a dirty reactor
|
|
Since register and unregister cant be used without full zmq initialization,
it should make sense to also check flag for them.
|
|
Checking was done inside of emit method. Doing on emit function at
a module level makes it cleaner with less lines inside of check.
|
|
Test client will only start with flag set to True.
Change EventsGenericClientTestCase to set the flag on the
first line of setUp.
|
|
Change EventsClientThread behavior so it won't start anymore if
the events flag is set to False
|
|
|
|
|
|
|
|
The events tests check for register and emit signals,
but because the flag set_events_enabled was False by
default in the tests, no signals were being emitted.
I added the flag to the setUp and tearDown of the tests,
they are still very slow but at least they are passing now
|
|
Two test cases were broken and were implemented here:
The first was that HTTPClient should share the connection between
clients if a pool was not passed explicitly. If you initialize an
HTTPClient without a pool, it will reuse a pool created on the class.
The second was that you should be able to pass to the HTTPCLient a pool
on initialization. Added that possibility and fixed the tests accordingly
|
|
|
|
|
|
The events ioloop client is not completelly thread safe, so we have to use
reactor.callFromThread whenever we need it to be thread-safe. Examples of this
behaviour are the events ioloop client tests that depend on the firing of
deferreds, which are not thread safe. This commit fixes tese tests.
|
|
The connectTimeout parameter of twisted.web.client.Agent only acts on the
connection setup, and the Agent will wait forever for incoming data after the
connection has been established.
This commit adds a timeout for the connection, and will cancel the deferred if
the result has not been received after a certain number of seconds.
|
|
The ability to close cached connections is needed in order to have a clean
reactor when the program ends.
|
|
this will be used to allow the unittests to disable the events
framework. this way, emit() will become a passthrough.
note that, until now, the basetest class is making use of the threaded
version of the client, which launches a zmq tornado-based ioloop. this
is wrong, and will have to be addressed in a future commit. we'll have
to make use of the global EVENTS_ENABLED flag in the txclient version
when those changes are made.
Related: #7259
Relases: 0.4.2
|
|
this, together with the events server registration, was breaking the
events signalling on the client whenever it used ipc:// sockets.
|
|
the idea is that we'll be able to use the threaded version of the
client, which makes use of the tornado ioloop, in a non-twisted module,
like the main graphical client probably will be in the near future.
|
|
|
|
|
|
|
|
to be used in post-sync hooks.
Related: #6996
Releases: 0.4.1
|
|
The emission of an event was being logged twice, and the second time was
logging the pickled content of the event. This pickled content contained line
breaks and other things that caused strange output on the client log.
This commit removes the second loggin of the event pickled content.
Closes #7130.
|
|
Altough we specify maxPersistentPerHost, Twisted won't stop opening
connections after that. This limit is used just to keep the size of
persistent connections pool under control. Additional connections will be
made as non persistent. So, if we ask 10000 requests, it will open 10000
connections immediately and leave 10 open after all finished.
For checking this behavior, see getConnection from Twisted source:
http://twistedmatrix.com/trac/browser/tags/releases/twisted-15.2.1/twisted/web/client.py#L1203
I tested this by using http_target from soledad without a local database to
download all encrypted docs from one account with 1700 of them. The
program just hangs and crashes with 1000+ connections and "Too many
files open" warnings.
With this fix, it was able to download normally, respecting the
maxPersistentPerHost as a limiter. :)
|