From 674b152e262406cbd17437b9889e2f477b23272f Mon Sep 17 00:00:00 2001 From: yumiguan <41277086+yumiguan@users.noreply.github.com> Date: Mon, 29 May 2023 16:31:02 +0800 Subject: [PATCH] Add python 3.11 (#760) --- .github/workflows/tests.yml | 2 +- .../mock/handlers/http_data_helper/content_encoding/__init__.py | 2 +- .../mock/handlers/http_data_helper/content_type/__init__.py | 2 +- setup.py | 1 + tests/test_plugins.py | 2 ++ 5 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 75bd12d03..b58c945e1 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -31,7 +31,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v1 with: - python-version: "3.10" + python-version: ["3.10", "3.11"] - name: Install dependency run: | pip install pip -U diff --git a/lyrebird/mock/handlers/http_data_helper/content_encoding/__init__.py b/lyrebird/mock/handlers/http_data_helper/content_encoding/__init__.py index df66bb191..70b3c8823 100644 --- a/lyrebird/mock/handlers/http_data_helper/content_encoding/__init__.py +++ b/lyrebird/mock/handlers/http_data_helper/content_encoding/__init__.py @@ -43,6 +43,6 @@ def origin2string(content_encoding, request_data): except Exception as e: func = DefaultHandler _data = func.origin2string(request_data) - logger.warning(f'Convert Content-Encoding: {content_encoding} data origin2flow failed! {e}') + logger.warning(f'Convert Content-Encoding: {content_encoding} data origin2string failed! {e}') return _data diff --git a/lyrebird/mock/handlers/http_data_helper/content_type/__init__.py b/lyrebird/mock/handlers/http_data_helper/content_type/__init__.py index 6b8e4d58d..417874f73 100644 --- a/lyrebird/mock/handlers/http_data_helper/content_type/__init__.py +++ b/lyrebird/mock/handlers/http_data_helper/content_type/__init__.py @@ -50,5 +50,5 @@ def origin2string(content_type, request_data): except Exception as e: func = DefaultHandler _data = func.origin2string(request_data) - logger.warning(f'Convert Content-Type: {content_type} data origin2flow failed! {e}') + logger.warning(f'Convert Content-Type: {content_type} data origin2string failed! {e}') return _data diff --git a/setup.py b/setup.py index 8c55842b3..2247e0843 100644 --- a/setup.py +++ b/setup.py @@ -35,6 +35,7 @@ def read_requirements(name): "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", "License :: OSI Approved :: MIT License", "Operating System :: MacOS", "Operating System :: Microsoft :: Windows", diff --git a/tests/test_plugins.py b/tests/test_plugins.py index 9ff826f98..0fc01faf3 100644 --- a/tests/test_plugins.py +++ b/tests/test_plugins.py @@ -83,6 +83,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", "License :: OSI Approved :: MIT License", "Operating System :: MacOS", "Operating System :: Microsoft :: Windows",