Closed spl closed 3 years ago
We're running into this in AFDKO as we begin to incorporate Python 3.9 in our test suite.
I also played around with simply removing use_builtin_types=False
from _loads()
, but the test suite has other failures because the deprecation also removed the plistlib.Data
class and some other stuff that is used in ufoNormalizer
.
A somewhat straightforward workaround would be to copy the pre-Python 3.9 plistlib.Data
class definition & friends into ufoNormalizer
and switch references from plistlib.Data
to ufoNormalizer.Data
. All existing functionality using that class within ufoNormalizer
would be maintained without a lot of code & test changes.
But the advice regarding the deprecation is to "use bytes
" instead of Data
. On the surface that is simple enough, but I suspect that other projects that depend on ufoNormalizer
might encounter problems.
I can take a stab at a patch, if the maintainers could advise as to any preference on how to work this out.
Perhaps switching to fontTools.misc.plistlib
is worth considering?
I would prefer to also deprecate that API in fontTools.misc.plistlib. I don't see the point now that everything is python3 to not use bytes as binary data and str as text.
@josh-hadley use ufolib2?
the fix is to drop support for py27 and not use use_builtin_types argument any more
See this change and this (abbreviated) error message:
I removed
use_builtin_types
and didn't get an error, but I don't know if this is the correct thing to do: