[Python-modules-commits] [python-multidict] 01/03: Import python-multidict_2.1.2.orig.tar.gz

Piotr Ożarowski piotr at moszumanska.debian.org
Sat Nov 5 22:40:41 UTC 2016


This is an automated email from the git hooks/post-receive script.

piotr pushed a commit to branch master
in repository python-multidict.

commit 978a822e19cec931263cef244a75fc7fd94c98ae
Author: Piotr Ożarowski <piotr at debian.org>
Date:   Sat Nov 5 23:33:26 2016 +0100

    Import python-multidict_2.1.2.orig.tar.gz
---
 CHANGES.rst                 |   12 +
 PKG-INFO                    |   14 +-
 multidict.egg-info/PKG-INFO |   14 +-
 multidict/__init__.py       |    2 +-
 multidict/_multidict.c      | 1509 ++++++++++++++++++++-----------------------
 multidict/_multidict.pyx    |   26 +-
 tests/test_multidict.py     |   15 +
 7 files changed, 756 insertions(+), 836 deletions(-)

diff --git a/CHANGES.rst b/CHANGES.rst
index e9edef0..ea0234e 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -1,3 +1,15 @@
+2.1.2 (2016-09-25)
+------------------
+
+* Fix `CIMultiDict.update()` for case of accepting `istr`
+
+
+2.1.1 (2016-09-22)
+------------------
+
+* Fix `CIMultiDict` constructor for case of accepting `istr` #11
+
+
 2.1.0 (2016-09-18)
 ------------------
 
diff --git a/PKG-INFO b/PKG-INFO
index 5b9e595..6c4af72 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: multidict
-Version: 2.1.0
+Version: 2.1.2
 Summary: multidict implementation
 Home-page: https://github.com/aio-libs/multidict/
 Author: Andrew Svetlov
@@ -60,6 +60,18 @@ Description: =========
         .. _aiohttp: https://github.com/KeepSafe/aiohttp
         .. _Cython: http://cython.org/
         
+        2.1.2 (2016-09-25)
+        ------------------
+        
+        * Fix `CIMultiDict.update()` for case of accepting `istr`
+        
+        
+        2.1.1 (2016-09-22)
+        ------------------
+        
+        * Fix `CIMultiDict` constructor for case of accepting `istr` #11
+        
+        
         2.1.0 (2016-09-18)
         ------------------
         
diff --git a/multidict.egg-info/PKG-INFO b/multidict.egg-info/PKG-INFO
index 5b9e595..6c4af72 100644
--- a/multidict.egg-info/PKG-INFO
+++ b/multidict.egg-info/PKG-INFO
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: multidict
-Version: 2.1.0
+Version: 2.1.2
 Summary: multidict implementation
 Home-page: https://github.com/aio-libs/multidict/
 Author: Andrew Svetlov
@@ -60,6 +60,18 @@ Description: =========
         .. _aiohttp: https://github.com/KeepSafe/aiohttp
         .. _Cython: http://cython.org/
         
+        2.1.2 (2016-09-25)
+        ------------------
+        
+        * Fix `CIMultiDict.update()` for case of accepting `istr`
+        
+        
+        2.1.1 (2016-09-22)
+        ------------------
+        
+        * Fix `CIMultiDict` constructor for case of accepting `istr` #11
+        
+        
         2.1.0 (2016-09-18)
         ------------------
         
diff --git a/multidict/__init__.py b/multidict/__init__.py
index cee8107..c1a091b 100644
--- a/multidict/__init__.py
+++ b/multidict/__init__.py
@@ -10,7 +10,7 @@ import os
 __all__ = ('MultiDictProxy', 'CIMultiDictProxy',
            'MultiDict', 'CIMultiDict', 'upstr', 'istr')
 
-__version__ = '2.1.0'
+__version__ = '2.1.2'
 
 
 if bool(os.environ.get('MULTIDICT_NO_EXTENSIONS')):
diff --git a/multidict/_multidict.c b/multidict/_multidict.c
index 8fac044..085b1f3 100644
--- a/multidict/_multidict.c
+++ b/multidict/_multidict.c
@@ -580,7 +580,7 @@ struct __pyx_obj_9multidict_10_multidict_MultiDict {
 };
 
 
-/* "multidict/_multidict.pyx":415
+/* "multidict/_multidict.pyx":413
  * 
  * 
  * cdef class CIMultiDict(MultiDict):             # <<<<<<<<<<<<<<
@@ -592,7 +592,7 @@ struct __pyx_obj_9multidict_10_multidict_CIMultiDict {
 };
 
 
-/* "multidict/_multidict.pyx":428
+/* "multidict/_multidict.pyx":426
  * 
  * 
  * cdef class _ViewBase:             # <<<<<<<<<<<<<<
@@ -605,7 +605,7 @@ struct __pyx_obj_9multidict_10_multidict__ViewBase {
 };
 
 
-/* "multidict/_multidict.pyx":439
+/* "multidict/_multidict.pyx":437
  * 
  * 
  * cdef class _ViewBaseSet(_ViewBase):             # <<<<<<<<<<<<<<
@@ -617,7 +617,7 @@ struct __pyx_obj_9multidict_10_multidict__ViewBaseSet {
 };
 
 
-/* "multidict/_multidict.pyx":520
+/* "multidict/_multidict.pyx":518
  * 
  * 
  * cdef class _ItemsIter:             # <<<<<<<<<<<<<<
@@ -632,7 +632,7 @@ struct __pyx_obj_9multidict_10_multidict__ItemsIter {
 };
 
 
-/* "multidict/_multidict.pyx":541
+/* "multidict/_multidict.pyx":539
  * 
  * 
  * cdef class _ItemsView(_ViewBaseSet):             # <<<<<<<<<<<<<<
@@ -644,7 +644,7 @@ struct __pyx_obj_9multidict_10_multidict__ItemsView {
 };
 
 
-/* "multidict/_multidict.pyx":576
+/* "multidict/_multidict.pyx":574
  * 
  * 
  * cdef class _ValuesIter:             # <<<<<<<<<<<<<<
@@ -659,7 +659,7 @@ struct __pyx_obj_9multidict_10_multidict__ValuesIter {
 };
 
 
-/* "multidict/_multidict.pyx":597
+/* "multidict/_multidict.pyx":595
  * 
  * 
  * cdef class _ValuesView(_ViewBase):             # <<<<<<<<<<<<<<
@@ -671,7 +671,7 @@ struct __pyx_obj_9multidict_10_multidict__ValuesView {
 };
 
 
-/* "multidict/_multidict.pyx":623
+/* "multidict/_multidict.pyx":621
  * 
  * 
  * cdef class _KeysIter:             # <<<<<<<<<<<<<<
@@ -686,7 +686,7 @@ struct __pyx_obj_9multidict_10_multidict__KeysIter {
 };
 
 
-/* "multidict/_multidict.pyx":644
+/* "multidict/_multidict.pyx":642
  * 
  * 
  * cdef class _KeysView(_ViewBaseSet):             # <<<<<<<<<<<<<<
@@ -764,7 +764,7 @@ struct __pyx_vtabstruct_9multidict_10_multidict_MultiDict {
 static struct __pyx_vtabstruct_9multidict_10_multidict_MultiDict *__pyx_vtabptr_9multidict_10_multidict_MultiDict;
 
 
-/* "multidict/_multidict.pyx":415
+/* "multidict/_multidict.pyx":413
  * 
  * 
  * cdef class CIMultiDict(MultiDict):             # <<<<<<<<<<<<<<
@@ -914,22 +914,6 @@ static PyObject* __Pyx_PyInt_EqObjC(PyObject *op1, PyObject *op2, long intval, i
 /* KeywordStringCheck.proto */
 static CYTHON_INLINE int __Pyx_CheckKeywordStrings(PyObject *kwdict, const char* function_name, int kw_allowed);
 
