Skip to content

Commit

Permalink
Merge tag 'v0.34.3' into configurable-header-line-length
Browse files Browse the repository at this point in the history
0.34.3

* Fix security issue in the wsgi module related to RFC 9112 eventlet#826
* Fix segfault, a new approach for greening existing locks eventlet#866
* greendns: fix getaddrinfo parameter name eventlet#809
* Fix deprecation warning on ssl.PROTOCOL_TLS eventlet#872
* Pytests, fix error at teardown of TestGreenSocket.test_full_duplex eventlet#871
* Skip test which uses Py cgi module eventlet#865
* Drop old code based on python < 3.7
  • Loading branch information
zsiciarz committed Jan 18, 2024
2 parents 798c275 + 268c4d7 commit 210da53
Show file tree
Hide file tree
Showing 166 changed files with 1,537 additions and 2,272 deletions.
1 change: 0 additions & 1 deletion .coveragerc
Expand Up @@ -5,7 +5,6 @@ source = eventlet
#concurrency = eventlet
omit =
eventlet/support/dns/*
eventlet/support/six.py
tests/*

[report]
Expand Down
36 changes: 36 additions & 0 deletions .github/workflows/publish.yaml
@@ -0,0 +1,36 @@
# This workflow will upload a Python Package using Twine when a release is created
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#publishing-to-package-registries

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.

name: Build & Optional Deploy

on: [push, pull_request]

permissions:
id-token: write

jobs:
build-and-deploy:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build
- name: Build package
run: python -m build
- name: Publish package
# deploy only when a new tag is pushed to github
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@release/v1
8 changes: 2 additions & 6 deletions .github/workflows/test.yaml
Expand Up @@ -29,12 +29,7 @@ jobs:
fail-fast: false
matrix:
include:
- { py: 2.7, toxenv: py27-epolls, ignore-error: true, os: ubuntu-latest }
- { py: 3.5, toxenv: py35-epolls, ignore-error: true, os: ubuntu-20.04 }
- { py: 3.6, toxenv: py36-epolls, ignore-error: true, os: ubuntu-20.04 }
- { py: 3.7, toxenv: py37-epolls, ignore-error: false, os: ubuntu-latest }
- { py: 3.7, toxenv: py37-poll, ignore-error: false, os: ubuntu-latest }
- { py: 3.7, toxenv: py37-selects, ignore-error: false, os: ubuntu-latest }
- { py: 3.8, toxenv: py38-epolls, ignore-error: false, os: ubuntu-latest }
- { py: 3.8, toxenv: py38-openssl, ignore-error: false, os: ubuntu-latest }
- { py: 3.8, toxenv: py38-poll, ignore-error: false, os: ubuntu-latest }
Expand All @@ -47,7 +42,8 @@ jobs:
- { py: "3.10", toxenv: py310-poll, ignore-error: false, os: ubuntu-latest }
- { py: "3.10", toxenv: py310-selects, ignore-error: false, os: ubuntu-latest }
- { py: "3.10", toxenv: ipv6, ignore-error: false, os: ubuntu-latest }
- { py: pypy2.7, toxenv: pypy2-epolls, ignore-error: true, os: ubuntu-20.04 }
- { py: "3.11", toxenv: py311-epolls, ignore-error: false, os: ubuntu-latest }
- { py: "3.12", toxenv: py312-epolls, ignore-error: false, os: ubuntu-latest }
- { py: pypy3.9, toxenv: pypy3-epolls, ignore-error: true, os: ubuntu-20.04 }

steps:
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Expand Up @@ -9,3 +9,6 @@ dist/
doc/changelog.rst
venv*
website-build/

# auto-generated by hatch
eventlet/_version.py
1 change: 1 addition & 0 deletions AUTHORS
Expand Up @@ -46,6 +46,7 @@ Contributors
* Victor Stinner
* Samuel Merritt
* Eric Urban
* Tuomo Kriikkula

Linden Lab Contributors
-----------------------
Expand Down
39 changes: 39 additions & 0 deletions NEWS
@@ -1,3 +1,42 @@
Unreleased
==========

0.34.3
======

* Fix security issue in the wsgi module related to RFC 9112 https://github.com/eventlet/eventlet/pull/826
* Fix segfault, a new approach for greening existing locks https://github.com/eventlet/eventlet/pull/866
* greendns: fix getaddrinfo parameter name https://github.com/eventlet/eventlet/pull/809
* Fix deprecation warning on ssl.PROTOCOL_TLS https://github.com/eventlet/eventlet/pull/872
* Pytests, fix error at teardown of TestGreenSocket.test_full_duplex https://github.com/eventlet/eventlet/pull/871
* Skip test which uses Py cgi module https://github.com/eventlet/eventlet/pull/865
* Drop old code based on python < 3.7

0.34.2
======

* Allowing inheritance of GreenSSLSocket without overriding the __new_ method https://github.com/eventlet/eventlet/pull/796
* [bug] Fix broken API related to `__version__` removal https://github.com/eventlet/eventlet/pull/859
* [doc] Fix pypi broken link https://github.com/eventlet/eventlet/pull/857

0.34.1
======

* [bug] Fix memory leak in greendns https://github.com/eventlet/eventlet/issues/810
* [infra] Fix OIDC authentication failure https://github.com/eventlet/eventlet/pull/855
* [bug] Ignore asyncore and asynchat for Python 3.12+ https://github.com/eventlet/eventlet/issues/804

0.34.0 (Not released on Pypi)
=============================

* Dropped support for Python 3.6 and earlier.
* Fix Python 3.13 compat by adding missing attibute '_is_main_interpreter' https://github.com/eventlet/eventlet/pull/847
* Add support of Python 3.12 https://github.com/eventlet/eventlet/pull/817
* Drop unmaintained and unused stdlib tests https://github.com/eventlet/eventlet/pull/820
* Fix tests and CI for Python 3.7 and higher https://github.com/eventlet/eventlet/pull/831 and https://github.com/eventlet/eventlet/pull/832
* Stop claiming to create universal wheels https://github.com/eventlet/eventlet/pull/841
* Fix green logging locks for Python versions <= 3.10 https://github.com/eventlet/eventlet/pull/754

0.33.3
======
* dnspython 2.3.0 raised AttributeError: module 'dns.rdtypes' has no attribute 'ANY' https://github.com/eventlet/eventlet/issues/781
Expand Down
4 changes: 2 additions & 2 deletions README.rst
Expand Up @@ -65,15 +65,15 @@ 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.
Python 3.7-3.12 are currently supported.

Flair
=====

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

.. image:: https://img.shields.io/github/workflow/status/eventlet/eventlet/test/master
.. image:: https://img.shields.io/github/actions/workflow/status/eventlet/eventlet/test.yaml?branch=master
:target: https://github.com/eventlet/eventlet/actions?query=workflow%3Atest+branch%3Amaster

.. image:: https://codecov.io/gh/eventlet/eventlet/branch/master/graph/badge.svg
Expand Down
10 changes: 4 additions & 6 deletions benchmarks/__init__.py
@@ -1,4 +1,3 @@
from __future__ import print_function
import argparse
import gc
import importlib
Expand All @@ -10,7 +9,6 @@
import timeit

import eventlet
import six


# legacy, TODO convert context/localhost_socket benchmarks to new way
Expand All @@ -19,7 +17,7 @@ def measure_best(repeat, iters,
common_cleanup='pass',
*funcs):
funcs = list(funcs)
results = dict((f, []) for f in funcs)
results = {f: [] for f in funcs}

for _ in range(repeat):
random.shuffle(funcs)
Expand All @@ -30,7 +28,7 @@ def measure_best(repeat, iters,
common_cleanup()

best_results = {}
for func, times in six.iteritems(results):
for func, times in results.items():
best_results[func] = min(times)
return best_results

Expand All @@ -44,13 +42,13 @@ class Benchmark:
mb_per_s = 0

def __init__(self, **kwargs):
for k, v in six.iteritems(kwargs):
for k, v in kwargs.items():
if not hasattr(self, k):
raise AttributeError(k)
setattr(self, k, v)

def __str__(self):
kvs = ', '.join('{}={}'.format(k, v) for k, v in six.iteritems(self.__dict__) if not k.startswith('_'))
kvs = ', '.join('{}={}'.format(k, v) for k, v in self.__dict__.items() if not k.startswith('_'))
return 'Benchmark<{}>'.format(kvs)

__repr__ = __str__
Expand Down
1 change: 0 additions & 1 deletion benchmarks/context.py
@@ -1,5 +1,4 @@
"""Test context switching performance of threading and eventlet"""
from __future__ import print_function

import threading
import time
Expand Down
3 changes: 1 addition & 2 deletions benchmarks/hub_timers.py
Expand Up @@ -5,7 +5,6 @@

import benchmarks
from eventlet.hubs import timer, get_hub
import six


l = []
Expand All @@ -19,7 +18,7 @@ def work(n):
@contextlib.contextmanager
def setup(iters):
l[:] = []
timeouts = [random.uniform(0, 10) for x in six.moves.range(iters)]
timeouts = [random.uniform(0, 10) for x in range(iters)]
yield timeouts


Expand Down
10 changes: 4 additions & 6 deletions benchmarks/localhost_socket.py
@@ -1,10 +1,8 @@
"""Benchmark evaluating eventlet's performance at speaking to itself over a localhost socket."""
from __future__ import print_function

import time

import benchmarks
import six


BYTES = 1000
Expand All @@ -31,13 +29,13 @@ def writer(addr, socket_impl):


def green_accepter(server_sock, pool):
for i in six.moves.range(CONCURRENCY):
for i in range(CONCURRENCY):
sock, addr = server_sock.accept()
pool.spawn_n(reader, sock)


def heavy_accepter(server_sock, pool):
for i in six.moves.range(CONCURRENCY):
for i in range(CONCURRENCY):
sock, addr = server_sock.accept()
t = threading.Thread(None, reader, "reader thread", (sock,))
t.start()
Expand All @@ -58,7 +56,7 @@ def launch_green_threads():
server_sock.listen(50)
addr = ('localhost', server_sock.getsockname()[1])
pool.spawn_n(green_accepter, server_sock, pool)
for i in six.moves.range(CONCURRENCY):
for i in range(CONCURRENCY):
pool.spawn_n(writer, addr, eventlet.green.socket.socket)
pool.waitall()

Expand All @@ -77,7 +75,7 @@ def launch_heavy_threads():
None, heavy_accepter, "accepter thread", (server_sock, threads))
accepter_thread.start()
threads.append(accepter_thread)
for i in six.moves.range(CONCURRENCY):
for i in range(CONCURRENCY):
client_thread = threading.Thread(None, writer, "writer thread", (addr, socket.socket))
client_thread.start()
threads.append(client_thread)
Expand Down

0 comments on commit 210da53

Please sign in to comment.