summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Shepelev <temotor@gmail.com>2023-01-22 04:52:32 +0300
committerSergey Shepelev <temotor@gmail.com>2023-01-22 07:35:32 +0300
commit0e46f0410205ac7a60f9a5d3be401677eab97e03 (patch)
tree3100f6338d00e1a919753b23013b72486fb1c575
parent80b7cfaf86e9d787250c1a3924248a22c8b6baad (diff)
downloadeventlet-0e46f0410205ac7a60f9a5d3be401677eab97e03.tar.gz
green.http: collections.Iterable alias removed in Python 3.10, CI 3.10, drop non-essential CI against 2.7 to 3.6
fixes https://github.com/eventlet/eventlet/issues/740 related to https://github.com/eventlet/eventlet/pull/715
-rw-r--r--.github/workflows/test.yaml18
-rw-r--r--eventlet/green/http/client.py7
-rw-r--r--tox.ini23
3 files changed, 28 insertions, 20 deletions
diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml
index 914f8ca..80ba514 100644
--- a/.github/workflows/test.yaml
+++ b/.github/workflows/test.yaml
@@ -29,16 +29,9 @@ jobs:
fail-fast: false
matrix:
include:
- - { py: 2.7, toxenv: py27-epolls, ignore-error: false, os: ubuntu-latest }
- - { py: 2.7, toxenv: py27-poll, ignore-error: false, os: ubuntu-latest }
- - { py: 2.7, toxenv: py27-selects, ignore-error: false, os: ubuntu-latest }
- - { py: 2.7, toxenv: py27-dnspython1, ignore-error: false, os: ubuntu-latest }
- - { py: 3.5, toxenv: py35-epolls, ignore-error: false, os: ubuntu-20.04 }
- - { py: 3.5, toxenv: py35-poll, ignore-error: false, os: ubuntu-20.04 }
- - { py: 3.5, toxenv: py35-selects, ignore-error: false, os: ubuntu-20.04 }
- - { py: 3.6, toxenv: py36-epolls, ignore-error: false, os: ubuntu-20.04 }
- - { py: 3.6, toxenv: py36-poll, ignore-error: false, os: ubuntu-20.04 }
- - { py: 3.6, toxenv: py36-selects, ignore-error: false, os: ubuntu-20.04 }
+ - { 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 }
@@ -50,7 +43,10 @@ jobs:
- { py: 3.9, toxenv: py39-poll, ignore-error: false, os: ubuntu-latest }
- { py: 3.9, toxenv: py39-selects, ignore-error: false, os: ubuntu-latest }
- { py: 3.9, toxenv: py39-dnspython1, ignore-error: false, os: ubuntu-latest }
- - { py: 3.x, toxenv: ipv6, ignore-error: false, os: ubuntu-latest }
+ - { py: "3.10", toxenv: py310-epolls, ignore-error: false, os: ubuntu-latest }
+ - { 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: pypy3.9, toxenv: pypy3-epolls, ignore-error: true, os: ubuntu-20.04 }
diff --git a/eventlet/green/http/client.py b/eventlet/green/http/client.py
index 744a074..7725649 100644
--- a/eventlet/green/http/client.py
+++ b/eventlet/green/http/client.py
@@ -126,7 +126,10 @@ import email.parser
import email.message
import io
import re
-import collections
+try:
+ from collections.abc import Iterable
+except ImportError:
+ from collections import Iterable
from urllib.parse import urlsplit
from eventlet.green import http, os, socket
@@ -1048,7 +1051,7 @@ class HTTPConnection:
try:
self.sock.sendall(data)
except TypeError:
- if isinstance(data, collections.Iterable):
+ if isinstance(data, Iterable):
for d in data:
self.sock.sendall(d)
else:
diff --git a/tox.ini b/tox.ini
index 0f8d712..040d827 100644
--- a/tox.ini
+++ b/tox.ini
@@ -16,7 +16,12 @@ statistics = 1
[tox]
minversion=2.5
envlist =
- ipv6, pep8, py{27,35,36,37,38,39,py2,py3}-{selects,poll,epolls}, py38-openssl, py27-dnspython1, py39-dnspython1
+ ipv6
+ pep8
+ py38-openssl
+ py39-dnspython1
+ py{27,35,36,py2,py3}-epolls
+ py{37,38,39,310}-{selects,poll,epolls}
skipsdist = True
[testenv:ipv6]
@@ -26,9 +31,10 @@ setenv =
eventlet_test_ipv6 = 1
deps =
coverage==4.5.1
- nose==1.3.7
- setuptools==38.5.1
+ nose3==1.3.8
+usedevelop = True
commands =
+ pip install -e .
nosetests --verbose {env:tox_cover_args} \
tests.backdoor_test:BackdoorTest.test_server_on_ipv6_socket \
tests.wsgi_test:TestHttpd.test_ipv6
@@ -56,17 +62,20 @@ setenv =
tox_cover_args = --with-coverage --cover-erase --cover-package=eventlet
deps =
coverage==4.5.1
- nose==1.3.7
+ nose3==1.3.8
py27-{selects,poll,epolls}: pyopenssl==19.1.0
py27: mysqlclient==1.4.6
+ py{27,35}: setuptools==38.5.1
py27: subprocess32==3.2.7
py38-openssl: pyopenssl==20.0.0
pypy{2,3}: psycopg2cffi-compat==1.1
+ py{27,35}-{selects,poll,epolls}: pyzmq==19.0.2
+ py{36,37,38,39}-{selects,poll,epolls}: pyzmq==21.0.2
py{27,35,36,37}: psycopg2-binary==2.7.7
- py{35,36,37,38,39}: mysqlclient==2.0.3
+ py{35,36,37,38,39,310,311}: mysqlclient==2.0.3
py{38,39}: psycopg2-binary==2.8.4
- setuptools==38.5.1
- {selects,poll,epolls}: pyzmq==19.0.2
+ py{310,311}: psycopg2-binary==2.9.5
+ py{310,311}: pyzmq==25.0.0
dnspython1: dnspython<2
usedevelop = True
commands =