Uploaded image for project: 'Qbs ("Cubes")'
  1. Qbs ("Cubes")
  2. QBS-1642

Packaged biplist required for dmgbuild is unsupported by python 3.9

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Not Evaluated
    • None
    • 1.19.0, 1.18.1
    • Platforms: Darwin
    • None
    • Python 3.9.1 as python in PATH
    • macOS
    • 0976a94724854501a12581201b2c6d860a0f6dd4 (qbs/qbs/1.19)

    Description

      biplist lib required by dmg module uses plistlib.Data which was removed in python 3.9 (default python3 for new macOS).

      Traceback (most recent call last):
        File "/Users/buildserver/.conan/data/qbs/1.18.1/openmedia/default/package/13033aa1a9db6bdc6849cb2d5012d7a6b76359f5/share/qbs/python/biplist/__init__.py", line 126, in readPlist
          result = reader.parse()
        File "/Users/buildserver/.conan/data/qbs/1.18.1/openmedia/default/package/13033aa1a9db6bdc6849cb2d5012d7a6b76359f5/share/qbs/python/biplist/__init__.py", line 234, in parse
          return self.readRoot()
        File "/Users/buildserver/.conan/data/qbs/1.18.1/openmedia/default/package/13033aa1a9db6bdc6849cb2d5012d7a6b76359f5/share/qbs/python/biplist/__init__.py", line 248, in readRoot
          raise NotBinaryPlistException()
      biplist.NotBinaryPlistException
      
      During handling of the above exception, another exception occurred:
      
      Traceback (most recent call last):
        File "/Users/buildserver/.conan/data/qbs/1.18.1/openmedia/default/package/13033aa1a9db6bdc6849cb2d5012d7a6b76359f5/share/qbs/python/biplist/__init__.py", line 141, in readPlist
          result = wrapDataObject(result, for_binary=True)
        File "/Users/buildserver/.conan/data/qbs/1.18.1/openmedia/default/package/13033aa1a9db6bdc6849cb2d5012d7a6b76359f5/share/qbs/python/biplist/__init__.py", line 154, in wrapDataObject
          elif isinstance(o, (bytes, plistlib.Data)) and for_binary:
      AttributeError: module 'plistlib' has no attribute 'Data'
      
      During handling of the above exception, another exception occurred:
      
      Traceback (most recent call last):
        File "/Users/buildserver/.conan/data/qbs/1.18.1/openmedia/default/package/13033aa1a9db6bdc6849cb2d5012d7a6b76359f5/libexec/qbs/dmgbuild", line 36, in <module>
          dmgbuild.build_dmg(args.filename, args.volume_name, args.settings, defines=defines, lookForHiDPI=args.lookForHiDPI)
        File "/Users/buildserver/.conan/data/qbs/1.18.1/openmedia/default/package/13033aa1a9db6bdc6849cb2d5012d7a6b76359f5/share/qbs/python/dmgbuild/core.py", line 403, in build_dmg
          ret, output = hdiutil('create',
        File "/Users/buildserver/.conan/data/qbs/1.18.1/openmedia/default/package/13033aa1a9db6bdc6849cb2d5012d7a6b76359f5/share/qbs/python/dmgbuild/core.py", line 54, in hdiutil
          results = biplist.readPlistFromString(output)
        File "/Users/buildserver/.conan/data/qbs/1.18.1/openmedia/default/package/13033aa1a9db6bdc6849cb2d5012d7a6b76359f5/share/qbs/python/biplist/__init__.py", line 191, in readPlistFromString
          return readPlist(io.BytesIO(data))
        File "/Users/buildserver/.conan/data/qbs/1.18.1/openmedia/default/package/13033aa1a9db6bdc6849cb2d5012d7a6b76359f5/share/qbs/python/biplist/__init__.py", line 143, in readPlist
          raise InvalidPlistException(e)
      biplist.InvalidPlistException: module 'plistlib' has no attribute 'Data'
      

      I was searching for newer biplist version, but haven't found out the status of the fix. According to this https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=973082 there is a fix for 1.0.3 version, but the 1.0.3 version in pip still has this bug.

      The workaround is to use qbs with dmg module in python < 3.9 environment.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            arch Ivan Komissarov
            mabean Max Bespalov
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes