Bug 2176174

Summary: flatpak-module-tools fails to build with Python 3.12: AttributeError: 'RawConfigParser' object has no attribute 'readfp'.
Product: [Fedora] Fedora Reporter: Tomáš Hrnčiar <thrnciar>
Component: flatpak-module-toolsAssignee: Owen Taylor <otaylor>
Status: CLOSED EOL QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 39CC: klember, mhroncok, otaylor, 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: 2024-11-27 21:08:17 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: 2135404    

Description Tomáš Hrnčiar 2023-03-07 14:59:18 UTC
flatpak-module-tools fails to build with Python 3.12.0a5.

_________________________ test_renames[eog-None-None] __________________________

app_tree = <test_tree_processor.AppTree object at 0x7f3fa6a69c10>
rename_appdata_file = None, rename_desktop_file = None, rename_icon = 'eog'

    @pytest.mark.parametrize('rename_appdata_file', (None, 'eog.appdata.xml', 'eog.metainfo.xml'))
    @pytest.mark.parametrize('rename_desktop_file', (None, 'eog.desktop'))
    @pytest.mark.parametrize('rename_icon', (None, 'eog'))
    def test_renames(app_tree,
                     rename_appdata_file,
                     rename_desktop_file,
                     rename_icon):
        app_tree.create(rename_appdata_file,
                        rename_desktop_file,
                        rename_icon)
    
        processor = FileTreeProcessor(app_tree.root, {
            'id': 'org.gnome.eog',
            'rename-appdata-file': rename_appdata_file,
            'rename-desktop-file': rename_desktop_file,
            'rename-icon': rename_icon,
        })
>       processor.process()

tests/test_tree_processor.py:158: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
../../BUILDROOT/flatpak-module-tools-0.13-7.fc39.x86_64/usr/lib/python3.12/site-packages/flatpak_module_tools/flatpak_builder.py:331: in process
    self._rewrite_desktop_file()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <flatpak_module_tools.flatpak_builder.FileTreeProcessor object at 0x7f3fa6a61a60>

    def _rewrite_desktop_file(self):
        if not (self.rename_icon or self.desktop_file_name_prefix or self.desktop_file_name_suffix):
            return
    
        applications_dir = os.path.join(self.app_root, "share/applications")
        desktop_basename = self.app_id + ".desktop"
        desktop = os.path.join(applications_dir, desktop_basename)
    
        self.log.debug("Rewriting contents of %s", desktop_basename)
    
        cp = CP()
        cp.optionxform = str
        with open(desktop) as f:
>           cp.readfp(f)
E           AttributeError: 'RawConfigParser' object has no attribute 'readfp'. Did you mean: 'read'?

../../BUILDROOT/flatpak-module-tools-0.13-7.fc39.x86_64/usr/lib/python3.12/site-packages/flatpak_module_tools/flatpak_builder.py:290: AttributeError
____________________ test_renames[eog-None-eog.appdata.xml] ____________________

app_tree = <test_tree_processor.AppTree object at 0x7f3fa6a6a9f0>
rename_appdata_file = 'eog.appdata.xml', rename_desktop_file = None
rename_icon = 'eog'

    @pytest.mark.parametrize('rename_appdata_file', (None, 'eog.appdata.xml', 'eog.metainfo.xml'))
    @pytest.mark.parametrize('rename_desktop_file', (None, 'eog.desktop'))
    @pytest.mark.parametrize('rename_icon', (None, 'eog'))
    def test_renames(app_tree,
                     rename_appdata_file,
                     rename_desktop_file,
                     rename_icon):
        app_tree.create(rename_appdata_file,
                        rename_desktop_file,
                        rename_icon)
    
        processor = FileTreeProcessor(app_tree.root, {
            'id': 'org.gnome.eog',
            'rename-appdata-file': rename_appdata_file,
            'rename-desktop-file': rename_desktop_file,
            'rename-icon': rename_icon,
        })
>       processor.process()