-/* IncludeStringH.proto */
-#include <string.h>
-
-/* BytesEquals.proto */
-static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals);
-
-/* UnicodeEquals.proto */
-static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals);
-
-/* StrEquals.proto */
-#if PY_MAJOR_VERSION >= 3
-#define __Pyx_PyString_Equals __Pyx_PyUnicode_Equals
-#else
-#define __Pyx_PyString_Equals __Pyx_PyBytes_Equals
-#endif
-
 /* ListAppend.proto */
 #if CYTHON_COMPILING_IN_CPYTHON
 static CYTHON_INLINE int __Pyx_PyList_Append(PyObject* list, PyObject* x) {
@@ -2719,12 +2703,12 @@ static PyObject *__pyx_pf_9multidict_10_multidict_5_Base_2getall(struct __pyx_ob
  *         """Return a list of all values matching the key."""
  *         return self._getall(self._title(key), default)             # <<<<<<<<<<<<<<
  * 
- *     cdef _getall(self, str key, default):
+ *     cdef _getall(self, key, default):
  */
   __Pyx_XDECREF(__pyx_r);
   __pyx_t_1 = ((struct __pyx_vtabstruct_9multidict_10_multidict__Base *)__pyx_v_self->__pyx_vtab)->_title(__pyx_v_self, __pyx_v_key); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 91, __pyx_L1_error)
   __Pyx_GOTREF(__pyx_t_1);
-  __pyx_t_2 = ((struct __pyx_vtabstruct_9multidict_10_multidict__Base *)__pyx_v_self->__pyx_vtab)->_getall(__pyx_v_self, ((PyObject*)__pyx_t_1), __pyx_v_default); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 91, __pyx_L1_error)
+  __pyx_t_2 = ((struct __pyx_vtabstruct_9multidict_10_multidict__Base *)__pyx_v_self->__pyx_vtab)->_getall(__pyx_v_self, __pyx_t_1, __pyx_v_default); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 91, __pyx_L1_error)
   __Pyx_GOTREF(__pyx_t_2);
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   __pyx_r = __pyx_t_2;
@@ -2754,7 +2738,7 @@ static PyObject *__pyx_pf_9multidict_10_multidict_5_Base_2getall(struct __pyx_ob
 /* "multidict/_multidict.pyx":93
  *         return self._getall(self._title(key), default)
  * 
- *     cdef _getall(self, str key, default):             # <<<<<<<<<<<<<<
+ *     cdef _getall(self, key, default):             # <<<<<<<<<<<<<<
  *         cdef list res
  *         cdef _Pair item
  */
@@ -2828,7 +2812,9 @@ static PyObject *__pyx_f_9multidict_10_multidict_5_Base__getall(struct __pyx_obj
  *                 res.append(item._value)
  *         if res:
  */
-    __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_v_item->_key, __pyx_v_key, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 99, __pyx_L1_error)
+    __pyx_t_3 = PyObject_RichCompare(__pyx_v_item->_key, __pyx_v_key, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 99, __pyx_L1_error)
+    __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 99, __pyx_L1_error)
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
     if (__pyx_t_4) {
 
       /* "multidict/_multidict.pyx":100
@@ -2958,7 +2944,7 @@ static PyObject *__pyx_f_9multidict_10_multidict_5_Base__getall(struct __pyx_obj
   /* "multidict/_multidict.pyx":93
  *         return self._getall(self._title(key), default)
  * 
- *     cdef _getall(self, str key, default):             # <<<<<<<<<<<<<<
+ *     cdef _getall(self, key, default):             # <<<<<<<<<<<<<<
  *         cdef list res
  *         cdef _Pair item
  */
@@ -3060,12 +3046,12 @@ static PyObject *__pyx_pf_9multidict_10_multidict_5_Base_4getone(struct __pyx_ob
  *         """Get first value matching the key."""
  *         return self._getone(self._title(key), default)             # <<<<<<<<<<<<<<
  * 
- *     cdef _getone(self, str key, default):
+ *     cdef _getone(self, key, default):
  */
   __Pyx_XDECREF(__pyx_r);
   __pyx_t_1 = ((struct __pyx_vtabstruct_9multidict_10_multidict__Base *)__pyx_v_self->__pyx_vtab)->_title(__pyx_v_self, __pyx_v_key); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 109, __pyx_L1_error)
   __Pyx_GOTREF(__pyx_t_1);
-  __pyx_t_2 = ((struct __pyx_vtabstruct_9multidict_10_multidict__Base *)__pyx_v_self->__pyx_vtab)->_getone(__pyx_v_self, ((PyObject*)__pyx_t_1), __pyx_v_default); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 109, __pyx_L1_error)
+  __pyx_t_2 = ((struct __pyx_vtabstruct_9multidict_10_multidict__Base *)__pyx_v_self->__pyx_vtab)->_getone(__pyx_v_self, __pyx_t_1, __pyx_v_default); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 109, __pyx_L1_error)
   __Pyx_GOTREF(__pyx_t_2);
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   __pyx_r = __pyx_t_2;
@@ -3095,7 +3081,7 @@ static PyObject *__pyx_pf_9multidict_10_multidict_5_Base_4getone(struct __pyx_ob
 /* "multidict/_multidict.pyx":111
  *         return self._getone(self._title(key), default)
  * 
- *     cdef _getone(self, str key, default):             # <<<<<<<<<<<<<<
+ *     cdef _getone(self, key, default):             # <<<<<<<<<<<<<<
  *         cdef _Pair item
  *         for i in self._items:
  */
@@ -3113,7 +3099,7 @@ static PyObject *__pyx_f_9multidict_10_multidict_5_Base__getone(struct __pyx_obj
   __Pyx_RefNannySetupContext("_getone", 0);
 
   /* "multidict/_multidict.pyx":113
- *     cdef _getone(self, str key, default):
+ *     cdef _getone(self, key, default):
  *         cdef _Pair item
  *         for i in self._items:             # <<<<<<<<<<<<<<
  *             item = <_Pair>i
@@ -3154,7 +3140,9 @@ static PyObject *__pyx_f_9multidict_10_multidict_5_Base__getone(struct __pyx_obj
  *                 return item._value
  *         if default is not self.marker:
  */
-    __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_v_item->_key, __pyx_v_key, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 115, __pyx_L1_error)
+    __pyx_t_3 = PyObject_RichCompare(__pyx_v_item->_key, __pyx_v_key, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 115, __pyx_L1_error)
+    __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 115, __pyx_L1_error)
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
     if (__pyx_t_4) {
 
       /* "multidict/_multidict.pyx":116
@@ -3180,7 +3168,7 @@ static PyObject *__pyx_f_9multidict_10_multidict_5_Base__getone(struct __pyx_obj
     }
 
     /* "multidict/_multidict.pyx":113
- *     cdef _getone(self, str key, default):
+ *     cdef _getone(self, key, default):
  *         cdef _Pair item
  *         for i in self._items:             # <<<<<<<<<<<<<<
  *             item = <_Pair>i
@@ -3245,7 +3233,7 @@ static PyObject *__pyx_f_9multidict_10_multidict_5_Base__getone(struct __pyx_obj
   /* "multidict/_multidict.pyx":111
  *         return self._getone(self._title(key), default)
  * 
- *     cdef _getone(self, str key, default):             # <<<<<<<<<<<<<<
+ *     cdef _getone(self, key, default):             # <<<<<<<<<<<<<<
  *         cdef _Pair item
  *         for i in self._items:
  */
@@ -3305,7 +3293,7 @@ static PyObject *__pyx_pf_9multidict_10_multidict_5_Base_6__getitem__(struct __p
   __Pyx_GOTREF(__pyx_t_1);
   __pyx_t_2 = __pyx_v_self->marker;
   __Pyx_INCREF(__pyx_t_2);
-  __pyx_t_3 = ((struct __pyx_vtabstruct_9multidict_10_multidict__Base *)__pyx_v_self->__pyx_vtab)->_getone(__pyx_v_self, ((PyObject*)__pyx_t_1), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 124, __pyx_L1_error)
+  __pyx_t_3 = ((struct __pyx_vtabstruct_9multidict_10_multidict__Base *)__pyx_v_self->__pyx_vtab)->_getone(__pyx_v_self, __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 124, __pyx_L1_error)
   __Pyx_GOTREF(__pyx_t_3);
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
@@ -3421,7 +3409,7 @@ static PyObject *__pyx_pf_9multidict_10_multidict_5_Base_8get(struct __pyx_obj_9
   __Pyx_XDECREF(__pyx_r);
   __pyx_t_1 = ((struct __pyx_vtabstruct_9multidict_10_multidict__Base *)__pyx_v_self->__pyx_vtab)->_title(__pyx_v_self, __pyx_v_key); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 131, __pyx_L1_error)
   __Pyx_GOTREF(__pyx_t_1);
-  __pyx_t_2 = ((struct __pyx_vtabstruct_9multidict_10_multidict__Base *)__pyx_v_self->__pyx_vtab)->_getone(__pyx_v_self, ((PyObject*)__pyx_t_1), __pyx_v_default); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 131, __pyx_L1_error)
+  __pyx_t_2 = ((struct __pyx_vtabstruct_9multidict_10_multidict__Base *)__pyx_v_self->__pyx_vtab)->_getone(__pyx_v_self, __pyx_t_1, __pyx_v_default); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 131, __pyx_L1_error)
   __Pyx_GOTREF(__pyx_t_2);
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   __pyx_r = __pyx_t_2;
@@ -3482,11 +3470,11 @@ static int __pyx_pf_9multidict_10_multidict_5_Base_10__contains__(struct __pyx_o
  *     def __contains__(self, key):
  *         return self._contains(self._title(key))             # <<<<<<<<<<<<<<
  * 
- *     cdef _contains(self, str key):
+ *     cdef _contains(self, key):
  */
   __pyx_t_1 = ((struct __pyx_vtabstruct_9multidict_10_multidict__Base *)__pyx_v_self->__pyx_vtab)->_title(__pyx_v_self, __pyx_v_key); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 134, __pyx_L1_error)
   __Pyx_GOTREF(__pyx_t_1);
