| Commit message (Collapse) | Author | Age | Files | Lines |
| | |
|
| | |
|
| |
|
|
|
|
|
| |
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
|
| |
|
|
|
|
| |
- export Event, *Semaphore in `eventlet.` top level namespace
https://github.com/eventlet/eventlet/issues/364
|
| |
|
|
|
|
|
|
| |
`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
|
| |
|
|
|
|
| |
package
https://github.com/eventlet/eventlet/issues/362
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
| |
import errors
Allows to read package version without installing dependencies.
```
import eventlet
print(eventlet.__version__) # ok
eventlet.sleep() # error
```
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| | |
|
| |
|
|
| |
https://github.com/eventlet/eventlet/issues/351
|
| |
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
| |
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
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
| |
https://github.com/eventlet/eventlet/pull/347
|
| |
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
| |
Discard any '%' delimited suffix.
https://github.com/eventlet/eventlet/pull/322
|
| | |
|
| |
|
|
|
| |
Fixes installation issue when older dnspython is present in system packages
https://github.com/eventlet/eventlet/pull/341
|
| |
|
|
| |
https://github.com/eventlet/eventlet/pull/320
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
| |
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
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
| |
This patch is contributed by Smarkets Limited.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
| |
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()`.
|
| |
|
|
|
|
| |
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
|
| |
|
| |
https://github.com/eventlet/eventlet/pull/314
|
| | |
|
| | |
|
| |
|
|
|
| |
GreenSocket was (family_or_realsock=AF_INET, ...) which breaks code like socket(family=...)
https://github.com/eventlet/eventlet/issues/319
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
| |
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.
|
| |
|
|
| |
This patch is contributed by Smarkets Limited.
|
| | |
|