- [x] Object protocol - https://docs.python.org/3/c-api/object.html - This protocol will not be a type or trait. `impl PyObjectRef` in `vm/src/protocol/object.rs` will be enuogh - [x] Py_RETURN_NOTIMPLEMENTED (PyArithmeticValue::NotImplemented) - [ ] PyObject_Print - [x] PyObject_HasAttr / PyObject_HasAttrString (has_attr) - [x] PyObject_GetAttr / PyObject_GetAttrString (get_attr) - [x] PyObject_GenericGetAttr - [x] PyObject_SetAttr / PyObject_SetAttrString (set_attr) - [x] PyObject_GenericSetAttr - [x] PyObject_DelAttr / PyObject_DelAttrString (del_attr) - [ ] PyObject_GenericGetDict - [ ] PyObject_GenericSetDict - [x] PyObject_RichCompare (rich_compare) - [x] PyObject_RichCompareBool (rich_compare_bool) - [x] PyObject_Repr (repr) - [x] PyObject_ASCII (ascii) - [x] PyObject_Str (str) - [x] PyObject_Bytes (bytes) - [x] PyObject_IsSubclass (is_subclass) - [x] PyObject_IsInstance (is_instance) - [x] PyObject_Hash (hash) - [x] PyObject_HashNotImplemented #4640 - [x] PyObject_IsTrue (is_true) - [x] PyObject_Not (not) - [x] PyObject_Type #5091 - [x] PyObject_TypeCheck #5091 - [x] PyObject_Size / PyObject_Length (length) - [x] PyObject_LengthHint (length_hint) - [x] PyObject_GetItem (get_item) - [x] PyObject_SetItem (set_item) - [x] PyObject_DelItem (del_item) - [ ] PyObject_Dir - [x] PyObject_GetIter (get_iter) - [x] PyObject_GetAIter #5090 - [ ] Call protocol - https://docs.python.org/3/c-api/call.html - [x] `Callable` trait to provide type slot `call`. - [ ] `PyCallable` protocol object to provide interface (at least check) #4654 - [ ] Vectercall protocol - [ ] Number protocol - https://docs.python.org/3/c-api/number.html - [ ] Design decision where to put PyNumber_* functions - [ ] Apply to actual operations #4139 - [x] `AsNumber` trait to provide type slot `as_number`. #3507 - [x] None #3880 - [x] bool #4639 - [x] bytearray #4574 - [x] bytes #3903 - [x] complex #3838 - [x] dict #4644 - [ ] dictviews - [x] float #3507 - [x] int #3507 - [ ] range - [x] set #4619 - [x] frozenset #4619 - [x] type #4619 - [x] str — #4622 - [ ] weakref - [x] mappingproxy #3898 - [ ] decimal - [ ] collections.deque - [ ] collections.defaultdict - [ ] collections.OrderedDict - [ ] time.timedelta - [ ] time.date - [ ] time.datetime - [ ] matmul - [ ] ctypes CFuncPtr, Simple, Pointer - [ ] PyHKEY - [x] `PyIndex_Check` - [x] `PyNumber` #3507 - [ ] Sequence protocol - https://docs.python.org/3/c-api/sequence.html - [x] `AsSequence` trait to provide type slot `as_sequence`. #3316 - [x] array #4585 - [x] bytesarray - [x] bytes - [x] mappingproxy - [x] dict - [x] dictkeys - [x] dictitems - [x] dictvalues - [x] list - [x] memory - [x] range - [x] set - [x] frozenset - [x] tuple - [x] str - [ ] weakref proxy - [x] collections.deque - [ ] ctypes.CDataType, Array, Pointer - [ ] xml.etree.ElementTree.Element - [x] `PySequence` type or trait to support sequence features. #3316 #3445 - Note: Check `SimpleSeq` before working on it. - [ ] Mapping protocol - https://docs.python.org/3/c-api/mapping.html - [x] `Mapping` trait to provide type slot `as_mapping` - array, bytearray, bytes, dict, list, mappingproxy, memoryview, range, tuple done - [x] str #3417 - [ ] OrderedDict - [ ] weakref proxy/callable proxy - [ ] DecSignalDict - [x] GenericAlias #3374 - [ ] ctypes Array/Pointer - [ ] xml.etree.ElementTree.Element - [x] `PyMapping` type to provide its methods - [ ] Iterator protocol - https://docs.python.org/3/c-api/iter.html - [x] `Iterator` protocol for type slot `iternext` - [ ] Check the list of types - [x] PyIter type - [x] PyIter_Check - [x] PyIter_Next - [ ] PyAIter_Check - [ ] PyIter_Send - [ ] Buffer protocol - https://docs.python.org/3/c-api/buffer.html - [x] `AsBuffer` protocol for type slot `as_buffer` #2226 - [x] bytearray - [x] bytes - [x] memory - [ ] ctypes.CData - [ ] `PyBuffer` type - [ ] flags - [ ] ndim - [x] shape #3340 - [x] strides #3340 - Check if we need Old buffer protocol compatibiiltiy layer
impl PyObjectRefinvm/src/protocol/object.rswill be enuoghCallabletrait to provide type slotcall.PyCallableprotocol object to provide interface (at least check) Add protocol object PyCallable #4654AsNumbertrait to provide type slotas_number. Implement Number Protocol #3507PyBool#4639PyByteArray#4574PyBytes#3903PyDict#4644PyType,PySetandPyFrozenSet#4619PyType,PySetandPyFrozenSet#4619PyType,PySetandPyFrozenSet#4619MappingProxy#3898PyIndex_CheckPyNumberImplement Number Protocol #3507AsSequencetrait to provide type slotas_sequence. Impl PySequence Protocol #3316as_sequenceforarray#4585PySequencetype or trait to support sequence features. Impl PySequence Protocol #3316 Refactor and new sequence traits, generic sequence operation #3445SimpleSeqbefore working on it.Mappingtrait to provide type slotas_mappingAsMappingforPyStr#3417mappingtrait forGenericAlias#3374PyMappingtype to provide its methodsIteratorprotocol for type slotiternextAsBufferprotocol for type slotas_bufferImplement Buffer Protocol #2226PyBuffertype