Skip to content

Commit

Permalink
Python 3.10+ support, drop non-essential CI against Python 2.7 and 3.5
Browse files Browse the repository at this point in the history
fixes #740
fixes #780

related to #715
  • Loading branch information
temoto committed Jan 22, 2023
1 parent 3740657 commit a9d3223
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 17 deletions.
19 changes: 9 additions & 10 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,6 +43,12 @@ 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.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.11", toxenv: py311-epolls, ignore-error: false, os: ubuntu-latest }
- { py: "3.11", toxenv: py311-poll, ignore-error: false, os: ubuntu-latest }
- { py: "3.11", toxenv: py311-selects, ignore-error: false, os: ubuntu-latest }
- { py: 3.x, 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
2 changes: 2 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python",
"Topic :: Internet",
"Topic :: Software Development :: Libraries :: Python Modules",
Expand Down
19 changes: 14 additions & 5 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,311}-{selects,poll,epolls}
skipsdist = True

[testenv:ipv6]
Expand All @@ -27,7 +32,7 @@ setenv =
deps =
coverage==4.5.1
nose==1.3.7
setuptools==38.5.1
setuptools==50.3.2
commands =
nosetests --verbose {env:tox_cover_args} \
tests.backdoor_test:BackdoorTest.test_server_on_ipv6_socket \
Expand Down Expand Up @@ -57,16 +62,20 @@ setenv =
deps =
coverage==4.5.1
nose==1.3.7
setuptools==50.3.2
py27-{selects,poll,epolls}: pyopenssl==19.1.0
py27: mysqlclient==1.4.6
py27: 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 a9d3223

Please sign in to comment.