-  __pyx_t_2 = ((struct __pyx_vtabstruct_9multidict_10_multidict__Base *)__pyx_v_self->__pyx_vtab)->_contains(__pyx_v_self, ((PyObject*)__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 134, __pyx_L1_error)
+  __pyx_t_2 = ((struct __pyx_vtabstruct_9multidict_10_multidict__Base *)__pyx_v_self->__pyx_vtab)->_contains(__pyx_v_self, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 134, __pyx_L1_error)
   __Pyx_GOTREF(__pyx_t_2);
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 134, __pyx_L1_error)
@@ -3516,7 +3504,7 @@ static int __pyx_pf_9multidict_10_multidict_5_Base_10__contains__(struct __pyx_o
 /* "multidict/_multidict.pyx":136
  *         return self._contains(self._title(key))
  * 
- *     cdef _contains(self, str key):             # <<<<<<<<<<<<<<
+ *     cdef _contains(self, key):             # <<<<<<<<<<<<<<
  *         cdef _Pair item
  *         for i in self._items:
  */
@@ -3533,7 +3521,7 @@ static PyObject *__pyx_f_9multidict_10_multidict_5_Base__contains(struct __pyx_o
   __Pyx_RefNannySetupContext("_contains", 0);
 
   /* "multidict/_multidict.pyx":138
- *     cdef _contains(self, str key):
+ *     cdef _contains(self, key):
  *         cdef _Pair item
  *         for i in self._items:             # <<<<<<<<<<<<<<
  *             item = <_Pair>i
@@ -3574,7 +3562,9 @@ static PyObject *__pyx_f_9multidict_10_multidict_5_Base__contains(struct __pyx_o
  *                 return True
  *         return False
  */
-    __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_v_item->_key, __pyx_v_key, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 140, __pyx_L1_error)
+    __pyx_t_3 = PyObject_RichCompare(__pyx_v_item->_key, __pyx_v_key, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 140, __pyx_L1_error)
+    __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 140, __pyx_L1_error)
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
     if (__pyx_t_4) {
 
       /* "multidict/_multidict.pyx":141
@@ -3600,7 +3590,7 @@ static PyObject *__pyx_f_9multidict_10_multidict_5_Base__contains(struct __pyx_o
     }
 
     /* "multidict/_multidict.pyx":138
- *     cdef _contains(self, str key):
+ *     cdef _contains(self, key):
  *         cdef _Pair item
  *         for i in self._items:             # <<<<<<<<<<<<<<
  *             item = <_Pair>i
@@ -3624,7 +3614,7 @@ static PyObject *__pyx_f_9multidict_10_multidict_5_Base__contains(struct __pyx_o
   /* "multidict/_multidict.pyx":136
  *         return self._contains(self._title(key))
  * 
- *     cdef _contains(self, str key):             # <<<<<<<<<<<<<<
+ *     cdef _contains(self, key):             # <<<<<<<<<<<<<<
  *         cdef _Pair item
  *         for i in self._items:
  */
@@ -5523,7 +5513,7 @@ static int __pyx_pf_9multidict_10_multidict_9MultiDict___init__(struct __pyx_obj
  * 
  *     cdef _extend(self, tuple args, dict kwargs, name, int do_add):             # <<<<<<<<<<<<<<
  *         cdef _Pair item
- *         cdef str key
+ *         cdef object key
  */
 
 static PyObject *__pyx_f_9multidict_10_multidict_9MultiDict__extend(struct __pyx_obj_9multidict_10_multidict_MultiDict *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs, PyObject *__pyx_v_name, int __pyx_v_do_add) {
@@ -5548,7 +5538,7 @@ static PyObject *__pyx_f_9multidict_10_multidict_9MultiDict__extend(struct __pyx
   __Pyx_RefNannySetupContext("_extend", 0);
 
   /* "multidict/_multidict.pyx":257
- *         cdef str key
+ *         cdef object key
  * 
  *         if len(args) > 1:             # <<<<<<<<<<<<<<
  *             raise TypeError("{} takes at most 1 positional argument"
@@ -5626,7 +5616,7 @@ static PyObject *__pyx_f_9multidict_10_multidict_9MultiDict__extend(struct __pyx
     __PYX_ERR(0, 258, __pyx_L1_error)
 
     /* "multidict/_multidict.pyx":257
- *         cdef str key
+ *         cdef object key
  * 
  *         if len(args) > 1:             # <<<<<<<<<<<<<<
  *             raise TypeError("{} takes at most 1 positional argument"
@@ -5718,7 +5708,7 @@ static PyObject *__pyx_f_9multidict_10_multidict_9MultiDict__extend(struct __pyx
         __pyx_t_7 = ((struct __pyx_vtabstruct_9multidict_10_multidict_MultiDict *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._title(((struct __pyx_obj_9multidict_10_multidict__Base *)__pyx_v_self), __pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 266, __pyx_L1_error)
         __Pyx_GOTREF(__pyx_t_7);
         __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-        __Pyx_XDECREF_SET(__pyx_v_key, ((PyObject*)__pyx_t_7));
+        __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_7);
         __pyx_t_7 = 0;
 
         /* "multidict/_multidict.pyx":267
@@ -5909,10 +5899,9 @@ static PyObject *__pyx_f_9multidict_10_multidict_9MultiDict__extend(struct __pyx
  *                         value = item._value
  *                     else:
  */
-          if (!(likely(PyString_CheckExact(__pyx_v_item->_key))||((__pyx_v_item->_key) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_v_item->_key)->tp_name), 0))) __PYX_ERR(0, 276, __pyx_L1_error)
           __pyx_t_3 = __pyx_v_item->_key;
           __Pyx_INCREF(__pyx_t_3);
-          __Pyx_XDECREF_SET(__pyx_v_key, ((PyObject*)__pyx_t_3));
+          __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_3);
           __pyx_t_3 = 0;
 
           /* "multidict/_multidict.pyx":277
@@ -5950,7 +5939,7 @@ static PyObject *__pyx_f_9multidict_10_multidict_9MultiDict__extend(struct __pyx
           __pyx_t_4 = ((struct __pyx_vtabstruct_9multidict_10_multidict_MultiDict *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._title(((struct __pyx_obj_9multidict_10_multidict__Base *)__pyx_v_self), __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 279, __pyx_L1_error)
           __Pyx_GOTREF(__pyx_t_4);
           __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-          __Pyx_XDECREF_SET(__pyx_v_key, ((PyObject*)__pyx_t_4));
+          __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_4);
           __pyx_t_4 = 0;
 
           /* "multidict/_multidict.pyx":280
@@ -6112,10 +6101,9 @@ static PyObject *__pyx_f_9multidict_10_multidict_9MultiDict__extend(struct __pyx
  *                         value = item._value
  *                     else:
  */
-          if (!(likely(PyString_CheckExact(__pyx_v_item->_key))||((__pyx_v_item->_key) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_v_item->_key)->tp_name), 0))) __PYX_ERR(0, 289, __pyx_L1_error)
           __pyx_t_4 = __pyx_v_item->_key;
           __Pyx_INCREF(__pyx_t_4);