tests/test_tree_processor.py:158: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
../../BUILDROOT/flatpak-module-tools-0.13-7.fc39.x86_64/usr/lib/python3.12/site-packages/flatpak_module_tools/flatpak_builder.py:331: in process
    self._rewrite_desktop_file()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <flatpak_module_tools.flatpak_builder.FileTreeProcessor object at 0x7f3fa69f5790>

    def _rewrite_desktop_file(self):
        if not (self.rename_icon or self.desktop_file_name_prefix or self.desktop_file_name_suffix):
            return
    
        applications_dir = os.path.join(self.app_root, "share/applications")
        desktop_basename = self.app_id + ".desktop"
        desktop = os.path.join(applications_dir, desktop_basename)
    
        self.log.debug("Rewriting contents of %s", desktop_basename)
    
        cp = CP()
        cp.optionxform = str
        with open(desktop) as f:
>           cp.readfp(f)
E           AttributeError: 'RawConfigParser' object has no attribute 'readfp'. Did you mean: 'read'?

../../BUILDROOT/flatpak-module-tools-0.13-7.fc39.x86_64/usr/lib/python3.12/site-packages/flatpak_module_tools/flatpak_builder.py:290: AttributeError
___________________ test_renames[eog-None-eog.metainfo.xml] ____________________

app_tree = <test_tree_processor.AppTree object at 0x7f3fa784b980>
rename_appdata_file = 'eog.metainfo.xml', rename_desktop_file = None
rename_icon = 'eog'

    @pytest.mark.parametrize('rename_appdata_file', (None, 'eog.appdata.xml', 'eog.metainfo.xml'))
    @pytest.mark.parametrize('rename_desktop_file', (None, 'eog.desktop'))
    @pytest.mark.parametrize('rename_icon', (None, 'eog'))
    def test_renames(app_tree,
                     rename_appdata_file,
                     rename_desktop_file,
                     rename_icon):
        app_tree.create(rename_appdata_file,
                        rename_desktop_file,
                        rename_icon)
    
        processor = FileTreeProcessor(app_tree.root, {
            'id': 'org.gnome.eog',
            'rename-appdata-file': rename_appdata_file,
            'rename-desktop-file': rename_desktop_file,
            'rename-icon': rename_icon,
        })
>       processor.process()

tests/test_tree_processor.py:158: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
../../BUILDROOT/flatpak-module-tools-0.13-7.fc39.x86_64/usr/lib/python3.12/site-packages/flatpak_module_tools/flatpak_builder.py:331: in process
    self._rewrite_desktop_file()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <flatpak_module_tools.flatpak_builder.FileTreeProcessor object at 0x7f3fa784a090>

    def _rewrite_desktop_file(self):
        if not (self.rename_icon or self.desktop_file_name_prefix or self.desktop_file_name_suffix):
            return
    
        applications_dir = os.path.join(self.app_root, "share/applications")
        desktop_basename = self.app_id + ".desktop"
        desktop = os.path.join(applications_dir, desktop_basename)
    
        self.log.debug("Rewriting contents of %s", desktop_basename)
    
        cp = CP()
        cp.optionxform = str
        with open(desktop) as f:
>           cp.readfp(f)
E           AttributeError: 'RawConfigParser' object has no attribute 'readfp'. Did you mean: 'read'?

../../BUILDROOT/flatpak-module-tools-0.13-7.fc39.x86_64/usr/lib/python3.12/site-packages/flatpak_module_tools/flatpak_builder.py:290: AttributeError
______________________ test_renames[eog-eog.desktop-None] ______________________

