File: use-raw-strings-to-avoid-py3.12-warning.patch

package info (click to toggle)
python-pecan 1.5.1-6
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,296 kB
  • sloc: python: 10,389; makefile: 131; sh: 17
file content (27 lines) | stat: -rw-r--r-- 954 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
Description: Use raw strings to avoid Python 3.12 warning
Author: Thomas Goirand <zigo@debian.org>
Forwarded: no
Last-Update: 2024-07-15

--- python-pecan-1.5.1.orig/pecan/core.py
+++ python-pecan-1.5.1/pecan/core.py
@@ -317,7 +317,7 @@ class PecanBase(object):
         return self.hooks
 
     def handle_hooks(self, hooks, hook_type, *args):
-        '''
+        r'''
         Processes hooks of the specified type.
 
         :param hook_type: The type of hook, including ``before``, ``after``,
--- python-pecan-1.5.1.orig/pecan/routing.py
+++ python-pecan-1.5.1/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 '