Closed bollwyvl closed 2 years ago
that is strange. i would expect these issues in older python implementations, there hashes of tuples and sets were inconsistent.
this test ran on platform linux -- Python 3.10.4, pytest-7.1.1, pluggy-1.0.0 -- $PREFIX/bin/python
see https://dev.azure.com/conda-forge/feedstock-builds/_build/results?buildId=486922&view=logs&j=656edd35-690f-5c53-9ba3-09c10d0bea97&t=e5c8ab1d-8ff9-5cae-b332-e15ae582ed2d&l=290
took the hint, and triggered a test run in our own env, on latest master branch - https://github.com/CycloneDX/cyclonedx-python-lib/actions/runs/2104143406 on tag v2.1.1 - https://github.com/CycloneDX/cyclonedx-python-lib/actions/runs/2104149187
Hello @bollwyvl ,
thanks for the report & maintaining it for conda-forge.. Our own tests on v2.1.1 (running in venv via tox) on ubuntu with Python 3.10.4 are passing - see https://github.com/CycloneDX/cyclonedx-python-lib/runs/5855876653?check_suite_focus=true#step:10:16
thing that might affect the tests: we are setting env var "PYTHONHASHSEED=0" in our test setup. see https://github.com/CycloneDX/cyclonedx-python-lib/blob/main/tox.ini#L31 could you do the same and see if the tests pass?
see also: https://docs.python.org/3/using/cmdline.html#envvar-PYTHONHASHSEED
Well: setting the PYTHONHASHSEED to 0 does work, but if it relies on that for regular runtime behavior, that deems dubious. Closing either way, thanks for looking into it.
@madpah FYI. need to check which model actually depends on item order for hashing. afaik none should do so. what am i missing?
Thanks for
cyclonedx
!Downstream on conda-forge i'm seeing the following when running the test suite against the as-installed
2.1.1
: is there cause for concern? I'll likely just skip it and move on, buthash
tricks seem like rather fundamental thing that other features might be relying on for correctness...versions