aports/testing/py3-glob2/regex-escape.patch

22 lines
695 B
Diff

Patch-Source: https://github.com/miracle2k/python-glob2/pull/27
--
From 3f2dc81ceb6e8d3ac112ca16aa951814d5931bf6 Mon Sep 17 00:00:00 2001
From: Felix Yan <felixonmars@archlinux.org>
Date: Sun, 1 Aug 2021 19:26:19 +0800
Subject: [PATCH] Fix DeprecationWarning in Python 3.8
Fixes #25
---
glob2/fnmatch.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/glob2/fnmatch.py b/glob2/fnmatch.py
index b94be65..80cbc64 100644
--- a/glob2/fnmatch.py
+++ b/glob2/fnmatch.py
@@ -138,4 +138,4 @@ def translate(pat):
res = '%s([%s])' % (res, stuff)
else:
res = res + re.escape(c)
- return '(?ms)' + res + '\Z'
+ return '(?ms)' + res + r'\Z'