Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: eventlet/eventlet
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.24.1
Choose a base ref
...
head repository: eventlet/eventlet
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v0.31.0
Choose a head ref
Loading
Showing with 1,910 additions and 672 deletions.
  1. +11 −12 .travis.yml
  2. +7 −1 AUTHORS
  3. +110 −0 CONTRIBUTING.md
  4. +93 −0 NEWS
  5. +11 −4 README.rst
  6. +19 −0 SECURITY.md
  7. +184 −3 benchmarks/__init__.py
  8. +7 −0 benchmarks/__main__.py
  9. +20 −29 benchmarks/hub_timers.py
  10. +50 −57 benchmarks/spawn.py
  11. +0 −101 benchmarks/spawn_plot.py
  12. +79 −0 bin/bench-compare
  13. +3 −3 doc/design_patterns.rst
  14. +8 −2 doc/index.rst
  15. +1 −1 doc/modules/backdoor.rst
  16. +15 −37 doc/real_index.html
  17. +2 −2 doc/ssl.rst
  18. +13 −3 eventlet/__init__.py
  19. +16 −8 eventlet/backdoor.py
  20. +1 −1 eventlet/db_pool.py
  21. +6 −1 eventlet/green/OpenSSL/__init__.py
  22. +12 −8 eventlet/green/builtin.py
  23. +13 −3 eventlet/green/http/client.py
  24. +9 −0 eventlet/green/os.py
  25. +77 −24 eventlet/green/ssl.py
  26. +6 −3 eventlet/greenio/base.py
  27. +4 −1 eventlet/greenio/py2.py
  28. +23 −17 eventlet/greenpool.py
  29. +8 −5 eventlet/greenthread.py
  30. +49 −54 eventlet/hubs/__init__.py
  31. +14 −25 eventlet/hubs/epolls.py
  32. +32 −16 eventlet/hubs/hub.py
  33. +16 −18 eventlet/hubs/kqueue.py
  34. +20 −18 eventlet/hubs/poll.py
  35. +15 −1 eventlet/hubs/pyevent.py
  36. +21 −17 eventlet/hubs/selects.py
  37. +3 −3 eventlet/hubs/timer.py
  38. +57 −6 eventlet/patcher.py
  39. +5 −0 eventlet/semaphore.py
  40. +2 −0 eventlet/support/greendns.py
  41. +4 −1 eventlet/tpool.py
  42. +30 −7 eventlet/websocket.py
  43. +59 −33 eventlet/wsgi.py
  44. +2 −2 examples/feedscraper-testclient.py
  45. +2 −2 examples/producer_consumer.py
  46. +2 −2 examples/recursive_crawler.py
  47. +2 −2 examples/webcrawler.py
  48. +3 −4 setup.py
  49. +6 −3 tests/__init__.py
  50. +16 −0 tests/backdoor_test.py
  51. +12 −2 tests/debug_test.py
  52. +25 −0 tests/greendns_test.py
  53. +10 −4 tests/greenio_test.py
  54. +6 −0 tests/greenpool_test.py
  55. +52 −51 tests/hub_test.py
  56. +3 −2 tests/isolated/env_tpool_zero.py
  57. +28 −0 tests/isolated/hub_kqueue_unsupported.py
  58. +13 −0 tests/isolated/hub_use_hub_class.py
  59. +14 −0 tests/isolated/patcher_builtin.py
  60. +59 −0 tests/isolated/patcher_fork_after_monkey_patch.py
  61. +10 −0 tests/isolated/patcher_open_kwargs.py
  62. +18 −0 tests/isolated/patcher_threadpoolexecutor.py
  63. 0 tests/isolated/test_sub_module_in_import_patched/__init__.py
  64. +7 −0 tests/isolated/test_sub_module_in_import_patched/sample_main_module/__init__.py
  65. +10 −0 tests/isolated/test_sub_module_in_import_patched/sample_main_module/sample_sub_module/__init__.py
  66. +10 −0 tests/isolated/test_sub_module_in_import_patched/test.py
  67. +0 −1 tests/openssl_test.py
  68. +11 −0 tests/os_test.py
  69. +20 −0 tests/patcher_test.py
  70. +21 −0 tests/semaphore_test.py
  71. +8 −0 tests/socket_test.py
  72. +68 −0 tests/ssl_test.py
  73. +5 −4 tests/test__socket_errors.py
  74. +21 −13 tests/test_server.crt
  75. +28 −15 tests/test_server.key
  76. +1 −1 tests/tpool_test.py
  77. +58 −1 tests/websocket_new_test.py
  78. +32 −0 tests/websocket_test.py
  79. +186 −34 tests/wsgi_test.py
  80. +6 −4 tox.ini
