@@ -13,16 +13,16 @@ use crate::{
1313 sequence:: { MutObjectSequenceOp , OptionalRangeArgs , SequenceExt , SequenceMutExt } ,
1414 sliceable:: { SequenceIndex , SliceableSequenceMutOp , SliceableSequenceOp } ,
1515 types:: {
16- AsMapping , AsSequence , Comparable , Constructor , Hashable , Initializer , IterNext ,
17- IterNextIterable , Iterable , PyComparisonOp , Unconstructible , Unhashable ,
16+ AsMapping , AsSequence , Comparable , Constructor , Initializer , IterNext , IterNextIterable ,
17+ Iterable , PyComparisonOp , Unconstructible ,
1818 } ,
1919 utils:: collection_repr,
2020 vm:: VirtualMachine ,
2121 AsObject , Context , Py , PyObject , PyObjectRef , PyPayload , PyRef , PyResult ,
2222} ;
2323use std:: { fmt, ops:: DerefMut } ;
2424
25- #[ pyclass( module = false , name = "list" ) ]
25+ #[ pyclass( module = false , name = "list" , unhashable = true ) ]
2626#[ derive( Default ) ]
2727pub struct PyList {
2828 elements : PyRwLock < Vec < PyObjectRef > > ,
@@ -86,15 +86,7 @@ pub(crate) struct SortOptions {
8686pub type PyListRef = PyRef < PyList > ;
8787
8888#[ pyclass(
89- with(
90- Constructor ,
91- Initializer ,
92- AsMapping ,
93- Iterable ,
94- Hashable ,
95- Comparable ,
96- AsSequence
97- ) ,
89+ with( Constructor , Initializer , AsMapping , Iterable , Comparable , AsSequence ) ,
9890 flags( BASETYPE )
9991) ]
10092impl PyList {
@@ -492,8 +484,6 @@ impl Comparable for PyList {
492484 }
493485}
494486
495- impl Unhashable for PyList { }
496-
497487fn do_sort (
498488 vm : & VirtualMachine ,
499489 values : & mut Vec < PyObjectRef > ,
0 commit comments