Bug 2280571

Summary: python-zlib-ng fails to build with Python 3.13: OSError: [Errno 9] write() on read-only GzipNGFile object
Product: [Fedora] Fedora Reporter: Karolina Surma <ksurma>
Component: python-zlib-ngAssignee: Ben Beasley <code>
Status: CLOSED ERRATA QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: code, ksurma, mhroncok, neuro-sig
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: python-zlib-ng-0.4.3-2.fc41 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2024-05-15 20:35:24 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: 2244836    

Description Karolina Surma 2024-05-15 07:55:01 UTC
python-zlib-ng fails to build with Python 3.13.0b1.

55 tests fail:

____________________ test_compress_infile_out_file_no_name _____________________

tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_compress_infile_out_file_4')
capsysbinary = <_pytest.capture.CaptureFixture object at 0x7f26cf229f60>

    def test_compress_infile_out_file_no_name(tmp_path, capsysbinary):
        test = tmp_path / "test"
        test.write_bytes(DATA)
        out_file = tmp_path / "compressed.gz"
        sys.argv = ['', '-n', '-o', str(out_file), str(test)]
>       gzip_ng.main()

tests/test_gzip_ng.py:247: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
../../BUILDROOT/python-zlib-ng-0.4.2-1.fc41.x86_64/usr/lib64/python3.13/site-packages/zlib_ng/gzip_ng.py:332: in main
    out_file.write(block)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <gzip_ng on 0x7f26d13b0670>, data = b'This is a simple test with gzip_ng'

    def write(self, data):
        self._check_not_closed()
        if self.mode != WRITE:
            import errno
>           raise OSError(errno.EBADF, "write() on read-only GzipNGFile object")
E           OSError: [Errno 9] write() on read-only GzipNGFile object

../../BUILDROOT/python-zlib-ng-0.4.2-1.fc41.x86_64/usr/lib64/python3.13/site-packages/zlib_ng/gzip_ng.py:158: OSError 


https://docs.python.org/3.13/whatsnew/3.13.html

For the build logs, see:
https://copr-be.cloud.fedoraproject.org/results/@python/python3.13/fedora-rawhide-x86_64/07443692-python-zlib-ng/

For all our attempts to build python-zlib-ng with Python 3.13, see:
https://copr.fedorainfracloud.org/coprs/g/python/python3.13/package/python-zlib-ng/

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

Let us know here if you have any questions.

Python 3.13 is planned to be included in Fedora 41.
To make that update smoother, we're building Fedora packages with all pre-releases of Python 3.13.
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 Update System 2024-05-15 19:41:39 UTC
FEDORA-2024-d1c88358dc (python-zlib-ng-0.4.3-2.fc41) has been submitted as an update to Fedora 41.
https://bodhi.fedoraproject.org/updates/FEDORA-2024-d1c88358dc

Comment 2 Fedora Update System 2024-05-15 20:35:24 UTC
FEDORA-2024-d1c88358dc (python-zlib-ng-0.4.3-2.fc41) has been pushed to the Fedora 41 stable repository.
If problem still persists, please make note of it in this bug report.