From 2735921e8f3b0e9ee888be44f28dacb60d7ed20f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Pazderka?= Date: Tue, 1 Nov 2022 10:22:31 +0100 Subject: [PATCH] Added support for python 3.11 Close #827 --- .github/workflows/python-test.yml | 2 +- CHANGELOG.md | 4 ++++ setup.py | 3 ++- src/oic/utils/settings.py | 7 ++++--- tox.ini | 2 +- 5 files changed, 12 insertions(+), 6 deletions(-) diff --git a/.github/workflows/python-test.yml b/.github/workflows/python-test.yml index e9b7fa32..872e650f 100644 --- a/.github/workflows/python-test.yml +++ b/.github/workflows/python-test.yml @@ -13,7 +13,7 @@ jobs: strategy: max-parallel: 4 matrix: - python: [3.7, 3.8, 3.9, "3.10"] + python: [3.7, 3.8, 3.9, "3.10", "3.11"] steps: - uses: actions/checkout@v2 diff --git a/CHANGELOG.md b/CHANGELOG.md index e6dd378b..59f59a3b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,11 +7,15 @@ The format is based on the [KeepAChangeLog] project. ## Unreleased +### Changed +- [#827] Added support for python 3.11 + ## Removed - [#820] Removed Client.grant_from_state method. [#820]: https://github.com/OpenIDC/pyoidc/pull/820 +[#827]: https://github.com/OpenIDC/pyoidc/issues/827 ## 1.4.0 [2022-05-23] diff --git a/setup.py b/setup.py index 0062c05c..9a7e93de 100755 --- a/setup.py +++ b/setup.py @@ -72,8 +72,9 @@ def run_tests(self): "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", "Topic :: Software Development :: Libraries :: Python Modules"], - python_requires='~=3.5', + python_requires='~=3.7', extras_require={ 'develop': ["cherrypy==3.2.4", "pyOpenSSL"], 'testing': tests_requires, diff --git a/src/oic/utils/settings.py b/src/oic/utils/settings.py index 10e237e3..0a2730e2 100644 --- a/src/oic/utils/settings.py +++ b/src/oic/utils/settings.py @@ -10,6 +10,7 @@ If you need to add some settings, make sure that you settings class inherits from the appropriate class in this module. """ import typing +from typing import Optional from typing import Tuple from typing import Union @@ -44,7 +45,7 @@ class PyoidcSettings: def __init__( self, verify_ssl: Union[bool, str] = True, - client_cert: Union[str, Tuple[str, str]] = None, + client_cert: Union[None, str, Tuple[str, str]] = None, timeout: Union[float, Tuple[float, float]] = 5, ): self.verify_ssl = verify_ssl @@ -89,9 +90,9 @@ class ClientSettings(PyoidcSettings): def __init__( self, verify_ssl: Union[bool, str] = True, - client_cert: Union[str, Tuple[str, str]] = None, + client_cert: Union[None, str, Tuple[str, str]] = None, timeout: Union[float, Tuple[float, float]] = 5, - requests_session: requests.Session = None, + requests_session: Optional[requests.Session] = None, ): super().__init__( verify_ssl=verify_ssl, client_cert=client_cert, timeout=timeout diff --git a/tox.ini b/tox.ini index 4fbab3ce..e47a52ff 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = py{37,38,39,310},docs,quality +envlist = py{37,38,39,310,311},docs,quality skip_missing_interpreters = True [testenv]