Bug 1899154

Summary: python-piexif fails to build with Python 3.10: struct.error: ubyte format requires 0 <= number <= 255
Product: [Fedora] Fedora Reporter: Tomáš Hrnčiar <thrnciar>
Component: python-piexifAssignee: Igor Raits <igor.raits>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: igor.raits, jamatos, mhroncok, thrnciar
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-01-20 10:47:54 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1890881    

Description Tomáš Hrnčiar 2020-11-18 15:53:06 UTC
python-piexif fails to build with Python 3.10.0a2.

ERROR: test_load (s_test.ExifTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "./tests/s_test.py", line 110, in test_load
    self._compare_piexifDict_PILDict(exif, e, p=False)
  File "./tests/s_test.py", line 614, in _compare_piexifDict_PILDict
    self._compare_value(zeroth_ifd[key], pilDict[key])
  File "./tests/s_test.py", line 585, in _compare_value
    self.assertEqual(pack_byte(*v1), v2)
  File "./tests/s_test.py", line 87, in pack_byte
    return struct.pack("B" * len(args), *args)
struct.error: ubyte format requires 0 <= number <= 255

======================================================================
ERROR: test_load_m (s_test.ExifTests)
'load' on memory.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "./tests/s_test.py", line 118, in test_load_m
    self._compare_piexifDict_PILDict(exif, e)
  File "./tests/s_test.py", line 614, in _compare_piexifDict_PILDict
    self._compare_value(zeroth_ifd[key], pilDict[key])
  File "./tests/s_test.py", line 585, in _compare_value
    self.assertEqual(pack_byte(*v1), v2)
  File "./tests/s_test.py", line 87, in pack_byte
    return struct.pack("B" * len(args), *args)
struct.error: ubyte format requires 0 <= number <= 255

======================================================================
ERROR: test_load_unicode_filename (s_test.ExifTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "./tests/s_test.py", line 186, in test_load_unicode_filename
    self._compare_piexifDict_PILDict(exif, e, p=False)
  File "./tests/s_test.py", line 614, in _compare_piexifDict_PILDict
    self._compare_value(zeroth_ifd[key], pilDict[key])
  File "./tests/s_test.py", line 585, in _compare_value
    self.assertEqual(pack_byte(*v1), v2)
  File "./tests/s_test.py", line 87, in pack_byte
    return struct.pack("B" * len(args), *args)
struct.error: ubyte format requires 0 <= number <= 255

----------------------------------------------------------------------
Ran 55 tests in 0.122s

FAILED (errors=3)
Test failed: <unittest.runner.TextTestResult run=55 errors=3 failures=0>
error: Test failed: <unittest.runner.TextTestResult run=55 errors=3 failures=0>
error: Bad exit status from /var/tmp/rpm-tmp.jpnKrx (%check)
    Bad exit status from /var/tmp/rpm-tmp.jpnKrx (%check)



For the build logs, see:
https://copr-be.cloud.fedoraproject.org/results/@python/python3.10/fedora-rawhide-x86_64/01773318-python-piexif/

For all our attempts to build python-piexif with Python 3.10, see:
https://copr.fedorainfracloud.org/coprs/g/python/python3.10/package/python-piexif/

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.10:
https://copr.fedorainfracloud.org/coprs/g/python/python3.10/

Let us know here if you have any questions.

Python 3.10 will be included in Fedora 35. To make that update smoother, we're building Fedora packages with early pre-releases of Python 3.10.
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 Tomáš Hrnčiar 2021-01-20 09:18:55 UTC
Hello, is there any update on this? It blocks us from testing other packages (ginga, python-nikola) with Python 3.10. Thank you.

Comment 3 Tomáš Hrnčiar 2021-01-20 14:02:30 UTC
Thank you!

Comment 4 Red Hat Bugzilla 2023-09-15 00:51:22 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 500 days