Commit Graph

2281 Commits

Author SHA1 Message Date
Sergey Shepelev 5859479208 green.subprocess: keep CalledProcessError identity; Thanks to Linbing@github
https://github.com/eventlet/eventlet/issues/413
2017-07-02 12:10:29 +03:00
Sergey Shepelev 09e166bfbd convenience: SO_REUSEPORT is not available on WSL platform (Linux on Windows)
https://github.com/eventlet/eventlet/issues/380
https://github.com/eventlet/eventlet/issues/418
2017-06-02 20:43:23 +03:00
Sergey Shepelev 0ec4df6cbe convenience: skip SO_REUSEPORT for bind on random port (0)
https://github.com/eventlet/eventlet/issues/411
2017-05-12 01:32:02 +03:00
Quan Tian f72cc96a70 patcher: set locked RLocks' owner only when patching existing locks
For Python 2, patching existing locks replaces RLock._RLock__owner with current
thread ID no matter the old lock is locked or not and thus an unlocked RLock
would have a non None owner (e.g. <_RLock owner=140106584489808 count=0>).
Then if we acquire the RLock in the same thread, the method RLock.acquire would
not invoke the _RLock__block.acquire() since it treats this is a recursive
acquire by checking current thread ID. And then the following RLock.release
would invoke the _RLock__block.release method resulting in the counter of
Semaphore being improved to 2.

There should be only two states being expected for RLock:
1. owner != None and count > 0
2. owner == None and count == 0

This patch fixs it by only setting locked RLocks' owner during patching.
2017-05-10 19:32:43 -07:00
Sergey Shepelev 7f53465578 wsgi: close idle connections (also applies to websockets)
https://github.com/eventlet/eventlet/issues/188
2017-04-30 20:56:40 +03:00
Sergey Shepelev ef83055441 wsgi: push deprecated options one step
+ cosmetic/style changes
2017-04-28 22:29:36 +03:00
Sergey Shepelev 0daf3e9da4 queue: empty except was catching too much
https://github.com/eventlet/eventlet/issues/407
2017-04-26 01:20:37 +03:00
orishoshan 38fd8a7131 Issue #405: GreenSocket.accept does not notify_open (#406)
greenio: GreenSocket.accept does not notify_open

https://github.com/eventlet/eventlet/issues/405
2017-04-17 12:04:26 +03:00
Matt Bennett fa87d41375 greendns: be explicit about expecting bytes from sock.recv
https://github.com/eventlet/eventlet/pull/391
2017-04-12 12:19:01 +03:00
Sergey Shepelev 1a9b17c0f4 update monotonic 1.3 5c0322dc559bf961f7e111d97cd3ed9ab5c1a73b
https://github.com/eventlet/eventlet/issues/403
2017-04-12 00:53:15 +03:00
Sergey Shepelev 1ed0c7f556 v0.21.0 release 2017-04-06 01:31:08 +03:00
Sergey Shepelev 61fc317c22 wsgi: log_output=False was not disabling startup and accepted messages
https://stackoverflow.com/questions/43211241/eventlet-wsgi-server-logging-wont-stop
2017-04-05 23:51:23 +03:00
Sergey Shepelev de06878e5a ssl: RecursionError on Python3.6+; Thanks to justdoit0823@github and Gevent developers
https://github.com/eventlet/eventlet/issues/371
2017-04-04 17:31:22 +03:00
Yuichi Bando 654a271b82 New feature: Add zipkin tracing to eventlet
Zipkin is a trend distributed tracing framewrok developed at Twitter.
Such tracing is useful for both developers and operatos to
understand the behavior of complex distributed systems
and find performance bottlenecks.

This patch provides a WSGI application using eventlet
with tracing facility that complies with Zipkin.

Signed-off-by: Yuichi Bando <bando.yuichi@lab.ntt.co.jp>

Original commit modified for PEP-8 fixes.
https://github.com/eventlet/eventlet/pull/218
2017-03-17 22:42:27 +03:00
Feng 86607d3820 greenio: Fixed OSError: [WinError 10038] Socket operation on nonsocket
https://github.com/eventlet/eventlet/pull/397
2017-03-07 12:35:14 +03:00
Sergey Shepelev 885482b576 db_pool: proxy Connection.set_isolation_level()
https://github.com/eventlet/eventlet/issues/389
2017-02-25 23:02:19 +03:00
Sergey Shepelev 4e775e23f3 dns: EAI_NODATA was removed from RFC3493 and FreeBSD
If your code depends on EAI_NODATA, run with EVENTLET_DEPRECATED_EAI_NODATA=yes
during transition to EAI_NONAME.
Support for EAI_NODATA will be removed in future versions.

https://github.com/eventlet/eventlet/issues/393
2017-02-25 13:40:13 +03:00
Sergey Shepelev 78f2ef8a81 dns: EVENTLET_NO_GREENDNS option is back, green is still default
Sorry for negation in name, perfectionists want EVENTLET_GREEN_DNS=no
but I figured it's lesser evil than reviving same behavior under different name.

This works around https://github.com/eventlet/eventlet/issues/383
at the cost of resolving blocking other greenthreads.
2017-02-17 00:05:43 +03:00
Sergey Shepelev f92b49f77e hubs: use monotonic clock by default (bundled package); Thanks to Roman Podoliaka and Victor Stinner
eventlet/support/monotonic.py is copied by curl from specific version on Github.
Change and run bin/pull-monotonic script to update to newer version.

https://github.com/eventlet/eventlet/pull/388
https://github.com/eventlet/eventlet/pull/303
2017-02-16 12:46:24 +03:00
Sergey Shepelev 503aed1310 dns: hosts file was consulted after nameservers
This bug was introduced in v0.20.1

