[Python-modules-commits] [python-multidict] 01/05: Import python-multidict_3.1.0.orig.tar.gz
Piotr Ożarowski
piotr at moszumanska.debian.org
Fri Jun 30 11:54:57 UTC 2017
This is an automated email from the git hooks/post-receive script.
piotr pushed a commit to branch master
in repository python-multidict.
commit 866086f13d1c0c5b8a41280272e578fae1b08cb8
Author: Piotr Ożarowski <piotr at debian.org>
Date: Tue Jun 27 21:02:29 2017 +0200
Import python-multidict_3.1.0.orig.tar.gz
---
CHANGES.rst | 37 +
Makefile | 16 +-
PKG-INFO | 39 +-
docs/multidict.rst | 45 +-
multidict.egg-info/PKG-INFO | 39 +-
multidict.egg-info/SOURCES.txt | 7 +-
multidict/__init__.py | 2 +-
multidict/__init__.pyi | 13 +
multidict/_istr.c | 237 +
multidict/_istr.cpython-35m-x86_64-linux-gnu.so | Bin 0 -> 30970 bytes
multidict/_multidict.c | 12639 ++++++++++++----------
multidict/_multidict.pyx | 482 +-
multidict/_multidict_py.py | 292 +-
setup.py | 3 +
tests/test_guard.py | 34 +
tests/test_istr.py | 57 +
tests/test_multidict.py | 213 +-
tests/test_version.py | 185 +
18 files changed, 8114 insertions(+), 6226 deletions(-)
diff --git a/CHANGES.rst b/CHANGES.rst
index 3c01753..d5976e3 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -1,3 +1,40 @@
+3.1.0 (2017-06-25)
+------------------
+
+* Fix #99: raise `RuntimeError` on dict iterations if the dict was changed
+
+* Update `__init__.pyi` signatures
+
+3.0.0 (2017-06-21)
+------------------
+
+* Refactor internal data structures: main dict operations are about
+ 100% faster now.
+
+* Preserve order on multidict updates #68
+
+ Updates are `md[key] = val` and `md.update(...)` calls.
+
+ Now **the last** entry is replaced with new key/value pair, all
+ previous occurrences are removed.
+
+ If key is not present in dictionary the pair is added to the end
+
+* Force keys to `str` instances #88
+
+* Implement `.popall(key[, default])` #84
+
+* `.pop()` removes only first occurence, `.popone()` added #92
+
+* Implement dict's version #86
+
+* Proxies are not pickable anymore #77
+
+2.1.7 (2017-05-29)
+------------------
+
+* Fix import warning on Python 3.6 #79
+
2.1.6 (2017-05-27)
------------------
diff --git a/Makefile b/Makefile
index 6d601e5..476e1a7 100644
--- a/Makefile
+++ b/Makefile
@@ -21,22 +21,22 @@ rmcache:
test: flake .develop rmcache
- py.test -q ./tests/
+ pytest -q ./tests/
vtest: flake .develop rmcache
- py.test -s -v ./tests/
+ pytest -s -v ./tests/
cov cover coverage:
tox
cov-dev: .develop rmcache
- py.test --cov=multidict --cov-report=term --cov-report=html tests
- @echo "open file://`pwd`/coverage/index.html"
+ pytest --cov=multidict --cov-report=term --cov-report=html tests
+ @echo "open file://`pwd`/htmlcov/index.html"
cov-dev-full: .develop rmcache
- AIOHTTPMULTIDICT_NO_EXTENSIONS=1 py.test --cov=multidict --cov-append tests
- py.test --cov=multidict --cov-report=term --cov-report=html tests
- @echo "open file://`pwd`/coverage/index.html"
+ AIOHTTPMULTIDICT_NO_EXTENSIONS=1 pytest --cov=multidict --cov-append tests
+ pytest --cov=multidict --cov-report=term --cov-report=html tests
+ @echo "open file://`pwd`/htmlcov/index.html"
clean:
rm -rf `find . -name __pycache__`
@@ -58,6 +58,8 @@ clean:
rm -f multidict/_multidict.*.so
rm -f multidict/_multidict.*.pyd
rm -rf .tox
+ rm .install-deps
+ rm .develop
doc:
make -C docs html
diff --git a/PKG-INFO b/PKG-INFO
index be2ea17..59dc24b 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: multidict
-Version: 2.1.6
+Version: 3.1.0
Summary: multidict implementation
Home-page: https://github.com/aio-libs/multidict/
Author: Andrew Svetlov
@@ -62,6 +62,43 @@ Description: =========
.. _aiohttp: https://github.com/KeepSafe/aiohttp
.. _Cython: http://cython.org/
+ 3.1.0 (2017-06-25)
+ ------------------
+
+ * Fix #99: raise `RuntimeError` on dict iterations if the dict was changed
+
+ * Update `__init__.pyi` signatures
+
+ 3.0.0 (2017-06-21)
+ ------------------
+
+ * Refactor internal data structures: main dict operations are about
+ 100% faster now.
+
+ * Preserve order on multidict updates #68
+
+ Updates are `md[key] = val` and `md.update(...)` calls.
+
+ Now **the last** entry is replaced with new key/value pair, all
+ previous occurrences are removed.
+
+ If key is not present in dictionary the pair is added to the end
+
+ * Force keys to `str` instances #88
+
+ * Implement `.popall(key[, default])` #84
+
+ * `.pop()` removes only first occurence, `.popone()` added #92
+
+ * Implement dict's version #86
+
+ * Proxies are not pickable anymore #77
+
+ 2.1.7 (2017-05-29)
+ ------------------
+
+ * Fix import warning on Python 3.6 #79
+
2.1.6 (2017-05-27)
------------------
diff --git a/docs/multidict.rst b/docs/multidict.rst
index 8996239..11386e4 100644
--- a/docs/multidict.rst
+++ b/docs/multidict.rst
@@ -18,7 +18,6 @@ MultiDict
Creates a mutable multidict instance.
Accepted parameters are the same as for :class:`dict`.
-
If the same key appears several times it will be added, e.g.::
>>> d = MultiDict([('a', 1), ('b', 2), ('a', 3)])
@@ -128,7 +127,7 @@ MultiDict
View contains all values.
- .. method:: pop(key[, default])
+ .. method:: popone(key[, default])
If *key* is in the dictionary, remove it and return its the
**first** value, else return *default*.
@@ -136,6 +135,28 @@ MultiDict
If *default* is not given and *key* is not in the dictionary, a
:exc:`KeyError` is raised.
+ .. versionadded:: 3.0
+
+ .. method:: pop(key[, default])
+
+ An alias to :meth:`pop`
+
+ .. versionchanged:: 3.0
+
+ Now only *first* occurrence is removed (was all).
+
+ .. method:: popall(key[, default])
+
+ If *key* is in the dictionary, remove all occurrences and return
+ a :class:`list` of all values in corresponding order (as
+ :meth:`getall` does).
+
+ If *key* is not found and *default* is provided return *default*.
+
+ If *default* is not given and *key* is not in the dictionary, a
+ :exc:`KeyError` is raised.
+
+ .. versionadded:: 3.0
.. method:: popitem()
@@ -300,6 +321,26 @@ CIMultiDictProxy
The class is inherited from :class:`MultiDict`.
+Version
+=======
+
+All multidicts have an internal version flag. It's changed on every
+dict update, thus the flag could be used for checks like cache
+expiring etc.
+
+.. function:: getversion(mdict)
+
+ Return a version of given *mdict* object (works for proxies also).
+
+ The type of returned value is opaque and should be used for
+ equality tests only (``==`` and ``!=``), ordering is not allowed
+ while not prohibited explicitly.
+
+ .. versionadded:: 3.0
+
+ .. seealso:: :pep:`509`
+
+
istr
====
diff --git a/multidict.egg-info/PKG-INFO b/multidict.egg-info/PKG-INFO
index be2ea17..59dc24b 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.6
+Version: 3.1.0
Summary: multidict implementation
Home-page: https://github.com/aio-libs/multidict/
Author: Andrew Svetlov
@@ -62,6 +62,43 @@ Description: =========
.. _aiohttp: https://github.com/KeepSafe/aiohttp
.. _Cython: http://cython.org/
+ 3.1.0 (2017-06-25)
+ ------------------
+
+ * Fix #99: raise `RuntimeError` on dict iterations if the dict was changed
+
+ * Update `__init__.pyi` signatures
+
+ 3.0.0 (2017-06-21)
+ ------------------
+
+ * Refactor internal data structures: main dict operations are about
+ 100% faster now.
+
+ * Preserve order on multidict updates #68
+
+ Updates are `md[key] = val` and `md.update(...)` calls.
+
+ Now **the last** entry is replaced with new key/value pair, all
+ previous occurrences are removed.
+
+ If key is not present in dictionary the pair is added to the end
+
+ * Force keys to `str` instances #88
+
+ * Implement `.popall(key[, default])` #84
+
+ * `.pop()` removes only first occurence, `.popone()` added #92
+
+ * Implement dict's version #86
+
+ * Proxies are not pickable anymore #77
+
+ 2.1.7 (2017-05-29)
+ ------------------
+
+ * Fix import warning on Python 3.6 #79
+
2.1.6 (2017-05-27)
------------------
diff --git a/multidict.egg-info/SOURCES.txt b/multidict.egg-info/SOURCES.txt
index 4791dcf..52674e8 100644
--- a/multidict.egg-info/SOURCES.txt
+++ b/multidict.egg-info/SOURCES.txt
@@ -12,6 +12,8 @@ docs/multidict.rst
docs/spelling_wordlist.txt
multidict/__init__.py
multidict/__init__.pyi
+multidict/_istr.c
+multidict/_istr.cpython-35m-x86_64-linux-gnu.so
multidict/_multidict.c
multidict/_multidict.pyx
multidict/_multidict_py.py
@@ -19,4 +21,7 @@ multidict.egg-info/PKG-INFO
multidict.egg-info/SOURCES.txt
multidict.egg-info/dependency_links.txt
multidict.egg-info/top_level.txt
-tests/test_multidict.py
\ No newline at end of file
+tests/test_guard.py
+tests/test_istr.py
+tests/test_multidict.py
+tests/test_version.py
\ No newline at end of file
diff --git a/multidict/__init__.py b/multidict/__init__.py
index 631a1a8..5d24f42 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.6'
+__version__ = '3.1.0'
if bool(os.environ.get('MULTIDICT_NO_EXTENSIONS')):
diff --git a/multidict/__init__.pyi b/multidict/__init__.pyi
index 3c8604c..0699739 100644
--- a/multidict/__init__.pyi
+++ b/multidict/__init__.pyi
@@ -52,10 +52,23 @@ class MultiDict(MutableMapping[_S, _T], Generic[_T]):
def __setitem__(self, key: _S, value) -> None: ...
def __delitem__(self, key: _S) -> None: ...
def setdefault(self, key: _S, default: _T=None) -> _T: ...
+
@overload
def pop(self, key: _S) -> _T: ...
@overload
def pop(self, key: _S, default: _T=...) -> _T: ...
+
+ @overload
+ def popone(self, key: _S) -> _T: ...
+ @overload
+ def popone(self, key: _S, default: _T=...) -> _T: ...
+
+ @overload
+ def popall(self, key: _S) -> List[_T]: ...
+ @overload
+ def popall(self, key: _S, default: _T=...) -> List[_T]: ...
+
+
def popitem(self) -> Tuple[_S, _T]: ...
diff --git a/multidict/_istr.c b/multidict/_istr.c
new file mode 100644
index 0000000..109d433
--- /dev/null
+++ b/multidict/_istr.c
@@ -0,0 +1,237 @@
+#include "Python.h"
+#include "structmember.h"
+
+PyDoc_STRVAR(istr__doc__, "istr class implementation");
+
+/* We link this module statically for convenience. If compiled as a shared
+ library instead, some compilers don't allow addresses of Python objects
+ defined in other libraries to be used in static initializers here. The
+ DEFERRED_ADDRESS macro is used to tag the slots where such addresses
+ appear; the module init function must fill in the tagged slots at runtime.
+ The argument is for documentation -- the macro ignores it.
+*/
+#define DEFERRED_ADDRESS(ADDR) 0
+
+
+typedef struct {
+ PyUnicodeObject str;
+ PyObject * canonical;
+} istrobject;
+
+typedef struct {
+ PyObject *title;
+ PyObject *emptystr;
+ PyObject *emptydict;
+} ModData;
+
+static struct PyModuleDef _istrmodule;
+static PyTypeObject istr_type;
+
+static ModData *
+modstate(PyObject *mod)
+{
+ return (ModData*)PyModule_GetState(mod);
+}
+
+static ModData *
+global_state(void)
+{
+ return modstate(PyState_FindModule(&_istrmodule));
+}
+
+
+
+static PyObject *
+istr_title(istrobject *self, PyObject *args)
+{
+ if (!PyArg_ParseTuple(args, ":title"))
+ return NULL;
+ Py_INCREF(self);
+ return (PyObject*)self;
+}
+
+static PyObject *
+istr_str(istrobject *self)
+{
+ Py_INCREF(self->canonical);
+ return self->canonical;
+}
+
+static PyMethodDef istr_methods[] = {
+ {"title", (PyCFunction)istr_title, METH_VARARGS,
+ PyDoc_STR("title()")},
+ {NULL, NULL},
+};
+
+
+void istr_dealloc(istrobject *self)
+{
+ Py_XDECREF(self->canonical);
+}
+
+static PyObject *
+istr_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
+{
+ PyObject *x = NULL;
+ static char *kwlist[] = {"object", "encoding", "errors", 0};
+ char *encoding = NULL;
+ char *errors = NULL;
+ PyObject *s = NULL;
+ PyObject *tmp = NULL;
+ PyObject * new_args = NULL;
+ PyObject * ret = NULL;
+
+ ModData * state = global_state();
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwds, "|Oss:str",
+ kwlist, &x, &encoding, &errors))
+ return NULL;
+ if (x == NULL) {
+ s = state->emptystr;
+ Py_INCREF(s);
+ }
+ else if (PyObject_IsInstance(x, (PyObject*)&istr_type)) {
+ Py_INCREF(x);
+ return x;
+ }
+ else {
+ if (encoding == NULL && errors == NULL) {
+ tmp = PyObject_Str(x);
+ } else {
+ tmp = PyUnicode_FromEncodedObject(x, encoding, errors);
+ }
+ if (!tmp) {
+ goto finish;
+ }
+ s = PyObject_CallMethodObjArgs(tmp, state->title, NULL);
+ }
+ if (!s)
+ goto finish;
+
+ new_args = PyTuple_Pack(1, s);
+ if (!new_args) {
+ goto finish;
+ }
+ ret = PyUnicode_Type.tp_new(type, new_args, state->emptydict);
+ if (!ret) {
+ goto finish;
+ }
+ ((istrobject*)ret)->canonical = s;
+ s = NULL; /* the reference is stollen by .canonical */
+finish:
+ Py_XDECREF(tmp);
+ Py_XDECREF(s);
+ Py_XDECREF(new_args);
+ return ret;
+}
+
+static PyTypeObject istr_type = {
+ PyVarObject_HEAD_INIT(DEFERRED_ADDRESS(&PyType_Type), 0)
+ "multidict._istr.istr",
+ sizeof(istrobject),
+ 0,
+ (destructor)istr_dealloc, /* tp_dealloc */
+ 0, /* tp_print */
+ 0, /* tp_getattr */
+ 0, /* tp_setattr */
+ 0, /* tp_reserved */
+ 0, /* tp_repr */
+ 0, /* tp_as_number */
+ 0, /* tp_as_sequence */
+ 0, /* tp_as_mapping */
+ 0, /* tp_hash */
+ 0, /* tp_call */
+ (reprfunc)istr_str, /* tp_str */
+ 0, /* tp_getattro */
+ 0, /* tp_setattro */
+ 0, /* tp_as_buffer */
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE | Py_TPFLAGS_UNICODE_SUBCLASS,
+ /* tp_flags */
+ 0, /* tp_doc */
+ 0, /* tp_traverse */
+ 0, /* tp_clear */
+ 0, /* tp_richcompare */
+ 0, /* tp_weaklistoffset */
+ 0, /* tp_iter */
+ 0, /* tp_iternext */
+ istr_methods, /* tp_methods */
+ 0, /* tp_members */
+ 0, /* tp_getset */
+ DEFERRED_ADDRESS(&PyUnicode_Type), /* tp_base */
+ 0, /* tp_dict */
+ 0, /* tp_descr_get */
+ 0, /* tp_descr_set */
+ 0, /* tp_dictoffset */
+ 0, /* tp_init */
+ 0, /* tp_alloc */
+ (newfunc)istr_new, /* tp_new */
+};
+
+
+static int mod_clear(PyObject *m)
+{
+ Py_CLEAR(modstate(m)->title);
+ Py_CLEAR(modstate(m)->emptystr);
+ Py_CLEAR(modstate(m)->emptydict);
+ return 0;
+}
+
+
+static struct PyModuleDef _istrmodule = {
+ PyModuleDef_HEAD_INIT,
+ "multidict._istr",
+ istr__doc__,
+ sizeof(ModData),
+ NULL, /* m_methods */
+ NULL, /* m_reload */
+ NULL, /* m_traverse */
+ mod_clear, /* m_clear */
+ NULL /* m_free */
+};
+
+
+PyObject* PyInit__istr(void)
+{
+ PyObject * tmp;
+ PyObject *mod;
+
+ mod = PyState_FindModule(&_istrmodule);
+ if (mod) {
+ Py_INCREF(mod);
+ return mod;
+ }
+
+ istr_type.tp_base = &PyUnicode_Type;
+ if (PyType_Ready(&istr_type) < 0) {
+ return NULL;
+ }
+
+ mod = PyModule_Create(&_istrmodule);
+ if (!mod) {
+ return NULL;
+ }
+ tmp = PyUnicode_FromString("title");
+ if (!tmp) {
+ goto err;
+ }
+ modstate(mod)->title = tmp;
+ tmp = PyUnicode_New(0, 0);
+ if (!tmp) {
+ goto err;
+ }
+ modstate(mod)->emptystr = tmp;
+ tmp = PyUnicode_FromString("title");
+ if(!tmp) {
+ goto err;
+ }
+ modstate(mod)->title = tmp;
+
+ Py_INCREF(&istr_type);
+ if (PyModule_AddObject(mod, "istr", (PyObject *)&istr_type) < 0)
+ goto err;
+
+ return mod;
+err:
+ Py_DECREF(mod);
+ return NULL;
+}
diff --git a/multidict/_istr.cpython-35m-x86_64-linux-gnu.so b/multidict/_istr.cpython-35m-x86_64-linux-gnu.so
new file mode 100755
index 0000000..2a68b42
Binary files /dev/null and b/multidict/_istr.cpython-35m-x86_64-linux-gnu.so differ
diff --git a/multidict/_multidict.c b/multidict/_multidict.c
index 2ec5a16..c09d155 100644
--- a/multidict/_multidict.c
+++ b/multidict/_multidict.c
@@ -2,7 +2,9 @@
/* BEGIN: Cython Metadata
{
- "distutils": {},
+ "distutils": {
+ "depends": []
+ },
"module_name": "multidict._multidict"
}
END: Cython Metadata */
@@ -436,6 +438,8 @@ static CYTHON_INLINE float __PYX_NAN() {
#define __PYX_HAVE__multidict___multidict
#define __PYX_HAVE_API__multidict___multidict
+#include <string.h>
+#include <stdio.h>
#ifdef _OPENMP
#include <omp.h>
#endif /* _OPENMP */
@@ -632,10 +636,12 @@ static const char *__pyx_filename;
static const char *__pyx_f[] = {
"multidict/_multidict.pyx",
+ "type.pxd",
};
/*--- Type declarations ---*/
struct __pyx_obj_9multidict_10_multidict__Pair;
+struct __pyx_obj_9multidict_10_multidict__Impl;
struct __pyx_obj_9multidict_10_multidict__Base;
struct __pyx_obj_9multidict_10_multidict_MultiDictProxy;
struct __pyx_obj_9multidict_10_multidict_CIMultiDictProxy;
@@ -649,67 +655,77 @@ struct __pyx_obj_9multidict_10_multidict__ValuesIter;
struct __pyx_obj_9multidict_10_multidict__ValuesView;
struct __pyx_obj_9multidict_10_multidict__KeysIter;
struct __pyx_obj_9multidict_10_multidict__KeysView;
-struct __pyx_defaults;
-typedef struct __pyx_defaults __pyx_defaults;
-struct __pyx_defaults {
- PyObject *__pyx_arg_encoding;
-};
-/* "multidict/_multidict.pyx":55
+/* "multidict/_multidict.pyx":54
*
*
* cdef class _Pair: # <<<<<<<<<<<<<<
- * cdef object _key
- * cdef object _value
+ * cdef str _identity
+ * cdef Py_hash_t _hash
*/
struct __pyx_obj_9multidict_10_multidict__Pair {
PyObject_HEAD
+ PyObject *_identity;
+ Py_hash_t _hash;
PyObject *_key;
PyObject *_value;
};
-/* "multidict/_multidict.pyx":74
- * return left._key != right._key and left._value != right._value
+/* "multidict/_multidict.pyx":70
*
- * cdef class _Base: # <<<<<<<<<<<<<<
*
+ * cdef class _Impl: # <<<<<<<<<<<<<<
* cdef list _items
+ * cdef unsigned long long _version
+ */
+struct __pyx_obj_9multidict_10_multidict__Impl {
+ PyObject_HEAD
+ struct __pyx_vtabstruct_9multidict_10_multidict__Impl *__pyx_vtab;
+ PyObject *_items;
+ unsigned PY_LONG_LONG _version;
+};
+
+
+/* "multidict/_multidict.pyx":84
+ *
+ *
+ * cdef class _Base: # <<<<<<<<<<<<<<
+ *
+ * cdef _Impl _impl
*/
struct __pyx_obj_9multidict_10_multidict__Base {
PyObject_HEAD
struct __pyx_vtabstruct_9multidict_10_multidict__Base *__pyx_vtab;
- PyObject *_items;
- PyObject *_istr;
- PyObject *marker;
+ struct __pyx_obj_9multidict_10_multidict__Impl *_impl;
};
-/* "multidict/_multidict.pyx":199
+/* "multidict/_multidict.pyx":217
*
*
* cdef class MultiDictProxy(_Base): # <<<<<<<<<<<<<<
- *
- * def __init__(self, arg):
+ * _proxy_classes = (MultiDict, MultiDictProxy)
+ * _base_class = MultiDict
*/
struct __pyx_obj_9multidict_10_multidict_MultiDictProxy {
struct __pyx_obj_9multidict_10_multidict__Base __pyx_base;
};
-/* "multidict/_multidict.pyx":219
+/* "multidict/_multidict.pyx":243
*
*
* cdef class CIMultiDictProxy(MultiDictProxy): # <<<<<<<<<<<<<<
- *
- * def __init__(self, arg):
+ * _proxy_classes = (CIMultiDict, CIMultiDictProxy)
+ * _base_class = CIMultiDict
*/
struct __pyx_obj_9multidict_10_multidict_CIMultiDictProxy {
struct __pyx_obj_9multidict_10_multidict_MultiDictProxy __pyx_base;
};
-/* "multidict/_multidict.pyx":245
+/* "multidict/_multidict.pyx":272
*
*
* cdef class MultiDict(_Base): # <<<<<<<<<<<<<<
@@ -721,7 +737,7 @@ struct __pyx_obj_9multidict_10_multidict_MultiDict {
};
-/* "multidict/_multidict.pyx":415
+/* "multidict/_multidict.pyx":525
*
*
* cdef class CIMultiDict(MultiDict): # <<<<<<<<<<<<<<
@@ -733,20 +749,20 @@ struct __pyx_obj_9multidict_10_multidict_CIMultiDict {
};
-/* "multidict/_multidict.pyx":433
+/* "multidict/_multidict.pyx":545
*
*
* cdef class _ViewBase: # <<<<<<<<<<<<<<
*
- * cdef list _items
+ * cdef _Impl _impl
*/
struct __pyx_obj_9multidict_10_multidict__ViewBase {
PyObject_HEAD
- PyObject *_items;
+ struct __pyx_obj_9multidict_10_multidict__Impl *_impl;
};
-/* "multidict/_multidict.pyx":444
+/* "multidict/_multidict.pyx":556
*
*
* cdef class _ViewBaseSet(_ViewBase): # <<<<<<<<<<<<<<
@@ -758,22 +774,23 @@ struct __pyx_obj_9multidict_10_multidict__ViewBaseSet {
};
-/* "multidict/_multidict.pyx":525
+/* "multidict/_multidict.pyx":637
*
*
* cdef class _ItemsIter: # <<<<<<<<<<<<<<
- * cdef list _items
+ * cdef _Impl _impl
* cdef int _current
*/
struct __pyx_obj_9multidict_10_multidict__ItemsIter {
PyObject_HEAD
- PyObject *_items;
+ struct __pyx_obj_9multidict_10_multidict__Impl *_impl;
int _current;
int _len;
+ unsigned PY_LONG_LONG _version;
};
-/* "multidict/_multidict.pyx":546
+/* "multidict/_multidict.pyx":662
*
*
* cdef class _ItemsView(_ViewBaseSet): # <<<<<<<<<<<<<<
@@ -785,22 +802,23 @@ struct __pyx_obj_9multidict_10_multidict__ItemsView {
};
-/* "multidict/_multidict.pyx":581
+/* "multidict/_multidict.pyx":703
*
*
* cdef class _ValuesIter: # <<<<<<<<<<<<<<
- * cdef list _items
+ * cdef _Impl _impl
* cdef int _current
*/
struct __pyx_obj_9multidict_10_multidict__ValuesIter {
PyObject_HEAD
- PyObject *_items;
+ struct __pyx_obj_9multidict_10_multidict__Impl *_impl;
int _current;
int _len;
+ unsigned PY_LONG_LONG _version;
};
-/* "multidict/_multidict.pyx":602
+/* "multidict/_multidict.pyx":728
*
*
* cdef class _ValuesView(_ViewBase): # <<<<<<<<<<<<<<
@@ -812,22 +830,23 @@ struct __pyx_obj_9multidict_10_multidict__ValuesView {
};
-/* "multidict/_multidict.pyx":628
+/* "multidict/_multidict.pyx":754
*
*
* cdef class _KeysIter: # <<<<<<<<<<<<<<
- * cdef list _items
+ * cdef _Impl _impl
* cdef int _current
*/
struct __pyx_obj_9multidict_10_multidict__KeysIter {
PyObject_HEAD
- PyObject *_items;
+ struct __pyx_obj_9multidict_10_multidict__Impl *_impl;
int _current;
int _len;
+ unsigned PY_LONG_LONG _version;
};
-/* "multidict/_multidict.pyx":649
+/* "multidict/_multidict.pyx":779
*
*
* cdef class _KeysView(_ViewBaseSet): # <<<<<<<<<<<<<<
@@ -840,18 +859,32 @@ struct __pyx_obj_9multidict_10_multidict__KeysView {
-/* "multidict/_multidict.pyx":74
- * return left._key != right._key and left._value != right._value
+/* "multidict/_multidict.pyx":70
*
- * cdef class _Base: # <<<<<<<<<<<<<<
*
+ * cdef class _Impl: # <<<<<<<<<<<<<<
* cdef list _items
+ * cdef unsigned long long _version
+ */
+
+struct __pyx_vtabstruct_9multidict_10_multidict__Impl {
+ void (*incr_version)(struct __pyx_obj_9multidict_10_multidict__Impl *);
+};
+static struct __pyx_vtabstruct_9multidict_10_multidict__Impl *__pyx_vtabptr_9multidict_10_multidict__Impl;
+
+
+/* "multidict/_multidict.pyx":84
+ *
+ *
+ * cdef class _Base: # <<<<<<<<<<<<<<
+ *
+ * cdef _Impl _impl
*/
struct __pyx_vtabstruct_9multidict_10_multidict__Base {
PyObject *(*_title)(struct __pyx_obj_9multidict_10_multidict__Base *, PyObject *);
- PyObject *(*_getall)(struct __pyx_obj_9multidict_10_multidict__Base *, PyObject *, PyObject *);
- PyObject *(*_getone)(struct __pyx_obj_9multidict_10_multidict__Base *, PyObject *, PyObject *);
+ PyObject *(*_getall)(struct __pyx_obj_9multidict_10_multidict__Base *, PyObject *, PyObject *, PyObject *);
+ PyObject *(*_getone)(struct __pyx_obj_9multidict_10_multidict__Base *, PyObject *, PyObject *, PyObject *);
PyObject *(*_contains)(struct __pyx_obj_9multidict_10_multidict__Base *, PyObject *);
PyObject *(*keys)(struct __pyx_obj_9multidict_10_multidict__Base *, int __pyx_skip_dispatch);
PyObject *(*_eq_to_mapping)(struct __pyx_obj_9multidict_10_multidict__Base *, PyObject *);
@@ -859,12 +892,12 @@ struct __pyx_vtabstruct_9multidict_10_multidict__Base {
static struct __pyx_vtabstruct_9multidict_10_multidict__Base *__pyx_vtabptr_9multidict_10_multidict__Base;
-/* "multidict/_multidict.pyx":199
+/* "multidict/_multidict.pyx":217
*
*
* cdef class MultiDictProxy(_Base): # <<<<<<<<<<<<<<
- *
- * def __init__(self, arg):
+ * _proxy_classes = (MultiDict, MultiDictProxy)
+ * _base_class = MultiDict
*/
struct __pyx_vtabstruct_9multidict_10_multidict_MultiDictProxy {
@@ -873,12 +906,12 @@ struct __pyx_vtabstruct_9multidict_10_multidict_MultiDictProxy {
static struct __pyx_vtabstruct_9multidict_10_multidict_MultiDictProxy *__pyx_vtabptr_9multidict_10_multidict_MultiDictProxy;
-/* "multidict/_multidict.pyx":219
+/* "multidict/_multidict.pyx":243
*
*
* cdef class CIMultiDictProxy(MultiDictProxy): # <<<<<<<<<<<<<<
- *
- * def __init__(self, arg):
+ * _proxy_classes = (CIMultiDict, CIMultiDictProxy)
+ * _base_class = CIMultiDict
*/
struct __pyx_vtabstruct_9multidict_10_multidict_CIMultiDictProxy {
@@ -887,7 +920,7 @@ struct __pyx_vtabstruct_9multidict_10_multidict_CIMultiDictProxy {
static struct __pyx_vtabstruct_9multidict_10_multidict_CIMultiDictProxy *__pyx_vtabptr_9multidict_10_multidict_CIMultiDictProxy;
-/* "multidict/_multidict.pyx":245
+/* "multidict/_multidict.pyx":272
*
*
* cdef class MultiDict(_Base): # <<<<<<<<<<<<<<
@@ -900,12 +933,12 @@ struct __pyx_vtabstruct_9multidict_10_multidict_MultiDict {
PyObject *(*_extend)(struct __pyx_obj_9multidict_10_multidict_MultiDict *, PyObject *, PyObject *, PyObject *, int);
PyObject *(*_add)(struct __pyx_obj_9multidict_10_multidict_MultiDict *, PyObject *, PyObject *);
PyObject *(*_replace)(struct __pyx_obj_9multidict_10_multidict_MultiDict *, PyObject *, PyObject *);
- PyObject *(*_remove)(struct __pyx_obj_9multidict_10_multidict_MultiDict *, PyObject *, int);
+ PyObject *(*_remove)(struct __pyx_obj_9multidict_10_multidict_MultiDict *, PyObject *);
};
static struct __pyx_vtabstruct_9multidict_10_multidict_MultiDict *__pyx_vtabptr_9multidict_10_multidict_MultiDict;
-/* "multidict/_multidict.pyx":415
+/* "multidict/_multidict.pyx":525
*
*
* cdef class CIMultiDict(MultiDict): # <<<<<<<<<<<<<<
@@ -1001,78 +1034,73 @@ static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject
/* GetBuiltinName.proto */
static PyObject *__Pyx_GetBuiltinName(PyObject *name);
-/* RaiseDoubleKeywords.proto */
-static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name);
+/* ArgTypeTest.proto */
+static CYTHON_INLINE int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed,
+ const char *name, int exact);
-/* ParseKeywords.proto */
-static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[],\
- PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args,\
- const char* function_name);
+/* GetItemInt.proto */
+#define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
+ (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
+ __Pyx_GetItemInt_Fast(o, (Py_ssize_t)i, is_list, wraparound, boundscheck) :\
+ (is_list ? (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL) :\
+ __Pyx_GetItemInt_Generic(o, to_py_func(i))))
+#define __Pyx_GetItemInt_List(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
+ (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
+ __Pyx_GetItemInt_List_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\
+ (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL))
+static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
+ int wraparound, int boundscheck);
+#define __Pyx_GetItemInt_Tuple(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
+ (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
+ __Pyx_GetItemInt_Tuple_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\
+ (PyErr_SetString(PyExc_IndexError, "tuple index out of range"), (PyObject*)NULL))
+static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
+ int wraparound, int boundscheck);
+static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j);
+static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i,
+ int is_list, int wraparound, int boundscheck);
-/* RaiseArgTupleInvalid.proto */
... 21881 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