Bug 1793018 - python-ufolib fails to build with Python 3.9: plistlib: it uses the old removed plistlib API
Summary: python-ufolib fails to build with Python 3.9: plistlib: it uses the old remov...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: python-ufolib
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Athos Ribeiro
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 1842155 (view as bug list)
Depends On:
Blocks: F33FTBFS F33FailsToInstall PYTHON39 1841692
TreeView+ depends on / blocked
 
Reported: 2020-01-20 14:05 UTC by Miro Hrončok
Modified: 2020-07-12 08:09 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-07-12 08:09:21 UTC
Type: Bug


Attachments (Terms of Use)

Description Miro Hrončok 2020-01-20 14:05:48 UTC
python-ufolib fails to build with Python 3.9.0a2.

=================================== FAILURES ===================================
___________________________ TestGLIF1.testLib_legal ____________________________
self = <ufoLib.test.test_GLIF1.TestGLIF1 testMethod=testLib_legal>
    def testLib_legal(self):
    	glif = """
    	<glyph name="a" format="1">
    		<outline>
    		</outline>
    		<lib>
    			<dict>
    				<key>dict</key>
    				<dict>
    					<key>hello</key>
    					<string>world</string>
    				</dict>
    				<key>float</key>
    				<real>2.5</real>
    				<key>int</key>
    				<integer>1</integer>
    				<key>list</key>
    				<array>
    					<string>a</string>
    					<string>b</string>
    					<integer>1</integer>
    					<real>2.5</real>
    				</array>
    				<key>string</key>
    				<string>a</string>
    			</dict>
    		</lib>
    	</glyph>
    	"""
    	py = """
    	glyph.name = "a"
    	glyph.lib = {"dict" : {"hello" : "world"}, "float" : 2.5, "int" : 1, "list" : ["a", "b", 1, 2.5], "string" : "a"}
    	"""
    	resultGlif = self.pyToGLIF(py)
>   	resultPy = self.glifToPy(glif)
Lib/ufoLib/test/test_GLIF1.py:350: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
Lib/ufoLib/test/test_GLIF1.py:35: in glifToPy
    readGlyphFromString(glif, glyphObject=glyph, pointPen=glyph)
Lib/ufoLib/glifLib.py:505: in readGlyphFromString
    _readGlyphFromTree(tree, glyphObject, pointPen, formatVersions=formatVersions)
Lib/ufoLib/glifLib.py:836: in _readGlyphFromTree
    _readGlyphFromTreeFormat1(tree=tree, glyphObject=glyphObject, pointPen=pointPen)
Lib/ufoLib/glifLib.py:883: in _readGlyphFromTreeFormat1
    _readLib(glyphObject, element)
Lib/ufoLib/glifLib.py:993: in _readLib
    plist = readPlistFromTree(child)
Lib/ufoLib/plistFromETree.py:11: in readPlistFromTree
    parser = PlistTreeParser()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <ufoLib.plistFromETree.PlistTreeParser object at 0x7f452bb36fa0>
    def __init__(self):
>   	super().__init__(use_builtin_types=True, dict_type=dict)
E    TypeError: __init__() got an unexpected keyword argument 'use_builtin_types'
Lib/ufoLib/plistlib.py:36: TypeError
______________________________ TestGLIF2.testLib _______________________________
self = <ufoLib.test.test_GLIF2.TestGLIF2 testMethod=testLib>
    def testLib(self):
    	glif = """
    	<glyph name="a" format="2">
    		<outline>
    		</outline>
    		<lib>
    			<dict>
    				<key>dict</key>
    				<dict>
    					<key>hello</key>
    					<string>world</string>
    				</dict>
    				<key>float</key>
    				<real>2.5</real>
    				<key>int</key>
    				<integer>1</integer>
    				<key>list</key>
    				<array>
    					<string>a</string>
    					<string>b</string>
    					<integer>1</integer>
    					<real>2.5</real>
    				</array>
    				<key>string</key>
    				<string>a</string>
    			</dict>
    		</lib>
    	</glyph>
    	"""
    	py = """
    	glyph.name = "a"
    	glyph.lib = {"dict" : {"hello" : "world"}, "float" : 2.5, "int" : 1, "list" : ["a", "b", 1, 2.5], "string" : "a"}
    	"""
    	resultGlif = self.pyToGLIF(py)
>   	resultPy = self.glifToPy(glif)
Lib/ufoLib/test/test_GLIF2.py:350: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
Lib/ufoLib/test/test_GLIF2.py:35: in glifToPy
    readGlyphFromString(glif, glyphObject=glyph, pointPen=glyph)
Lib/ufoLib/glifLib.py:505: in readGlyphFromString
    _readGlyphFromTree(tree, glyphObject, pointPen, formatVersions=formatVersions)
