diff options
author | V3n3RiX <venerix@koprulu.sector> | 2023-05-31 15:23:38 +0100 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2023-05-31 15:23:38 +0100 |
commit | a407e25d814596ca802d83102671d95e00079767 (patch) | |
tree | b0d4824cf74ddca3ee380c618ffae855cd0d1bcd /dev-python/pbr/files | |
parent | 441510fa20665b7920b149994e72b3a1cd62a813 (diff) |
gentoo auto-resync : 31:05:2023 - 15:23:38
Diffstat (limited to 'dev-python/pbr/files')
-rw-r--r-- | dev-python/pbr/files/pbr-5.11.1-importlib-suffixes.patch | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/dev-python/pbr/files/pbr-5.11.1-importlib-suffixes.patch b/dev-python/pbr/files/pbr-5.11.1-importlib-suffixes.patch new file mode 100644 index 000000000000..27609131fc59 --- /dev/null +++ b/dev-python/pbr/files/pbr-5.11.1-importlib-suffixes.patch @@ -0,0 +1,41 @@ +Subject: [PATCH] Replace imp with importlib.machinery + +The imp was removed in Python 3.12 [1]. This commit replaces +get_suffixes() method call with _SUFFIXES array from imprtlib.machinery. + +[1] https://github.com/python/cpython/issues/98040 + +--- + +This is original patch submitted to Github mirror, it was later resubmitted to +upstream Gerrit, where they are taking care of Python2.7. We can stick with +this version of patch for now because we don't care about py2.7 anymore. + +Original-PR: https://github.com/openstack/pbr/pull/22 +Upstream-PR: https://review.opendev.org/c/openstack/pbr/+/884789 + +diff --git a/pbr/tests/test_packaging.py b/pbr/tests/test_packaging.py +index c719d1e..068bab7 100644 +--- a/pbr/tests/test_packaging.py ++++ b/pbr/tests/test_packaging.py +@@ -40,7 +40,7 @@ + + import email + import email.errors +-import imp ++import importlib + import os + import re + import sysconfig +@@ -1217,7 +1217,7 @@ def get_soabi(): + # NOTE(sigmavirus24): PyPy only added support for the SOABI config var + # to sysconfig in 2015. That was well after 2.2.1 was published in the + # Ubuntu 14.04 archive. +- for suffix, _, _ in imp.get_suffixes(): ++ for suffix, _, _ in importlib.machinery._SUFFIXES: + if suffix.startswith('.pypy') and suffix.endswith('.so'): + soabi = suffix.split('.')[1] + break +-- +2.39.2 + |