Skip to content

Conversation

hroncok
Copy link
Contributor

@hroncok hroncok commented Dec 5, 2023

zlib-ng defines the version as "1.3.0.zlib-ng".

https://github.com/zlib-ng/zlib-ng/blob/f3211aba349a1d4781d0d41cb00d29fb8325af06/zlib.h.in#L61

test.test_zlib.CompressObjectTestCase.test_flushes blew up with:

Traceback (most recent call last):
  File "/builddir/build/BUILD/Python-3.12.0/Lib/test/test_zlib.py", line 477, in test_flushes
    ver = tuple(int(v) for v in zlib.ZLIB_RUNTIME_VERSION.split('.'))
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/builddir/build/BUILD/Python-3.12.0/Lib/test/test_zlib.py", line 477, in <genexpr>
    ver = tuple(int(v) for v in zlib.ZLIB_RUNTIME_VERSION.split('.'))
                ^^^^^^
ValueError: invalid literal for int() with base 10: 'zlib-ng'

This reuses logic from another test.

Fixes #112769

…th non-int suffix

zlib-ng defines the version as "1.3.0.zlib-ng".

https://github.com/zlib-ng/zlib-ng/blob/f3211aba349a1d4781d0d41cb00d29fb8325af06/zlib.h.in#L61

test.test_zlib.CompressObjectTestCase.test_flushes blew up with:

    Traceback (most recent call last):
      File "/builddir/build/BUILD/Python-3.12.0/Lib/test/test_zlib.py", line 477, in test_flushes
        ver = tuple(int(v) for v in zlib.ZLIB_RUNTIME_VERSION.split('.'))
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/builddir/build/BUILD/Python-3.12.0/Lib/test/test_zlib.py", line 477, in <genexpr>
        ver = tuple(int(v) for v in zlib.ZLIB_RUNTIME_VERSION.split('.'))
                    ^^^^^^
    ValueError: invalid literal for int() with base 10: 'zlib-ng'

This reuses logic from another test.

Fixes python#112769
@serhiy-storchaka serhiy-storchaka added needs backport to 3.11 only security fixes needs backport to 3.12 only security fixes labels Dec 5, 2023
@serhiy-storchaka serhiy-storchaka merged commit d384813 into python:main Dec 5, 2023
@miss-islington-app
Copy link

Thanks @hroncok for the PR, and @serhiy-storchaka for merging it 🌮🎉.. I'm working now to backport this PR to: 3.11, 3.12.
🐍🍒⛏🤖

@bedevere-app
Copy link

bedevere-app bot commented Dec 5, 2023

GH-112773 is a backport of this pull request to the 3.12 branch.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Dec 5, 2023
…th non-int suffix (pythonGH-112771)

zlib-ng defines the version as "1.3.0.zlib-ng".
(cherry picked from commit d384813)

Co-authored-by: Miro Hrončok <miro@hroncok.cz>
@bedevere-app bedevere-app bot removed the needs backport to 3.12 only security fixes label Dec 5, 2023
@bedevere-app
Copy link

bedevere-app bot commented Dec 5, 2023

GH-112774 is a backport of this pull request to the 3.11 branch.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Dec 5, 2023
…th non-int suffix (pythonGH-112771)

zlib-ng defines the version as "1.3.0.zlib-ng".
(cherry picked from commit d384813)

Co-authored-by: Miro Hrončok <miro@hroncok.cz>
@bedevere-app bedevere-app bot removed the needs backport to 3.11 only security fixes label Dec 5, 2023
@hroncok hroncok deleted the zlib-ng-version branch December 5, 2023 19:40
@hroncok
Copy link
Contributor Author

hroncok commented Dec 5, 2023

Thanks @serhiy-storchaka

serhiy-storchaka pushed a commit that referenced this pull request Dec 5, 2023
…ith non-int suffix (GH-112771) (GH-112774)

zlib-ng defines the version as "1.3.0.zlib-ng".
(cherry picked from commit d384813)

Co-authored-by: Miro Hrončok <miro@hroncok.cz>
serhiy-storchaka pushed a commit that referenced this pull request Dec 5, 2023
…ith non-int suffix (GH-112771) (GH-112773)

zlib-ng defines the version as "1.3.0.zlib-ng".
(cherry picked from commit d384813)

Co-authored-by: Miro Hrončok <miro@hroncok.cz>
befeleme pushed a commit to fedora-python/cpython that referenced this pull request Jan 25, 2024
…SION with non-int suffix (pythonGH-112771) (pythonGH-112774)

