inducer / inducer/islpy

Must not use Pybind's implicit object-identity `__hash__`

Open
#102 8 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Python
Stars
86
Forks
22
Avg merge
18h 16m
Merged PRs (30d)
6

Description

**To Reproduce**
1. Create a file: islpy_hash.py as:

```python
import islpy as isl

a = isl.BasicSet("{[i,j]: 0<=i<=j<10}")

print(hash("hashing of islpy objects isn't Python compliant"))
print(hash(a))
print(hash(a))
```
2. Call it as `PYTHONHASHSEED=3 python islpy_hash.py`.

**Observed behavior**

```console
(py311_env) [line@line ~]$ PYTHONHASHSEED=3 python islpy_hash.py
-5820926828285319218
8778101896947
8778101896947
(py311_env) [line@line ~]$ PYTHONHASHSEED=3 python islpy_hash.py
-5820926828285319218
8727734557427
8727734557427
(py311_env) [line@line ~]$ PYTHONHASHSEED=3 python islpy_hash.py
-5820926828285319218
8787476382451
8787476382451
```

**Expected behavior**

The message printed to stdout must be the same across interpreter runs.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.