Python 3.9 compatibility

Issue #12 new
Chris Mayo created an issue

On Python 3.9 when calling biplist.readPlistFromString():

  File ".tox/py39/lib/python3.9/site-packages/biplist/__init__.py", line 143, in readPlist
    line: raise InvalidPlistException(e)
    locals:
      InvalidPlistException = <global> <class 'biplist.InvalidPlistException'>
      e = <not found>

InvalidPlistException: module 'plistlib' has no attribute 'Data'

In Python 3.9:

The old plistlib API has been removed, it was deprecated since Python 3.4. Use the load(), loads(), dump(), and dumps() functions. Additionally, the use_builtin_types parameter was removed, standard bytes objects are always used instead. (Contributed by Jon Janzen in bpo-36409.)

https://docs.python.org/3.9/whatsnew/3.9.html#removed

Comments (6)

  1. Alastair Houghton

    Agreed, this is a problem for one of my projects (dmgbuild). I might try to take a look at fixing it.

  2. Andrew Wooster repo owner

    Yeah, I would look into the plistlib binary plist support in 3.x. It seems to be, in my experience, pretty good in most use cases.

  3. Chris Mayo reporter

    Thanks for the pointer and the confirmation. I’ve checked and plistlib can run our binary test.

  4. Log in to comment