Opened 4 years ago

Closed 3 years ago

#19310 closed defect (duplicate)

Pynac hashes are restricted to 32 bits

Reported by: jdemeyer Owned by:
Priority: major Milestone: sage-duplicate/invalid/wontfix
Component: packages: standard Keywords:
Cc: rws Merged in:
Authors: Reviewers: Jeroen Demeyer
Report Upstream: Fixed upstream, in a later stable release. Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Description (last modified by rws)

src/sage/symbolic/expression.pyx claims

        The hash of an object in Python or its coerced version into
        the symbolic ring is the same::

This is unfortunately not true since Pynac uses the 32-bit unsigned data type for hashes:

sage: hash(ZZ(2^32))
4294967296
sage: hash(SR(2^32))
0

See also https://github.com/pynac/pynac/issues/95

Change History (5)

comment:1 Changed 4 years ago by rws

  • Dependencies set to #19312
  • Description modified (diff)
  • Report Upstream changed from N/A to Reported upstream. Developers acknowledge bug.

comment:2 Changed 3 years ago by rws

  • Dependencies changed from #19312 to pynac-0.5.4
  • Report Upstream changed from Reported upstream. Developers acknowledge bug. to Fixed upstream, in a later stable release.

The fix will be in pynac-0.5.4. This ticket will provide some more doctests after the upgrade.

comment:3 Changed 3 years ago by jdemeyer

  • Dependencies pynac-0.5.4 deleted
  • Milestone changed from sage-6.9 to sage-duplicate/invalid/wontfix
  • Reviewers set to Jeroen Demeyer
  • Status changed from new to needs_review

"Duplicate" of #19819.

comment:4 Changed 3 years ago by jdemeyer

  • Status changed from needs_review to positive_review

comment:5 Changed 3 years ago by vbraun

  • Resolution set to duplicate
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.