23 changes: 11 additions & 12 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
sudo: required
os: linux
dist: xenial
language: python

matrix:
jobs:
fast_finish: true
include:
- {python: 3.6, env: TOXENV=pep8}
@@ -10,10 +11,6 @@ matrix:
- {python: 2.7, env: TOXENV=py27-poll}
- {python: 2.7, env: TOXENV=py27-selects}

- {python: 3.4, env: TOXENV=py34-epolls}
- {python: 3.4, env: TOXENV=py34-poll}
- {python: 3.4, env: TOXENV=py34-selects}

- {python: 3.5, env: TOXENV=py35-epolls}
- {python: 3.5, env: TOXENV=py35-poll}
- {python: 3.5, env: TOXENV=py35-selects}
@@ -22,15 +19,20 @@ matrix:
- {python: 3.6, env: TOXENV=py36-poll}
- {python: 3.6, env: TOXENV=py36-selects}

- {python: 3.7-dev, env: TOXENV=py37-epolls}
- {python: 3.7-dev, env: TOXENV=py37-poll}
- {python: 3.7-dev, env: TOXENV=py37-selects}
- {python: 3.7, env: TOXENV=py37-epolls}
- {python: 3.7, env: TOXENV=py37-poll}
- {python: 3.7, env: TOXENV=py37-selects}

- {python: 3.8, env: TOXENV=py38-epolls}
- {python: 3.8, env: TOXENV=py38-poll}
- {python: 3.8, env: TOXENV=py38-selects}

- {python: pypy, env: TOXENV=pypy-epolls}
- {python: pypy, env: TOXENV=pypy-poll}
- {python: pypy, env: TOXENV=pypy-selects}

