[sstruct/xmlWriter]: issue a deprecation warning when the two top-level modules are imported
Part of #696 (These are a actually `UserWarning` instead of `DeprecationWarning`, as the latter are normally muted)
This commit is contained in:
parent
8a7b245069
commit
c719da5bca
@ -5,3 +5,10 @@ from fontTools.misc.py23 import *
|
||||
|
||||
from fontTools.misc.sstruct import *
|
||||
from fontTools.misc.sstruct import __doc__
|
||||
|
||||
import warnings
|
||||
|
||||
warnings.warn(
|
||||
"Importing the stand-alone `sstruct` module is deprecated. "
|
||||
"Use `from fontTools.misc import sstruct` instead.",
|
||||
stacklevel=2)
|
||||
|
@ -5,3 +5,10 @@ from fontTools.misc.py23 import *
|
||||
|
||||
from fontTools.misc.xmlWriter import *
|
||||
from fontTools.misc.xmlWriter import __doc__
|
||||
|
||||
import warnings
|
||||
|
||||
warnings.warn(
|
||||
"Importing the stand-alone `xmlWriter` module is deprecated. "
|
||||
"Use `from fontTools.misc import xmlWriter` instead.",
|
||||
stacklevel=2)
|
||||
|
Loading…
x
Reference in New Issue
Block a user