Skip to content

Commit

Permalink
Merge pull request #588 from woutervb/python3.10
Browse files Browse the repository at this point in the history
Python3.10
  • Loading branch information
Wouter van Bommel authored Aug 31, 2022
2 parents 8579bfd + d525d6f commit e05b36e
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/tox.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
runs-on: ubuntu-20.04
strategy:
matrix:
python: [3.5, 3.6, 3.8]
python: [3.5, 3.6, 3.8, "3.10"]

steps:
- uses: actions/checkout@v2
Expand Down
4 changes: 2 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ Python version support
----------------------

This release of talisker (0.20.0) will be the last to support python 2.7
Talisker version >0.20.2 will only support python 3.5, 3.6 and 3.8 as they
come with ubuntu lts releases.
Talisker version >0.20.2 will only support python 3.5, 3.6, 3.8 and 3.10 as they
come with Ubuntu LTS releases.

Quick Start
-----------
Expand Down
18 changes: 12 additions & 6 deletions requirements.tests.txt
Original file line number Diff line number Diff line change
@@ -1,24 +1,30 @@
# these are pinned for repeatability, but updated by pyup.io to be latest
pytest==4.6.9 # pyup: <5.0.0
pytest==4.6.9;python_version<"3.10"
pytest>7;python_version>="3.10"
more-itertools<8.11.0;python_version<"3.6"
more-itertools;python_version>="3.6"
freezegun==0.3.14
pytest-cov==2.8.1
pytest-cov==2.8.1;python_version<"3.10"
pytest-cov>2.8;python_version>="3.10"
pytest-postgresql==1.4.1 # pypup: <2.0
pytest-xdist==1.31.0
mirakuru==1.1 # pyup: <2.0
pytest-timeout==1.3.4
responses==0.10.6 # pyup: <0.10.9
# setuptools 45+ does do py2
setuptools==44.0.0 # pyup: <45.0.0
coverage==5.0.3
setuptools==44.0.0;python_version<"3.10"
setuptools>64;python_version>="3.10"
coverage==5.0.3;python_version<"3.10"
coverage>=6;python_version>="3.10"
flaky==3.6.1

# for integration tests
# eventlet is pinned until https://github.com/benoitc/gunicorn/pull/2581
# is fixed
eventlet==0.30.2 # pyup: <0.30.3
gevent==20.9.0
eventlet==0.30.2;python_version<"3.10"
eventlet>0.33;python_version>="3.10"
gevent==20.9.0;python_version<"3.10"
gevent>21;python_version>="3.10"
# the bottom pin is for limbo test runs, as latest version doesn't work with
# newer celery versions
redis>=3.2.0
Expand Down
1 change: 1 addition & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ classifiers =
Programming Language :: Python :: 3.5
Programming Language :: Python :: 3.6
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.10
Programming Language :: Python :: Implementation :: CPython

[options]
Expand Down
5 changes: 3 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@
----------------------
This release of talisker (0.20.0) will be the last to support python 2.7
Talisker version >0.20.2 will only support python 3.5, 3.6 and 3.8 as they
come with ubuntu lts releases.
Talisker version >0.20.2 will only support python 3.5, 3.6, 3.8 and 3.10 as they
come with Ubuntu LTS releases.
Quick Start
-----------
Expand Down Expand Up @@ -125,6 +125,7 @@
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: Implementation :: CPython',
],
description='A common WSGI stack',
Expand Down
7 changes: 6 additions & 1 deletion talisker/endpoints.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@
import os
import sys

try:
from collections import Iterable
except ImportError:
from collections.abc import Iterable

from werkzeug.wrappers import Request, Response
import talisker
from talisker.util import module_cache, pkg_is_installed
Expand Down Expand Up @@ -219,7 +224,7 @@ def nagios_start(status, headers, exc_info=None):
response = self.app(request.environ, nagios_start)
if not start:
# nagios_start has not yet been called
if isinstance(response, collections.Iterable):
if isinstance(response, Iterable):
# force evaluation
response = b''.join(response)

Expand Down
1 change: 1 addition & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ python =
3.5: py35,minimal_dep_version
3.6: py36
3.8: py38,lint,docs, no-extras
3.10: py310

[testenv]
usedevelop = True
Expand Down

0 comments on commit e05b36e

Please sign in to comment.