No longer use the deprecated sre_constants module in bundled pyparsing
This commit is contained in:
parent
b36e0d42f2
commit
63fb5028fe
73
No-longer-use-undocumented-module-sre_constants.patch
Normal file
73
No-longer-use-undocumented-module-sre_constants.patch
Normal file
@ -0,0 +1,73 @@
|
|||||||
|
From 187738483489794693ee464050ccc6d070ac2dfb Mon Sep 17 00:00:00 2001
|
||||||
|
From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Hrn=C4=8Diar?= <thrnciar@redhat.com>
|
||||||
|
Date: Tue, 19 Apr 2022 14:23:21 +0200
|
||||||
|
Subject: [PATCH] No longer use undocumented module 'sre_constants'
|
||||||
|
|
||||||
|
---
|
||||||
|
pkg_resources/_vendor/pyparsing.py | 5 ++---
|
||||||
|
setuptools/_vendor/pyparsing.py | 5 ++---
|
||||||
|
2 files changed, 4 insertions(+), 6 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/pkg_resources/_vendor/pyparsing.py b/pkg_resources/_vendor/pyparsing.py
|
||||||
|
index cf75e1e..5ecc692 100644
|
||||||
|
--- a/pkg_resources/_vendor/pyparsing.py
|
||||||
|
+++ b/pkg_resources/_vendor/pyparsing.py
|
||||||
|
@@ -84,7 +84,6 @@ import copy
|
||||||
|
import sys
|
||||||
|
import warnings
|
||||||
|
import re
|
||||||
|
-import sre_constants
|
||||||
|
import collections
|
||||||
|
import pprint
|
||||||
|
import traceback
|
||||||
|
@@ -2791,7 +2790,7 @@ class Regex(Token):
|
||||||
|
try:
|
||||||
|
self.re = re.compile(self.pattern, self.flags)
|
||||||
|
self.reString = self.pattern
|
||||||
|
- except sre_constants.error:
|
||||||
|
+ except re.error:
|
||||||
|
warnings.warn("invalid pattern (%s) passed to Regex" % pattern,
|
||||||
|
SyntaxWarning, stacklevel=2)
|
||||||
|
raise
|
||||||
|
@@ -2915,7 +2914,7 @@ class QuotedString(Token):
|
||||||
|
try:
|
||||||
|
self.re = re.compile(self.pattern, self.flags)
|
||||||
|
self.reString = self.pattern
|
||||||
|
- except sre_constants.error:
|
||||||
|
+ except re.error:
|
||||||
|
warnings.warn("invalid pattern (%s) passed to Regex" % self.pattern,
|
||||||
|
SyntaxWarning, stacklevel=2)
|
||||||
|
raise
|
||||||
|
diff --git a/setuptools/_vendor/pyparsing.py b/setuptools/_vendor/pyparsing.py
|
||||||
|
index cf75e1e..5ecc692 100644
|
||||||
|
--- a/setuptools/_vendor/pyparsing.py
|
||||||
|
+++ b/setuptools/_vendor/pyparsing.py
|
||||||
|
@@ -84,7 +84,6 @@ import copy
|
||||||
|
import sys
|
||||||
|
import warnings
|
||||||
|
import re
|
||||||
|
-import sre_constants
|
||||||
|
import collections
|
||||||
|
import pprint
|
||||||
|
import traceback
|
||||||
|
@@ -2791,7 +2790,7 @@ class Regex(Token):
|
||||||
|
try:
|
||||||
|
self.re = re.compile(self.pattern, self.flags)
|
||||||
|
self.reString = self.pattern
|
||||||
|
- except sre_constants.error:
|
||||||
|
+ except re.error:
|
||||||
|
warnings.warn("invalid pattern (%s) passed to Regex" % pattern,
|
||||||
|
SyntaxWarning, stacklevel=2)
|
||||||
|
raise
|
||||||
|
@@ -2915,7 +2914,7 @@ class QuotedString(Token):
|
||||||
|
try:
|
||||||
|
self.re = re.compile(self.pattern, self.flags)
|
||||||
|
self.reString = self.pattern
|
||||||
|
- except sre_constants.error:
|
||||||
|
+ except re.error:
|
||||||
|
warnings.warn("invalid pattern (%s) passed to Regex" % self.pattern,
|
||||||
|
SyntaxWarning, stacklevel=2)
|
||||||
|
raise
|
||||||
|
--
|
||||||
|
2.33.1
|
||||||
|
|
@ -25,7 +25,7 @@
|
|||||||
Name: python-setuptools
|
Name: python-setuptools
|
||||||
# When updating, update the bundled libraries versions bellow!
|
# When updating, update the bundled libraries versions bellow!
|
||||||
Version: 60.9.3
|
Version: 60.9.3
|
||||||
Release: 1%{?dist}
|
Release: 2%{?dist}
|
||||||
Summary: Easily build and distribute Python packages
|
Summary: Easily build and distribute Python packages
|
||||||
# setuptools is MIT
|
# setuptools is MIT
|
||||||
# appdirs is MIT
|
# appdirs is MIT
|
||||||
@ -55,6 +55,11 @@ Patch: Isolate-spawned-processes-by-unsetting-PYTHONPATH.patch
|
|||||||
# PR open upstream: https://github.com/pypa/setuptools/pull/3156
|
# PR open upstream: https://github.com/pypa/setuptools/pull/3156
|
||||||
Patch: Point-to-a-custom-pre-built-distribution-of-setuptools.patch
|
Patch: Point-to-a-custom-pre-built-distribution-of-setuptools.patch
|
||||||
|
|
||||||
|
# setuptools doesn't build with Python 3.11.0a7 because of bundled pyparsing that uses deprecated
|
||||||
|
# sre_constants module.
|
||||||
|
# Upstream report: https://github.com/pypa/setuptools/issues/3274
|
||||||
|
Patch: No-longer-use-undocumented-module-sre_constants.patch
|
||||||
|
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
|
|
||||||
BuildRequires: python%{python3_pkgversion}-devel
|
BuildRequires: python%{python3_pkgversion}-devel
|
||||||
@ -234,6 +239,10 @@ PYTHONPATH=$(pwd) %pytest \
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Apr 19 2022 Tomáš Hrnčiar <thrnciar@redhat.com> - 60.9.3-2
|
||||||
|
- No longer use the deprecated sre_constants module in bundled pyparsing
|
||||||
|
- Fixes: rhbz#2075487
|
||||||
|
|
||||||
* Wed Feb 16 2022 Karolina Surma <ksurma@redhat.com> - 60.9.3-1
|
* Wed Feb 16 2022 Karolina Surma <ksurma@redhat.com> - 60.9.3-1
|
||||||
- Update to 60.9.3
|
- Update to 60.9.3
|
||||||
- Fixes rhbz#2033860
|
- Fixes rhbz#2033860
|
||||||
|
Loading…
Reference in New Issue
Block a user