app_tree = <test_tree_processor.AppTree object at 0x7f3fa6a2ab10>
rename_appdata_file = None, rename_desktop_file = 'eog.desktop'
rename_icon = 'eog'

    @pytest.mark.parametrize('rename_appdata_file', (None, 'eog.appdata.xml', 'eog.metainfo.xml'))
    @pytest.mark.parametrize('rename_desktop_file', (None, 'eog.desktop'))
    @pytest.mark.parametrize('rename_icon', (None, 'eog'))
    def test_renames(app_tree,
                     rename_appdata_file,
                     rename_desktop_file,
                     rename_icon):
        app_tree.create(rename_appdata_file,
                        rename_desktop_file,
                        rename_icon)
    
        processor = FileTreeProcessor(app_tree.root, {
            'id': 'org.gnome.eog',
            'rename-appdata-file': rename_appdata_file,
            'rename-desktop-file': rename_desktop_file,
            'rename-icon': rename_icon,
        })
>       processor.process()

tests/test_tree_processor.py:158: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
../../BUILDROOT/flatpak-module-tools-0.13-7.fc39.x86_64/usr/lib/python3.12/site-packages/flatpak_module_tools/flatpak_builder.py:331: in process
    self._rewrite_desktop_file()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <flatpak_module_tools.flatpak_builder.FileTreeProcessor object at 0x7f3fa6a2b4d0>

    def _rewrite_desktop_file(self):
        if not (self.rename_icon or self.desktop_file_name_prefix or self.desktop_file_name_suffix):
            return
    
        applications_dir = os.path.join(self.app_root, "share/applications")
        desktop_basename = self.app_id + ".desktop"
        desktop = os.path.join(applications_dir, desktop_basename)
    
        self.log.debug("Rewriting contents of %s", desktop_basename)
    
        cp = CP()
        cp.optionxform = str
        with open(desktop) as f:
>           cp.readfp(f)
E           AttributeError: 'RawConfigParser' object has no attribute 'readfp'. Did you mean: 'read'?

../../BUILDROOT/flatpak-module-tools-0.13-7.fc39.x86_64/usr/lib/python3.12/site-packages/flatpak_module_tools/flatpak_builder.py:290: AttributeError
________________ test_renames[eog-eog.desktop-eog.appdata.xml] _________________

app_tree = <test_tree_processor.AppTree object at 0x7f3fa7747ec0>
rename_appdata_file = 'eog.appdata.xml', rename_desktop_file = 'eog.desktop'
rename_icon = 'eog'

    @pytest.mark.parametrize('rename_appdata_file', (None, 'eog.appdata.xml', 'eog.metainfo.xml'))
    @pytest.mark.parametrize('rename_desktop_file', (None, 'eog.desktop'))
    @pytest.mark.parametrize('rename_icon', (None, 'eog'))
    def test_renames(app_tree,
                     rename_appdata_file,
                     rename_desktop_file,
                     rename_icon):
        app_tree.create(rename_appdata_file,
                        rename_desktop_file,
                        rename_icon)
    
        processor = FileTreeProcessor(app_tree.root, {
            'id': 'org.gnome.eog',
            'rename-appdata-file': rename_appdata_file,
            'rename-desktop-file': rename_desktop_file,
            'rename-icon': rename_icon,
        })
>       processor.process()

tests/test_tree_processor.py:158: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
../../BUILDROOT/flatpak-module-tools-0.13-7.fc39.x86_64/usr/lib/python3.12/site-packages/flatpak_module_tools/flatpak_builder.py:331: in process
    self._rewrite_desktop_file()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <flatpak_module_tools.flatpak_builder.FileTreeProcessor object at 0x7f3fa7849c40>

    def _rewrite_desktop_file(self):
        if not (self.rename_icon or self.desktop_file_name_prefix or self.desktop_file_name_suffix):
            return
    
        applications_dir = os.path.join(self.app_root, "share/applications")
        desktop_basename = self.app_id + ".desktop"
        desktop = os.path.join(applications_dir, desktop_basename)
    
        self.log.debug("Rewriting contents of %s", desktop_basename)
    
        cp = CP()
        cp.optionxform = str
        with open(desktop) as f:
>           cp.readfp(f)
E           AttributeError: 'RawConfigParser' object has no attribute 'readfp'. Did you mean: 'read'?

