Skip to content

Commit

Permalink
green.http: collections.Iterable alias removed in Python 3.10, CI 3.1…
Browse files Browse the repository at this point in the history
…0, drop non-essential CI against 2.7 to 3.6

fixes #740

related to #715
  • Loading branch information
temoto committed Jan 22, 2023
1 parent 80b7cfa commit 0e46f04
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 20 deletions.
18 changes: 7 additions & 11 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
Expand All @@ -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 }

Expand Down
7 changes: 5 additions & 2 deletions eventlet/green/http/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,10 @@
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
Expand Down Expand Up @@ -1048,7 +1051,7 @@ def send(self, data):
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:
Expand Down
23 changes: 16 additions & 7 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand All @@ -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
Expand Down Expand Up @@ -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 =
Expand Down

0 comments on commit 0e46f04

Please sign in to comment.