- {python: 3.6, env: TOXENV=ipv6}
- {python: 3.8, env: TOXENV=py38-openssl}
allow_failures:
- python: 3.7-dev
- python: pypy
@@ -64,6 +66,3 @@ script:
after_failure:
- for X in .tox/$TOXENV/log/*; do echo "$X\n"; cat "$X"; echo "\n\n"; done
- echo "pip.log\n"; cat $HOME/.pip/pip.log

notifications:
slack: eventlet-net:OYrQ1JE3hdTD78yQY1yZJnnc
8 changes: 7 additions & 1 deletion AUTHORS
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
Maintainer (i.e., Who To Hassle If You Find Bugs)
-------------------------------------------------
Sergey Shepelev, temoto on Freenode, temotor@gmail.com
Jakub Stasiak
Nat Goodspeed

The current maintainer(s) are volunteers with unrelated jobs.
We can only pay sporadic attention to responding to your issue and pull request submissions.
Your patience is greatly appreciated!

Original Authors
----------------
@@ -166,3 +171,4 @@ Thanks To
* Matt Bennett
* Ralf Haferkamp
* Jake Tesler
* Aayush Kasurde
110 changes: 110 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
# Contributing to Eventlet

Please take a moment to review this document in order to make the contribution
process easy and effective for everyone involved.

Following these guidelines helps to communicate that you respect the time
of the developers managing and developing this open source project. In return,
they should reciprocate that respect in addressing your issue or assessing
patches and features.


## Using the issue tracker

The [issue tracker](https://github.com/eventlet/eventlet/issues) is
the preferred channel for [Discussion](#discussion), [bug reports](#bugs), [features requests](#features)
and [submitting pull requests](#pull-requests).

<a name="discussion"></a>
## Discussion

- There's an IRC channel dedicated to Eventlet: `#eventlet` on freenode. It's a pretty chill place to hang out!
- We have Eventlet Google+ Community. Join us, +1, share your ideas, report bugs, find new friends or even new job!

<a name="bugs"></a>
## Bug reports

A bug is a _demonstrable problem_ that is caused by the code in the repository.
Good bug reports are extremely helpful - thank you!

You may report bugs via GitHub https://github.com/eventlet/eventlet/issues/new

Guidelines for bug reports:

1. **Before filing issue try to search for solution on the web** &mdash; There are lots of good resources for Eventlet and its related information which can be helpful in resolving issues and get things done.


2. **Use the GitHub issue search** &mdash; check if the issue has already been
reported.

3. **Check if the issue has been fixed** &mdash; try to reproduce it using the
latest `master` or development branch in the repository.

4. Please be sure to report bugs [as effectively as possible](http://www.chiark.greenend.org.uk/~sgtatham/bugs.html),
to ensure that we understand and act on them quickly.

A good bug report shouldn't leave others needing to chase you up for more information.

Please try to be as detailed as possible in your report.


- What is your environment?
- Which is eventlet version your using?
- `uname -a`
- `python -V`
- `pip freeze`
- What steps will reproduce the issue?
- What would you expect to be the outcome?

All these details will help people to fix any potential bugs.

Example of good bug report::

> Short description in title of issue like `HTTPS/SSL failure when using requests library on Python 3.4`
>
> `uname -a` output
>
> `python -V` output
>
> Steps to reproduce issue
<a name="features"></a>
## Feature requests

Feature requests are welcome. But take a moment to find out whether your idea
fits with the scope and aims of the project. It's up to *you* to make a strong
case to convince the project's developers of the merits of this feature. Please
provide as much detail and context as possible.


<a name="pull-requests"></a>
## Pull requests

Good pull requests - patches, improvements, new features - are a fantastic help.
They should remain focused in scope and avoid containing unrelated commits.

**Please ask first** before embarking on any significant pull request (e.g.
implementing features, re-factoring code), otherwise you risk spending a lot of
time working on something that the project's developers might not want to merge
into the project.

Please adhere to the coding conventions used throughout a project (indentation,
accurate comments, etc.) and any other requirements such as

- Test is required
- One commit is strongly preferred, except for very big changes
- Commit message should follow the following formula:

>subsystem: description of why the change is useful
>
>optional details
>
>links to related issues or websites
The why part is very important. Diff already says what you have done. But nobody knows why.
Feel free to append yourself into AUTHORS file, sections Thanks To or Contributors.

If you don't like these rules, raw patches are more than welcome!

**IMPORTANT**: By submitting a patch, you agree to allow the project owner to
license your work under the same license as that used by the project.
93 changes: 93 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
@@ -1,3 +1,96 @@
0.31.0
======
* IMPORTANT: websocket: Limit maximum uncompressed frame length to 8MiB https://github.com/eventlet/eventlet/security/advisories/GHSA-9p9m-jm8w-94p2

0.30.3
======
* wsgi: websocket ALREADY_HANDLED flag on corolocal
* green.ssl: Set suppress_ragged_eofs default based on SSLSocket defaults
* greenio: socket.connect_ex returned None instead of 0 on success
* Use _imp instead of deprecated imp

0.30.2
======
* greendns: patch ssl to fix RecursionError on SSLContext.options.__set__ https://github.com/eventlet/eventlet/issues/677

0.30.1
======
* patcher: built-in open() did not accept kwargs https://github.com/eventlet/eventlet/issues/683

0.30.0
======
* pyopenssl tsafe module was deprecated and removed in v20.0.0
* deprecate pyevent hub
* Deprecate CPython 2.7 and 3.4 support
* py39: Add _at_fork_reinit method to Semaphores

0.29.1
======
patcher: [py27] recursion error in pytest/python2.7 installing register_at_fork https://github.com/eventlet/eventlet/issues/660
patcher: monkey_patch(builtins=True) failed on py3 because `file` class is gone https://github.com/eventlet/eventlet/issues/541
don't crash on PyPy 7.0.0 https://github.com/eventlet/eventlet/pull/547
Only install monotonic on python2 https://github.com/eventlet/eventlet/pull/583

0.29.0
======
* ssl: context wrapped listener fails accept() https://github.com/eventlet/eventlet/issues/651

0.28.1
======
* Sorry, Eventlet was broken on Windows for versions 0.27-0.28
patcher: no os.register_at_fork on Windows (#654)
* Clean up TypeError in __del__

0.28.0
======
* Always remove the right listener from the hub https://github.com/eventlet/eventlet/pull/645

0.27.0
======
* patcher: Clean up threading book-keeping at fork when monkey-patched
* backdoor: handle disconnects better

0.26.1
======
* pin dnspython <2.0.0 https://github.com/eventlet/eventlet/issues/619

0.26.0
======
* Fix compatibility with SSLContext usage >= Python 3.7
* wsgi: Fix header capitalization on py3
* Fix #508: Py37 Deadlock ThreadPoolExecutor (#598)
* drop Python 3.4 support
* Fix misc SyntaxWarning's under Python 3.8
* Remove unnecessary assignment in _recv_loop (#601)

0.25.2
======
* green.ssl: redundant set_nonblocking() caused SSLWantReadError

0.25.1
======
* wsgi (tests): Stop using deprecated cgi.parse_qs() to support Python 3.8; Thanks to Miro Hrončok
* os: Add workaround to `open` for pathlib on py 3.7; Thanks to David Szotten

0.25.0
======
* wsgi: Only send 100 Continue response if no response has been sent yet; Thanks to Tim Burke
* wsgi: Return 400 on negative Content-Length request headers; Thanks to Tim Burke
* Make a GreenPile with no spawn()s an empty sequence; Thanks to nat-goodspeed
* wsgi: fix Input.readlines when dealing with chunked input; Thanks to Tim Burke
* wsgi: fix Input.readline on Python 3; Thanks to Tim Burke
* wsgi: Stop replacing invalid UTF-8 on py3; Thanks to Tim Burke
* ssl: Fix compatibility with Python 3.7 ssl.SSLSocket; Thanks to Junyi
* reimport submodule as well in patcher.inject; Thanks to Junyi
* use Python 2 compatible syntax for keyword-only args; Thanks to nat-goodspeed
* wsgi: Catch and swallow IOErrors during discard(); Thanks to Tim Burke
* Fix for Python 3.7; Thanks to Marcel Plch
* Fix race that could cause using epolls as default hub even when platform does not support it; Thanks to Sergey Shepelev
* wsgi: make Expect 100-continue field-value case-insensitive; Thanks to Julien Kasarherou
* greenthread: optimize _exit_funcs getattr/del dance; Thanks to Alex Kashirin
* New benchmarks runner; Thanks to Sergey Shepelev
* ssl: fix connect to use monotonic clock for timeout; Thanks to Sergey Shepelev

0.24.1
======
* greendns: don't contact nameservers if one entry is returned from hosts file; Thanks to Daniel Alvarez
15 changes: 11 additions & 4 deletions README.rst
Original file line number Diff line number Diff line change
@@ -16,11 +16,11 @@ Quick Example

Here's something you can try right on the command line::

% python
% python3
>>> import eventlet
>>> from eventlet.green import urllib2
>>> gt = eventlet.spawn(urllib2.urlopen, 'http://eventlet.net')
>>> gt2 = eventlet.spawn(urllib2.urlopen, 'http://secondlife.com')
>>> from eventlet.green.urllib.request import urlopen
>>> gt = eventlet.spawn(urlopen, 'http://eventlet.net')
>>> gt2 = eventlet.spawn(urlopen, 'http://secondlife.com')
>>> gt2.wait()
>>> gt.wait()

@@ -62,10 +62,17 @@ If you have a project that uses Eventlet with Twisted, your options are:

Apologies for any inconvenience.

Supported Python versions
=========================

Currently CPython 2.7 and 3.4+ are supported, but **2.7 and 3.4 support is deprecated and will be removed in the future**, only CPython 3.5+ support will remain.

Flair
=====

.. image:: https://img.shields.io/pypi/v/eventlet
:target: https://pypi.org/project/eventlet/

.. image:: https://travis-ci.org/eventlet/eventlet.svg?branch=master
:target: https://travis-ci.org/eventlet/eventlet

19 changes: 19 additions & 0 deletions SECURITY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Security Policy

## Supported Versions

master branch and latest release get priority support. You should expect all known problems fixed in master.

All other released versions receive security updates per request.
If you use some old version and can not upgrade for any or no reason, ask for security update release, most likely you will get it.

## Reporting a Vulnerability

Contact current maintainers. At 2021-03: temotor@gmail.com or https://t.me/temotor
If that doesn't work, open Github issue just asking for private communication channel.

This is volunteer maintained project, all issues are processed on best effort basis, no deadlines promised. Of course, security vulnerabilities get priority over regular issues.

You can expect fame in history or maybe you prefer anonymity - say what you prefer.

Thank you for responsible handling of security problems. Your attention and effort are appreciated.
Loading