summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2015-09-09[docs] fix broken pypi badgeKali Kaneko
2015-08-28[style] pep8 fixesKali Kaneko
2015-08-26[pkg] fold in changes0.4.2Ivan Alejandro
2015-08-17[tests] add pep8/flake8 ignoresKali Kaneko
2015-08-17[style] pep8 fixKali Kaneko
2015-08-17[feature] allow passing callback to http clientdrebs
2015-08-05[feat] WHEELHOUSE can be a url + --use-leap-wheelsParménides GV
--use-leap-wheels sets --trusted-host (remove it when we have a proper cert) and WHEELHOUSE to https://ftp.lizard.leap.se Until we get ftp.lizard cname, use lizard as the wheels server.
2015-08-04[bug] HTTP timeout was not being cleared on abortBruno Wagner
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
2015-08-03[tests] ignore trial temp folderKali Kaneko
2015-08-03[feat] use wheels to install dependenciesParménides GV
generate_wheels uses $WHEELHOUSE to generate and store the wheels for requirements.pip and requirements-testing.pip (if it exists). pip_install_requirements.sh installs requirements.pip from them if possible (if not, then it fetches them from pypi) or, if passed the --testing flag, it installs requirements-testing.pip.
2015-07-29[docs] remove ref to protobuf from READMEKali Kaneko
we stopped using protobuf after the events submodule refactor
2015-07-29[bug] register and unregister controlled by flagVictor Shyba
Since register and unregister cant be used without full zmq initialization, it should make sense to also check flag for them.
2015-07-29[refactor] Extract flags check to callerVictor Shyba
Checking was done inside of emit method. Doing on emit function at a module level makes it cleaner with less lines inside of check.
2015-07-28[test] set flag before starting clientVictor Shyba
Test client will only start with flag set to True. Change EventsGenericClientTestCase to set the flag on the first line of setUp.
2015-07-28[bug] Consider events flag when ensuring clientVictor Shyba
Change EventsClientThread behavior so it won't start anymore if the events flag is set to False
2015-07-28[style] more pep8 cleanupKali Kaneko
2015-07-28[tests] add pep8 to requirements-testingKali Kaneko
2015-07-27[pkg] add AUTHORS file + one-liner to generate itKali Kaneko
2015-07-27[pkg] add script to install base requirementsKali Kaneko
- update pip - install base reqs, with insecure flags for dirspec. fuck canonical.
2015-07-23[tests] fix initialization of basetest caseKali Kaneko
2015-07-23[style] fixed pep8 warnings on http and test eventsBruno Wagner
2015-07-23[tests] fixed events testsBruno Wagner
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
2015-07-23[tests] implemented http feature according to testBruno Wagner
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
2015-07-23[tests] set environment for certs testBruno Wagner
2015-07-23[tests] added setuptools_trial so the tests run using python setup.py testBruno Wagner
2015-07-23[style] fixed extra requires typoBruno Wagner
2015-07-23[style] Fixed pep8 warningsBruno Wagner
2015-07-23[bug] fix events ioloop client testsdrebs
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.
2015-07-22[bug] add http request timeoutdrebs
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.
2015-07-22[feat] add close method for http agentdrebs
The ability to close cached connections is needed in order to have a clean reactor when the program ends.
2015-07-21[feature] add global flag for disabling the events frameworkKali Kaneko
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
2015-07-20[bug] do not add a port string to non-tcp addressesKali Kaneko
this, together with the events server registration, was breaking the events signalling on the client whenever it used ipc:// sockets.
2015-07-20[refactor] remove use of reactor in threaded version of events clientKali Kaneko
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.
2015-07-10[pkg] fold in changes0.4.1Ivan Alejandro
2015-06-26[bug] run callback from thread in events clientdrebs
2015-06-26[bug] allow passing ':0' as port in events addressdrebs
2015-06-15Merge branch 'feature/post-sync-hooks' into developRuben Pollan
2015-06-15[bug] catch missing section header errorKali Kaneko
2015-06-15[feature] utility collect_pluginsKali Kaneko
to be used in post-sync hooks. Related: #6996 Releases: 0.4.1
2015-06-11[bug] remove extraneous data from events logsdrebs
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.
2015-06-08[bug] Makes request method respect a hard limitVictor Shyba
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. :)
2015-06-03[bug] allow ipc socket typesKali Kaneko
previous regex wasn't capturing addresses of type ipc://<path> Closes: #7089
2015-06-03Merge tag '0.4.0' into developIvan Alejandro
Tag leap.common version 0.4.0
2015-06-02[pkg] add pyzmq and txzmq dep versionsdrebs
2015-06-03Merge branch 'shyba/feat/twisted_http_get' into developRuben Pollan
2015-06-02[feat] Make it optional to have a dedicated poolVictor Shyba
As @meskio pointed out, some cases could need a dedicated pool with different parameters. This is a suggested implementation where the pool is reused by default, creating a dedicated one just if needed/asked. This way we ensure that resources are under control and special cases are still handled.
2015-06-02[bug] Use BrowserLikePolicyForHTTPS for checkingVictor Shyba
While testing the way that its implemented now, I found out that no check is being made on certificate attributes against the host. I found this simple way of creating a BrowserLikePolicyForHTTPS using a self signed cert and it worked on my test. I used test_https from Soledad for checking this (which we are fixing on another branch). Also, we don't want to depend on twisted for other things than leap.common.http.
2015-06-01[pkg] fold in changes0.4.0Ivan Alejandro
2015-05-28[bug] use dict keys to iterateVictor Shyba
We ran into a RuntimeError yesterday on this line, the callback can modify this dict and make the iteration raise an error. Using keys method to iterate is safer. See http://stackoverflow.com/questions/11941817/python-runtimeerror-dictionary-changed-size-during-iteration-how-to-avoid-th/11941855#11941855
2015-05-27[feat] add initialization of events to BaseLeapTestRuben Pollan
This is needed to get the tests working on environments where zmq was not initalizated. The environment variable XDG_CONFIG_HOME is set to get the leap configuration in the temp folder.