zlib-ng defines the version as "1.3.0.zlib-ng".
(cherry picked from commit d384813)
befeleme pushed a commit to fedora-python/cpython that referenced this pull request Jan 25, 2024
…SION with non-int suffix (pythonGH-112771) (pythonGH-112774)

zlib-ng defines the version as "1.3.0.zlib-ng".
(cherry picked from commit d384813)

Co-authored-by: Miro Hrončok <miro@hroncok.cz>
befeleme pushed a commit to fedora-python/cpython that referenced this pull request Jan 25, 2024
…SION with non-int suffix (pythonGH-112771) (pythonGH-112774)

zlib-ng defines the version as "1.3.0.zlib-ng".
(cherry picked from commit d384813)
befeleme pushed a commit to fedora-python/cpython that referenced this pull request Jan 25, 2024
…SION with non-int suffix (pythonGH-112771) (pythonGH-112774)

zlib-ng defines the version as "1.3.0.zlib-ng".
(cherry picked from commit d384813)
befeleme pushed a commit to fedora-python/cpython that referenced this pull request Jan 25, 2024
…SION with non-int suffix (pythonGH-112771) (pythonGH-112774)

zlib-ng defines the version as "1.3.0.zlib-ng".
(cherry picked from commit d384813)
aisk pushed a commit to aisk/cpython that referenced this pull request Feb 11, 2024
…th non-int suffix (pythonGH-112771)

zlib-ng defines the version as "1.3.0.zlib-ng".
stratakis pushed a commit to stratakis/cpython that referenced this pull request Feb 27, 2024
…SION with non-int suffix (pythonGH-112771) (pythonGH-112774)

zlib-ng defines the version as "1.3.0.zlib-ng".
(cherry picked from commit d384813)
hroncok added a commit to fedora-python/cpython that referenced this pull request Mar 7, 2024
…SION with non-int suffix (pythonGH-112771) (pythonGH-112774)

zlib-ng defines the version as "1.3.0.zlib-ng".
(cherry picked from commit d384813)
stratakis pushed a commit to stratakis/cpython that referenced this pull request Mar 11, 2024
…SION with non-int suffix (pythonGH-112771) (pythonGH-112774)

zlib-ng defines the version as "1.3.0.zlib-ng".
(cherry picked from commit d384813)
stratakis pushed a commit to stratakis/cpython that referenced this pull request Mar 11, 2024
…SION with non-int suffix (pythonGH-112771) (pythonGH-112774)

zlib-ng defines the version as "1.3.0.zlib-ng".
(cherry picked from commit d384813)
stratakis pushed a commit to stratakis/cpython that referenced this pull request Mar 20, 2024
…SION with non-int suffix (pythonGH-112771) (pythonGH-112774)

zlib-ng defines the version as "1.3.0.zlib-ng".
(cherry picked from commit d384813)
hrnciar pushed a commit to fedora-python/cpython that referenced this pull request Mar 20, 2024
…SION with non-int suffix (pythonGH-112771) (pythonGH-112774)

zlib-ng defines the version as "1.3.0.zlib-ng".
(cherry picked from commit d384813)
hrnciar pushed a commit to fedora-python/cpython that referenced this pull request Mar 20, 2024
…SION with non-int suffix (pythonGH-112771) (pythonGH-112774)

zlib-ng defines the version as "1.3.0.zlib-ng".
(cherry picked from commit d384813)
hrnciar pushed a commit to fedora-python/cpython that referenced this pull request Mar 20, 2024
…SION with non-int suffix (pythonGH-112771) (pythonGH-112774)

zlib-ng defines the version as "1.3.0.zlib-ng".
(cherry picked from commit d384813)
stratakis pushed a commit to stratakis/cpython that referenced this pull request Mar 20, 2024
…SION with non-int suffix (pythonGH-112771) (pythonGH-112774)

zlib-ng defines the version as "1.3.0.zlib-ng".
(cherry picked from commit d384813)
stratakis pushed a commit to stratakis/cpython that referenced this pull request Mar 20, 2024
…SION with non-int suffix (pythonGH-112771) (pythonGH-112774)

zlib-ng defines the version as "1.3.0.zlib-ng".
(cherry picked from commit d384813)
stratakis pushed a commit to stratakis/cpython that referenced this pull request Mar 20, 2024
…SION with non-int suffix (pythonGH-112771) (pythonGH-112774)

