Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Register
  • Sign in
  • slapos slapos
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Merge requests 129
    • Merge requests 129
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Jobs
  • Commits
Collapse sidebar
  • nexedinexedi
  • slaposslapos
  • Merge requests
  • !1535

software/erp5: add control for PYTHONHASHSEED

  • Review changes

  • Download
  • Patches
  • Plain diff
Merged Jérome Perrin requested to merge feat/erp5-pythonhashseed into master Feb 21, 2024
  • Overview 8
  • Commits 1
  • Pipelines 8
  • Changes 7

See https://docs.python.org/3/using/cmdline.html#envvar-PYTHONHASHSEED

Setting a value will set the environment variable for all zope processes and for the test runner.

Default behavior is:

  • for zope: do not set the variable, so default python behavior will be used ( equivalent to setting 0 on python2 and random on python3)
  • for test runner: generate a random value for each execution and print it, to make it easy to re-run a failing test with the same seed.

This means that ERP5 tests will likely reveal problems where code depends on python2 behavior of deterministic hashing. To keep previous behavior (and hide these problems), it's possible to set python-hash-seed to 0 in test suite parameters.

Edited Mar 07, 2024 by Jérome Perrin
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: feat/erp5-pythonhashseed
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7