summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* test coverage reportscoverageSergey Shepelev2017-01-046-8/+41
|
* v0.20.1 releasev0.20.1Sergey Shepelev2017-01-035-4/+13
|
* test_import_patched_defaults bended to play with pyopenssl>=16.1.0Sergey Shepelev2016-12-319-44/+70
| | | | | | | Basically this patch replaces urllib with custom module that is guaranteed not imported before patching. https://github.com/eventlet/eventlet/issues/362 More general issue here https://github.com/eventlet/eventlet/issues/368
* Type check Semaphore, GreenPool arguments; Thanks to Matthew D. PagelSergey Shepelev2016-12-235-88/+118
| | | | | | - export Event, *Semaphore in `eventlet.` top level namespace https://github.com/eventlet/eventlet/issues/364
* dns: try unqualified queries as top levelSergey Shepelev2016-12-222-10/+65
| | | | | | | | `resolv.conf` docs say unqualified names must resolve from search (or local) domain. However, common OS `getaddrinfo()` implementations append trailing dot (e.g. `db -> db.`) and ask nameservers, as if top-level domain was queried. Eventlet now supports this behavior. https://github.com/eventlet/eventlet/issues/363
* tests: patcher_import_patched_defaults was failing in presence of pyopenssl ↵Sergey Shepelev2016-12-222-19/+27
| | | | | | package https://github.com/eventlet/eventlet/issues/362
* readme: latest dev version was pointing to bitbucketSergey Shepelev2016-12-121-5/+3
|
* release: use twine for PyPI uploadSergey Shepelev2016-12-122-7/+12
|
* Explicit environ flag for importing eventlet.__version__ without ignoring ↵Sergey Shepelev2016-12-123-24/+26
| | | | | | | | | | | import errors Allows to read package version without installing dependencies. ``` import eventlet print(eventlet.__version__) # ok eventlet.sleep() # error ```
* zmq: autogenerated documentation was missingSergey Shepelev2016-12-123-21/+8
|
* v0.20.0 releasev0.20.0Sergey Shepelev2016-12-124-2/+28
|
* dagpool: PropagateError was not compatible with picklenat-goodspeed2016-12-041-2/+9
| | | | | | | | | | | | | | Previous PropagateError.__init__() failed to call Exception.__init__() at all. Moreover, as described in https://bugs.python.org/issue1692335, setting self.args is important for an Exception subclass with nonstandard constructor arguments. When an Exception subclass sets self.args, it makes the subclass pickleable -- but instead of str(instance) returning the string passed to Exception.__init__(), it instead returns the string representation of self.args. So capture the message string, and in addition to passing it to Exception.__init__(), also override __str__() and return the same string. https://github.com/eventlet/eventlet/pull/359
* patcher: green existing locks fail (Python3)Whitney Young2016-12-011-3/+8
| | | | | | | Introduced in #309, this enumeration should be over the items of the dict in order to work correctly. https://github.com/eventlet/eventlet/pull/356 https://github.com/eventlet/eventlet/pull/309
* greendns: Return answers from /etc/hosts despite nameserver errorsTim Burke2016-11-092-3/+68
| | | | | | | | | | | | | | | | | | | When calling getaddrinfo with an unspecified address family, we: * try to get an IPv6 address for the host, first trying /etc/hosts and failing that, using any external nameserver, then * try to get an IPv4 address for it, with the same /etc/hosts -> external nameserver priority. Note that if the host can be resolved using /etc/hosts but only to one of the two address families, we still attempt to contact the external nameserver to resolve it in the other family. Previously, if this timed out or raised a DNSException other than NXDOMAIN, EAI_EAGAIN_ERROR or EAI_NODATA_ERROR would be raised even though we could resolve the host. Now, those errors will only be raised if neither attempt at resolution succeeded. https://github.com/eventlet/eventlet/pull/354
* tests: str/bytes typo on run_python timeoutSergey Shepelev2016-11-052-15/+18
|
* websocket: update example for BlobSergey Shepelev2016-11-051-5/+10
| | | | https://github.com/eventlet/eventlet/issues/351
* convenience: listen() sets SO_REUSEPORT when available; Thanks to Zhengwei GaoSergey Shepelev2016-10-282-7/+15
| | | | | | | From linux kernel >= 3.9, it supports the SO_REUSEPORT option that will allow multiple server socket to listen the same port https://github.com/eventlet/eventlet/pull/352
* greenio: _recv_loop behaviour with recv_into on closed sockDavid Szotten2016-10-282-6/+28
| | | | | | | make sure `_recv_loop` returns the correct value when `recv_meth` is of foo_into type (fills a buffer and returns number of bytes, not the data) https://github.com/eventlet/eventlet/pull/353 https://github.com/onefinestay/nameko/issues/368
* dagpool: improved documentationnat-goodspeed2016-09-282-116/+626
|
* Upgrade bundled dnspython to fix DNS resolutionJakub Stasiak2016-09-2736-117/+290
| | | | | | | | | | | | | | | | | | | | | | | The version introduced in commit [1] ([2]) has a major bug - "The DNS resolver doesn't return any records and under some circumstances throws KeyError exceptions from within dnspython" [3]. dnspython commit [4] fixes it so let's update to the latest development version. Simple script to reproduce: import eventlet eventlet.monkey_patch(all=True) import socket print(socket.gethostbyname('google.co.uk')) Before this change it'd raise an exception, after - it produces a result. [1] 52b09becacd23f384cf69ae37d70c893c43e3b13 [2] https://github.com/rthalley/dnspython/commit/188aa701a6826c607da0624e31a8c4618d0a8017 [3] https://github.com/rthalley/dnspython/issues/206 [4] https://github.com/rthalley/dnspython/commit/292995db18f16a528471250fab5cb25082b7d193
* ssl: Fix "TypeError: read() argument 2 must be read-write bytes-like object, ↵Jakub Stasiak2016-09-262-1/+43
| | | | | | | | | | | | | | | | | | | not None" The issue would manifest after performing the following steps on Python 3.5: * Create a plain socket without connecting to anything * Wrap the plain socket in an SSL socket * Call recv(n) on the SSL socket This is the only place in the code where we actually assign self._sslobj, I just modified the code to wrap the sslwrap result in SSLObject like the standard library SSLSocket.connect does[1] since Python 3.5[2]. [1] https://github.com/python/cpython/blob/9ec0aa138b18cdfb8cd98965f84bc6c383766ade/Lib/ssl.py#L1008 [2] http://bugs.python.org/issue21965
* Add DAGPool, a dependency-driven greenthread poolnat-goodspeed2016-09-254-0/+1272
| | | https://github.com/eventlet/eventlet/pull/347
* green.zmq: Support {send,recv}_{string,json,pyobj} wrappersozamiatin2016-09-011-0/+90
| | | | | | | | | | The following wrappers added: * send_string/recv_string * send_json/recv_json * send_pyobj/recv_pyobj This change is also needed to make these methods thread-safe. https://github.com/eventlet/eventlet/pull/343
* ipv6: getaddrinfo would fail with scope indexJarrod Johnson2016-08-302-0/+8
| | | | | | Discard any '%' delimited suffix. https://github.com/eventlet/eventlet/pull/322
* tests: (minor) socket.sendall() needs bytes, not stringSergey Shepelev2016-08-241-1/+1
|
* bundle dnspython in support/; resolving is always greenSergey Shepelev2016-08-24101-72/+14699
| | | | | Fixes installation issue when older dnspython is present in system packages https://github.com/eventlet/eventlet/pull/341
* wsgi: Unix socket address representation; Thanks to Samuel MerrittSergey Shepelev2016-08-202-17/+46
| | | | https://github.com/eventlet/eventlet/pull/320
* tests: new release of dnspython works for both py2/3Ondřej Nový2016-08-121-2/+2
|
* tpool: isolate internal socket from default timeout; Thanks to Alex ↵Sergey Shepelev2016-08-104-34/+52
| | | | | | | | | | | Villacís Lasso Since commit f37a87b the internal implementation of tpool uses sockets instead of pipes for communication. If, for whatever reason, the user code calls socket.setdefaulttimeout() with some nonzero value, tpool's internal socket now inherits this timeout. This causes the tpool to receive a `socket.timeout` exception where none was expected. https://github.com/eventlet/eventlet/pull/330
* tests: configurable timeout for run_python/isolatedSergey Shepelev2016-08-101-5/+7
|
* wsgi: only skip Content-Type and Content-Length headers (GH-327)Tim Burke2016-08-092-1/+18
| | | | | | | | | | | | | | | | | Previously, some HTTP headers would not be transcribed to the WSGI environment provided to applications. This could be happen if either: * the header closely mirrors another CGI variable, such as Request-Method or Path-Info, or * the header closely mirrors a previous header but prefixed with "Http-", such as Http-Foo when a Foo header has already been received. Now, only Content-Type and Content-Length will be skipped, and only because they were previously already added as CONTENT_TYPE and CONTENT_LENGTH keys. https://github.com/eventlet/eventlet/pull/327
* wsgi: 400 on blank Content-Length headers (GH-334)Tim Burke2016-08-092-1/+15
| | | | | | | | | Previously, a client sending a blank Content-Length header would trigger a `ValueError` in `Input.__init__`, preventing a response from being sent. Now, blank Content-Length headers will be treated like non-integer values, and a `400 Bad Request` response will be sent. https://github.com/eventlet/eventlet/pull/334
* ssl: Fix recv_into blocking when reading chunks of dataJakub Stasiak2016-07-112-10/+97
| | | | | | | | | | | The comment in the test should explain the issue sufficiently. Turns out that request/urllib3 use recv_into() instad of recv() on Python 3 so: Closes https://github.com/eventlet/eventlet/issues/315. This patch is contributed by Smarkets Limited.
* tests: Reduce code repetitionJakub Stasiak2016-07-111-9/+1
| | | | This patch is contributed by Smarkets Limited.
* subprocess: Fix patched functions with optional argumentssubprocessJakub Stasiak2016-07-112-1/+15
| | | | | | | | | | | | | | Since [1] we monkey patch subprocess module and it uncovered one issue - the previous patched_function implementation would produce functions with all optional arguments lacking their default values which made them required. This is an issue on Python 3 where there's at least one optional explicit argument in at least one of the functions (check_call), on Python 2 the function signature has *args and **kwargs so it wasn't an issue. This patch is contributed by Smarkets Limited. [1] 614a20462aebfe85a54ce35a7daaf1a7dbde44a7
* Provide green http without undesired side effectsJakub Stasiak2016-07-0812-42/+5773
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Eventlet patcher and the way we were patching multi-level http package don't work well[1][2]. I spent a lot of time trying to make it work but in the end every solution I came up with was breaking something else and made the patching and providing green http even more complicated - I wouldn't envy anyone having to debug it in the future. After a lot of thinking I decided having our own copy of http with the necessary modifications applied seems like the most straightforward and the most reliable solution, even considering its downsides (we need to keep it up to date ourselves and the API won't 100 % match the regular http module API on older Python 3 versions as our bundled version is the most recent one and has bug fixes and extra features implemented). The code introduces by this commit comes from the following Python commit (development branch): commit 6251d66ba9a692d3adf5d2e6818b29ac44130787 Author: Xavier de Gaye <xdegaye@users.sourceforge.net> Date: 2016-06-15 11:35:29 +0200 Issue #26862: SYS_getdents64 does not need to be defined on android API 21. Changes to the original http package code involve: * Removing unnecessary import(s) * Replacing some regular imports with eventlet.green imports * Replacing fullmatch()[3] usage with match() so we stay Python 3.3 compatible I left urllib.parse imports intact as nothing there performs IO. Green httplib module is also modified because it used to import http.client using patcher which was breaking things the same way. A new dependency, enum-compat, is added to ensure that the enum module is present on Python 3.3 (the http package code comes the latest Python development branch and uses enum). [1] https://github.com/getsentry/raven-python/issues/703 [2] https://github.com/eventlet/eventlet/issues/316 [3] https://docs.python.org/3/library/re.html#re.fullmatch This patch is contributed by Smarkets Limited.
* greenio: makefile related pypy socket ref countingYashwardhan Singh2016-07-071-0/+5
| | | | | | | On PyPy `[Errno 9] Bad file descriptor` because `makefile dup/_drop` dance leaves socket with PyPy special reference counter zero, so it may be garbage collected. https://github.com/eventlet/eventlet/issues/318 (@temoto) maybe proper fix is to remove `dup` in `makefile()`.
* websocket: support Gunicorn environ['gunicorn.socket']pull-331catroot2016-07-062-2/+61
| | | | | | Now you able to upgrade connection with eventlet.websocket.WebSocketsWSGI when app runs under `gunicorn application:app -k eventlet` https://github.com/eventlet/eventlet/pull/331
* greenio: only trampoline when we blockDavid Szotten2016-07-013-2/+49
| | | https://github.com/eventlet/eventlet/pull/314
* tests: clean out unittest.main()Sergey Shepelev2016-06-016-44/+11
|
* hub: Python2 _obsolete() was copying dicts, use six.iteritemsSergey Shepelev2016-05-241-3/+3
|
* socket: family kwarg name compatibilityissue-319Sergey Shepelev2016-05-242-4/+10
| | | | | GreenSocket was (family_or_realsock=AF_INET, ...) which breaks code like socket(family=...) https://github.com/eventlet/eventlet/issues/319
* release script: doc build was breaking pypi uploadSergey Shepelev2016-05-241-0/+1
|
* Remove select.poll and improve subprocessJakub Stasiak2016-05-206-16/+37
| | | | | | | | | | | | | | | | | | | | | | | | green select: Delete unpatched poll once again https://github.com/eventlet/eventlet/pull/317 Previously attempted in f63165c, had to be reverted in 8ea9df6 because subprocess was failing after monkey patching. Turns out we haven't been monkey patching the subprocess module at all, this patch adds that in order for the tests to pass. This part is changed because otherwise Popen class instantiation would cause an infinite loop when monkey patching is applied: -subprocess_orig = __import__("subprocess") +subprocess_orig = patcher.original("subprocess") This patch is contributed by Smarkets Limited. * green subprocess: Provide green check_output This patch is contributed by Smarkets Limited.
* Add Python 3.5 to test envs; Thanks to Piët DelportSergey Shepelev2016-05-183-3/+9
|
* greendns tests: Work around patcher/green package weirdnessJakub Stasiak2016-05-181-6/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The issue can be demonstrated by running the following piece of code: # t.py from __future__ import print_function from eventlet.support import greendns import sys if sys.argv[1] == 'yes': import dns.resolver print(sys.argv[1], issubclass(greendns.HostsAnswer, greendns.dns.resolver.Answer)) The results: # Python 2.7.11 % python t.py yes yes False % python t.py no no True # Python 3.5.1 % python t.py yes yes False % python t.py no no True Interestingly enough this particular test issue was only affecting Python 3.5+ before 861d684. Why? * This issue appears to be caused by importing green version of a package being followed by importing a non-green version of the same package * When we run tests using nose it first imports the main tests module (tests/__init__.py) which imports eventlet, that imports eventlet.convenience and that then imports eventlet.green.sockt. * Before 861d684 on Python < 3.5 the eventlet.green.socket import mentioned above would fail to import greendns (because of an import cycle) so when running those tests greendns was only being correctly imported *after* the regular dns * Since 861d684 (or on Python 3.5+) the green socket module correctly imports greendns which means that when the regular dns subpackages are being imported in this test file greendns is already imported and the patching issue demonstrated by the code above is in effect The patching/greening weirdness is reported[1] now. Fixes https://github.com/eventlet/eventlet/issues/267 This patch is contributed by Smarkets Limited. [1] https://github.com/eventlet/eventlet/issues/316
* socket: Actually provide non-blocking DNS methodsJakub Stasiak2016-05-183-5/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The green socket module seemed to have only blocking DNS resolution methods even with dnspython installed which is inconsistent with the documentation. This patch has a few consequences: * an import cycle is eliminated * if an import cycle reappears here it'll be visible Note: eliminating the import cycle revealed an issue related to monkey patching and the way we perform greendns tests (the test failures were already present on Python 3.5[1] as that version has some import cycle handling changes). The failures look like this: ====================================================================== FAIL: test_query_ans_types (tests.greendns_test.TestHostsResolver) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Users/kuba/projects/eventlet/tests/greendns_test.py", line 97, in test_query_ans_types assert isinstance(ans, greendns.dns.resolver.Answer) AssertionError ====================================================================== FAIL: test_query_unknown_no_raise (tests.greendns_test.TestHostsResolver) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Users/kuba/projects/eventlet/tests/greendns_test.py", line 129, in test_query_unknown_no_raise assert isinstance(ans, greendns.dns.resolver.Answer) AssertionError This issue will be addressed in a separate commit. This patch is contributed by Smarkets Limited. [1] https://github.com/eventlet/eventlet/issues/267
* greendns: Reduce code redundancyJakub Stasiak2016-05-181-15/+13
| | | | | | | | This list of module dependencies are already present in the code three times and I intend to make a change that will require the same dependencies reused even more. This patch is contributed by Smarkets Limited.
* tests: Make greendns tests less repetitiveJakub Stasiak2016-05-181-80/+1
| | | | This patch is contributed by Smarkets Limited.
* v0.19.0 releasev0.19.0Sergey Shepelev2016-05-024-2/+14
|