../../BUILDROOT/flatpak-module-tools-0.13-7.fc39.x86_64/usr/lib/python3.12/site-packages/flatpak_module_tools/flatpak_builder.py:290: AttributeError
________________ test_renames[eog-eog.desktop-eog.metainfo.xml] ________________

app_tree = <test_tree_processor.AppTree object at 0x7f3fa6a57260>
rename_appdata_file = 'eog.metainfo.xml', rename_desktop_file = 'eog.desktop'
rename_icon = 'eog'

    @pytest.mark.parametrize('rename_appdata_file', (None, 'eog.appdata.xml', 'eog.metainfo.xml'))
    @pytest.mark.parametrize('rename_desktop_file', (None, 'eog.desktop'))
    @pytest.mark.parametrize('rename_icon', (None, 'eog'))
    def test_renames(app_tree,
                     rename_appdata_file,
                     rename_desktop_file,
                     rename_icon):
        app_tree.create(rename_appdata_file,
                        rename_desktop_file,
                        rename_icon)
    
        processor = FileTreeProcessor(app_tree.root, {
            'id': 'org.gnome.eog',
            'rename-appdata-file': rename_appdata_file,
            'rename-desktop-file': rename_desktop_file,
            'rename-icon': rename_icon,
        })
>       processor.process()

tests/test_tree_processor.py:158: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
../../BUILDROOT/flatpak-module-tools-0.13-7.fc39.x86_64/usr/lib/python3.12/site-packages/flatpak_module_tools/flatpak_builder.py:331: in process
    self._rewrite_desktop_file()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <flatpak_module_tools.flatpak_builder.FileTreeProcessor object at 0x7f3fa6a56270>

    def _rewrite_desktop_file(self):
        if not (self.rename_icon or self.desktop_file_name_prefix or self.desktop_file_name_suffix):
            return
    
        applications_dir = os.path.join(self.app_root, "share/applications")
        desktop_basename = self.app_id + ".desktop"
        desktop = os.path.join(applications_dir, desktop_basename)
    
        self.log.debug("Rewriting contents of %s", desktop_basename)
    
        cp = CP()
        cp.optionxform = str
        with open(desktop) as f:
>           cp.readfp(f)
E           AttributeError: 'RawConfigParser' object has no attribute 'readfp'. Did you mean: 'read'?

../../BUILDROOT/flatpak-module-tools-0.13-7.fc39.x86_64/usr/lib/python3.12/site-packages/flatpak_module_tools/flatpak_builder.py:290: AttributeError
________________________________ test_copy_icon ________________________________

app_tree = <test_tree_processor.AppTree object at 0x7f3fa785dcd0>

    def test_copy_icon(app_tree):
        app_tree.create(rename_icon='eog')
    
        processor = FileTreeProcessor(app_tree.root, {
            'id': 'org.gnome.eog',
            'rename-icon': 'eog',
            'copy-icon': True
        })
>       processor.process()

tests/test_tree_processor.py:176: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
../../BUILDROOT/flatpak-module-tools-0.13-7.fc39.x86_64/usr/lib/python3.12/site-packages/flatpak_module_tools/flatpak_builder.py:331: in process
    self._rewrite_desktop_file()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <flatpak_module_tools.flatpak_builder.FileTreeProcessor object at 0x7f3fa785e210>

    def _rewrite_desktop_file(self):
        if not (self.rename_icon or self.desktop_file_name_prefix or self.desktop_file_name_suffix):
            return
    
        applications_dir = os.path.join(self.app_root, "share/applications")
        desktop_basename = self.app_id + ".desktop"
        desktop = os.path.join(applications_dir, desktop_basename)
    
        self.log.debug("Rewriting contents of %s", desktop_basename)
    
        cp = CP()
        cp.optionxform = str
        with open(desktop) as f:
>           cp.readfp(f)
E           AttributeError: 'RawConfigParser' object has no attribute 'readfp'. Did you mean: 'read'?

