Opened 22 months ago
Closed 21 months ago
#25978 closed defect (fixed)
Python 3: sorting issue causing failure in koszul_complex.py
Reported by:  jhpalmieri  Owned by:  

Priority:  minor  Milestone:  sage8.4 
Component:  python3  Keywords:  
Cc:  chapoton, tscrim  Merged in:  
Authors:  John Palmieri  Reviewers:  Travis Scrimshaw 
Report Upstream:  N/A  Work issues:  
Branch:  4a6ff4e (Commits)  Commit:  4a6ff4e6c396231908bd58758e46a9f0bb24dae2 
Dependencies:  Stopgaps: 
Description
A sorting issue (TypeError: '>' not supported between instances of 'NoneType' and 'int'
) in multi_polynomial_ring_base.pyx
causes a doctest failure in koszul_complex.py
in Python 3.
Change History (8)
comment:1 Changed 22 months ago by
 Branch set to u/jhpalmieri/koszulmultipolynomial
comment:2 Changed 22 months ago by
 Commit set to d8f9668efec431c33593f7490a78e22f6a8ebfd9
comment:3 Changed 22 months ago by
 Status changed from new to needs_review
comment:4 followup: ↓ 6 Changed 22 months ago by
I think it is good to put a comment in there explaining why this test is the way it is.
Also, I am presuming total >= 0
(otherwise, there would be a bug when terms = 0
and total < 0
).
comment:5 Changed 22 months ago by
 Commit changed from d8f9668efec431c33593f7490a78e22f6a8ebfd9 to 4a6ff4e6c396231908bd58758e46a9f0bb24dae2
Branch pushed to git repo; I updated commit sha1. New commits:
4a6ff4e  trac 25978: add comment explaining the change.

comment:6 in reply to: ↑ 4 Changed 22 months ago by
Replying to tscrim:
I think it is good to put a comment in there explaining why this test is the way it is.
Sounds good.
Also, I am presuming
total >= 0
(otherwise, there would be a bug whenterms = 0
andtotal < 0
).
total
is defined by counts, total = self._precomp_counts(n, degree)
, and according to the documentation, total
is a sum of cardinalities, so it had better be nonnegative.
comment:7 Changed 22 months ago by
 Reviewers set to Travis Scrimshaw
 Status changed from needs_review to positive_review
Thanks.
comment:8 Changed 21 months ago by
 Branch changed from u/jhpalmieri/koszulmultipolynomial to 4a6ff4e6c396231908bd58758e46a9f0bb24dae2
 Resolution set to fixed
 Status changed from positive_review to closed
The issue here is that
terms
can beNone
whiletotal
is an integer, and then Python 3 objects toif terms > total:
.New commits:
trac 25978: don't try to compare None with an int