Bug 1926220 - python-oletools fails to build with Python 3.10: ImportError: cannot import name 'Mapping' from 'collections'
Summary: python-oletools fails to build with Python 3.10: ImportError: cannot import n...
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: Fedora
Classification: Fedora
Component: python-oletools
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Robert Scheck
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 1969064 (view as bug list)
Depends On:
Blocks: F35FTBFS F35FailsToInstall PYTHON3.10 1926223
TreeView+ depends on / blocked
 
Reported: 2021-02-08 13:14 UTC by Tomáš Hrnčiar
Modified: 2021-06-09 23:12 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-06-09 23:12:43 UTC
Type: Bug


Attachments (Terms of Use)

Description Tomáš Hrnčiar 2021-02-08 13:14:03 UTC
python-oletools fails to build with Python 3.10.0a5.



======================================================================
ERROR: test_issue_251 (unittest.loader._FailedTest)
----------------------------------------------------------------------
ImportError: Failed to import test module: test_issue_251
Traceback (most recent call last):
  File "/usr/lib64/python3.10/unittest/loader.py", line 154, in loadTestsFromName
    module = __import__(module_name)
  File "/builddir/build/BUILD/oletools-0.56/tests/rtfobj/test_issue_251.py", line 4, in <module>
    from oletools import rtfobj
  File "/builddir/build/BUILD/oletools-0.56/oletools/rtfobj.py", line 127, in <module>
    from oletools.thirdparty.tablestream import tablestream
  File "/builddir/build/BUILD/oletools-0.56/oletools/thirdparty/tablestream/tablestream.py", line 75, in <module>
    import colorclass
  File "/usr/lib/python3.10/site-packages/colorclass/__init__.py", line 11, in <module>
    from colorclass.codes import list_tags  # noqa
  File "/usr/lib/python3.10/site-packages/colorclass/codes.py", line 4, in <module>
    from collections import Mapping
ImportError: cannot import name 'Mapping' from 'collections' (/usr/lib64/python3.10/collections/__init__.py)


======================================================================
ERROR: test_issue_185 (unittest.loader._FailedTest)
----------------------------------------------------------------------
ImportError: Failed to import test module: test_issue_185
Traceback (most recent call last):
  File "/usr/lib64/python3.10/unittest/loader.py", line 154, in loadTestsFromName
    module = __import__(module_name)
  File "/builddir/build/BUILD/oletools-0.56/tests/rtfobj/test_issue_185.py", line 4, in <module>
    from oletools import rtfobj
  File "/builddir/build/BUILD/oletools-0.56/oletools/rtfobj.py", line 127, in <module>
    from oletools.thirdparty.tablestream import tablestream
  File "/builddir/build/BUILD/oletools-0.56/oletools/thirdparty/tablestream/tablestream.py", line 75, in <module>
    import colorclass
  File "/usr/lib/python3.10/site-packages/colorclass/__init__.py", line 11, in <module>
    from colorclass.codes import list_tags  # noqa
  File "/usr/lib/python3.10/site-packages/colorclass/codes.py", line 4, in <module>
    from collections import Mapping
ImportError: cannot import name 'Mapping' from 'collections' (/usr/lib64/python3.10/collections/__init__.py)


======================================================================
ERROR: test_is_rtf (unittest.loader._FailedTest)
----------------------------------------------------------------------
ImportError: Failed to import test module: test_is_rtf
Traceback (most recent call last):
  File "/usr/lib64/python3.10/unittest/loader.py", line 154, in loadTestsFromName
    module = __import__(module_name)
  File "/builddir/build/BUILD/oletools-0.56/tests/rtfobj/test_is_rtf.py", line 9, in <module>
    from oletools.rtfobj import is_rtf, RTF_MAGIC
  File "/builddir/build/BUILD/oletools-0.56/oletools/rtfobj.py", line 127, in <module>
    from oletools.thirdparty.tablestream import tablestream
  File "/builddir/build/BUILD/oletools-0.56/oletools/thirdparty/tablestream/tablestream.py", line 75, in <module>
    import colorclass
  File "/usr/lib/python3.10/site-packages/colorclass/__init__.py", line 11, in <module>
    from colorclass.codes import list_tags  # noqa
  File "/usr/lib/python3.10/site-packages/colorclass/codes.py", line 4, in <module>
    from collections import Mapping
ImportError: cannot import name 'Mapping' from 'collections' (/usr/lib64/python3.10/collections/__init__.py)