../../BUILDROOT/flatpak-module-tools-0.13-7.fc39.x86_64/usr/lib/python3.12/site-packages/flatpak_module_tools/flatpak_builder.py:290: AttributeError
____________ test_desktop_file_name_prefix_suffix[None-Wonderful ] _____________

app_tree = <test_tree_processor.AppTree object at 0x7f3fa6a4b950>
prefix = 'Wonderful ', suffix = None

    @pytest.mark.parametrize('prefix', (None, 'Wonderful '))
    @pytest.mark.parametrize('suffix', (None, ' Nightly'))
    def test_desktop_file_name_prefix_suffix(app_tree, prefix, suffix):
        app_tree.create()
    
        processor = FileTreeProcessor(app_tree.root, {
            'id': 'org.gnome.eog',
            'desktop-file-name-prefix': prefix,
            'desktop-file-name-suffix': suffix,
        })
>       processor.process()

tests/test_tree_processor.py:192: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
../../BUILDROOT/flatpak-module-tools-0.13-7.fc39.x86_64/usr/lib/python3.12/site-packages/flatpak_module_tools/flatpak_builder.py:331: in process
    self._rewrite_desktop_file()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <flatpak_module_tools.flatpak_builder.FileTreeProcessor object at 0x7f3fa6a4a510>

    def _rewrite_desktop_file(self):
        if not (self.rename_icon or self.desktop_file_name_prefix or self.desktop_file_name_suffix):
            return
    
        applications_dir = os.path.join(self.app_root, "share/applications")
        desktop_basename = self.app_id + ".desktop"
        desktop = os.path.join(applications_dir, desktop_basename)
    
        self.log.debug("Rewriting contents of %s", desktop_basename)
    
        cp = CP()
        cp.optionxform = str
        with open(desktop) as f:
>           cp.readfp(f)
E           AttributeError: 'RawConfigParser' object has no attribute 'readfp'. Did you mean: 'read'?

../../BUILDROOT/flatpak-module-tools-0.13-7.fc39.x86_64/usr/lib/python3.12/site-packages/flatpak_module_tools/flatpak_builder.py:290: AttributeError
_____________ test_desktop_file_name_prefix_suffix[ Nightly-None] ______________

app_tree = <test_tree_processor.AppTree object at 0x7f3fa64f5a30>, prefix = None
suffix = ' Nightly'

    @pytest.mark.parametrize('prefix', (None, 'Wonderful '))
    @pytest.mark.parametrize('suffix', (None, ' Nightly'))
    def test_desktop_file_name_prefix_suffix(app_tree, prefix, suffix):
        app_tree.create()
    
        processor = FileTreeProcessor(app_tree.root, {
            'id': 'org.gnome.eog',
            'desktop-file-name-prefix': prefix,
            'desktop-file-name-suffix': suffix,
        })
>       processor.process()

tests/test_tree_processor.py:192: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
../../BUILDROOT/flatpak-module-tools-0.13-7.fc39.x86_64/usr/lib/python3.12/site-packages/flatpak_module_tools/flatpak_builder.py:331: in process
    self._rewrite_desktop_file()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <flatpak_module_tools.flatpak_builder.FileTreeProcessor object at 0x7f3fa64f6540>

    def _rewrite_desktop_file(self):
        if not (self.rename_icon or self.desktop_file_name_prefix or self.desktop_file_name_suffix):
            return
    
        applications_dir = os.path.join(self.app_root, "share/applications")
        desktop_basename = self.app_id + ".desktop"
        desktop = os.path.join(applications_dir, desktop_basename)
    
        self.log.debug("Rewriting contents of %s", desktop_basename)
    
        cp = CP()
        cp.optionxform = str
        with open(desktop) as f:
>           cp.readfp(f)
E           AttributeError: 'RawConfigParser' object has no attribute 'readfp'. Did you mean: 'read'?

../../BUILDROOT/flatpak-module-tools-0.13-7.fc39.x86_64/usr/lib/python3.12/site-packages/flatpak_module_tools/flatpak_builder.py:290: AttributeError
__________ test_desktop_file_name_prefix_suffix[ Nightly-Wonderful ] ___________