-          __Pyx_XDECREF_SET(__pyx_v_key, ((PyObject*)__pyx_t_4));
+          __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_4);
           __pyx_t_4 = 0;
 
           /* "multidict/_multidict.pyx":290
@@ -6227,7 +6215,7 @@ static PyObject *__pyx_f_9multidict_10_multidict_9MultiDict__extend(struct __pyx
           __pyx_t_3 = ((struct __pyx_vtabstruct_9multidict_10_multidict_MultiDict *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._title(((struct __pyx_obj_9multidict_10_multidict__Base *)__pyx_v_self), __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 296, __pyx_L1_error)
           __Pyx_GOTREF(__pyx_t_3);
           __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-          __Pyx_XDECREF_SET(__pyx_v_key, ((PyObject*)__pyx_t_3));
+          __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_3);
           __pyx_t_3 = 0;
 
           /* "multidict/_multidict.pyx":297
@@ -6413,8 +6401,7 @@ static PyObject *__pyx_f_9multidict_10_multidict_9MultiDict__extend(struct __pyx
       __PYX_ERR(0, 304, __pyx_L1_error)
       __pyx_L21_unpacking_done:;
     }
-    if (!(likely(PyString_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_t_4)->tp_name), 0))) __PYX_ERR(0, 304, __pyx_L1_error)
-    __Pyx_XDECREF_SET(__pyx_v_key, ((PyObject*)__pyx_t_4));
+    __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_4);
     __pyx_t_4 = 0;
     __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_6);
     __pyx_t_6 = 0;
@@ -6428,7 +6415,7 @@ static PyObject *__pyx_f_9multidict_10_multidict_9MultiDict__extend(struct __pyx
  */
     __pyx_t_7 = ((struct __pyx_vtabstruct_9multidict_10_multidict_MultiDict *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._title(((struct __pyx_obj_9multidict_10_multidict__Base *)__pyx_v_self), __pyx_v_key); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 305, __pyx_L1_error)
     __Pyx_GOTREF(__pyx_t_7);
-    __Pyx_DECREF_SET(__pyx_v_key, ((PyObject*)__pyx_t_7));
+    __Pyx_DECREF_SET(__pyx_v_key, __pyx_t_7);
     __pyx_t_7 = 0;
 
     /* "multidict/_multidict.pyx":306
@@ -6467,7 +6454,7 @@ static PyObject *__pyx_f_9multidict_10_multidict_9MultiDict__extend(struct __pyx
  *             else:
  *                 self._replace(key, value)             # <<<<<<<<<<<<<<
  * 
- *     cdef _add(self, str key, value):
+ *     cdef _add(self, key, value):
  */
     /*else*/ {
       __pyx_t_7 = ((struct __pyx_vtabstruct_9multidict_10_multidict_MultiDict *)__pyx_v_self->__pyx_base.__pyx_vtab)->_replace(__pyx_v_self, __pyx_v_key, __pyx_v_value); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 309, __pyx_L1_error)
@@ -6491,7 +6478,7 @@ static PyObject *__pyx_f_9multidict_10_multidict_9MultiDict__extend(struct __pyx
  * 
  *     cdef _extend(self, tuple args, dict kwargs, name, int do_add):             # <<<<<<<<<<<<<<
  *         cdef _Pair item
- *         cdef str key
+ *         cdef object key
  */
 
   /* function exit code */
@@ -6519,7 +6506,7 @@ static PyObject *__pyx_f_9multidict_10_multidict_9MultiDict__extend(struct __pyx
 /* "multidict/_multidict.pyx":311
  *                 self._replace(key, value)
  * 
- *     cdef _add(self, str key, value):             # <<<<<<<<<<<<<<
+ *     cdef _add(self, key, value):             # <<<<<<<<<<<<<<
  *         self._items.append(_Pair.__new__(_Pair, key, value))
  * 
  */
@@ -6534,10 +6521,10 @@ static PyObject *__pyx_f_9multidict_10_multidict_9MultiDict__add(struct __pyx_ob
 
   /* "multidict/_multidict.pyx":312
  * 
- *     cdef _add(self, str key, value):
+ *     cdef _add(self, key, value):
  *         self._items.append(_Pair.__new__(_Pair, key, value))             # <<<<<<<<<<<<<<
  * 
- *     cdef _replace(self, str key, value):
+ *     cdef _replace(self, key, value):
  */
   if (unlikely(__pyx_v_self->__pyx_base._items == Py_None)) {
     PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "append");
@@ -6560,7 +6547,7 @@ static PyObject *__pyx_f_9multidict_10_multidict_9MultiDict__add(struct __pyx_ob
   /* "multidict/_multidict.pyx":311
  *                 self._replace(key, value)
  * 
- *     cdef _add(self, str key, value):             # <<<<<<<<<<<<<<
+ *     cdef _add(self, key, value):             # <<<<<<<<<<<<<<
  *         self._items.append(_Pair.__new__(_Pair, key, value))
  * 
  */
@@ -6582,7 +6569,7 @@ static PyObject *__pyx_f_9multidict_10_multidict_9MultiDict__add(struct __pyx_ob
 /* "multidict/_multidict.pyx":314
  *         self._items.append(_Pair.__new__(_Pair, key, value))
  * 
- *     cdef _replace(self, str key, value):             # <<<<<<<<<<<<<<
+ *     cdef _replace(self, key, value):             # <<<<<<<<<<<<<<
  *         self._remove(key, 0)
  *         self._items.append(_Pair.__new__(_Pair, key, value))
  */
@@ -6597,7 +6584,7 @@ static PyObject *__pyx_f_9multidict_10_multidict_9MultiDict__replace(struct __py
 
   /* "multidict/_multidict.pyx":315
  * 
- *     cdef _replace(self, str key, value):
+ *     cdef _replace(self, key, value):
  *         self._remove(key, 0)             # <<<<<<<<<<<<<<
  *         self._items.append(_Pair.__new__(_Pair, key, value))
  * 
@@ -6607,7 +6594,7 @@ static PyObject *__pyx_f_9multidict_10_multidict_9MultiDict__replace(struct __py
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
   /* "multidict/_multidict.pyx":316
- *     cdef _replace(self, str key, value):
+ *     cdef _replace(self, key, value):
  *         self._remove(key, 0)
  *         self._items.append(_Pair.__new__(_Pair, key, value))             # <<<<<<<<<<<<<<
  * 
@@ -6634,7 +6621,7 @@ static PyObject *__pyx_f_9multidict_10_multidict_9MultiDict__replace(struct __py
   /* "multidict/_multidict.pyx":314
  *         self._items.append(_Pair.__new__(_Pair, key, value))
  * 
- *     cdef _replace(self, str key, value):             # <<<<<<<<<<<<<<
+ *     cdef _replace(self, key, value):             # <<<<<<<<<<<<<<
  *         self._remove(key, 0)
  *         self._items.append(_Pair.__new__(_Pair, key, value))
  */
@@ -6736,7 +6723,7 @@ static PyObject *__pyx_pf_9multidict_10_multidict_9MultiDict_2add(struct __pyx_o
  */
   __pyx_t_1 = ((struct __pyx_vtabstruct_9multidict_10_multidict_MultiDict *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._title(((struct __pyx_obj_9multidict_10_multidict__Base *)__pyx_v_self), __pyx_v_key); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 320, __pyx_L1_error)
   __Pyx_GOTREF(__pyx_t_1);
-  __pyx_t_2 = ((struct __pyx_vtabstruct_9multidict_10_multidict_MultiDict *)__pyx_v_self->__pyx_base.__pyx_vtab)->_add(__pyx_v_self, ((PyObject*)__pyx_t_1), __pyx_v_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 320, __pyx_L1_error)
+  __pyx_t_2 = ((struct __pyx_vtabstruct_9multidict_10_multidict_MultiDict *)__pyx_v_self->__pyx_base.__pyx_vtab)->_add(__pyx_v_self, __pyx_t_1, __pyx_v_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 320, __pyx_L1_error)
   __Pyx_GOTREF(__pyx_t_2);
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
@@ -7056,7 +7043,7 @@ static int __pyx_pf_9multidict_10_multidict_9MultiDict_10__setitem__(struct __py
  */
   __pyx_t_1 = ((struct __pyx_vtabstruct_9multidict_10_multidict_MultiDict *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._title(((struct __pyx_obj_9multidict_10_multidict__Base *)__pyx_v_self), __pyx_v_key); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 341, __pyx_L1_error)
   __Pyx_GOTREF(__pyx_t_1);
-  __pyx_t_2 = ((struct __pyx_vtabstruct_9multidict_10_multidict_MultiDict *)__pyx_v_self->__pyx_base.__pyx_vtab)->_replace(__pyx_v_self, ((PyObject*)__pyx_t_1), __pyx_v_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 341, __pyx_L1_error)
+  __pyx_t_2 = ((struct __pyx_vtabstruct_9multidict_10_multidict_MultiDict *)__pyx_v_self->__pyx_base.__pyx_vtab)->_replace(__pyx_v_self, __pyx_t_1, __pyx_v_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 341, __pyx_L1_error)
   __Pyx_GOTREF(__pyx_t_2);
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
@@ -7115,11 +7102,11 @@ static int __pyx_pf_9multidict_10_multidict_9MultiDict_12__delitem__(struct __py
  *     def __delitem__(self, key):
  *         self._remove(self._title(key), True)             # <<<<<<<<<<<<<<
  * 
- *     cdef _remove(self, str key, int raise_key_error):
+ *     cdef _remove(self, key, int raise_key_error):
  */
   __pyx_t_1 = ((struct __pyx_vtabstruct_9multidict_10_multidict_MultiDict *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._title(((struct __pyx_obj_9multidict_10_multidict__Base *)__pyx_v_self), __pyx_v_key); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 344, __pyx_L1_error)
   __Pyx_GOTREF(__pyx_t_1);
-  __pyx_t_2 = ((struct __pyx_vtabstruct_9multidict_10_multidict_MultiDict *)__pyx_v_self->__pyx_base.__pyx_vtab)->_remove(__pyx_v_self, ((PyObject*)__pyx_t_1), 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 344, __pyx_L1_error)
+  __pyx_t_2 = ((struct __pyx_vtabstruct_9multidict_10_multidict_MultiDict *)__pyx_v_self->__pyx_base.__pyx_vtab)->_remove(__pyx_v_self, __pyx_t_1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 344, __pyx_L1_error)
   __Pyx_GOTREF(__pyx_t_2);
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
@@ -7148,7 +7135,7 @@ static int __pyx_pf_9multidict_10_multidict_9MultiDict_12__delitem__(struct __py
 /* "multidict/_multidict.pyx":346
  *         self._remove(self._title(key), True)
  * 
- *     cdef _remove(self, str key, int raise_key_error):             # <<<<<<<<<<<<<<
+ *     cdef _remove(self, key, int raise_key_error):             # <<<<<<<<<<<<<<
  *         cdef _Pair item
  *         cdef int found
  */
@@ -7220,7 +7207,9 @@ static PyObject *__pyx_f_9multidict_10_multidict_9MultiDict__remove(struct __pyx
  *                 del self._items[i]
  *                 found = True
  */
-    __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_item->_key, __pyx_v_key, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 352, __pyx_L1_error)
+    __pyx_t_4 = PyObject_RichCompare(__pyx_v_item->_key, __pyx_v_key, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 352, __pyx_L1_error)
+    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 352, __pyx_L1_error)
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
     if (__pyx_t_5) {
 
       /* "multidict/_multidict.pyx":353
@@ -7304,7 +7293,7 @@ static PyObject *__pyx_f_9multidict_10_multidict_9MultiDict__remove(struct __pyx
   /* "multidict/_multidict.pyx":346
  *         self._remove(self._title(key), True)
  * 
- *     cdef _remove(self, str key, int raise_key_error):             # <<<<<<<<<<<<<<
+ *     cdef _remove(self, key, int raise_key_error):             # <<<<<<<<<<<<<<
  *         cdef _Pair item
  *         cdef int found
  */
@@ -7329,7 +7318,7 @@ static PyObject *__pyx_f_9multidict_10_multidict_9MultiDict__remove(struct __pyx
  * 
  *     def setdefault(self, key, default=None):             # <<<<<<<<<<<<<<
  *         """Return value for key, set value to default if key is not present."""
- *         cdef str skey
+ *         cdef _Pair item
  */
 
 /* Python wrapper */
@@ -7395,7 +7384,6 @@ static PyObject *__pyx_pw_9multidict_10_multidict_9MultiDict_15setdefault(PyObje
 }
 
 static PyObject *__pyx_pf_9multidict_10_multidict_9MultiDict_14setdefault(struct __pyx_obj_9multidict_10_multidict_MultiDict *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_default) {
-  PyObject *__pyx_v_skey = 0;
   struct __pyx_obj_9multidict_10_multidict__Pair *__pyx_v_item = 0;
   PyObject *__pyx_v_i = NULL;
   PyObject *__pyx_r = NULL;
@@ -7405,47 +7393,48 @@ static PyObject *__pyx_pf_9multidict_10_multidict_9MultiDict_14setdefault(struct
   PyObject *__pyx_t_3 = NULL;
   int __pyx_t_4;
   __Pyx_RefNannySetupContext("setdefault", 0);
+  __Pyx_INCREF(__pyx_v_key);
 
-  /* "multidict/_multidict.pyx":362
- *         cdef str skey
+  /* "multidict/_multidict.pyx":361
+ *         """Return value for key, set value to default if key is not present."""
  *         cdef _Pair item
- *         skey = self._title(key)             # <<<<<<<<<<<<<<
+ *         key = self._title(key)             # <<<<<<<<<<<<<<
  *         for i in self._items:
  *             item = <_Pair>i
  */
-  __pyx_t_1 = ((struct __pyx_vtabstruct_9multidict_10_multidict_MultiDict *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._title(((struct __pyx_obj_9multidict_10_multidict__Base *)__pyx_v_self), __pyx_v_key); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 362, __pyx_L1_error)
+  __pyx_t_1 = ((struct __pyx_vtabstruct_9multidict_10_multidict_MultiDict *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._title(((struct __pyx_obj_9multidict_10_multidict__Base *)__pyx_v_self), __pyx_v_key); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 361, __pyx_L1_error)
   __Pyx_GOTREF(__pyx_t_1);
-  __pyx_v_skey = ((PyObject*)__pyx_t_1);
+  __Pyx_DECREF_SET(__pyx_v_key, __pyx_t_1);
   __pyx_t_1 = 0;
 
-  /* "multidict/_multidict.pyx":363
+  /* "multidict/_multidict.pyx":362
  *         cdef _Pair item
- *         skey = self._title(key)
+ *         key = self._title(key)
  *         for i in self._items:             # <<<<<<<<<<<<<<
  *             item = <_Pair>i
- *             if item._key == skey:
+ *             if item._key == key:
  */
   if (unlikely(__pyx_v_self->__pyx_base._items == Py_None)) {
     PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
-    __PYX_ERR(0, 363, __pyx_L1_error)
+    __PYX_ERR(0, 362, __pyx_L1_error)
   }
   __pyx_t_1 = __pyx_v_self->__pyx_base._items; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
   for (;;) {
     if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
     #if CYTHON_COMPILING_IN_CPYTHON
-    __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 363, __pyx_L1_error)
+    __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 362, __pyx_L1_error)
     #else
-    __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 363, __pyx_L1_error)
+    __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 362, __pyx_L1_error)
     __Pyx_GOTREF(__pyx_t_3);
     #endif
     __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_3);
     __pyx_t_3 = 0;
 
-    /* "multidict/_multidict.pyx":364
- *         skey = self._title(key)
+    /* "multidict/_multidict.pyx":363
+ *         key = self._title(key)
  *         for i in self._items:
  *             item = <_Pair>i             # <<<<<<<<<<<<<<
- *             if item._key == skey:
+ *             if item._key == key:
  *                 return item._value
  */
     __pyx_t_3 = __pyx_v_i;
@@ -7453,21 +7442,23 @@ static PyObject *__pyx_pf_9multidict_10_multidict_9MultiDict_14setdefault(struct
     __Pyx_XDECREF_SET(__pyx_v_item, ((struct __pyx_obj_9multidict_10_multidict__Pair *)__pyx_t_3));
     __pyx_t_3 = 0;
 
-    /* "multidict/_multidict.pyx":365
+    /* "multidict/_multidict.pyx":364
  *         for i in self._items:
  *             item = <_Pair>i
- *             if item._key == skey:             # <<<<<<<<<<<<<<
+ *             if item._key == key:             # <<<<<<<<<<<<<<
  *                 return item._value
- *         self._add(skey, default)
+ *         self._add(key, default)
  */
-    __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_v_item->_key, __pyx_v_skey, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 365, __pyx_L1_error)
+    __pyx_t_3 = PyObject_RichCompare(__pyx_v_item->_key, __pyx_v_key, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 364, __pyx_L1_error)
+    __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 364, __pyx_L1_error)
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
     if (__pyx_t_4) {
 
-      /* "multidict/_multidict.pyx":366
+      /* "multidict/_multidict.pyx":365
  *             item = <_Pair>i
- *             if item._key == skey:
+ *             if item._key == key:
  *                 return item._value             # <<<<<<<<<<<<<<
- *         self._add(skey, default)
+ *         self._add(key, default)
  *         return default
  */
       __Pyx_XDECREF(__pyx_r);
@@ -7476,39 +7467,39 @@ static PyObject *__pyx_pf_9multidict_10_multidict_9MultiDict_14setdefault(struct
       __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
       goto __pyx_L0;
 
-      /* "multidict/_multidict.pyx":365
+      /* "multidict/_multidict.pyx":364
  *         for i in self._items:
  *             item = <_Pair>i
- *             if item._key == skey:             # <<<<<<<<<<<<<<
+ *             if item._key == key:             # <<<<<<<<<<<<<<
  *                 return item._value
- *         self._add(skey, default)
+ *         self._add(key, default)
  */
     }
 
-    /* "multidict/_multidict.pyx":363
+    /* "multidict/_multidict.pyx":362
  *         cdef _Pair item
- *         skey = self._title(key)
+ *         key = self._title(key)
  *         for i in self._items:             # <<<<<<<<<<<<<<
  *             item = <_Pair>i
- *             if item._key == skey:
+ *             if item._key == key:
  */
   }
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
-  /* "multidict/_multidict.pyx":367
- *             if item._key == skey:
+  /* "multidict/_multidict.pyx":366
+ *             if item._key == key:
  *                 return item._value
- *         self._add(skey, default)             # <<<<<<<<<<<<<<
+ *         self._add(key, default)             # <<<<<<<<<<<<<<
  *         return default
  * 
  */
-  __pyx_t_1 = ((struct __pyx_vtabstruct_9multidict_10_multidict_MultiDict *)__pyx_v_self->__pyx_base.__pyx_vtab)->_add(__pyx_v_self, __pyx_v_skey, __pyx_v_default); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 367, __pyx_L1_error)
+  __pyx_t_1 = ((struct __pyx_vtabstruct_9multidict_10_multidict_MultiDict *)__pyx_v_self->__pyx_base.__pyx_vtab)->_add(__pyx_v_self, __pyx_v_key, __pyx_v_default); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 366, __pyx_L1_error)
   __Pyx_GOTREF(__pyx_t_1);
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
-  /* "multidict/_multidict.pyx":368
+  /* "multidict/_multidict.pyx":367
  *                 return item._value
- *         self._add(skey, default)
+ *         self._add(key, default)
  *         return default             # <<<<<<<<<<<<<<
  * 
  *     def pop(self, key, default=_marker):
@@ -7523,7 +7514,7 @@ static PyObject *__pyx_pf_9multidict_10_multidict_9MultiDict_14setdefault(struct
  * 
  *     def setdefault(self, key, default=None):             # <<<<<<<<<<<<<<
  *         """Return value for key, set value to default if key is not present."""
- *         cdef str skey
+ *         cdef _Pair item
  */
 
   /* function exit code */
@@ -7533,15 +7524,15 @@ static PyObject *__pyx_pf_9multidict_10_multidict_9MultiDict_14setdefault(struct
   __Pyx_AddTraceback("multidict._multidict.MultiDict.setdefault", __pyx_clineno, __pyx_lineno, __pyx_filename);
   __pyx_r = NULL;
   __pyx_L0:;
-  __Pyx_XDECREF(__pyx_v_skey);
   __Pyx_XDECREF((PyObject *)__pyx_v_item);
   __Pyx_XDECREF(__pyx_v_i);
+  __Pyx_XDECREF(__pyx_v_key);
   __Pyx_XGIVEREF(__pyx_r);
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "multidict/_multidict.pyx":370
+/* "multidict/_multidict.pyx":369
  *         return default
  * 
  *     def pop(self, key, default=_marker):             # <<<<<<<<<<<<<<
@@ -7583,7 +7574,7 @@ static PyObject *__pyx_pw_9multidict_10_multidict_9MultiDict_17pop(PyObject *__p
         }
       }
       if (unlikely(kw_args > 0)) {
-        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "pop") < 0)) __PYX_ERR(0, 370, __pyx_L3_error)
+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "pop") < 0)) __PYX_ERR(0, 369, __pyx_L3_error)
       }
     } else {
       switch (PyTuple_GET_SIZE(__pyx_args)) {
@@ -7598,7 +7589,7 @@ static PyObject *__pyx_pw_9multidict_10_multidict_9MultiDict_17pop(PyObject *__p
   }
   goto __pyx_L4_argument_unpacking_done;
   __pyx_L5_argtuple_error:;
-  __Pyx_RaiseArgtupleInvalid("pop", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 370, __pyx_L3_error)
+  __Pyx_RaiseArgtupleInvalid("pop", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 369, __pyx_L3_error)
   __pyx_L3_error:;
   __Pyx_AddTraceback("multidict._multidict.MultiDict.pop", __pyx_clineno, __pyx_lineno, __pyx_filename);
   __Pyx_RefNannyFinishContext();
@@ -7613,7 +7604,6 @@ static PyObject *__pyx_pw_9multidict_10_multidict_9MultiDict_17pop(PyObject *__p
 
 static PyObject *__pyx_pf_9multidict_10_multidict_9MultiDict_16pop(struct __pyx_obj_9multidict_10_multidict_MultiDict *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_default) {
   int __pyx_v_found;
-  PyObject *__pyx_v_skey = 0;
   PyObject *__pyx_v_value = 0;
   struct __pyx_obj_9multidict_10_multidict__Pair *__pyx_v_item = 0;
   Py_ssize_t __pyx_v_i;
@@ -7626,22 +7616,23 @@ static PyObject *__pyx_pf_9multidict_10_multidict_9MultiDict_16pop(struct __pyx_
   int __pyx_t_5;
   int __pyx_t_6;
   __Pyx_RefNannySetupContext("pop", 0);
+  __Pyx_INCREF(__pyx_v_key);
 
-  /* "multidict/_multidict.pyx":381
+  /* "multidict/_multidict.pyx":379
  *         cdef object value
  *         cdef _Pair item
- *         skey = self._title(key)             # <<<<<<<<<<<<<<
+ *         key = self._title(key)             # <<<<<<<<<<<<<<
  *         value = None
  *         found = False
  */
-  __pyx_t_1 = ((struct __pyx_vtabstruct_9multidict_10_multidict_MultiDict *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._title(((struct __pyx_obj_9multidict_10_multidict__Base *)__pyx_v_self), __pyx_v_key); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 381, __pyx_L1_error)
+  __pyx_t_1 = ((struct __pyx_vtabstruct_9multidict_10_multidict_MultiDict *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._title(((struct __pyx_obj_9multidict_10_multidict__Base *)__pyx_v_self), __pyx_v_key); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 379, __pyx_L1_error)
   __Pyx_GOTREF(__pyx_t_1);
-  __pyx_v_skey = ((PyObject*)__pyx_t_1);
+  __Pyx_DECREF_SET(__pyx_v_key, __pyx_t_1);
   __pyx_t_1 = 0;
 
-  /* "multidict/_multidict.pyx":382
+  /* "multidict/_multidict.pyx":380
  *         cdef _Pair item
- *         skey = self._title(key)
+ *         key = self._title(key)
  *         value = None             # <<<<<<<<<<<<<<
  *         found = False
  *         for i in range(len(self._items) - 1, -1, -1):
@@ -7649,8 +7640,8 @@ static PyObject *__pyx_pf_9multidict_10_multidict_9MultiDict_16pop(struct __pyx_
   __Pyx_INCREF(Py_None);
   __pyx_v_value = Py_None;
 
-  /* "multidict/_multidict.pyx":383
- *         skey = self._title(key)
+  /* "multidict/_multidict.pyx":381
+ *         key = self._title(key)
  *         value = None
  *         found = False             # <<<<<<<<<<<<<<
  *         for i in range(len(self._items) - 1, -1, -1):
@@ -7658,36 +7649,36 @@ static PyObject *__pyx_pf_9multidict_10_multidict_9MultiDict_16pop(struct __pyx_
  */
   __pyx_v_found = 0;
 
-  /* "multidict/_multidict.pyx":384
+  /* "multidict/_multidict.pyx":382
  *         value = None
  *         found = False
  *         for i in range(len(self._items) - 1, -1, -1):             # <<<<<<<<<<<<<<
  *             item = <_Pair>self._items[i]
- *             if item._key == skey:
+ *             if item._key == key:
  */
   __pyx_t_1 = __pyx_v_self->__pyx_base._items;
   __Pyx_INCREF(__pyx_t_1);
   if (unlikely(__pyx_t_1 == Py_None)) {
     PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
-    __PYX_ERR(0, 384, __pyx_L1_error)
+    __PYX_ERR(0, 382, __pyx_L1_error)
   }
-  __pyx_t_2 = PyList_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(0, 384, __pyx_L1_error)
+  __pyx_t_2 = PyList_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(0, 382, __pyx_L1_error)
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   for (__pyx_t_3 = (__pyx_t_2 - 1); __pyx_t_3 > -1L; __pyx_t_3-=1) {
     __pyx_v_i = __pyx_t_3;
 
-    /* "multidict/_multidict.pyx":385
+    /* "multidict/_multidict.pyx":383
  *         found = False
  *         for i in range(len(self._items) - 1, -1, -1):
  *             item = <_Pair>self._items[i]             # <<<<<<<<<<<<<<
- *             if item._key == skey:
+ *             if item._key == key:
  *                 value = item._value
  */
     if (unlikely(__pyx_v_self->__pyx_base._items == Py_None)) {
       PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
-      __PYX_ERR(0, 385, __pyx_L1_error)
+      __PYX_ERR(0, 383, __pyx_L1_error)
     }
-    __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_self->__pyx_base._items, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 385, __pyx_L1_error)
+    __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_self->__pyx_base._items, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 383, __pyx_L1_error)
     __Pyx_GOTREF(__pyx_t_1);
     __pyx_t_4 = __pyx_t_1;
     __Pyx_INCREF(__pyx_t_4);
@@ -7695,19 +7686,21 @@ static PyObject *__pyx_pf_9multidict_10_multidict_9MultiDict_16pop(struct __pyx_
     __Pyx_XDECREF_SET(__pyx_v_item, ((struct __pyx_obj_9multidict_10_multidict__Pair *)__pyx_t_4));
     __pyx_t_4 = 0;
 
-    /* "multidict/_multidict.pyx":386
+    /* "multidict/_multidict.pyx":384
  *         for i in range(len(self._items) - 1, -1, -1):
  *             item = <_Pair>self._items[i]
- *             if item._key == skey:             # <<<<<<<<<<<<<<
+ *             if item._key == key:             # <<<<<<<<<<<<<<
  *                 value = item._value
  *                 del self._items[i]
  */
-    __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_item->_key, __pyx_v_skey, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 386, __pyx_L1_error)
+    __pyx_t_4 = PyObject_RichCompare(__pyx_v_item->_key, __pyx_v_key, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 384, __pyx_L1_error)
+    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 384, __pyx_L1_error)
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
     if (__pyx_t_5) {
 
-      /* "multidict/_multidict.pyx":387
+      /* "multidict/_multidict.pyx":385
  *             item = <_Pair>self._items[i]
- *             if item._key == skey:
+ *             if item._key == key:
  *                 value = item._value             # <<<<<<<<<<<<<<
  *                 del self._items[i]
  *                 found = True
@@ -7717,8 +7710,8 @@ static PyObject *__pyx_pf_9multidict_10_multidict_9MultiDict_16pop(struct __pyx_
       __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_4);
       __pyx_t_4 = 0;
 
-      /* "multidict/_multidict.pyx":388
- *             if item._key == skey:
+      /* "multidict/_multidict.pyx":386
+ *             if item._key == key:
  *                 value = item._value
  *                 del self._items[i]             # <<<<<<<<<<<<<<
  *                 found = True
@@ -7726,11 +7719,11 @@ static PyObject *__pyx_pf_9multidict_10_multidict_9MultiDict_16pop(struct __pyx_
  */
       if (unlikely(__pyx_v_self->__pyx_base._items == Py_None)) {
         PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
-        __PYX_ERR(0, 388, __pyx_L1_error)
... 4200 lines suppressed ...

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/python-multidict.git



More information about the Python-modules-commits mailing list