======================================================================
ERROR: test_autostart (tests.olevba.test_crypto.OlevbaCryptoWriteProtectTest)
Check that autostart macro is found in xls[mb] sample file.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/oletools-0.56/tests/olevba/test_crypto.py", line 39, in test_autostart
    output, _ = call_and_capture('olevba', args=('-j', example_file),
  File "/builddir/build/BUILD/oletools-0.56/tests/test_utils/utils.py", line 62, in call_and_capture
    output = check_output((sys.executable, '-m', module) + my_args,
  File "/usr/lib64/python3.10/subprocess.py", line 429, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
  File "/usr/lib64/python3.10/subprocess.py", line 533, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '('/usr/bin/python3', '-m', 'olevba', '-j', '/builddir/build/BUILD/oletools-0.56/tests/test-data/encrypted/autostart-encrypt-standardpassword.xlsm')' returned non-zero exit status 1.

======================================================================
ERROR: test_empty_behaviour (tests.olevba.test_basic.TestOlevbaBasic)
Test behaviour of olevba when presented with pure text file.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/oletools-0.56/tests/olevba/test_basic.py", line 23, in test_empty_behaviour
    self.do_test_behaviour('empty')
  File "/builddir/build/BUILD/oletools-0.56/tests/olevba/test_basic.py", line 28, in do_test_behaviour
    output, _ = call_and_capture('olevba', args=(input_file, ))
  File "/builddir/build/BUILD/oletools-0.56/tests/test_utils/utils.py", line 62, in call_and_capture
    output = check_output((sys.executable, '-m', module) + my_args,
  File "/usr/lib64/python3.10/subprocess.py", line 429, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
  File "/usr/lib64/python3.10/subprocess.py", line 533, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '('/usr/bin/python3', '-m', 'olevba', '/builddir/build/BUILD/oletools-0.56/tests/test-data/basic/empty')' returned non-zero exit status 1.

======================================================================
ERROR: test_text_behaviour (tests.olevba.test_basic.TestOlevbaBasic)
Test behaviour of olevba when presented with pure text file.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/oletools-0.56/tests/olevba/test_basic.py", line 19, in test_text_behaviour
    self.do_test_behaviour('text')
  File "/builddir/build/BUILD/oletools-0.56/tests/olevba/test_basic.py", line 28, in do_test_behaviour
    output, _ = call_and_capture('olevba', args=(input_file, ))
  File "/builddir/build/BUILD/oletools-0.56/tests/test_utils/utils.py", line 62, in call_and_capture
    output = check_output((sys.executable, '-m', module) + my_args,
  File "/usr/lib64/python3.10/subprocess.py", line 429, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
  File "/usr/lib64/python3.10/subprocess.py", line 533, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '('/usr/bin/python3', '-m', 'olevba', '/builddir/build/BUILD/oletools-0.56/tests/test-data/basic/text')' returned non-zero exit status 1.

======================================================================
ERROR: test_basic (unittest.loader._FailedTest)
----------------------------------------------------------------------
ImportError: Failed to import test module: test_basic
Traceback (most recent call last):
  File "/usr/lib64/python3.10/unittest/loader.py", line 154, in loadTestsFromName
    module = __import__(module_name)
  File "/builddir/build/BUILD/oletools-0.56/tests/oleform/test_basic.py", line 10, in <module>
    from oletools.olevba import VBA_Parser
  File "/builddir/build/BUILD/oletools-0.56/oletools/olevba.py", line 306, in <module>
    import colorclass
  File "/usr/lib/python3.10/site-packages/colorclass/__init__.py", line 11, in <module>
    from colorclass.codes import list_tags  # noqa
  File "/usr/lib/python3.10/site-packages/colorclass/codes.py", line 4, in <module>
    from collections import Mapping
ImportError: cannot import name 'Mapping' from 'collections' (/usr/lib64/python3.10/collections/__init__.py)


======================================================================
ERROR: test_csv (unittest.loader._FailedTest)
----------------------------------------------------------------------
ImportError: Failed to import test module: test_csv
Traceback (most recent call last):
  File "/usr/lib64/python3.10/unittest/loader.py", line 154, in loadTestsFromName
    module = __import__(module_name)
  File "/builddir/build/BUILD/oletools-0.56/tests/msodde/test_csv.py", line 11, in <module>
    from oletools import msodde
  File "/builddir/build/BUILD/oletools-0.56/oletools/msodde.py", line 74, in <module>
    from oletools import rtfobj
  File "/builddir/build/BUILD/oletools-0.56/oletools/rtfobj.py", line 127, in <module>
    from oletools.thirdparty.tablestream import tablestream
  File "/builddir/build/BUILD/oletools-0.56/oletools/thirdparty/tablestream/tablestream.py", line 75, in <module>
    import colorclass
  File "/usr/lib/python3.10/site-packages/colorclass/__init__.py", line 11, in <module>
    from colorclass.codes import list_tags  # noqa
  File "/usr/lib/python3.10/site-packages/colorclass/codes.py", line 4, in <module>
    from collections import Mapping
ImportError: cannot import name 'Mapping' from 'collections' (/usr/lib64/python3.10/collections/__init__.py)


======================================================================
ERROR: test_standard_password (tests.msodde.test_crypto.MsoddeCryptoTest)
Check dde-link is found in xls[mb] sample files.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/oletools-0.56/tests/msodde/test_crypto.py", line 23, in test_standard_password
    output, _ = call_and_capture('msodde', [example_file, ])
  File "/builddir/build/BUILD/oletools-0.56/tests/test_utils/utils.py", line 62, in call_and_capture
    output = check_output((sys.executable, '-m', module) + my_args,
  File "/usr/lib64/python3.10/subprocess.py", line 429, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
  File "/usr/lib64/python3.10/subprocess.py", line 533, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '('/usr/bin/python3', '-m', 'msodde', '/builddir/build/BUILD/oletools-0.56/tests/test-data/encrypted/dde-test-encrypt-standardpassword.xls')' returned non-zero exit status 1.

======================================================================
ERROR: test_blacklist (unittest.loader._FailedTest)
----------------------------------------------------------------------
ImportError: Failed to import test module: test_blacklist
Traceback (most recent call last):
  File "/usr/lib64/python3.10/unittest/loader.py", line 154, in loadTestsFromName
    module = __import__(module_name)
  File "/builddir/build/BUILD/oletools-0.56/tests/msodde/test_blacklist.py", line 7, in <module>
    from oletools.msodde import field_is_blacklisted
  File "/builddir/build/BUILD/oletools-0.56/oletools/msodde.py", line 74, in <module>
    from oletools import rtfobj
  File "/builddir/build/BUILD/oletools-0.56/oletools/rtfobj.py", line 127, in <module>
    from oletools.thirdparty.tablestream import tablestream
  File "/builddir/build/BUILD/oletools-0.56/oletools/thirdparty/tablestream/tablestream.py", line 75, in <module>
    import colorclass
  File "/usr/lib/python3.10/site-packages/colorclass/__init__.py", line 11, in <module>
    from colorclass.codes import list_tags  # noqa
  File "/usr/lib/python3.10/site-packages/colorclass/codes.py", line 4, in <module>
    from collections import Mapping
ImportError: cannot import name 'Mapping' from 'collections' (/usr/lib64/python3.10/collections/__init__.py)


======================================================================
ERROR: test_basic (unittest.loader._FailedTest)
----------------------------------------------------------------------
ImportError: Failed to import test module: test_basic
Traceback (most recent call last):
  File "/usr/lib64/python3.10/unittest/loader.py", line 154, in loadTestsFromName
    module = __import__(module_name)
  File "/builddir/build/BUILD/oletools-0.56/tests/msodde/test_basic.py", line 18, in <module>
    from oletools import msodde
  File "/builddir/build/BUILD/oletools-0.56/oletools/msodde.py", line 74, in <module>
    from oletools import rtfobj
  File "/builddir/build/BUILD/oletools-0.56/oletools/rtfobj.py", line 127, in <module>
    from oletools.thirdparty.tablestream import tablestream
  File "/builddir/build/BUILD/oletools-0.56/oletools/thirdparty/tablestream/tablestream.py", line 75, in <module>
    import colorclass
  File "/usr/lib/python3.10/site-packages/colorclass/__init__.py", line 11, in <module>
    from colorclass.codes import list_tags  # noqa
  File "/usr/lib/python3.10/site-packages/colorclass/codes.py", line 4, in <module>
    from collections import Mapping
ImportError: cannot import name 'Mapping' from 'collections' (/usr/lib64/python3.10/collections/__init__.py)


======================================================================
FAIL: test_crypt_return (tests.olevba.test_basic.TestOlevbaBasic)
Tests that encrypted files give a certain return code.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/oletools-0.56/tests/olevba/test_basic.py", line 102, in test_crypt_return
    self.assertEqual(ret_code, CRYPT_RETURN_CODE,
AssertionError: 1 != 9 : Wrong return code 1 for args ['encrypted.xlsx']

======================================================================
FAIL: test_rtf_behaviour (tests.olevba.test_basic.TestOlevbaBasic)
Test behaviour of olevba when presented with an rtf file.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/oletools-0.56/tests/olevba/test_basic.py", line 58, in test_rtf_behaviour
    self.assertEqual(ret_code, 5)
AssertionError: 1 != 5

----------------------------------------------------------------------
Ran 46 tests in 8.385s

FAILED (failures=2, errors=11)
Test failed: <unittest.runner.TextTestResult run=46 errors=11 failures=2>

Traceback (most recent call last):
  File "/usr/lib64/python3.10/runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/lib64/python3.10/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/builddir/build/BUILD/oletools-0.56/oletools/olevba.py", line 306, in <module>
    import colorclass
  File "/usr/lib/python3.10/site-packages/colorclass/__init__.py", line 11, in <module>
    from colorclass.codes import list_tags  # noqa
  File "/usr/lib/python3.10/site-packages/colorclass/codes.py", line 4, in <module>
    from collections import Mapping
ImportError: cannot import name 'Mapping' from 'collections' (/usr/lib64/python3.10/collections/__init__.py)

Traceback (most recent call last):
  File "/usr/lib64/python3.10/runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/lib64/python3.10/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/builddir/build/BUILD/oletools-0.56/oletools/olevba.py", line 306, in <module>
    import colorclass
  File "/usr/lib/python3.10/site-packages/colorclass/__init__.py", line 11, in <module>
    from colorclass.codes import list_tags  # noqa
  File "/usr/lib/python3.10/site-packages/colorclass/codes.py", line 4, in <module>
    from collections import Mapping
ImportError: cannot import name 'Mapping' from 'collections' (/usr/lib64/python3.10/collections/__init__.py)

-------------------------------------------------------------------------------
File: '/builddir/build/BUILD/oletools-0.56/tests/test-data/oleobj/sample_with_calc_embedded.doc'
extract file embedded in OLE object from stream 'ObjectPool/_1572084892/\x01Ole10Native':
Parsing OLE Package
Filename = "calc.exe"
Source path = "C:\Windows\System32\calc.exe"
Temp path = "C:\Users\xxxxx\AppData\Local\Temp\calc (2).exe"
saving to file /tmp/oletools-oleobj-qv9cvlm8/sample_with_calc_embedded.doc_calc.exe
-------------------------------------------------------------------------------
File: '/builddir/build/BUILD/oletools-0.56/tests/test-data/oleobj/embedded-unicode.doc'
extract file embedded in OLE object from stream 'ObjectPool/_1577272170/\x01Ole10Native':
Parsing OLE Package
Filename = "ünicöde-???????????.txt"
Source path = "C:\Users\user\Documents\ünicöde-???????????.txt"
Temp path = "C:\Users\user\AppData\Local\Temp\ünicöde-???????????.txt"
saving to file /tmp/oletools-oleobj-qv9cvlm8/embedded-unicode.doc__nic_de-___________.txt
-------------------------------------------------------------------------------
File: '/builddir/build/BUILD/oletools-0.56/tests/test-data/oleobj/embedded-simple-2007.docx'
extract file embedded in OLE object from stream '\x01Ole10Native':
Parsing OLE Package
Filename = "simple-text-file.txt"
Source path = "C:\Users\user\Documents\simple-text-file.txt"
Temp path = "C:\Users\user\AppData\Local\Temp\simple-text-file.txt"
saving to file /tmp/oletools-oleobj-qv9cvlm8/embedded-simple-2007.docx_simple-text-file.txt
-------------------------------------------------------------------------------
File: '/builddir/build/BUILD/oletools-0.56/tests/test-data/oleobj/embedded-simple-2007.xls'
extract file embedded in OLE object from stream 'MBD0009CF7B/\x01Ole10Native':
Parsing OLE Package
Filename = "simple-text-file.txt"
Source path = "C:\Users\user\Documents\simple-text-file.txt"
Temp path = "C:\Users\user\AppData\Local\Temp\simple-text-file.txt"
saving to file /tmp/oletools-oleobj-qv9cvlm8/embedded-simple-2007.xls_simple-text-file.txt
-------------------------------------------------------------------------------
File: '/builddir/build/BUILD/oletools-0.56/tests/test-data/oleobj/embedded-simple-2007.xla'
extract file embedded in OLE object from stream 'MBD000A47B1/\x01Ole10Native':
Parsing OLE Package
Filename = "simple-text-file.txt"
Source path = "C:\Users\user\Documents\simple-text-file.txt"
Temp path = "C:\Users\user\AppData\Local\Temp\simple-text-file.txt"
saving to file /tmp/oletools-oleobj-qv9cvlm8/embedded-simple-2007.xla_simple-text-file.txt
-------------------------------------------------------------------------------
File: '/builddir/build/BUILD/oletools-0.56/tests/test-data/oleobj/embedded-simple-2007.xltx'
extract file embedded in OLE object from stream '\x01Ole10Native':
Parsing OLE Package
Filename = "simple-text-file.txt"
Source path = "C:\Users\user\Documents\simple-text-file.txt"
Temp path = "C:\Users\user\AppData\Local\Temp\simple-text-file.txt"
saving to file /tmp/oletools-oleobj-qv9cvlm8/embedded-simple-2007.xltx_simple-text-file.txt
-------------------------------------------------------------------------------
File: '/builddir/build/BUILD/oletools-0.56/tests/test-data/oleobj/embedded-simple-2007.pps'
extract file embedded in OLE object from stream '\x01Ole10Native':
Parsing OLE Package
Filename = "simple-text-file.txt"
Source path = "C:\Users\user\Documents\simple-text-file.txt"
Temp path = "C:\Users\user\AppData\Local\Temp\simple-text-file.txt"
saving to file /tmp/oletools-oleobj-qv9cvlm8/embedded-simple-2007.pps_simple-text-file.txt
-------------------------------------------------------------------------------
File: '/builddir/build/BUILD/oletools-0.56/tests/test-data/oleobj/embedded-simple-2007.potx'
extract file embedded in OLE object from stream '\x01Ole10Native':
Parsing OLE Package
Filename = "simple-text-file.txt"
Source path = "C:\Users\user\Documents\simple-text-file.txt"
Temp path = "C:\Users\user\AppData\Local\Temp\simple-text-file.txt"
saving to file /tmp/oletools-oleobj-qv9cvlm8/embedded-simple-2007.potx_simple-text-file.txt
-------------------------------------------------------------------------------
File: '/builddir/build/BUILD/oletools-0.56/tests/test-data/oleobj/embedded-simple-2007.odt'
extract file embedded in OLE object from stream '\x01Ole10Native':
Parsing OLE Package
Filename = "simple-text-file.txt"
Source path = "C:\Users\user\Documents\simple-text-file.txt"
Temp path = "C:\Users\user\AppData\Local\Temp\simple-text-file.txt"
saving to file /tmp/oletools-oleobj-qv9cvlm8/embedded-simple-2007.odt_simple-text-file.txt
Should add oleid output for rtfobj/issue_185.rtf.zip to tests.oleid.test_basic ((False,))
Should add oleid output for ooxml/dde-in-word2003.xml.zip to tests.oleid.test_basic ((False,))
Should add oleid output for msodde/dde-test-from-office2016.doc.zip to tests.oleid.test_basic ((False,))
Should add oleid output for msodde/dde-test-from-office2013-utf_16le-korean.doc.zip to tests.oleid.test_basic ((False,))
Should add oleid output for msodde/dde-test-from-office2003.doc.zip to tests.oleid.test_basic ((False,))
Should add oleid output for msodde/dde-in-word2007.xml.zip to tests.oleid.test_basic ((False,))
Should add oleid output for msodde/dde-in-word2003.xml.zip to tests.oleid.test_basic ((False,))
Traceback (most recent call last):
  File "/usr/lib64/python3.10/runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/lib64/python3.10/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/builddir/build/BUILD/oletools-0.56/oletools/msodde.py", line 74, in <module>
    from oletools import rtfobj
  File "/builddir/build/BUILD/oletools-0.56/oletools/rtfobj.py", line 127, in <module>
    from oletools.thirdparty.tablestream import tablestream
  File "/builddir/build/BUILD/oletools-0.56/oletools/thirdparty/tablestream/tablestream.py", line 75, in <module>
    import colorclass
  File "/usr/lib/python3.10/site-packages/colorclass/__init__.py", line 11, in <module>
    from colorclass.codes import list_tags  # noqa
  File "/usr/lib/python3.10/site-packages/colorclass/codes.py", line 4, in <module>
    from collections import Mapping
ImportError: cannot import name 'Mapping' from 'collections' (/usr/lib64/python3.10/collections/__init__.py)

error: Test failed: <unittest.runner.TextTestResult run=46 errors=11 failures=2>
+ true
+ PYTHONPATH=/builddir/build/BUILDROOT/python-oletools-0.56-3.fc34.x86_64/usr/lib/python3.10/site-packages
+ /builddir/build/BUILDROOT/python-oletools-0.56-3.fc34.x86_64/usr/bin/olevba-3 --code cheatsheet/oletools_cheatsheet.docx
Traceback (most recent call last):
  File "/builddir/build/BUILDROOT/python-oletools-0.56-3.fc34.x86_64/usr/bin/olevba-3", line 33, in <module>
    sys.exit(load_entry_point('oletools==0.56', 'console_scripts', 'olevba')())
  File "/builddir/build/BUILDROOT/python-oletools-0.56-3.fc34.x86_64/usr/bin/olevba-3", line 25, in importlib_load_entry_point
    return next(matches).load()
  File "/usr/lib64/python3.10/importlib/metadata.py", line 88, in load
    module = import_module(match.group('module'))
  File "/usr/lib64/python3.10/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1049, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1026, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1005, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 698, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 833, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/builddir/build/BUILDROOT/python-oletools-0.56-3.fc34.x86_64/usr/lib/python3.10/site-packages/oletools/olevba.py", line 305, in <module>
    import colorclass
  File "/usr/lib/python3.10/site-packages/colorclass/__init__.py", line 11, in <module>
    from colorclass.codes import list_tags  # noqa
  File "/usr/lib/python3.10/site-packages/colorclass/codes.py", line 4, in <module>
    from collections import Mapping
ImportError: cannot import name 'Mapping' from 'collections' (/usr/lib64/python3.10/collections/__init__.py)

bpo-37324: Remove deprecated aliases to Collections Abstract Base Classes
from the collections module.

https://docs.python.org/3.10/whatsnew/changelog.html#python-3-10-0-alpha-5

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

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

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 Robert Scheck 2021-02-08 13:29:49 UTC
I'm not sure what the intention of this bug report is...shall I forward it to upstream? Or are you looking for a downstream solution? Or?

Comment 2 Miro Hrončok 2021-02-08 13:45:14 UTC
Forwarding to upstream (or seeing if it isn't already fixed there is a good start). If a simple backport fixes the problem, we'd appreciate doing it. We do not encourage downstream-only solutions.


However, note that /usr/lib/python3.10/site-packages/colorclass/codes.py is from python-colorclass.

Comment 3 Miro Hrončok 2021-02-08 13:47:17 UTC
python-colorclass has empty %check, so it built fine.

The fix is in https://github.com/Robpol86/colorclass/pull/27 but the repo is archived.

Comment 4 Ben Cotton 2021-02-09 16:07:07 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 34 development cycle.
Changing version to 34.

Comment 5 Miro Hrončok 2021-06-04 20:14:00 UTC
This is a mass-posted update. Sorry if it is not 100% accurate to this bugzilla.


The Python 3.10 rebuild is in progress in a Koji side tag. If you manage to fix the problem, please commit the fix in the rawhide branch, but don't build the package in regular rawhide.

You can either build the package in the side tag, with:

    $ fedpkg build --target=f35-python

Or you can the build and we will eventually build it for you.

Note that the rebuild is still in progress, so not all (build) dependencies of this package might be available right away.

Thanks.

See also https://fedoraproject.org/wiki/Changes/Python3.10

If you have general questions about the rebuild, please use this mailing list thread: https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/thread/G47SGOYIQLRDTWGOSLSWERZSSHXDEDH5/

Comment 6 Miro Hrončok 2021-06-07 22:58:41 UTC
The f35-python side tag has been merged to Rawhide. From now on, build as you would normally build.

Comment 7 Miro Hrončok 2021-06-08 11:29:47 UTC
*** Bug 1969064 has been marked as a duplicate of this bug. ***

Comment 8 Miro Hrončok 2021-06-09 23:12:43 UTC
Hello,

Please note that this comment was generated automatically. If you feel that this output has mistakes, please contact me via email (mhroncok@redhat.com).

All subpackages of a package against which this bug was filled are now installable or removed from Fedora 35.

Thanks for taking care of it!


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