Lib/ufoLib/glifLib.py:838: in _readGlyphFromTree
    _readGlyphFromTreeFormat2(tree=tree, glyphObject=glyphObject, pointPen=pointPen)
Lib/ufoLib/glifLib.py:955: in _readGlyphFromTreeFormat2
    _readLib(glyphObject, element)
Lib/ufoLib/glifLib.py:993: in _readLib
    plist = readPlistFromTree(child)
Lib/ufoLib/plistFromETree.py:11: in readPlistFromTree
    parser = PlistTreeParser()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <ufoLib.plistFromETree.PlistTreeParser object at 0x7f452bda6bb0>
    def __init__(self):
>   	super().__init__(use_builtin_types=True, dict_type=dict)
E    TypeError: __init__() got an unexpected keyword argument 'use_builtin_types'
Lib/ufoLib/plistlib.py:36: TypeError

For the build logs, see:
https://copr-be.cloud.fedoraproject.org/results/@python/python3.9/fedora-rawhide-x86_64/01162428-python-ufolib/

For all our attempts to build python-ufolib with Python 3.9, see:
https://copr.fedorainfracloud.org/coprs/g/python/python3.9/package/python-ufolib/

Testing and mass rebuild of packages is happening in copr. You can follow these instructions to test locally in mock if your package builds with Python 3.9:
https://copr.fedorainfracloud.org/coprs/g/python/python3.9/

Let us know here if you have any questions.

Python 3.9 will be included in Fedora 33. To make that update smoother, we're building Fedora packages with early pre-releases of Python 3.9.
A build failure prevents us from testing all dependent packages (transitive [Build]Requires), so if this package is required a lot, it's important for us to get it fixed soon.
We'd appreciate help from the people who know this package best, but if you don't want to work on this now, let us know so we can try to work around it on our side.

Comment 1 Miro Hrončok 2020-01-20 14:21:52 UTC
See https://docs.python.org/3.9/whatsnew/3.9.html#removed

"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. "

Comment 2 Ben Cotton 2020-02-11 17:32:06 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 32 development cycle.
Changing version to 32.

Comment 3 Miro Hrončok 2020-03-16 13:07:05 UTC
Athos, could you please have look and report this upstream if needed? Thanks.

Comment 4 Miro Hrončok 2020-05-25 13:01:04 UTC
This comment is mass posted to all bugs blocking the Python 3.9 tracker, sorry if it is not 100 % relevant. When in doubt, please ask.


The Python 3.9 rebuild is in progress in a Koji side tag.

If you fix this bug, please don't rebuild the package in regular rawhide, but do it in the side tag with:

    $ fedpkg build --target=f33-python

The rebuild is progressing slowly and it is possible this package won't have all the required build dependencies yet. If that's the case, please just leave the fix committed and pushed and we will eventually rebuild it for you.

You are not asked to go and try rebuild all the missing dependencies yourself. If you know there is a bootstrap loop in the dependencies, let me know and we can untangle it together.

If you want to test your fix or reproduce the failure, you can still use the Copr repo mentioned in the initial comment of this bug: https://copr.fedorainfracloud.org/coprs/g/python/python3.9/

Comment 5 Miro Hrončok 2020-05-29 07:11:13 UTC
Python 3.9 update: The f33-python side tag is currently being merged.

New builds in f33-python are no longer possible, but python3 is not yet updated to Python 3.9 in rawhide. You can check when Python is Python 3.9 with:

    $ koji wait-repo f33-build --build python3.9-3.9.0~b1-3.fc3

And build the packages normally after that.

Comment 6 Miro Hrončok 2020-06-01 20:48:47 UTC
*** Bug 1842155 has been marked as a duplicate of this bug. ***

Comment 7 Igor Raits 2020-06-09 04:38:14 UTC
Hello,

This is the first reminder (step 3 from https://docs.fedoraproject.org/en-US/fesco/Fails_to_build_from_source_Fails_to_install/#_package_removal_for_long_standing_ftbfs_and_fti_bugs).

If you know about this problem and are planning on fixing it, please acknowledge so by setting the bug status to ASSIGNED. If you don't have time to maintain this package, consider orphaning it, so maintainers of dependent packages realize the problem.

Comment 8 Athos Ribeiro 2020-06-14 15:57:01 UTC
Ufolib has been deprecated upsream in favor of ufolib2, which is shipped in fonttools. I will start the process to retire it in fedora. Sorry for the delay on this one! :)

Comment 9 Athos Ribeiro 2020-06-21 11:11:12 UTC
The package was retired in rawhide.


Note You need to log in before you can comment on or make changes to this bug.