Deprecate the fnmatch module.

Oslo.utils's fnmatch module was added to fix the py2.7 fnmatch module
who was not thread safe [1]. Python 2.7 is no longer supported so now we
can use the stdlib's fnmatch module and deprecate the one of oslo.utils.

[1] https://bugs.python.org/issue23191$
[2] e46a46ba90

Change-Id: I538379f91d2ba415c566ada8d221b62b47ba80bb
This commit is contained in:
Hervé Beraud 2021-05-10 14:18:43 +02:00
parent 36fa21870f
commit 4c893c92f5
2 changed files with 14 additions and 0 deletions

View File

@ -24,6 +24,15 @@ import os
import posixpath
import re
import sys
import warnings
import debtcollector
warnings.simplefilter("always")
debtcollector.deprecate(
"Using the oslo.utils's 'fnmatch' module is deprecate, "
"please use the stdlib `fnmatch` module."
)
if sys.version_info > (2, 7, 9):

View File

@ -0,0 +1,5 @@
---
deprecations:
- |
Oslo.utils's ``fnmatch`` module is deprecated, please use the stdlib
``fnmatch`` module which is thread safe for python 3+.