zlib-ng defines the version as "1.3.0.zlib-ng".
(cherry picked from commit d384813)
stratakis pushed a commit to stratakis/cpython that referenced this pull request Mar 25, 2024
…SION with non-int suffix (pythonGH-112771) (pythonGH-112774)

zlib-ng defines the version as "1.3.0.zlib-ng".
(cherry picked from commit d384813)
hroncok added a commit to fedora-python/cpython that referenced this pull request Mar 26, 2024
…SION with non-int suffix (pythonGH-112771) (pythonGH-112774)

zlib-ng defines the version as "1.3.0.zlib-ng".
(cherry picked from commit d384813)
mcepl pushed a commit to openSUSE-Python/cpython that referenced this pull request Apr 2, 2024
…SION with non-int suffix (pythonGH-112771) (pythonGH-112774)

zlib-ng defines the version as "1.3.0.zlib-ng".
(cherry picked from commit d384813)
@encukou encukou added 3.10 only security fixes needs backport to 3.10 only security fixes and removed 3.10 only security fixes labels May 21, 2024
@miss-islington-app
Copy link

Thanks @hroncok for the PR, and @serhiy-storchaka for merging it 🌮🎉.. I'm working now to backport this PR to: 3.10.
🐍🍒⛏🤖

@miss-islington-app
Copy link

Sorry, @hroncok and @serhiy-storchaka, I could not cleanly backport this to 3.10 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker d384813ff18b33280a90b6d2011654528a2b6ad1 3.10

@bedevere-app
Copy link

bedevere-app bot commented May 25, 2024

GH-119565 is a backport of this pull request to the 3.10 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.10 only security fixes label May 25, 2024
@bedevere-app
Copy link

bedevere-app bot commented May 25, 2024

GH-119566 is a backport of this pull request to the 3.9 branch.

@bedevere-app
Copy link

bedevere-app bot commented May 25, 2024

GH-119567 is a backport of this pull request to the 3.8 branch.

pablogsal pushed a commit that referenced this pull request May 28, 2024
…E_VERSION with non-int suffix (GH-112771) (#119565)

[3.10] gh-112769: test_zlib: test_zlib: Fix comparison of ZLIB_RUNTIME_VERSION with non-int suffix

zlib-ng defines the version as "1.3.0.zlib-ng".
(cherry picked from commit d384813)

Co-authored-by: Miro Hrončok miro@hroncok.cz
ambv pushed a commit that referenced this pull request May 30, 2024
…_VERSION with non-int suffix (GH-112771) (GH-119566)

zlib-ng defines the version as "1.3.0.zlib-ng".

(cherry picked from commit d384813)

Co-authored-by: Miro Hrončok miro@hroncok.cz
ambv pushed a commit that referenced this pull request May 30, 2024
…_VERSION with non-int suffix (GH-112771) (GH-119567)

zlib-ng defines the version as "1.3.0.zlib-ng".

(cherry picked from commit d384813)

Co-authored-by: Miro Hrončok miro@hroncok.cz
Glyphack pushed a commit to Glyphack/cpython that referenced this pull request Sep 2, 2024
…th non-int suffix (pythonGH-112771)

zlib-ng defines the version as "1.3.0.zlib-ng".
hrnciar pushed a commit to fedora-python/cpython that referenced this pull request Sep 9, 2024
…SION with non-int suffix (pythonGH-112771) (pythonGH-112774)

zlib-ng defines the version as "1.3.0.zlib-ng".
(cherry picked from commit d384813)
hrnciar pushed a commit to fedora-python/cpython that referenced this pull request Apr 23, 2025
…SION with non-int suffix (pythonGH-112771) (pythonGH-112774)

zlib-ng defines the version as "1.3.0.zlib-ng".
(cherry picked from commit d384813)
hroncok added a commit to fedora-python/cpython that referenced this pull request Jul 4, 2025
…SION with non-int suffix (pythonGH-112771) (pythonGH-112774)

zlib-ng defines the version as "1.3.0.zlib-ng".
(cherry picked from commit d384813)
frenzymadness pushed a commit to fedora-python/cpython that referenced this pull request Aug 12, 2025
…SION with non-int suffix (pythonGH-112771) (pythonGH-112774)

zlib-ng defines the version as "1.3.0.zlib-ng".
(cherry picked from commit d384813)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tests Tests in the Lib/test dir
Projects
None yet
Development

Successfully merging this pull request may close these issues.

test.test_zlib.CompressObjectTestCase.test_flushes fails to parse ZLIB_VERSION with zlib-ng
3 participants