Now the behavior is as expected: first check hosts file, if it contains address - short return without querying nameservers.
https://github.com/eventlet/eventlet/issues/387
2017-02-16 09:43:22 +03:00
talwrii f657c22eff green.zmq: support RCVTIMEO (receive timeout)
https://github.com/eventlet/eventlet/issues/282
https://github.com/eventlet/eventlet/pull/283
2017-02-16 01:34:57 +03:00
jaimefrites 0fdb1154cb green.select: fix mark_as_closed() wrong number of args
https://github.com/eventlet/eventlet/pull/294
2017-01-18 01:03:31 +05:00
Sergey Shepelev 0fed9e52ed tests: socket_resolve_green was giving false fails
Because first GreenPool.spawn() sometimes takes 200+ms
which is a bug not related to this test.

https://github.com/eventlet/eventlet/issues/374
https://github.com/eventlet/eventlet/issues/379
2017-01-18 00:25:03 +05:00
Sergey Shepelev a41a74902e Timeout was marked deprecated along with TimeoutError by mistake
https://github.com/eventlet/eventlet/issues/378
2017-01-17 21:47:53 +05:00
Aayush Kasurde 0f81f03bf6 Modified pyopenssl example using evenlet
Signed-off-by: Aayush Kasurde <aayush.kasurde@gmail.com>
2017-01-17 12:31:59 +05:00
Sergey Shepelev f81b135ae9 green.profile: Python3 compatibility; Thanks to Artur Stawiarski
https://github.com/eventlet/eventlet/pull/259
2017-01-16 14:58:04 +05:00
Sergey Shepelev bfc253fb46 support: upgrade bundled six to 1.10 (dbfbfc818e3d) 2017-01-16 14:10:00 +05:00
Gevorg Davoian ceff431231 green.zmq: socket.{recv,send}_* signatures did not match recent upstream pyzmq
https://github.com/eventlet/eventlet/pull/344
https://github.com/eventlet/eventlet/issues/376
2017-01-13 23:10:14 +03:00
Ondřej Kobližek b20d2f2819 Fixed tests.greendns_test.TestGetaddrinfo eventlet/eventlet#373
Asserting udp for ssh introduce test failures under debian unstable
because netbase 5.4 removed ssh (22/udp).
This fix changes ssh -> domain, which better suit for test name and
allows tcp and udp simultaneously.
2017-01-12 16:04:44 +01:00
Sergey Shepelev 54be7593ab New timeout error API: .is_timeout=True on exception object
Please use eventlet.is_timeout(ex) or getattr(ex, 'is_timeout', False)
instead of searching substrings in exception message.

https://github.com/eventlet/eventlet/pull/346
2017-01-10 20:49:15 +03:00
Sergey Shepelev 7595a5a4b7 python3.6: http.client.request support chunked_encoding
https://bugs.python.org/issue12319
2017-01-05 09:06:15 +03:00
Sergey Shepelev ed79125c65 tests cleanup, CI with Python 3.6 2017-01-05 09:06:15 +03:00
Sergey Shepelev 461348f9a8 test coverage reports 2017-01-04 03:00:11 +03:00
Sergey Shepelev de6d5e3b7a v0.20.1 release 2017-01-03 04:11:45 +03:00
Sergey Shepelev b7b357189d test_import_patched_defaults bended to play with pyopenssl>=16.1.0
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
2016-12-31 20:50:04 +03:00
Sergey Shepelev 79292bd16a Type check Semaphore, GreenPool arguments; Thanks to Matthew D. Pagel
- export Event, *Semaphore in `eventlet.` top level namespace

https://github.com/eventlet/eventlet/issues/364
2016-12-23 02:10:07 +03:00
Sergey Shepelev e1bb2fee1d dns: try unqualified queries as top level
`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
2016-12-22 23:22:59 +03:00
Sergey Shepelev 3a8115c560 tests: patcher_import_patched_defaults was failing in presence of pyopenssl package
https://github.com/eventlet/eventlet/issues/362
2016-12-22 02:41:32 +03:00
Sergey Shepelev f190122026 readme: latest dev version was pointing to bitbucket 2016-12-12 01:58:51 +03:00
Sergey Shepelev 351093573e release: use twine for PyPI upload 2016-12-12 01:48:39 +03:00
Sergey Shepelev ca26b02d61 Explicit environ flag for importing eventlet.__version__ without ignoring import errors
Allows to read package version without installing dependencies.
```
import eventlet
print(eventlet.__version__)  # ok
eventlet.sleep()  # error
```
2016-12-12 01:48:39 +03:00
Sergey Shepelev f52c4d31b6 zmq: autogenerated documentation was missing 2016-12-12 01:48:39 +03:00
Sergey Shepelev 594faaca6b v0.20.0 release 2016-12-12 00:09:40 +03:00
nat-goodspeed f572fc9ae2 dagpool: PropagateError was not compatible with pickle
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
2016-12-04 22:55:58 +03:00
Whitney Young 32e2c335fb patcher: green existing locks fail (Python3)
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
2016-12-01 01:34:14 +03:00
Tim Burke f508a7e330 greendns: Return answers from /etc/hosts despite nameserver errors
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
2016-11-09 08:39:16 +03:00
Sergey Shepelev 4872be7700 tests: str/bytes typo on run_python timeout 2016-11-05 22:43:35 +03:00
Sergey Shepelev df0d300e7e websocket: update example for Blob
https://github.com/eventlet/eventlet/issues/351
2016-11-05 18:54:54 +03:00
Sergey Shepelev f9a3074a3b convenience: listen() sets SO_REUSEPORT when available; Thanks to Zhengwei Gao
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
2016-10-28 01:09:40 +03:00
David Szotten fc0e96fbc5 greenio: _recv_loop behaviour with recv_into on closed sock
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
2016-10-28 00:18:15 +03:00