From f98825860c686a7d1779ce82c2b062a3299d2d83 Mon Sep 17 00:00:00 2001 From: Francis Charette Migneault Date: Mon, 6 Nov 2023 11:23:51 -0500 Subject: [PATCH 1/2] support Python 3.12 --- .github/workflows/ci-tests.yml | 1 + .gitignore | 2 ++ setup.cfg | 1 + src/paste/deploy/util.py | 2 +- tox.ini | 2 +- 5 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci-tests.yml b/.github/workflows/ci-tests.yml index fca1c2f..9bf1bfb 100644 --- a/.github/workflows/ci-tests.yml +++ b/.github/workflows/ci-tests.yml @@ -20,6 +20,7 @@ jobs: - "3.9" - "3.10" - "3.11" + - "3.12" - "pypy-3.8" os: - "ubuntu-latest" diff --git a/.gitignore b/.gitignore index fd8adfe..a0c7063 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ +.idea +.vscode .coverage .coverage.* .tox diff --git a/setup.cfg b/setup.cfg index ec761a1..5ef1485 100644 --- a/setup.cfg +++ b/setup.cfg @@ -26,6 +26,7 @@ classifiers = Programming Language :: Python :: 3.9 Programming Language :: Python :: 3.10 Programming Language :: Python :: 3.11 + Programming Language :: Python :: 3.12 Programming Language :: Python :: Implementation :: CPython Programming Language :: Python :: Implementation :: PyPy Topic :: Internet :: WWW/HTTP diff --git a/src/paste/deploy/util.py b/src/paste/deploy/util.py index a9c20d6..b0befb5 100644 --- a/src/paste/deploy/util.py +++ b/src/paste/deploy/util.py @@ -33,7 +33,7 @@ def fix_type_error(exc_info, callable, varargs, kwargs): ): return exc_info exc_info[1]._type_error_fixed = True - argspec = inspect.formatargspec(*inspect.getargspec(callable)) + argspec = inspect.signature(callable) args = ', '.join(map(_short_repr, varargs)) if kwargs and args: args += ', ' diff --git a/tox.ini b/tox.ini index 52de84b..3db1eeb 100644 --- a/tox.ini +++ b/tox.ini @@ -1,6 +1,6 @@ [tox] envlist = - py37,py38,py39,py310,py311,pypy3, + py37,py38,py39,py310,py311,py312,pypy3, coverage, docs isolated_build = True From 20cf43a72d19a35834658f333b126cd5f1a0df15 Mon Sep 17 00:00:00 2001 From: Francis Charette Migneault Date: Mon, 6 Nov 2023 13:31:43 -0500 Subject: [PATCH 2/2] apply format fixes --- src/paste/deploy/loadwsgi.py | 3 --- src/paste/deploy/paster_templates.py | 1 - 2 files changed, 4 deletions(-) diff --git a/src/paste/deploy/loadwsgi.py b/src/paste/deploy/loadwsgi.py index bde8a08..736fee5 100644 --- a/src/paste/deploy/loadwsgi.py +++ b/src/paste/deploy/loadwsgi.py @@ -91,7 +91,6 @@ def before_get(self, parser, section, option, value, defaults): class _ObjectType: - name = None egg_protocols = None config_prefixes = None @@ -112,7 +111,6 @@ def invoke(self, context): class _App(_ObjectType): - name = 'application' egg_protocols = [ 'paste.app_factory', @@ -338,7 +336,6 @@ def _loadegg(object_type, uri, spec, name, relative_to, global_conf): def _loadfunc(object_type, uri, spec, name, relative_to, global_conf): - loader = FuncLoader(spec) return loader.get_context(object_type, name, global_conf) diff --git a/src/paste/deploy/paster_templates.py b/src/paste/deploy/paster_templates.py index 063b536..2d2b56c 100644 --- a/src/paste/deploy/paster_templates.py +++ b/src/paste/deploy/paster_templates.py @@ -6,7 +6,6 @@ class PasteDeploy(Template): - _template_dir = 'paster_templates/paste_deploy' summary = "A web application deployed through paste.deploy"