diff --git a/backport-address-a-few-deprecation-warnings.patch b/backport-address-a-few-deprecation-warnings.patch new file mode 100644 index 0000000000000000000000000000000000000000..a1566b9f6c10fe9025fd4faad43219fe438bbd5a --- /dev/null +++ b/backport-address-a-few-deprecation-warnings.patch @@ -0,0 +1,40 @@ +From 606ff430696f493bd00fc3532c3997d4753c3564 Mon Sep 17 00:00:00 2001 +From: Ryan Petrello +Date: Sat, 15 Jul 2023 11:26:32 -0400 +Subject: [PATCH] address a few deprecation warnings + +resolves: https://github.com/pecan/pecan/issues/115 +--- + pecan/core.py | 2 +- + pecan/routing.py | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/pecan/core.py b/pecan/core.py +index 819e50c..1d79832 100644 +--- a/pecan/core.py ++++ b/pecan/core.py +@@ -322,7 +322,7 @@ class PecanBase(object): + + :param hook_type: The type of hook, including ``before``, ``after``, + ``on_error``, and ``on_route``. +- :param \*args: Arguments to pass to the hooks. ++ :param *args: Arguments to pass to the hooks. + ''' + if hook_type not in ['before', 'on_route']: + hooks = reversed(hooks) +diff --git a/pecan/routing.py b/pecan/routing.py +index 95c5160..9ff2cdd 100644 +--- a/pecan/routing.py ++++ b/pecan/routing.py +@@ -45,7 +45,7 @@ def route(*args): + raise TypeError('%s must be a string' % route) + + if route in ('.', '..') or not re.match( +- '^[0-9a-zA-Z-_$\(\)\.~!,;:*+@=]+$', route ++ r'^[0-9a-zA-Z-_$\(\)\.~!,;:*+@=]+$', route + ): + raise ValueError( + '%s must be a valid path segment. Keep in mind ' +-- +2.9.3.windows.1 + diff --git a/backport-fix-a-CLI-parsing-bug-when-no-command-is-provided.patch b/backport-fix-a-CLI-parsing-bug-when-no-command-is-provided.patch new file mode 100644 index 0000000000000000000000000000000000000000..2287bdb0e677a67c6a45d790447c4c573bdd1ea8 --- /dev/null +++ b/backport-fix-a-CLI-parsing-bug-when-no-command-is-provided.patch @@ -0,0 +1,26 @@ +From 140fdf1734932739cd88f193493a41f0577bfd3f Mon Sep 17 00:00:00 2001 +From: Ryan Petrello +Date: Fri, 14 Jul 2023 12:03:27 -0400 +Subject: [PATCH] fix a CLI parsing bug (when no command is provided) + +--- + pecan/commands/base.py | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/pecan/commands/base.py b/pecan/commands/base.py +index b1a25e8..1cb92c8 100644 +--- a/pecan/commands/base.py ++++ b/pecan/commands/base.py +@@ -86,6 +86,9 @@ class CommandRunner(object): + + def run(self, args): + ns = self.parser.parse_args(args) ++ if ns.command_name is None: ++ self.run(['--help']) ++ return + self.commands[ns.command_name]().run(ns) + + @classmethod +-- +2.9.3.windows.1 + diff --git a/backport-update-doc-to-address-upcoming-setuptools-deprecatio.patch b/backport-update-doc-to-address-upcoming-setuptools-deprecatio.patch new file mode 100644 index 0000000000000000000000000000000000000000..0cac48c1567f8745b2a15dcf7bcbf4eb7b2972d3 --- /dev/null +++ b/backport-update-doc-to-address-upcoming-setuptools-deprecatio.patch @@ -0,0 +1,52 @@ +From 3de40ff924bb525408b3f57f40ef517d8aeee25b Mon Sep 17 00:00:00 2001 +From: Ryan Petrello +Date: Tue, 16 Jan 2024 10:32:06 -0500 +Subject: [PATCH] update doc to address upcoming setuptools deprecation + +Co-Authored-By: sambhavnoobcoder <94298612+sambhavnoobcoder@users.noreply.github.com> +Closes: https://github.com/pecan/pecan/issues/153 +--- + AUTHORS | 1 + + docs/source/quick_start.rst | 17 +---------------- + 2 files changed, 2 insertions(+), 16 deletions(-) + +diff --git a/AUTHORS b/AUTHORS +index 3e8f667..8524cac 100644 +--- a/AUTHORS ++++ b/AUTHORS +@@ -14,3 +14,4 @@ Justin Barber + Wesley Spikes + Steven Berler + Chad Lung ++Sambhav Dixit +diff --git a/docs/source/quick_start.rst b/docs/source/quick_start.rst +index 3830afe..8ed1dd4 100644 +--- a/docs/source/quick_start.rst ++++ b/docs/source/quick_start.rst +@@ -272,22 +272,7 @@ Running the Tests For Your Application + Your application comes with a few example tests that you can run, replace, and + add to. To run them:: + +- $ python setup.py test -q +- running test +- running egg_info +- writing requirements to sam.egg-info/requires.txt +- writing sam.egg-info/PKG-INFO +- writing top-level names to sam.egg-info/top_level.txt +- writing dependency_links to sam.egg-info/dependency_links.txt +- reading manifest file 'sam.egg-info/SOURCES.txt' +- reading manifest template 'MANIFEST.in' +- writing manifest file 'sam.egg-info/SOURCES.txt' +- running build_ext +- .... +- ---------------------------------------------------------------------- +- Ran 4 tests in 0.009s +- +- OK ++ $ pip install tox && tox -e py + + The tests themselves can be found in the ``tests`` module in your project. + +-- +2.9.3.windows.1 + diff --git a/python-pecan.spec b/python-pecan.spec index b05209c0b3b346d2d29f5391e9e015c59f7c972f..dccc72e2c5fdee72ce924d4dc111f5861eb568a5 100644 --- a/python-pecan.spec +++ b/python-pecan.spec @@ -1,12 +1,15 @@ %global _empty_manifest_terminate_build 0 Name: python-pecan Version: 1.4.2 -Release: 1 +Release: 2 Summary: A WSGI object-dispatching web framework, designed to be lean and fast, with few dependencies. License: BSD-3-Clause URL: https://github.com/pecan/pecan Source0: https://files.pythonhosted.org/packages/14/14/e1c5336c1b66c380620daf5b880f2371584d42c4c4a265dcf7ce341c9b66/pecan-1.4.2.tar.gz BuildArch: noarch +Patch0: backport-fix-a-CLI-parsing-bug-when-no-command-is-provided.patch +Patch1: backport-address-a-few-deprecation-warnings.patch +Patch2: backport-update-doc-to-address-upcoming-setuptools-deprecatio.patch Requires: python3-logutils Requires: python3-mako @@ -78,6 +81,12 @@ mv %{buildroot}/doclist.lst . %{_docdir}/* %changelog +* Wed May 22 2024 wuzhaomin - 1.4.2-2 +- Bakport commits from upstream +- fix a CLI parsing bug (when no command is provided) +- address a few deprecation warnings +- update doc to address upcoming setuptools deprecation + * Mon Oct 24 2022 liqiuyu - 1.4.2-1 - Upgrade package to version 1.4.2