[Python-modules-commits] [python-multidict] 01/03: Import python-multidict_2.1.0.orig.tar.gz
Piotr Ożarowski
piotr at moszumanska.debian.org
Tue Sep 20 21:52:02 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 c13344272cfac80cde0f293a293befa33edcbd77
Author: Piotr Ożarowski <piotr at debian.org>
Date: Tue Sep 20 23:48:47 2016 +0200
Import python-multidict_2.1.0.orig.tar.gz
---
CHANGES.rst | 8 +
PKG-INFO | 24 +-
README.rst | 14 +-
docs/index.rst | 12 +-
multidict.egg-info/PKG-INFO | 24 +-
multidict.egg-info/SOURCES.txt | 1 +
multidict/__init__.py | 2 +-
multidict/__init__.pyi | 90 ++
multidict/_multidict.c | 2614 ++++++++++++++++++++--------------------
multidict/_multidict.pyx | 35 +-
multidict/_multidict_py.py | 12 +-
tests/test_multidict.py | 14 +
12 files changed, 1486 insertions(+), 1364 deletions(-)
diff --git a/CHANGES.rst b/CHANGES.rst
index d22b4e2..e9edef0 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -1,3 +1,11 @@
+2.1.0 (2016-09-18)
+------------------
+
+* Allow to create proxy from proxy
+
+* Add type hints (PEP-484)
+
+
2.0.1 (2016-08-02)
------------------
diff --git a/PKG-INFO b/PKG-INFO
index 2e022c5..5b9e595 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: multidict
-Version: 2.0.1
+Version: 2.1.0
Summary: multidict implementation
Home-page: https://github.com/aio-libs/multidict/
Author: Andrew Svetlov
@@ -13,13 +13,13 @@ Description: =========
Multidicts are useful for working with HTTP headers, URL
query args etc.
- The code was extracted from aiohttp library.
+ The code was extracted from aiohttp_ library.
Introduction
------------
*HTTP Headers* and *URL query string* require specific data structure:
- *multidict*. It behaves mostly like a ``dict`` but it can have
+ *multidict*. It behaves mostly like a regular ``dict`` but it may have
several *values* for the same *key*.
``multidict`` has four multidict classes:
@@ -27,7 +27,7 @@ Description: =========
and ``CIMultiDictProxy``.
Immutable proxies (``MultiDictProxy`` and
- ``CIMultiDictProxy``) provide a dynamic view on the
+ ``CIMultiDictProxy``) provide a dynamic view for the
proxied multidict, the view reflects underlying collection changes. They
implement the ``collections.abc.Mapping`` interface.
@@ -37,7 +37,7 @@ Description: =========
*Case insensitive* (``CIMultiDict`` and
- ``CIMultiDictProxy``) ones assumes the *keys* are case
+ ``CIMultiDictProxy``) ones assume the *keys* are case
insensitive, e.g.::
>>> dct = CIMultiDict(key='val')
@@ -48,7 +48,7 @@ Description: =========
*Keys* should be ``str`` or ``istr`` instances.
- The library has optional Cython optimization for sake of speed.
+ The library has optional Cython_ optimization for sake of speed.
License
@@ -56,6 +56,18 @@ Description: =========
Apache 2
+
+ .. _aiohttp: https://github.com/KeepSafe/aiohttp
+ .. _Cython: http://cython.org/
+
+ 2.1.0 (2016-09-18)
+ ------------------
+
+ * Allow to create proxy from proxy
+
+ * Add type hints (PEP-484)
+
+
2.0.1 (2016-08-02)
------------------
diff --git a/README.rst b/README.rst
index fdbc544..903dfd9 100644
--- a/README.rst
+++ b/README.rst
@@ -5,13 +5,13 @@ multidict
Multidicts are useful for working with HTTP headers, URL
query args etc.
-The code was extracted from aiohttp library.
+The code was extracted from aiohttp_ library.
Introduction
------------
*HTTP Headers* and *URL query string* require specific data structure:
-*multidict*. It behaves mostly like a ``dict`` but it can have
+*multidict*. It behaves mostly like a regular ``dict`` but it may have
several *values* for the same *key*.
``multidict`` has four multidict classes:
@@ -19,7 +19,7 @@ several *values* for the same *key*.
and ``CIMultiDictProxy``.
Immutable proxies (``MultiDictProxy`` and
-``CIMultiDictProxy``) provide a dynamic view on the
+``CIMultiDictProxy``) provide a dynamic view for the
proxied multidict, the view reflects underlying collection changes. They
implement the ``collections.abc.Mapping`` interface.
@@ -29,7 +29,7 @@ their own content.
*Case insensitive* (``CIMultiDict`` and
-``CIMultiDictProxy``) ones assumes the *keys* are case
+``CIMultiDictProxy``) ones assume the *keys* are case
insensitive, e.g.::
>>> dct = CIMultiDict(key='val')
@@ -40,10 +40,14 @@ insensitive, e.g.::
*Keys* should be ``str`` or ``istr`` instances.
-The library has optional Cython optimization for sake of speed.
+The library has optional Cython_ optimization for sake of speed.
License
-------
Apache 2
+
+
+.. _aiohttp: https://github.com/KeepSafe/aiohttp
+.. _Cython: http://cython.org/
diff --git a/docs/index.rst b/docs/index.rst
index 4a5554b..5bbd1ec 100644
--- a/docs/index.rst
+++ b/docs/index.rst
@@ -15,7 +15,7 @@ Introduction
------------
*HTTP Headers* and *URL query string* require specific data structure:
-*multidict*. It behaves mostly like a :class:`dict` but it can have
+*multidict*. It behaves mostly like a regular :class:`dict` but it may have
several *values* for the same *key*.
:mod:`multidict` has four multidict classes:
@@ -23,7 +23,7 @@ several *values* for the same *key*.
and :class:`CIMultiDictProxy`.
Immutable proxies (:class:`MultiDictProxy` and
-:class:`CIMultiDictProxy`) provide a dynamic view on the
+:class:`CIMultiDictProxy`) provide a dynamic view for the
proxied multidict, the view reflects underlying collection changes. They
implement the :class:`~collections.abc.Mapping` interface.
@@ -33,7 +33,7 @@ their own content.
*Case insensitive* (:class:`CIMultiDict` and
-:class:`CIMultiDictProxy`) ones assumes the *keys* are case
+:class:`CIMultiDictProxy`) ones assume the *keys* are case
insensitive, e.g.::
>>> dct = CIMultiDict(key='val')
@@ -44,7 +44,7 @@ insensitive, e.g.::
*Keys* should be either :class:`str` or :class:`istr` instance.
-The library has optional Cython optimization for sake of speed.
+The library has optional Cython_ optimization for sake of speed.
Library Installation
--------------------
@@ -61,7 +61,7 @@ Source code
The project is hosted on GitHub_
-Please feel free to file an issue on the `bug tracker
+Please file an issue on the `bug tracker
<https://github.com/aio-libs/multidict/issues>`_ if you have found a bug
or have some suggestion in order to improve the library.
@@ -83,7 +83,6 @@ The ``multidict`` package is written by Andrew Svetlov.
It's *Apache 2* licensed and freely available.
-Feel free to improve this package and send a pull request to GitHub_.
Contents
--------
@@ -100,3 +99,4 @@ Indices and tables
* :ref:`search`
.. _GitHub: https://github.com/aio-libs/multidict
+.. _Cython: http://cython.org/
diff --git a/multidict.egg-info/PKG-INFO b/multidict.egg-info/PKG-INFO
index 2e022c5..5b9e595 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.0.1
+Version: 2.1.0
Summary: multidict implementation
Home-page: https://github.com/aio-libs/multidict/
Author: Andrew Svetlov
@@ -13,13 +13,13 @@ Description: =========
Multidicts are useful for working with HTTP headers, URL
query args etc.
- The code was extracted from aiohttp library.
+ The code was extracted from aiohttp_ library.
Introduction
------------
*HTTP Headers* and *URL query string* require specific data structure:
- *multidict*. It behaves mostly like a ``dict`` but it can have
+ *multidict*. It behaves mostly like a regular ``dict`` but it may have
several *values* for the same *key*.
``multidict`` has four multidict classes:
@@ -27,7 +27,7 @@ Description: =========
and ``CIMultiDictProxy``.
Immutable proxies (``MultiDictProxy`` and
- ``CIMultiDictProxy``) provide a dynamic view on the
+ ``CIMultiDictProxy``) provide a dynamic view for the
proxied multidict, the view reflects underlying collection changes. They
implement the ``collections.abc.Mapping`` interface.
@@ -37,7 +37,7 @@ Description: =========
*Case insensitive* (``CIMultiDict`` and
- ``CIMultiDictProxy``) ones assumes the *keys* are case
+ ``CIMultiDictProxy``) ones assume the *keys* are case
insensitive, e.g.::
>>> dct = CIMultiDict(key='val')
@@ -48,7 +48,7 @@ Description: =========
*Keys* should be ``str`` or ``istr`` instances.
- The library has optional Cython optimization for sake of speed.
+ The library has optional Cython_ optimization for sake of speed.
License
@@ -56,6 +56,18 @@ Description: =========
Apache 2
+
+ .. _aiohttp: https://github.com/KeepSafe/aiohttp
+ .. _Cython: http://cython.org/
+
+ 2.1.0 (2016-09-18)
+ ------------------
+
+ * Allow to create proxy from proxy
+
+ * Add type hints (PEP-484)
+
+
2.0.1 (2016-08-02)
------------------
diff --git a/multidict.egg-info/SOURCES.txt b/multidict.egg-info/SOURCES.txt
index 7e0b8a3..7269112 100644
--- a/multidict.egg-info/SOURCES.txt
+++ b/multidict.egg-info/SOURCES.txt
@@ -10,6 +10,7 @@ docs/make.bat
docs/multidict.rst
docs/spelling_wordlist.txt
multidict/__init__.py
+multidict/__init__.pyi
multidict/_multidict.c
multidict/_multidict.pyx
multidict/_multidict_py.py
diff --git a/multidict/__init__.py b/multidict/__init__.py
index 6e8481c..cee8107 100644
--- a/multidict/__init__.py
+++ b/multidict/__init__.py
@@ -10,7 +10,7 @@ import os
__all__ = ('MultiDictProxy', 'CIMultiDictProxy',
'MultiDict', 'CIMultiDict', 'upstr', 'istr')
-__version__ = '2.0.1'
+__version__ = '2.1.0'
if bool(os.environ.get('MULTIDICT_NO_EXTENSIONS')):
diff --git a/multidict/__init__.pyi b/multidict/__init__.pyi
new file mode 100644
index 0000000..3c8604c
--- /dev/null
+++ b/multidict/__init__.pyi
@@ -0,0 +1,90 @@
+from typing import Any, Mapping, MutableMapping, List, Union, Iterable
+from typing import KeysView, ValuesView, ItemsView, Iterator, Tuple
+from typing import overload, TypeVar, Generic, Optional
+
+
+class istr(str): ...
+
+upstr = istr
+
+_S = Union[str, istr]
+
+_T = TypeVar('_T')
+
+
+class MultiDict(MutableMapping[_S, _T], Generic[_T]):
+ @overload
+ def __init__(self) -> None: ...
+ @overload
+ def __init__(self, map: Mapping[_S, _T]) -> None: ...
+ @overload
+ def __init__(self, iterable: Iterable[Tuple[_S, _T]]) -> None: ...
+
+ def getall(self, key: _S, default: _T=...) -> List[_T]: ...
+ def getone(self, key: _S, default: _T=...) -> _T: ...
+
+ def __getitem__(self, key: _S) -> _T: ...
+
+ def get(self, key: _S, default: Optional[_T]=None) -> _T: ...
+
+ def __iter__(self) -> Iterator[_S]: ...
+ def __len__(self) -> int: ...
+ def keys(self) -> KeysView[_S]: ...
+ def items(self) -> ItemsView[_S, _T]: ...
+ def values(self) -> ValuesView[_T]: ...
+
+ def __eq__(self, other) -> bool: ...
+ def __contains__(self, key) -> bool: ...
+ def __repr__(self) -> str: ...
+
+ def copy(self) -> MultiDict: ...
+
+ def add(self, key: _S, value: _T) -> None: ...
+
+ @overload
+ def __extend__(self, dct: MultiDict[_T]) -> None: ...
+ @overload
+ def __extend__(self, map: Mapping[_S, _T]) -> None: ...
+ @overload
+ def __extend__(self, iterable: Iterable[Tuple[_S, _T]]) -> None: ...
+
+ def clear(self) -> None: ...
+ 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: ...
+ def popitem(self) -> Tuple[_S, _T]: ...
+
+
+class CIMultiDict(MultiDict[_T], Generic[_T]):
+ def copy(self) -> CIMultiDict[_T]: ...
+
+
+class MultiDictProxy(Mapping[_S, _T], Generic[_T]):
+ def getall(self, key: _S, default: _T=...) -> List[_T]: ...
+ def getone(self, key: _S, default: _T=...) -> _T: ...
+
+ def __getitem__(self, key: _S) -> _T: ...
+
+ def get(self, key: _S, default: Optional[_T]=None) -> _T: ...
+
+ def __iter__(self) -> Iterator[_S]: ...
+ def __len__(self) -> int: ...
+ def keys(self) -> KeysView[_S]: ...
+ def items(self) -> ItemsView[_S, _T]: ...
+ def values(self) -> ValuesView[_T]: ...
+
+ def __eq__(self, other) -> bool: ...
+ def __contains__(self, key) -> bool: ...
+ def __repr__(self) -> str: ...
+
+ def copy(self) -> MultiDictProxy: ...
+
+ def __init__(self, arg: Union[MultiDict[_T], MultiDictProxy[_T]]) -> None: ...
+
+
+class CIMultiDictProxy(MultiDictProxy[_T], Generic[_T]):
+ def copy(self) -> CIMultiDictProxy[_T]: ...
diff --git a/multidict/_multidict.c b/multidict/_multidict.c
index 47d4c1c..8fac044 100644
--- a/multidict/_multidict.c
+++ b/multidict/_multidict.c
@@ -539,12 +539,12 @@ struct __pyx_obj_9multidict_10_multidict__Base {
PyObject_HEAD
struct __pyx_vtabstruct_9multidict_10_multidict__Base *__pyx_vtab;
PyObject *_items;
- PyObject *_upstr;
+ PyObject *_istr;
PyObject *marker;
};
-/* "multidict/_multidict.pyx":202
+/* "multidict/_multidict.pyx":199
*
*
* cdef class MultiDictProxy(_Base): # <<<<<<<<<<<<<<
@@ -556,7 +556,7 @@ struct __pyx_obj_9multidict_10_multidict_MultiDictProxy {
};
-/* "multidict/_multidict.pyx":221
+/* "multidict/_multidict.pyx":219
*
*
* cdef class CIMultiDictProxy(MultiDictProxy): # <<<<<<<<<<<<<<
@@ -568,7 +568,7 @@ struct __pyx_obj_9multidict_10_multidict_CIMultiDictProxy {
};
-/* "multidict/_multidict.pyx":246
+/* "multidict/_multidict.pyx":245
*
*
* cdef class MultiDict(_Base): # <<<<<<<<<<<<<<
@@ -580,7 +580,7 @@ struct __pyx_obj_9multidict_10_multidict_MultiDict {
};
-/* "multidict/_multidict.pyx":416
+/* "multidict/_multidict.pyx":415
*
*
* cdef class CIMultiDict(MultiDict): # <<<<<<<<<<<<<<
@@ -592,7 +592,7 @@ struct __pyx_obj_9multidict_10_multidict_CIMultiDict {
};
-/* "multidict/_multidict.pyx":429
+/* "multidict/_multidict.pyx":428
*
*
* cdef class _ViewBase: # <<<<<<<<<<<<<<
@@ -605,7 +605,7 @@ struct __pyx_obj_9multidict_10_multidict__ViewBase {
};
-/* "multidict/_multidict.pyx":440
+/* "multidict/_multidict.pyx":439
*
*
* cdef class _ViewBaseSet(_ViewBase): # <<<<<<<<<<<<<<
@@ -617,7 +617,7 @@ struct __pyx_obj_9multidict_10_multidict__ViewBaseSet {
};
-/* "multidict/_multidict.pyx":521
+/* "multidict/_multidict.pyx":520
*
*
* cdef class _ItemsIter: # <<<<<<<<<<<<<<
@@ -632,7 +632,7 @@ struct __pyx_obj_9multidict_10_multidict__ItemsIter {
};
-/* "multidict/_multidict.pyx":542
+/* "multidict/_multidict.pyx":541
*
*
* cdef class _ItemsView(_ViewBaseSet): # <<<<<<<<<<<<<<
@@ -644,7 +644,7 @@ struct __pyx_obj_9multidict_10_multidict__ItemsView {
};
-/* "multidict/_multidict.pyx":577
+/* "multidict/_multidict.pyx":576
*
*
* cdef class _ValuesIter: # <<<<<<<<<<<<<<
@@ -659,7 +659,7 @@ struct __pyx_obj_9multidict_10_multidict__ValuesIter {
};
-/* "multidict/_multidict.pyx":598
+/* "multidict/_multidict.pyx":597
*
*
* cdef class _ValuesView(_ViewBase): # <<<<<<<<<<<<<<
@@ -671,7 +671,7 @@ struct __pyx_obj_9multidict_10_multidict__ValuesView {
};
-/* "multidict/_multidict.pyx":624
+/* "multidict/_multidict.pyx":623
*
*
* cdef class _KeysIter: # <<<<<<<<<<<<<<
@@ -686,7 +686,7 @@ struct __pyx_obj_9multidict_10_multidict__KeysIter {
};
-/* "multidict/_multidict.pyx":645
+/* "multidict/_multidict.pyx":644
*
*
* cdef class _KeysView(_ViewBaseSet): # <<<<<<<<<<<<<<
@@ -718,7 +718,7 @@ struct __pyx_vtabstruct_9multidict_10_multidict__Base {
static struct __pyx_vtabstruct_9multidict_10_multidict__Base *__pyx_vtabptr_9multidict_10_multidict__Base;
-/* "multidict/_multidict.pyx":202
+/* "multidict/_multidict.pyx":199
*
*
* cdef class MultiDictProxy(_Base): # <<<<<<<<<<<<<<
@@ -732,7 +732,7 @@ struct __pyx_vtabstruct_9multidict_10_multidict_MultiDictProxy {
static struct __pyx_vtabstruct_9multidict_10_multidict_MultiDictProxy *__pyx_vtabptr_9multidict_10_multidict_MultiDictProxy;
-/* "multidict/_multidict.pyx":221
+/* "multidict/_multidict.pyx":219
*
*
* cdef class CIMultiDictProxy(MultiDictProxy): # <<<<<<<<<<<<<<
@@ -746,7 +746,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":246
+/* "multidict/_multidict.pyx":245
*
*
* cdef class MultiDict(_Base): # <<<<<<<<<<<<<<
@@ -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":416
+/* "multidict/_multidict.pyx":415
*
*
* cdef class CIMultiDict(MultiDict): # <<<<<<<<<<<<<<
@@ -1327,10 +1327,9 @@ static const char __pyx_k_multidict__multidict[] = "multidict._multidict";
static const char __pyx_k_home_travis_build_aio_libs_mult[] = "/home/travis/build/aio-libs/multidict/multidict/_multidict.pyx";
static const char __pyx_k_takes_at_most_1_positional_argu[] = "{} takes at most 1 positional argument ({} given)";
static const char __pyx_k_takes_either_dict_or_list_of_ke[] = "{} takes either dict or list of (key, value) tuples";
-static const char __pyx_k_CIMultiDictProxy_requires_CIMult[] = "CIMultiDictProxy requires CIMultiDict instance, not {}";
-static const char __pyx_k_MultiDictProxy_requires_MultiDic[] = "MultiDictProxy requires MultiDict instance, not {}";
+static const char __pyx_k_ctor_requires_CIMultiDict_or_CIM[] = "ctor requires CIMultiDict or CIMultiDictProxy instance, not {}";
+static const char __pyx_k_ctor_requires_MultiDict_or_Multi[] = "ctor requires MultiDict or MultiDictProxy instance, not {}";
static PyObject *__pyx_kp_s_;
-static PyObject *__pyx_kp_s_CIMultiDictProxy_requires_CIMult;
static PyObject *__pyx_kp_s_Case_insensitive_str;
static PyObject *__pyx_n_s_ItemsView;
static PyObject *__pyx_n_s_Iterable;
@@ -1338,7 +1337,6 @@ static PyObject *__pyx_n_s_KeyError;
static PyObject *__pyx_kp_s_Key_not_found_r;
static PyObject *__pyx_n_s_KeysView;
static PyObject *__pyx_n_s_Mapping;
-static PyObject *__pyx_kp_s_MultiDictProxy_requires_MultiDic;
static PyObject *__pyx_n_s_MutableMapping;
static PyObject *__pyx_n_s_NotImplemented;
static PyObject *__pyx_n_s_Set;
@@ -1355,6 +1353,8 @@ static PyObject *__pyx_n_s_clear;
static PyObject *__pyx_n_s_cls;
static PyObject *__pyx_n_s_collections;
static PyObject *__pyx_n_s_collections_abc;
+static PyObject *__pyx_kp_s_ctor_requires_CIMultiDict_or_CIM;
+static PyObject *__pyx_kp_s_ctor_requires_MultiDict_or_Multi;
static PyObject *__pyx_n_s_default;
static PyObject *__pyx_n_s_doc;
static PyObject *__pyx_kp_s_empty_multidict;
@@ -2483,7 +2483,7 @@ static PyObject *__pyx_pf_9multidict_10_multidict_5_Pair_2__richcmp__(PyObject *
* cdef object marker
*
* def __cinit__(self): # <<<<<<<<<<<<<<
- * self._upstr = upstr
+ * self._istr = istr
* self.marker = _marker
*/
@@ -2512,21 +2512,21 @@ static int __pyx_pf_9multidict_10_multidict_5_Base___cinit__(struct __pyx_obj_9m
/* "multidict/_multidict.pyx":81
*
* def __cinit__(self):
- * self._upstr = upstr # <<<<<<<<<<<<<<
+ * self._istr = istr # <<<<<<<<<<<<<<
* self.marker = _marker
*
*/
- __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_upstr); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 81, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_istr); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 81, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__Pyx_GIVEREF(__pyx_t_1);
- __Pyx_GOTREF(__pyx_v_self->_upstr);
- __Pyx_DECREF(__pyx_v_self->_upstr);
- __pyx_v_self->_upstr = __pyx_t_1;
+ __Pyx_GOTREF(__pyx_v_self->_istr);
+ __Pyx_DECREF(__pyx_v_self->_istr);
+ __pyx_v_self->_istr = __pyx_t_1;
__pyx_t_1 = 0;
/* "multidict/_multidict.pyx":82
* def __cinit__(self):
- * self._upstr = upstr
+ * self._istr = istr
* self.marker = _marker # <<<<<<<<<<<<<<
*
* cdef str _title(self, s):
@@ -2543,7 +2543,7 @@ static int __pyx_pf_9multidict_10_multidict_5_Base___cinit__(struct __pyx_obj_9m
* cdef object marker
*
* def __cinit__(self): # <<<<<<<<<<<<<<
- * self._upstr = upstr
+ * self._istr = istr
* self.marker = _marker
*/
@@ -2563,7 +2563,7 @@ static int __pyx_pf_9multidict_10_multidict_5_Base___cinit__(struct __pyx_obj_9m
* self.marker = _marker
*
* cdef str _title(self, s): # <<<<<<<<<<<<<<
- * if type(s) is self._upstr:
+ * if type(s) is self._istr:
* return <str>s
*/
@@ -2577,17 +2577,17 @@ static PyObject *__pyx_f_9multidict_10_multidict_5_Base__title(struct __pyx_obj_
/* "multidict/_multidict.pyx":85
*
* cdef str _title(self, s):
- * if type(s) is self._upstr: # <<<<<<<<<<<<<<
+ * if type(s) is self._istr: # <<<<<<<<<<<<<<
* return <str>s
* return s
*/
- __pyx_t_1 = (((PyObject *)Py_TYPE(__pyx_v_s)) == __pyx_v_self->_upstr);
+ __pyx_t_1 = (((PyObject *)Py_TYPE(__pyx_v_s)) == __pyx_v_self->_istr);
__pyx_t_2 = (__pyx_t_1 != 0);
if (__pyx_t_2) {
/* "multidict/_multidict.pyx":86
* cdef str _title(self, s):
- * if type(s) is self._upstr:
+ * if type(s) is self._istr:
* return <str>s # <<<<<<<<<<<<<<
* return s
*
@@ -2600,14 +2600,14 @@ static PyObject *__pyx_f_9multidict_10_multidict_5_Base__title(struct __pyx_obj_
/* "multidict/_multidict.pyx":85
*
* cdef str _title(self, s):
- * if type(s) is self._upstr: # <<<<<<<<<<<<<<
+ * if type(s) is self._istr: # <<<<<<<<<<<<<<
* return <str>s
* return s
*/
}
/* "multidict/_multidict.pyx":87
- * if type(s) is self._upstr:
+ * if type(s) is self._istr:
* return <str>s
* return s # <<<<<<<<<<<<<<
*
@@ -2623,7 +2623,7 @@ static PyObject *__pyx_f_9multidict_10_multidict_5_Base__title(struct __pyx_obj_
* self.marker = _marker
*
* cdef str _title(self, s): # <<<<<<<<<<<<<<
- * if type(s) is self._upstr:
+ * if type(s) is self._istr:
* return <str>s
*/
@@ -2773,34 +2773,21 @@ static PyObject *__pyx_f_9multidict_10_multidict_5_Base__getall(struct __pyx_obj
int __pyx_t_6;
int __pyx_t_7;
__Pyx_RefNannySetupContext("_getall", 0);
- __Pyx_INCREF(__pyx_v_key);
/* "multidict/_multidict.pyx":96
* cdef list res
* cdef _Pair item
- * key = self._title(key) # <<<<<<<<<<<<<<
- * res = []
- * for i in self._items:
- */
- __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, 96, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF_SET(__pyx_v_key, ((PyObject*)__pyx_t_1));
- __pyx_t_1 = 0;
-
- /* "multidict/_multidict.pyx":97
- * cdef _Pair item
- * key = self._title(key)
* res = [] # <<<<<<<<<<<<<<
* for i in self._items:
* item = <_Pair>i
*/
- __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 97, __pyx_L1_error)
+ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 96, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_v_res = ((PyObject*)__pyx_t_1);
__pyx_t_1 = 0;
- /* "multidict/_multidict.pyx":98
- * key = self._title(key)
+ /* "multidict/_multidict.pyx":97
+ * cdef _Pair item
* res = []
* for i in self._items: # <<<<<<<<<<<<<<
* item = <_Pair>i
@@ -2808,21 +2795,21 @@ static PyObject *__pyx_f_9multidict_10_multidict_5_Base__getall(struct __pyx_obj
*/
if (unlikely(__pyx_v_self->_items == Py_None)) {
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
- __PYX_ERR(0, 98, __pyx_L1_error)
+ __PYX_ERR(0, 97, __pyx_L1_error)
}
__pyx_t_1 = __pyx_v_self->_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, 98, __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, 97, __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, 98, __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, 97, __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":99
+ /* "multidict/_multidict.pyx":98
* res = []
* for i in self._items:
* item = <_Pair>i # <<<<<<<<<<<<<<
@@ -2834,17 +2821,17 @@ static PyObject *__pyx_f_9multidict_10_multidict_5_Base__getall(struct __pyx_obj
__Pyx_XDECREF_SET(__pyx_v_item, ((struct __pyx_obj_9multidict_10_multidict__Pair *)__pyx_t_3));
__pyx_t_3 = 0;
- /* "multidict/_multidict.pyx":100
+ /* "multidict/_multidict.pyx":99
* for i in self._items:
* item = <_Pair>i
* if item._key == key: # <<<<<<<<<<<<<<
* 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, 100, __pyx_L1_error)
+ __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)
if (__pyx_t_4) {
- /* "multidict/_multidict.pyx":101
+ /* "multidict/_multidict.pyx":100
* item = <_Pair>i
* if item._key == key:
* res.append(item._value) # <<<<<<<<<<<<<<
@@ -2853,10 +2840,10 @@ static PyObject *__pyx_f_9multidict_10_multidict_5_Base__getall(struct __pyx_obj
*/
__pyx_t_3 = __pyx_v_item->_value;
__Pyx_INCREF(__pyx_t_3);
- __pyx_t_5 = __Pyx_PyList_Append(__pyx_v_res, __pyx_t_3); if (unlikely(__pyx_t_5 == -1)) __PYX_ERR(0, 101, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyList_Append(__pyx_v_res, __pyx_t_3); if (unlikely(__pyx_t_5 == -1)) __PYX_ERR(0, 100, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- /* "multidict/_multidict.pyx":100
+ /* "multidict/_multidict.pyx":99
* for i in self._items:
* item = <_Pair>i
* if item._key == key: # <<<<<<<<<<<<<<
@@ -2865,8 +2852,8 @@ static PyObject *__pyx_f_9multidict_10_multidict_5_Base__getall(struct __pyx_obj
*/
}
- /* "multidict/_multidict.pyx":98
- * key = self._title(key)
+ /* "multidict/_multidict.pyx":97
+ * cdef _Pair item
* res = []
* for i in self._items: # <<<<<<<<<<<<<<
* item = <_Pair>i
@@ -2875,7 +2862,7 @@ static PyObject *__pyx_f_9multidict_10_multidict_5_Base__getall(struct __pyx_obj
}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "multidict/_multidict.pyx":102
+ /* "multidict/_multidict.pyx":101
* if item._key == key:
* res.append(item._value)
* if res: # <<<<<<<<<<<<<<
@@ -2885,7 +2872,7 @@ static PyObject *__pyx_f_9multidict_10_multidict_5_Base__getall(struct __pyx_obj
__pyx_t_4 = (__pyx_v_res != Py_None) && (PyList_GET_SIZE(__pyx_v_res) != 0);
if (__pyx_t_4) {
- /* "multidict/_multidict.pyx":103
+ /* "multidict/_multidict.pyx":102
* res.append(item._value)
* if res:
* return res # <<<<<<<<<<<<<<
@@ -2897,7 +2884,7 @@ static PyObject *__pyx_f_9multidict_10_multidict_5_Base__getall(struct __pyx_obj
__pyx_r = __pyx_v_res;
goto __pyx_L0;
- /* "multidict/_multidict.pyx":102
+ /* "multidict/_multidict.pyx":101
* if item._key == key:
* res.append(item._value)
* if res: # <<<<<<<<<<<<<<
@@ -2906,7 +2893,7 @@ static PyObject *__pyx_f_9multidict_10_multidict_5_Base__getall(struct __pyx_obj
*/
}
- /* "multidict/_multidict.pyx":104
+ /* "multidict/_multidict.pyx":103
* if res:
* return res
* if not res and default is not self.marker: # <<<<<<<<<<<<<<
@@ -2926,7 +2913,7 @@ static PyObject *__pyx_f_9multidict_10_multidict_5_Base__getall(struct __pyx_obj
__pyx_L8_bool_binop_done:;
if (__pyx_t_4) {
- /* "multidict/_multidict.pyx":105
+ /* "multidict/_multidict.pyx":104
* return res
* if not res and default is not self.marker:
* return default # <<<<<<<<<<<<<<
@@ -2938,7 +2925,7 @@ static PyObject *__pyx_f_9multidict_10_multidict_5_Base__getall(struct __pyx_obj
__pyx_r = __pyx_v_default;
goto __pyx_L0;
- /* "multidict/_multidict.pyx":104
+ /* "multidict/_multidict.pyx":103
* if res:
* return res
* if not res and default is not self.marker: # <<<<<<<<<<<<<<
@@ -2947,26 +2934,26 @@ static PyObject *__pyx_f_9multidict_10_multidict_5_Base__getall(struct __pyx_obj
*/
}
- /* "multidict/_multidict.pyx":106
+ /* "multidict/_multidict.pyx":105
* if not res and default is not self.marker:
* return default
* raise KeyError('Key not found: %r' % key) # <<<<<<<<<<<<<<
*
* def getone(self, key, default=_marker):
*/
- __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_Key_not_found_r, __pyx_v_key); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 106, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_Key_not_found_r, __pyx_v_key); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 105, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 106, __pyx_L1_error)
+ __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 105, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__Pyx_GIVEREF(__pyx_t_1);
PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
__pyx_t_1 = 0;
- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_KeyError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 106, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_KeyError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 105, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_Raise(__pyx_t_1, 0, 0, 0);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __PYX_ERR(0, 106, __pyx_L1_error)
+ __PYX_ERR(0, 105, __pyx_L1_error)
/* "multidict/_multidict.pyx":93
* return self._getall(self._title(key), default)
@@ -2986,13 +2973,12 @@ static PyObject *__pyx_f_9multidict_10_multidict_5_Base__getall(struct __pyx_obj
__Pyx_XDECREF(__pyx_v_res);
__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":108
+/* "multidict/_multidict.pyx":107
* raise KeyError('Key not found: %r' % key)
*
* def getone(self, key, default=_marker): # <<<<<<<<<<<<<<
@@ -3034,7 +3020,7 @@ static PyObject *__pyx_pw_9multidict_10_multidict_5_Base_5getone(PyObject *__pyx
}
}
if (unlikely(kw_args > 0)) {
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getone") < 0)) __PYX_ERR(0, 108, __pyx_L3_error)
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getone") < 0)) __PYX_ERR(0, 107, __pyx_L3_error)
}
} else {
switch (PyTuple_GET_SIZE(__pyx_args)) {
@@ -3049,7 +3035,7 @@ static PyObject *__pyx_pw_9multidict_10_multidict_5_Base_5getone(PyObject *__pyx
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("getone", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 108, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("getone", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 107, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("multidict._multidict._Base.getone", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
@@ -3069,7 +3055,7 @@ static PyObject *__pyx_pf_9multidict_10_multidict_5_Base_4getone(struct __pyx_ob
PyObject *__pyx_t_2 = NULL;
__Pyx_RefNannySetupContext("getone", 0);
- /* "multidict/_multidict.pyx":110
+ /* "multidict/_multidict.pyx":109
* def getone(self, key, default=_marker):
* """Get first value matching the key."""
* return self._getone(self._title(key), default) # <<<<<<<<<<<<<<
@@ -3077,16 +3063,16 @@ static PyObject *__pyx_pf_9multidict_10_multidict_5_Base_4getone(struct __pyx_ob
* cdef _getone(self, str 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, 110, __pyx_L1_error)
+ __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, 110, __pyx_L1_error)
+ __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_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_r = __pyx_t_2;
__pyx_t_2 = 0;
goto __pyx_L0;
- /* "multidict/_multidict.pyx":108
+ /* "multidict/_multidict.pyx":107
* raise KeyError('Key not found: %r' % key)
*
* def getone(self, key, default=_marker): # <<<<<<<<<<<<<<
@@ -3106,12 +3092,12 @@ static PyObject *__pyx_pf_9multidict_10_multidict_5_Base_4getone(struct __pyx_ob
return __pyx_r;
}
-/* "multidict/_multidict.pyx":112
+/* "multidict/_multidict.pyx":111
* return self._getone(self._title(key), default)
*
* cdef _getone(self, str key, default): # <<<<<<<<<<<<<<
* cdef _Pair item
- * key = self._title(key)
+ * for i in self._items:
*/
static PyObject *__pyx_f_9multidict_10_multidict_5_Base__getone(struct __pyx_obj_9multidict_10_multidict__Base *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_default) {
@@ -3125,45 +3111,32 @@ static PyObject *__pyx_f_9multidict_10_multidict_5_Base__getone(struct __pyx_obj
int __pyx_t_4;
int __pyx_t_5;
__Pyx_RefNannySetupContext("_getone", 0);
- __Pyx_INCREF(__pyx_v_key);
- /* "multidict/_multidict.pyx":114
+ /* "multidict/_multidict.pyx":113
* cdef _getone(self, str key, default):
* cdef _Pair item
- * key = self._title(key) # <<<<<<<<<<<<<<
- * for i in self._items:
- * item = <_Pair>i
- */
- __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, 114, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF_SET(__pyx_v_key, ((PyObject*)__pyx_t_1));
- __pyx_t_1 = 0;
-
- /* "multidict/_multidict.pyx":115
- * cdef _Pair item
... 8106 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