app_tree = <test_tree_processor.AppTree object at 0x7f3fa6a86570>
prefix = 'Wonderful ', suffix = ' Nightly'

    @pytest.mark.parametrize('prefix', (None, 'Wonderful '))
    @pytest.mark.parametrize('suffix', (None, ' Nightly'))
    def test_desktop_file_name_prefix_suffix(app_tree, prefix, suffix):
        app_tree.create()
    
        processor = FileTreeProcessor(app_tree.root, {
            'id': 'org.gnome.eog',
            'desktop-file-name-prefix': prefix,
            'desktop-file-name-suffix': suffix,
        })
>       processor.process()

tests/test_tree_processor.py:192: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
../../BUILDROOT/flatpak-module-tools-0.13-7.fc39.x86_64/usr/lib/python3.12/site-packages/flatpak_module_tools/flatpak_builder.py:331: in process
    self._rewrite_desktop_file()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <flatpak_module_tools.flatpak_builder.FileTreeProcessor object at 0x7f3fa6a86e70>

    def _rewrite_desktop_file(self):
        if not (self.rename_icon or self.desktop_file_name_prefix or self.desktop_file_name_suffix):
            return
    
        applications_dir = os.path.join(self.app_root, "share/applications")
        desktop_basename = self.app_id + ".desktop"
        desktop = os.path.join(applications_dir, desktop_basename)
    
        self.log.debug("Rewriting contents of %s", desktop_basename)
    
        cp = CP()
        cp.optionxform = str
        with open(desktop) as f:
>           cp.readfp(f)
E           AttributeError: 'RawConfigParser' object has no attribute 'readfp'. Did you mean: 'read'?

    - configparser.ParsingError no longer has a filename attribute or argument.
Use the source attribute and argument instead.

    - configparser no longer has a SafeConfigParser class. Use the shorter
ConfigParser name instead.

    - configparser.ConfigParser no longer has a readfp method. Use read_file()
instead.

https://github.com/python/cpython/issues/89336
https://docs.python.org/3.12/whatsnew/3.12.html

For the build logs, see:
https://copr-be.cloud.fedoraproject.org/results/@python/python3.12/fedora-rawhide-x86_64/05574251-flatpak-module-tools/

For all our attempts to build flatpak-module-tools with Python 3.12, see:
https://copr.fedorainfracloud.org/coprs/g/python/python3.12/package/flatpak-module-tools/

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

Let us know here if you have any questions.

Python 3.12 is planned to be included in Fedora 39. To make that update smoother, we're building Fedora packages with all pre-releases of Python 3.12.
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 Fedora Release Engineering 2023-08-16 07:11:07 UTC
This bug appears to have been reported against 'rawhide' during the Fedora Linux 39 development cycle.
Changing version to 39.

Comment 2 Aoife Moloney 2024-11-08 10:49:03 UTC
This message is a reminder that Fedora Linux 39 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora Linux 39 on 2024-11-26.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
'version' of '39'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, change the 'version' 
to a later Fedora Linux version. Note that the version field may be hidden.
Click the "Show advanced fields" button if you do not see it.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora Linux 39 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora Linux, you are encouraged to change the 'version' to a later version
prior to this bug being closed.

Comment 3 Aoife Moloney 2024-11-27 21:08:17 UTC
Fedora Linux 39 entered end-of-life (EOL) status on 2024-11-26.

Fedora Linux 39 is no longer maintained, which means that it
will not receive any further security or bug fix updates. As a result we
are closing this bug.

If you can reproduce this bug against a currently maintained version of Fedora Linux
please feel free to reopen this bug against that version. Note that the version
field may be hidden. Click the "Show advanced fields" button if you do not see
the version field.

If you are unable to reopen this bug, please file a new report against an
active release.

Thank you for reporting this bug and we are sorry it could not be fixed.