Bug 2328038 - python-cramjam test_variants_decompress_info fails with: from hypothesis.internal.conjecture.optimiser import Optimiser results in SyntaxError: could not convert string to float: 'R'
Summary: python-cramjam test_variants_decompress_info fails with: from hypothesis.inte...
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Fedora
Classification: Fedora
Component: python-hypothesis
Version: 42
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miro Hrončok
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2024-11-22 14:15 UTC by Karolina Surma
Modified: 2026-03-18 14:44 UTC (History)
9 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2026-03-18 14:44:28 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github HypothesisWorks hypothesis issues 4267 0 None open Disable pytest assertion-rewrites inside Hypothesis, using magic module docstrings 2025-03-04 16:15:25 UTC

Description Karolina Surma 2024-11-22 14:15:39 UTC
This failure comes from python-cramjam which fails to build with Python 3.14.0a2.

Given the sole import of the hypothesis object causes a test failure, I'm inclined to assign this to hypothesis first. We've built it without tests so far.

____________ test_variants_decompress_into[snappy-memoryview-numpy] ____________
[gw1] linux -- Python 3.14.0 /usr/bin/python3

variant_str = 'snappy', input_type = 'numpy', output_type = <class 'memoryview'>
tmp_path_factory = TempPathFactory(_given_basetemp=PosixPath('/tmp/pytest-of-mockbuild/pytest-0/popen-gw1'), _trace=<pluggy._tracing.TagT...f6f0>, _basetemp=PosixPath('/tmp/pytest-of-mockbuild/pytest-0/popen-gw1'), _retention_count=3, _retention_policy='all')
is_pypy = False

    @pytest.mark.parametrize(
>       "input_type", (bytes, bytearray, "numpy", cramjam.Buffer, cramjam.File, memoryview)

tests/test_variants.py:145: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/usr/lib/python3.14/site-packages/hypothesis/internal/conjecture/engine.py:754: in run
    self._run()
/usr/lib/python3.14/site-packages/hypothesis/internal/conjecture/engine.py:1216: in _run
    self.generate_new_examples()
/usr/lib/python3.14/site-packages/hypothesis/internal/conjecture/engine.py:1062: in generate_new_examples
    self.optimise_targets()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <hypothesis.internal.conjecture.engine.ConjectureRunner object at 0x7f328f42ae90>

    def optimise_targets(self) -> None:
        """If any target observations have been made, attempt to optimise them
        all."""
        if not self.should_optimise:
            return
>       from hypothesis.internal.conjecture.optimiser import Optimiser
E         File "/usr/lib/python3.14/site-packages/hypothesis/internal/conjecture/optimiser.py", line 43
E           self.improvements = 0
E       SyntaxError: could not convert string to float: 'R' - Consider hexadecimal for huge integer literals to avoid decimal conversion limits.

/usr/lib/python3.14/site-packages/hypothesis/internal/conjecture/engine.py:1169: SyntaxError
---------------------------------- Hypothesis ----------------------------------
You can add @seed(212344181825535987951636017873018613235) to this test or run pytest with --hypothesis-seed=212344181825535987951636017873018613235 to reproduce this failure.



This report is automated and not very verbose, but we'll try to get back here with details.

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

For the build logs, see:
https://copr-be.cloud.fedoraproject.org/results/@python/python3.14/fedora-rawhide-x86_64/08291308-python-cramjam/

For all our attempts to build python-cramjam with Python 3.14, see:
https://copr.fedorainfracloud.org/coprs/g/python/python3.14/package/python-cramjam/

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

Let us know here if you have any questions.

Python 3.14 is planned to be included in Fedora 43.
To make that update smoother, we're building Fedora packages with all pre-releases of Python 3.14.
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 Miro Hrončok 2024-12-04 10:19:00 UTC
See also bz2328019.

Comment 2 Aoife Moloney 2025-02-26 13:18:00 UTC
This bug appears to have been reported against 'rawhide' during the Fedora Linux 42 development cycle.
Changing version to 42.

Comment 3 Karolina Surma 2025-03-04 15:25:55 UTC
I build hypothesis with tests, without ghostwriter and cli which require black. 
The build succeeded. There are 561 passed, 5985 skipped tests.
I can't reproduce the issue reported here. Closing as notabug (anymore).

Comment 4 Ben Beasley 2025-03-04 16:15:26 UTC
There’s been some progress in understanding this: see https://github.com/HypothesisWorks/hypothesis/issues/4267.

You won’t see the failure in python-cramjam anymore because I’m now entirely skipping the parameterized test that would trigger it in F42+: https://src.fedoraproject.org/rpms/python-cramjam/c/c663726bcee535c0aa3d3e681963f5e23573b92f?branch=rawhide. That isn’t ideal, but it’s the best I can do for now.

Comment 5 Ben Beasley 2025-03-04 16:17:01 UTC
I would add that this is definitely *not* specific to Python 3.14.

Comment 6 Karolina Surma 2025-03-05 08:06:18 UTC
I see. Let's reopen.

Comment 7 Miro Hrončok 2026-03-18 14:44:28 UTC
I won't have time investigating this downstream. Upstream is aware and given https://src.fedoraproject.org/rpms/python-cramjam/c/c663726bcee535c0aa3d3e681963f5e23573b92f?branch=rawhide I don't think we need to do anything special.


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