Victor Shyba [Mon, 8 Jun 2015 18:18:00 +0000 (15:18 -0300)]
[bug] Makes request method respect a hard limit
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. :)
Kali Kaneko [Tue, 2 Jun 2015 21:27:42 +0000 (17:27 -0400)]
[bug] allow ipc socket types
previous regex wasn't capturing addresses of type ipc://<path>
Closes: #7089
Ivan Alejandro [Wed, 3 Jun 2015 17:42:52 +0000 (14:42 -0300)]
Merge tag '0.4.0' into develop
Tag leap.common version 0.4.0
drebs [Tue, 2 Jun 2015 18:05:19 +0000 (15:05 -0300)]
[pkg] add pyzmq and txzmq dep versions
Ruben Pollan [Tue, 2 Jun 2015 22:29:13 +0000 (00:29 +0200)]
Merge branch 'shyba/feat/twisted_http_get' into develop
Victor Shyba [Wed, 27 May 2015 20:19:13 +0000 (17:19 -0300)]
[feat] Make it optional to have a dedicated pool
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.
Victor Shyba [Wed, 27 May 2015 15:49:44 +0000 (12:49 -0300)]
[bug] Use BrowserLikePolicyForHTTPS for checking
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.
Ivan Alejandro [Mon, 1 Jun 2015 18:20:21 +0000 (15:20 -0300)]
[pkg] fold in changes
Victor Shyba [Wed, 27 May 2015 21:51:44 +0000 (18:51 -0300)]
[bug] use dict keys to iterate
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
Ruben Pollan [Mon, 18 May 2015 22:31:05 +0000 (00:31 +0200)]
[feat] add initialization of events to BaseLeapTest
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.
drebs [Wed, 4 Feb 2015 17:04:10 +0000 (15:04 -0200)]
[feat] refactor events to use ZMQ
Before this commit, protobuf and protobuf.socketrpc were used to serialize and
transmit messages between events clients. This change implements a simpler ZMQ
client/server events mechanism that uses ZMQ sockets for transmitting messages
from clients to server and to redistribute such messages to subscribed
clients.
Closes: #6359
Ruben Pollan [Tue, 26 May 2015 20:06:20 +0000 (22:06 +0200)]
[refactor] move http twisted code from soledad
Implements an HTTP client the twisted way, with a focus on pinning the
SSL certs.
* Related: #6506
Ivan Alejandro [Wed, 20 May 2015 21:39:10 +0000 (18:39 -0300)]
[bug] get certificate times as UTC, add tests
The certificate validity times were converted to local time and later on
compared with UTC time, which caused the certificate not being updated
at the right times.
Add tests to be sure this is not happenning again.
Add a joint pem file for the existing cert and key files to ease test.
- Resolves: #6994
Ivan Alejandro [Mon, 26 Jan 2015 16:40:47 +0000 (13:40 -0300)]
Fold in changes.
Ivan Alejandro [Mon, 12 Jan 2015 20:13:05 +0000 (17:13 -0300)]
Consider different possibilities for tmpdir.
In some systems the used tmp dir is like '/tmp/leap_tests-asdf' and in
others is like '/tmp/username/leap_tests-asdf'.
With this fix we protect the home dir and consider different possible
temp directories.
Ruben Pollan [Wed, 3 Dec 2014 16:40:38 +0000 (10:40 -0600)]
Add support for deferreds to memoize_method decorator
Ruben Pollan [Wed, 3 Dec 2014 15:42:45 +0000 (09:42 -0600)]
Extract the environment set up and tear down for tests
Using trial there is no setUpClass neither tearDownClass, the setting up
of the environment needs to be in an external class to be able to call
it from inhereted classes.
Ivan Alejandro [Mon, 6 Oct 2014 16:07:59 +0000 (13:07 -0300)]
Merge remote-tracking branch 'meskio/feature/cache_invalidation' into develop
Ruben Pollan [Tue, 16 Sep 2014 15:51:09 +0000 (10:51 -0500)]
Add invalidation timeout to cache
Tomás Touceda [Fri, 18 Jul 2014 13:58:41 +0000 (10:58 -0300)]
Merge branch 'release-0.3.9'
Tomás Touceda [Fri, 18 Jul 2014 13:57:43 +0000 (10:57 -0300)]
Fold in changes
Tomás Touceda [Mon, 14 Jul 2014 20:59:19 +0000 (17:59 -0300)]
Merge remote-tracking branch 'refs/remotes/kali/bug/install-pemfiles-data' into develop
kali [Mon, 14 Jul 2014 20:25:06 +0000 (15:25 -0500)]
include pemfile in the installed package
Ivan Alejandro [Thu, 10 Jul 2014 14:44:49 +0000 (11:44 -0300)]
Merge remote-tracking branch 'chiiph/feature/cacert_osx' into develop
Tomás Touceda [Thu, 10 Jul 2014 14:29:31 +0000 (11:29 -0300)]
Look for cacert.pem in the Resources dir in OSX
Tomás Touceda [Tue, 8 Jul 2014 17:18:53 +0000 (14:18 -0300)]
Merge remote-tracking branch 'refs/remotes/meskio/doc' into develop
Ruben Pollan [Fri, 4 Jul 2014 17:16:33 +0000 (12:16 -0500)]
Update documentation about events/proto
Tomás Touceda [Fri, 6 Jun 2014 16:17:27 +0000 (13:17 -0300)]
Merge branch 'release-0.3.8'
Tomás Touceda [Fri, 6 Jun 2014 16:16:58 +0000 (13:16 -0300)]
Fold in changes
Tomás Touceda [Thu, 29 May 2014 13:44:25 +0000 (10:44 -0300)]
Merge remote-tracking branch 'refs/remotes/drebs/feature/5517_add-soledad-sync-status-signals' into develop
drebs [Fri, 2 May 2014 18:18:02 +0000 (15:18 -0300)]
Add soledad sync status signals (#5517).
Kali Kaneko [Wed, 23 Apr 2014 15:49:37 +0000 (10:49 -0500)]
Merge remote-tracking branch 'chiiph-github/bug/improve_changelog_readability' into develop
Tomás Touceda [Wed, 9 Apr 2014 18:16:27 +0000 (15:16 -0300)]
Update changelog for improved readability
Tomás Touceda [Tue, 8 Apr 2014 20:02:59 +0000 (17:02 -0300)]
Merge remote-tracking branch 'refs/remotes/kali/fix-changelog-year' into develop
Kali Kaneko [Tue, 8 Apr 2014 19:59:03 +0000 (14:59 -0500)]
fix year in changelog
Tomás Touceda [Fri, 4 Apr 2014 19:19:22 +0000 (16:19 -0300)]
Merge branch 'release-0.3.7'
Tomás Touceda [Fri, 4 Apr 2014 19:18:46 +0000 (16:18 -0300)]
Fold in changes
Tomás Touceda [Tue, 18 Mar 2014 18:10:25 +0000 (15:10 -0300)]
Merge remote-tracking branch 'refs/remotes/drebs/feature/5191_add-soledad-invalid-auth-token-event' into develop
drebs [Mon, 17 Mar 2014 20:51:08 +0000 (17:51 -0300)]
Add Soledad invalid auth token event (#5191).
Tomás Touceda [Fri, 17 Jan 2014 18:52:21 +0000 (15:52 -0300)]
Merge remote-tracking branch 'refs/remotes/ivan/feature/support-str-in-charset-detection' into develop
Ivan Alejandro [Fri, 17 Jan 2014 17:40:44 +0000 (14:40 -0300)]
Support str type in email charset detection.
Tomás Touceda [Thu, 19 Dec 2013 17:35:43 +0000 (14:35 -0300)]
Merge remote-tracking branch 'refs/remotes/kali/bug/fix-memoize' into develop
Kali Kaneko [Thu, 19 Dec 2013 16:49:22 +0000 (12:49 -0400)]
add cache invalidation
Kali Kaneko [Thu, 19 Dec 2013 02:31:23 +0000 (22:31 -0400)]
Fix memoize decorator: raise instead of storing None
With this fix, we will re-raise an exception that happens
while evaluating the callable, instead of storing None as value.
Kali Kaneko [Tue, 17 Dec 2013 20:00:37 +0000 (16:00 -0400)]
Merge remote-tracking branch 'chiiph-github/bug/versioneer_windows' into develop
Tomás Touceda [Tue, 17 Dec 2013 18:47:24 +0000 (15:47 -0300)]
Use git.exe instead of git.cmd on windows since we use GitBash
Tomás Touceda [Tue, 17 Dec 2013 17:53:16 +0000 (14:53 -0300)]
Merge remote-tracking branch 'refs/remotes/kali/feature/memoize' into develop
Kali Kaneko [Tue, 17 Dec 2013 04:39:48 +0000 (00:39 -0400)]
Add a memoize_method decorator
Tomás Touceda [Fri, 6 Dec 2013 18:24:39 +0000 (15:24 -0300)]
Merge branch 'release-0.3.6'
Tomás Touceda [Fri, 6 Dec 2013 18:24:14 +0000 (15:24 -0300)]
Fold in changes
Tomás Touceda [Thu, 5 Dec 2013 15:25:51 +0000 (12:25 -0300)]
Merge remote-tracking branch 'refs/remotes/kali/bug/fix-missing-readme-while-pip' into develop
Kali Kaneko [Thu, 5 Dec 2013 15:21:33 +0000 (11:21 -0400)]
workaround for missing file during pip install
Tomás Touceda [Fri, 8 Nov 2013 11:07:43 +0000 (08:07 -0300)]
Merge remote-tracking branch 'kali/add-readme-to-manifest' into develop
Kali Kaneko [Fri, 8 Nov 2013 11:05:32 +0000 (09:05 -0200)]
add readme to manifest
Tomás Touceda [Fri, 1 Nov 2013 13:30:22 +0000 (10:30 -0300)]
Merge branch 'release-0.3.5'
Tomás Touceda [Fri, 1 Nov 2013 13:29:03 +0000 (10:29 -0300)]
Fold in changes
Ivan Alejandro [Thu, 31 Oct 2013 15:38:33 +0000 (12:38 -0300)]
Merge remote-tracking branch 'chiiph/bug/refactor_mail_utils' into develop
Tomás Touceda [Thu, 31 Oct 2013 13:17:03 +0000 (10:17 -0300)]
Move get_email_charset to this module
Tomás Touceda [Wed, 30 Oct 2013 12:58:26 +0000 (09:58 -0300)]
Merge remote-tracking branch 'kali/add-debian-freezever' into develop
Kali Kaneko [Wed, 30 Oct 2013 12:55:15 +0000 (10:55 -0200)]
add freeze_debianver command to setup.py
Tomás Touceda [Fri, 4 Oct 2013 14:19:03 +0000 (11:19 -0300)]
Merge branch 'release-0.3.4'
Tomás Touceda [Fri, 4 Oct 2013 14:18:30 +0000 (11:18 -0300)]
Fold in changes
Tomás Touceda [Mon, 30 Sep 2013 14:25:21 +0000 (11:25 -0300)]
Merge remote-tracking branch 'kali/feature/cert_bundle' into develop
Kali Kaneko [Sat, 28 Sep 2013 15:03:16 +0000 (11:03 -0400)]
add ca-bundle with ca-cert
Ivan Alejandro [Fri, 20 Sep 2013 15:11:18 +0000 (12:11 -0300)]
Merge branch 'release-0.3.3'
Ivan Alejandro [Fri, 20 Sep 2013 15:09:15 +0000 (12:09 -0300)]
Fold in changes.
Kali Kaneko [Thu, 19 Sep 2013 17:02:58 +0000 (13:02 -0400)]
Merge remote-tracking branch 'drebs-github/bug/3515_events-server-test-fails' into develop
drebs [Mon, 9 Sep 2013 14:13:54 +0000 (11:13 -0300)]
Fix events exception raising when ensuring server. Closes #3515.
Ivan Alejandro [Fri, 6 Sep 2013 18:16:06 +0000 (15:16 -0300)]
Merge branch 'release-0.3.2' into develop
Ivan Alejandro [Fri, 6 Sep 2013 18:13:49 +0000 (15:13 -0300)]
Merge branch 'release-0.3.2'
Ivan Alejandro [Fri, 6 Sep 2013 17:41:01 +0000 (14:41 -0300)]
Fold in changes.
Ivan Alejandro [Tue, 3 Sep 2013 18:09:00 +0000 (15:09 -0300)]
Merge remote-tracking branch 'kali/bug/renew-testing-certificates' into develop
Kali Kaneko [Tue, 3 Sep 2013 17:56:32 +0000 (19:56 +0200)]
fix testing certs with proper server use for localhost
Ivan Alejandro [Tue, 3 Sep 2013 16:29:06 +0000 (13:29 -0300)]
Merge remote-tracking branch 'kali/bug/renew-testing-certificates' into develop
Kali Kaneko [Tue, 3 Sep 2013 15:32:47 +0000 (17:32 +0200)]
renew the certs used for testing
Ivan Alejandro [Tue, 3 Sep 2013 14:59:02 +0000 (11:59 -0300)]
Merge remote-tracking branch 'kali/bug/fix-exception' into develop
Kali Kaneko [Tue, 3 Sep 2013 13:53:04 +0000 (15:53 +0200)]
change verbosity level in logging
Kali Kaneko [Tue, 3 Sep 2013 13:52:39 +0000 (15:52 +0200)]
cosmetic changes to imports
Kali Kaneko [Tue, 3 Sep 2013 13:51:54 +0000 (15:51 +0200)]
Fix Exception use
Tomás Touceda [Fri, 30 Aug 2013 17:45:31 +0000 (14:45 -0300)]
Merge remote-tracking branch 'ivan/bug/3606_make-base-config-test-pass' into develop
Ivan Alejandro [Thu, 29 Aug 2013 21:07:15 +0000 (18:07 -0300)]
Update baseconfig tests to use schema correctly.
Tomás Touceda [Wed, 28 Aug 2013 18:45:53 +0000 (15:45 -0300)]
Merge remote-tracking branch 'ivan/feature/3574_path-prefix-with-dirspec' into develop
Ivan Alejandro [Wed, 28 Aug 2013 16:14:09 +0000 (13:14 -0300)]
Use dirspec instead of plain xdg. Closes #3574.
Tomás Touceda [Tue, 27 Aug 2013 18:39:30 +0000 (15:39 -0300)]
Merge remote-tracking branch 'kali/hotfix/add-to-manifest'
Kali Kaneko [Tue, 27 Aug 2013 18:39:26 +0000 (20:39 +0200)]
add pkg, license and changelog to manifest
Tomás Touceda [Tue, 27 Aug 2013 18:39:16 +0000 (15:39 -0300)]
Merge remote-tracking branch 'kali/hotfix/add-to-manifest' into develop
Kali Kaneko [Tue, 27 Aug 2013 18:38:57 +0000 (20:38 +0200)]
trim license file
Tomás Touceda [Mon, 26 Aug 2013 14:22:18 +0000 (11:22 -0300)]
Merge remote-tracking branch 'kali/add-manifest' into develop
Kali Kaneko [Mon, 26 Aug 2013 13:32:15 +0000 (15:32 +0200)]
add manifest to gitignore
Tomás Touceda [Fri, 23 Aug 2013 14:46:17 +0000 (11:46 -0300)]
Merge branch 'release-0.3.1'
Tomás Touceda [Fri, 23 Aug 2013 14:45:52 +0000 (11:45 -0300)]
Fold in changes
Tomás Touceda [Fri, 23 Aug 2013 13:24:34 +0000 (10:24 -0300)]
Merge remote-tracking branch 'kali/feature/add_versioneer' into develop
Conflicts:
setup.py
Tomás Touceda [Fri, 23 Aug 2013 13:21:54 +0000 (10:21 -0300)]
Merge remote-tracking branch 'kali/bug/update_deps' into develop
Kali Kaneko [Fri, 23 Aug 2013 09:56:55 +0000 (11:56 +0200)]
Add versioneer to handle versioning here too.
Kali Kaneko [Fri, 23 Aug 2013 09:40:17 +0000 (11:40 +0200)]
Update requirements
* Use requirements.pip
* Update reqs
Kali Kaneko [Tue, 20 Aug 2013 15:49:31 +0000 (17:49 +0200)]
Merge remote-tracking branch 'chiiph-github/feature/add_unread_imap_event' into develop
Tomás Touceda [Mon, 19 Aug 2013 18:54:50 +0000 (15:54 -0300)]
Merge remote-tracking branch 'ivan/bug/add-missing-dependency' into develop
Tomás Touceda [Mon, 19 Aug 2013 18:51:54 +0000 (15:51 -0300)]
Add IMAP_UNREAD_MAIL event
Ivan Alejandro [Mon, 19 Aug 2013 17:54:19 +0000 (14:54 -0300)]
Add libssl-dev requirement for pyOpenSSL.
Tomás Touceda [Fri, 16 Aug 2013 17:08:13 +0000 (14:08 -0300)]
Merge remote-tracking branch 'kali/feature/imap_keymanager_events' into develop