mirror of
https://github.com/ets-labs/python-dependency-injector.git
synced 2025-01-31 03:36:41 +03:00
Merge branch 'release/3.6.1' into master
This commit is contained in:
commit
a4bb5514b1
|
@ -7,6 +7,10 @@ that were made in every particular version.
|
|||
From version 0.7.6 *Dependency Injector* framework strictly
|
||||
follows `Semantic versioning`_
|
||||
|
||||
3.6.1
|
||||
-----
|
||||
- Regenerate C sources using Cython 0.26.
|
||||
|
||||
3.6.0
|
||||
-----
|
||||
- Add ``CallableDelegate`` provider.
|
||||
|
|
41
examples/miniapps/mail_service/container.py
Normal file
41
examples/miniapps/mail_service/container.py
Normal file
|
@ -0,0 +1,41 @@
|
|||
"""Mail service and user registration DI container example."""
|
||||
|
||||
from dependency_injector.containers import DeclarativeContainer
|
||||
from dependency_injector.providers import Callable, Singleton
|
||||
|
||||
import example
|
||||
|
||||
|
||||
class Container(DeclarativeContainer):
|
||||
"""DI container."""
|
||||
|
||||
mail_service = Singleton(example.MailService,
|
||||
host='localhost',
|
||||
port=587,
|
||||
login='my_login',
|
||||
password='super_secret_password')
|
||||
|
||||
add_user = Callable(example.add_user,
|
||||
mailer=mail_service)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
print('Using real mail service:')
|
||||
Container.add_user('sample@mail.com', 'password')
|
||||
# Using real mail service:
|
||||
# Connecting server localhost:587 with my_login:super_secret_password
|
||||
# Sending "Your password is password" to "sample@mail.com"
|
||||
|
||||
print('Using mail service stub:')
|
||||
Container.add_user('sample@mail.com', 'password',
|
||||
mailer=example.MailServiceStub())
|
||||
# Using mail service stub:
|
||||
# Emulating sending "Your password is password" to "sample@mail.com"
|
||||
|
||||
# Also you can override provider by another provider:
|
||||
Container.mail_service.override(Singleton(example.MailServiceStub))
|
||||
print('Using mail service stub by overriding mail service provider:')
|
||||
Container.add_user('sample@mail.com', 'password')
|
||||
# Using mail service stub by overriding mail service provider:
|
||||
# Emulating sending "Your password is password" to "sample@mail.com"
|
||||
Container.mail_service.reset_override() # Resetting provider overriding
|
39
examples/miniapps/mail_service/example.py
Normal file
39
examples/miniapps/mail_service/example.py
Normal file
|
@ -0,0 +1,39 @@
|
|||
"""Mail service and user registration example."""
|
||||
|
||||
|
||||
class AbstractMailService(object):
|
||||
"""Abstract mail service."""
|
||||
|
||||
def send(self, email, body):
|
||||
"""Send email."""
|
||||
raise NotImplementedError()
|
||||
|
||||
|
||||
class MailService(AbstractMailService):
|
||||
"""Mail service."""
|
||||
|
||||
def __init__(self, host, port, login, password):
|
||||
"""Initializer."""
|
||||
self._host = host
|
||||
self._port = port
|
||||
self._login = login
|
||||
self._password = password
|
||||
|
||||
def send(self, email, body):
|
||||
"""Send email."""
|
||||
print('Connecting server {0}:{1} with {2}:{3}'.format(
|
||||
self._host, self._port, self._login, self._password))
|
||||
print('Sending "{0}" to "{1}"'.format(body, email))
|
||||
|
||||
|
||||
class MailServiceStub(AbstractMailService):
|
||||
"""Mail service stub."""
|
||||
|
||||
def send(self, email, body):
|
||||
"""Send email."""
|
||||
print('Emulating sending "{0}" to "{1}"'.format(body, email))
|
||||
|
||||
|
||||
def add_user(email, password, mailer):
|
||||
"""Register user."""
|
||||
mailer.send(email, 'Your password is {0}'.format(password))
|
|
@ -1,4 +1,4 @@
|
|||
cython
|
||||
cython==0.26
|
||||
tox
|
||||
unittest2
|
||||
coverage
|
||||
|
|
12
setup.py
12
setup.py
|
@ -7,7 +7,8 @@ from setuptools import setup, Extension
|
|||
|
||||
|
||||
# Defining setup variables:
|
||||
defined_macros = list()
|
||||
defined_macros = dict()
|
||||
defined_macros['CYTHON_CLINE_IN_TRACEBACK'] = 0
|
||||
|
||||
# Getting description:
|
||||
with open('README.rst') as readme_file:
|
||||
|
@ -23,8 +24,9 @@ with open('src/dependency_injector/__init__.py') as init_file:
|
|||
|
||||
# Adding debug options:
|
||||
if os.environ.get('DEPENDENCY_INJECTOR_DEBUG_MODE') == '1':
|
||||
defined_macros.append(('CYTHON_TRACE', 1))
|
||||
defined_macros.append(('CYTHON_TRACE_NOGIL', 1))
|
||||
defined_macros['CYTHON_TRACE'] = 1
|
||||
defined_macros['CYTHON_TRACE_NOGIL'] = 1
|
||||
defined_macros['CYTHON_CLINE_IN_TRACEBACK'] = 1
|
||||
|
||||
|
||||
setup(name='dependency-injector',
|
||||
|
@ -47,11 +49,11 @@ setup(name='dependency-injector',
|
|||
ext_modules=[
|
||||
Extension('dependency_injector.containers',
|
||||
['src/dependency_injector/containers.c'],
|
||||
define_macros=defined_macros,
|
||||
define_macros=list(defined_macros.items()),
|
||||
extra_compile_args=['-O2']),
|
||||
Extension('dependency_injector.providers',
|
||||
['src/dependency_injector/providers.c'],
|
||||
define_macros=defined_macros,
|
||||
define_macros=list(defined_macros.items()),
|
||||
extra_compile_args=['-O2']),
|
||||
],
|
||||
package_data={
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
"""Dependency injector top-level package."""
|
||||
|
||||
__version__ = '3.6.0'
|
||||
__version__ = '3.6.1'
|
||||
"""Version number that follows semantic versioning.
|
||||
|
||||
:type: str
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* Generated by Cython 0.25.2 */
|
||||
/* Generated by Cython 0.26 */
|
||||
|
||||
#define PY_SSIZE_T_CLEAN
|
||||
#include "Python.h"
|
||||
|
@ -7,7 +7,7 @@
|
|||
#elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03020000)
|
||||
#error Cython requires Python 2.6+ or Python 3.2+.
|
||||
#else
|
||||
#define CYTHON_ABI "0_25_2"
|
||||
#define CYTHON_ABI "0_26"
|
||||
#include <stddef.h>
|
||||
#ifndef offsetof
|
||||
#define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
|
||||
|
@ -29,6 +29,7 @@
|
|||
#ifndef DL_EXPORT
|
||||
#define DL_EXPORT(t) t
|
||||
#endif
|
||||
#define __PYX_COMMA ,
|
||||
#ifndef HAVE_LONG_LONG
|
||||
#if PY_VERSION_HEX >= 0x03030000 || (PY_MAJOR_VERSION == 2 && PY_VERSION_HEX >= 0x02070000)
|
||||
#define HAVE_LONG_LONG
|
||||
|
@ -181,16 +182,20 @@
|
|||
#ifndef Py_TPFLAGS_HAVE_FINALIZE
|
||||
#define Py_TPFLAGS_HAVE_FINALIZE 0
|
||||
#endif
|
||||
#ifndef METH_FASTCALL
|
||||
#if PY_VERSION_HEX < 0x030700A0 || !defined(METH_FASTCALL)
|
||||
#ifndef METH_FASTCALL
|
||||
#define METH_FASTCALL 0x80
|
||||
typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject **args,
|
||||
#endif
|
||||
typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject **args, Py_ssize_t nargs);
|
||||
typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *self, PyObject **args,
|
||||
Py_ssize_t nargs, PyObject *kwnames);
|
||||
#else
|
||||
#define __Pyx_PyCFunctionFast _PyCFunctionFast
|
||||
#define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords
|
||||
#endif
|
||||
#if CYTHON_FAST_PYCCALL
|
||||
#define __Pyx_PyFastCFunction_Check(func)\
|
||||
((PyCFunction_Check(func) && (METH_FASTCALL == (PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST)))))
|
||||
((PyCFunction_Check(func) && (METH_FASTCALL == (PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS)))))
|
||||
#else
|
||||
#define __Pyx_PyFastCFunction_Check(func) 0
|
||||
#endif
|
||||
|
@ -317,6 +322,12 @@
|
|||
#else
|
||||
#define __Pyx_PyMethod_New(func, self, klass) PyMethod_New(func, self, klass)
|
||||
#endif
|
||||
#ifndef __has_attribute
|
||||
#define __has_attribute(x) 0
|
||||
#endif
|
||||
#ifndef __has_cpp_attribute
|
||||
#define __has_cpp_attribute(x) 0
|
||||
#endif
|
||||
#if CYTHON_USE_ASYNC_SLOTS
|
||||
#if PY_VERSION_HEX >= 0x030500B1
|
||||
#define __Pyx_PyAsyncMethodsStruct PyAsyncMethods
|
||||
|
@ -371,6 +382,35 @@
|
|||
# endif
|
||||
#endif
|
||||
#define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None)
|
||||
#ifdef _MSC_VER
|
||||
#ifndef _MSC_STDINT_H_
|
||||
#if _MSC_VER < 1300
|
||||
typedef unsigned char uint8_t;
|
||||
typedef unsigned int uint32_t;
|
||||
#else
|
||||
typedef unsigned __int8 uint8_t;
|
||||
typedef unsigned __int32 uint32_t;
|
||||
#endif
|
||||
#endif
|
||||
#else
|
||||
#include <stdint.h>
|
||||
#endif
|
||||
#ifndef CYTHON_FALLTHROUGH
|
||||
#ifdef __cplusplus
|
||||
#if __has_cpp_attribute(fallthrough)
|
||||
#define CYTHON_FALLTHROUGH [[fallthrough]]
|
||||
#elif __has_cpp_attribute(clang::fallthrough)
|
||||
#define CYTHON_FALLTHROUGH [[clang::fallthrough]]
|
||||
#endif
|
||||
#endif
|
||||
#ifndef CYTHON_FALLTHROUGH
|
||||
#if __has_attribute(fallthrough) || (defined(__GNUC__) && defined(__attribute__))
|
||||
#define CYTHON_FALLTHROUGH __attribute__((fallthrough))
|
||||
#else
|
||||
#define CYTHON_FALLTHROUGH
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef CYTHON_INLINE
|
||||
#if defined(__clang__)
|
||||
|
@ -473,8 +513,8 @@ typedef struct {PyObject **p; const char *s; const Py_ssize_t n; const char* enc
|
|||
#else
|
||||
#define __Pyx_sst_abs(value) ((value<0) ? -value : value)
|
||||
#endif
|
||||
static CYTHON_INLINE char* __Pyx_PyObject_AsString(PyObject*);
|
||||
static CYTHON_INLINE char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length);
|
||||
static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject*);
|
||||
static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length);
|
||||
#define __Pyx_PyByteArray_FromString(s) PyByteArray_FromStringAndSize((const char*)s, strlen((const char*)s))
|
||||
#define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l)
|
||||
#define __Pyx_PyBytes_FromString PyBytes_FromString
|
||||
|
@ -487,8 +527,11 @@ static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*);
|
|||
#define __Pyx_PyStr_FromString __Pyx_PyUnicode_FromString
|
||||
#define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize
|
||||
#endif
|
||||
#define __Pyx_PyObject_AsSString(s) ((signed char*) __Pyx_PyObject_AsString(s))
|
||||
#define __Pyx_PyObject_AsUString(s) ((unsigned char*) __Pyx_PyObject_AsString(s))
|
||||
#define __Pyx_PyObject_AsWritableString(s) ((char*) __Pyx_PyObject_AsString(s))
|
||||
#define __Pyx_PyObject_AsWritableSString(s) ((signed char*) __Pyx_PyObject_AsString(s))
|
||||
#define __Pyx_PyObject_AsWritableUString(s) ((unsigned char*) __Pyx_PyObject_AsString(s))
|
||||
#define __Pyx_PyObject_AsSString(s) ((const signed char*) __Pyx_PyObject_AsString(s))
|
||||
#define __Pyx_PyObject_AsUString(s) ((const unsigned char*) __Pyx_PyObject_AsString(s))
|
||||
#define __Pyx_PyObject_FromCString(s) __Pyx_PyObject_FromString((const char*)s)
|
||||
#define __Pyx_PyBytes_FromCString(s) __Pyx_PyBytes_FromString((const char*)s)
|
||||
#define __Pyx_PyByteArray_FromCString(s) __Pyx_PyByteArray_FromString((const char*)s)
|
||||
|
@ -610,10 +653,12 @@ bad:
|
|||
#define likely(x) (x)
|
||||
#define unlikely(x) (x)
|
||||
#endif /* __GNUC__ */
|
||||
static CYTHON_INLINE void __Pyx_pretend_to_initialize(void* ptr) { (void)ptr; }
|
||||
|
||||
static PyObject *__pyx_m;
|
||||
static PyObject *__pyx_d;
|
||||
static PyObject *__pyx_b;
|
||||
static PyObject *__pyx_cython_runtime;
|
||||
static PyObject *__pyx_empty_tuple;
|
||||
static PyObject *__pyx_empty_bytes;
|
||||
static PyObject *__pyx_empty_unicode;
|
||||
|
@ -1767,6 +1812,9 @@ static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObj
|
|||
#include "descrobject.h"
|
||||
static PyObject* __Pyx_Method_ClassMethod(PyObject *method);
|
||||
|
||||
/* CLineInTraceback.proto */
|
||||
static int __Pyx_CLineForTraceback(int c_line);
|
||||
|
||||
/* CodeObjectCache.proto */
|
||||
typedef struct {
|
||||
PyCodeObject* code_object;
|
||||
|
@ -1996,6 +2044,7 @@ static const char __pyx_k_reset_override[] = "reset_override";
|
|||
static const char __pyx_k_source_provider[] = "source_provider";
|
||||
static const char __pyx_k_DynamicContainer[] = "DynamicContainer";
|
||||
static const char __pyx_k_copied_container[] = "copied_container";
|
||||
static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback";
|
||||
static const char __pyx_k_inherited_providers[] = "inherited_providers";
|
||||
static const char __pyx_k_DeclarativeContainer[] = "DeclarativeContainer";
|
||||
static const char __pyx_k_overriding_container[] = "overriding_container";
|
||||
|
@ -2018,13 +2067,13 @@ static const char __pyx_k_DeclarativeContainerMetaClass_4[] = "DeclarativeContai
|
|||
static const char __pyx_k_DeclarativeContainerMetaClass_5[] = "DeclarativeContainerMetaClass.__delattr__";
|
||||
static const char __pyx_k_DeclarativeContainer_reset_last[] = "DeclarativeContainer.reset_last_overriding";
|
||||
static const char __pyx_k_DynamicContainer_reset_override[] = "DynamicContainer.reset_override";
|
||||
static const char __pyx_k_Users_romanmogilatov_ets_labs_p[] = "/Users/romanmogilatov/ets-labs/python-dependency-injector/src/dependency_injector/containers.pyx";
|
||||
static const char __pyx_k_Container_0_could_not_be_overrid[] = "Container {0} could not be overridden with itself";
|
||||
static const char __pyx_k_DeclarativeContainer_reset_overr[] = "DeclarativeContainer.reset_override";
|
||||
static const char __pyx_k_Declarative_inversion_of_control[] = "Declarative inversion of control container meta class.";
|
||||
static const char __pyx_k_Dependency_injector_containers_P[] = "Dependency injector containers.\n\nPowered by Cython.\n";
|
||||
static const char __pyx_k_DynamicContainer_reset_last_over[] = "DynamicContainer.reset_last_overriding";
|
||||
static const char __pyx_k_Dynamic_inversion_of_control_con[] = "Dynamic inversion of control container.\n\n .. code-block:: python\n\n services = DynamicContainer()\n services.auth = providers.Factory(AuthService)\n services.users = providers.Factory(UsersService,\n auth_service=services.auth)\n\n .. py:attribute:: providers\n\n Read-only dictionary of all providers.\n\n :type: dict[str, :py:class:`dependency_injector.providers.Provider`]\n\n .. py:attribute:: overridden\n\n Tuple of overriding containers.\n\n :type: tuple[:py:class:`DynamicContainer`]\n\n .. py:attribute:: provider_type\n\n Type of providers that could be placed in container.\n\n :type: type\n ";
|
||||
static const char __pyx_k_src_dependency_injector_containe[] = "src/dependency_injector/containers.pyx";
|
||||
static const char __pyx_k_Container_0_could_not_be_overrid_2[] = "Container {0} could not be overridden with itself or its subclasses";
|
||||
static const char __pyx_k_Declarative_inversion_of_control_2[] = "Declarative inversion of control container.\n\n .. code-block:: python\n\n class Services(DeclarativeContainer):\n auth = providers.Factory(AuthService)\n users = providers.Factory(UsersService,\n auth_service=auth)\n ";
|
||||
static PyObject *__pyx_kp_s_0_can_contain_only_1_instances;
|
||||
|
@ -2054,12 +2103,12 @@ static PyObject *__pyx_n_s_DynamicContainer_reset_override;
|
|||
static PyObject *__pyx_kp_s_Dynamic_inversion_of_control_con;
|
||||
static PyObject *__pyx_n_s_Error;
|
||||
static PyObject *__pyx_n_s_IS_CONTAINER;
|
||||
static PyObject *__pyx_kp_s_Users_romanmogilatov_ets_labs_p;
|
||||
static PyObject *__pyx_n_s_add_metaclass;
|
||||
static PyObject *__pyx_n_s_args;
|
||||
static PyObject *__pyx_n_s_attributes;
|
||||
static PyObject *__pyx_n_s_bases;
|
||||
static PyObject *__pyx_n_s_class_name;
|
||||
static PyObject *__pyx_n_s_cline_in_traceback;
|
||||
static PyObject *__pyx_n_s_close;
|
||||
static PyObject *__pyx_n_s_cls;
|
||||
static PyObject *__pyx_n_s_cls_providers;
|
||||
|
@ -2110,6 +2159,7 @@ static PyObject *__pyx_n_s_send;
|
|||
static PyObject *__pyx_n_s_setattr;
|
||||
static PyObject *__pyx_n_s_six;
|
||||
static PyObject *__pyx_n_s_source_provider;
|
||||
static PyObject *__pyx_kp_s_src_dependency_injector_containe;
|
||||
static PyObject *__pyx_n_s_super;
|
||||
static PyObject *__pyx_n_s_test;
|
||||
static PyObject *__pyx_n_s_throw;
|
||||
|
@ -2335,8 +2385,11 @@ static PyObject *__pyx_pw_19dependency_injector_10containers_16DynamicContainer_
|
|||
const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
|
||||
switch (pos_args) {
|
||||
case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
|
||||
CYTHON_FALLTHROUGH;
|
||||
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
|
||||
CYTHON_FALLTHROUGH;
|
||||
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
|
||||
CYTHON_FALLTHROUGH;
|
||||
case 0: break;
|
||||
default: goto __pyx_L5_argtuple_error;
|
||||
}
|
||||
|
@ -2345,11 +2398,13 @@ static PyObject *__pyx_pw_19dependency_injector_10containers_16DynamicContainer_
|
|||
case 0:
|
||||
if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
|
||||
else goto __pyx_L5_argtuple_error;
|
||||
CYTHON_FALLTHROUGH;
|
||||
case 1:
|
||||
if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_name)) != 0)) kw_args--;
|
||||
else {
|
||||
__Pyx_RaiseArgtupleInvalid("__setattr__", 1, 3, 3, 1); __PYX_ERR(0, 57, __pyx_L3_error)
|
||||
}
|
||||
CYTHON_FALLTHROUGH;
|
||||
case 2:
|
||||
if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--;
|
||||
else {
|
||||
|
@ -2565,7 +2620,9 @@ static PyObject *__pyx_pw_19dependency_injector_10containers_16DynamicContainer_
|
|||
const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
|
||||
switch (pos_args) {
|
||||
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
|
||||
CYTHON_FALLTHROUGH;
|
||||
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
|
||||
CYTHON_FALLTHROUGH;
|
||||
case 0: break;
|
||||
default: goto __pyx_L5_argtuple_error;
|
||||
}
|
||||
|
@ -2574,6 +2631,7 @@ static PyObject *__pyx_pw_19dependency_injector_10containers_16DynamicContainer_
|
|||
case 0:
|
||||
if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
|
||||
else goto __pyx_L5_argtuple_error;
|
||||
CYTHON_FALLTHROUGH;
|
||||
case 1:
|
||||
if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_name)) != 0)) kw_args--;
|
||||
else {
|
||||
|
@ -2776,7 +2834,9 @@ static PyObject *__pyx_pw_19dependency_injector_10containers_16DynamicContainer_
|
|||
const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
|
||||
switch (pos_args) {
|
||||
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
|
||||
CYTHON_FALLTHROUGH;
|
||||
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
|
||||
CYTHON_FALLTHROUGH;
|
||||
case 0: break;
|
||||
default: goto __pyx_L5_argtuple_error;
|
||||
}
|
||||
|
@ -2785,6 +2845,7 @@ static PyObject *__pyx_pw_19dependency_injector_10containers_16DynamicContainer_
|
|||
case 0:
|
||||
if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
|
||||
else goto __pyx_L5_argtuple_error;
|
||||
CYTHON_FALLTHROUGH;
|
||||
case 1:
|
||||
if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_overriding)) != 0)) kw_args--;
|
||||
else {
|
||||
|
@ -3910,9 +3971,13 @@ static PyObject *__pyx_pw_19dependency_injector_10containers_29DeclarativeContai
|
|||
const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
|
||||
switch (pos_args) {
|
||||
case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
|
||||
CYTHON_FALLTHROUGH;
|
||||
case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
|
||||
CYTHON_FALLTHROUGH;
|
||||
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
|
||||
CYTHON_FALLTHROUGH;
|
||||
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
|
||||
CYTHON_FALLTHROUGH;
|
||||
case 0: break;
|
||||
default: goto __pyx_L5_argtuple_error;
|
||||
}
|
||||
|
@ -3921,16 +3986,19 @@ static PyObject *__pyx_pw_19dependency_injector_10containers_29DeclarativeContai
|
|||
case 0:
|
||||
if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_mcs)) != 0)) kw_args--;
|
||||
else goto __pyx_L5_argtuple_error;
|
||||
CYTHON_FALLTHROUGH;
|
||||
case 1:
|
||||
if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_class_name)) != 0)) kw_args--;
|
||||
else {
|
||||
__Pyx_RaiseArgtupleInvalid("__new__", 1, 4, 4, 1); __PYX_ERR(0, 141, __pyx_L3_error)
|
||||
}
|
||||
CYTHON_FALLTHROUGH;
|
||||
case 2:
|
||||
if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_bases)) != 0)) kw_args--;
|
||||
else {
|
||||
__Pyx_RaiseArgtupleInvalid("__new__", 1, 4, 4, 2); __PYX_ERR(0, 141, __pyx_L3_error)
|
||||
}
|
||||
CYTHON_FALLTHROUGH;
|
||||
case 3:
|
||||
if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_attributes)) != 0)) kw_args--;
|
||||
else {
|
||||
|
@ -5093,8 +5161,11 @@ static PyObject *__pyx_pw_19dependency_injector_10containers_29DeclarativeContai
|
|||
const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
|
||||
switch (pos_args) {
|
||||
case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
|
||||
CYTHON_FALLTHROUGH;
|
||||
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
|
||||
CYTHON_FALLTHROUGH;
|
||||
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
|
||||
CYTHON_FALLTHROUGH;
|
||||
case 0: break;
|
||||
default: goto __pyx_L5_argtuple_error;
|
||||
}
|
||||
|
@ -5103,11 +5174,13 @@ static PyObject *__pyx_pw_19dependency_injector_10containers_29DeclarativeContai
|
|||
case 0:
|
||||
if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_cls)) != 0)) kw_args--;
|
||||
else goto __pyx_L5_argtuple_error;
|
||||
CYTHON_FALLTHROUGH;
|
||||
case 1:
|
||||
if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_name)) != 0)) kw_args--;
|
||||
else {
|
||||
__Pyx_RaiseArgtupleInvalid("__setattr__", 1, 3, 3, 1); __PYX_ERR(0, 168, __pyx_L3_error)
|
||||
}
|
||||
CYTHON_FALLTHROUGH;
|
||||
case 2:
|
||||
if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--;
|
||||
else {
|
||||
|
@ -5335,7 +5408,9 @@ static PyObject *__pyx_pw_19dependency_injector_10containers_29DeclarativeContai
|
|||
const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
|
||||
switch (pos_args) {
|
||||
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
|
||||
CYTHON_FALLTHROUGH;
|
||||
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
|
||||
CYTHON_FALLTHROUGH;
|
||||
case 0: break;
|
||||
default: goto __pyx_L5_argtuple_error;
|
||||
}
|
||||
|
@ -5344,6 +5419,7 @@ static PyObject *__pyx_pw_19dependency_injector_10containers_29DeclarativeContai
|
|||
case 0:
|
||||
if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_cls)) != 0)) kw_args--;
|
||||
else goto __pyx_L5_argtuple_error;
|
||||
CYTHON_FALLTHROUGH;
|
||||
case 1:
|
||||
if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_name)) != 0)) kw_args--;
|
||||
else {
|
||||
|
@ -5586,6 +5662,7 @@ static PyObject *__pyx_pw_19dependency_injector_10containers_20DeclarativeContai
|
|||
switch (pos_args) {
|
||||
default:
|
||||
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
|
||||
CYTHON_FALLTHROUGH;
|
||||
case 0: break;
|
||||
}
|
||||
kw_args = PyDict_Size(__pyx_kwds);
|
||||
|
@ -5909,7 +5986,9 @@ static PyObject *__pyx_pw_19dependency_injector_10containers_20DeclarativeContai
|
|||
const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
|
||||
switch (pos_args) {
|
||||
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
|
||||
CYTHON_FALLTHROUGH;
|
||||
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
|
||||
CYTHON_FALLTHROUGH;
|
||||
case 0: break;
|
||||
default: goto __pyx_L5_argtuple_error;
|
||||
}
|
||||
|
@ -5918,6 +5997,7 @@ static PyObject *__pyx_pw_19dependency_injector_10containers_20DeclarativeContai
|
|||
case 0:
|
||||
if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_cls)) != 0)) kw_args--;
|
||||
else goto __pyx_L5_argtuple_error;
|
||||
CYTHON_FALLTHROUGH;
|
||||
case 1:
|
||||
if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_overriding)) != 0)) kw_args--;
|
||||
else {
|
||||
|
@ -7933,7 +8013,7 @@ static int __pyx_f_19dependency_injector_10containers_is_container(PyObject *__p
|
|||
/* function exit code */
|
||||
__pyx_L1_error:;
|
||||
__Pyx_XDECREF(__pyx_t_1);
|
||||
__Pyx_WriteUnraisable("dependency_injector.containers.is_container", __pyx_clineno, __pyx_lineno, __pyx_filename, 0, 0);
|
||||
__Pyx_WriteUnraisable("dependency_injector.containers.is_container", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
|
||||
__pyx_r = 0;
|
||||
__pyx_L0:;
|
||||
__Pyx_RefNannyFinishContext();
|
||||
|
@ -8182,7 +8262,9 @@ static PyObject *__pyx_pw_19dependency_injector_10containers_7_check_provider_ty
|
|||
const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
|
||||
switch (pos_args) {
|
||||
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
|
||||
CYTHON_FALLTHROUGH;
|
||||
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
|
||||
CYTHON_FALLTHROUGH;
|
||||
case 0: break;
|
||||
default: goto __pyx_L5_argtuple_error;
|
||||
}
|
||||
|
@ -8191,6 +8273,7 @@ static PyObject *__pyx_pw_19dependency_injector_10containers_7_check_provider_ty
|
|||
case 0:
|
||||
if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_container)) != 0)) kw_args--;
|
||||
else goto __pyx_L5_argtuple_error;
|
||||
CYTHON_FALLTHROUGH;
|
||||
case 1:
|
||||
if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_provider)) != 0)) kw_args--;
|
||||
else {
|
||||
|
@ -9213,7 +9296,7 @@ static int __pyx_tp_traverse_19dependency_injector_10containers___pyx_scope_stru
|
|||
int e;
|
||||
struct __pyx_obj_19dependency_injector_10containers___pyx_scope_struct_1_genexpr *p = (struct __pyx_obj_19dependency_injector_10containers___pyx_scope_struct_1_genexpr *)o;
|
||||
if (p->__pyx_outer_scope) {
|
||||
e = (*v)(((PyObject*)p->__pyx_outer_scope), a); if (e) return e;
|
||||
e = (*v)(((PyObject *)p->__pyx_outer_scope), a); if (e) return e;
|
||||
}
|
||||
if (p->__pyx_v_name) {
|
||||
e = (*v)(p->__pyx_v_name, a); if (e) return e;
|
||||
|
@ -9340,7 +9423,7 @@ static int __pyx_tp_traverse_19dependency_injector_10containers___pyx_scope_stru
|
|||
int e;
|
||||
struct __pyx_obj_19dependency_injector_10containers___pyx_scope_struct_2_genexpr *p = (struct __pyx_obj_19dependency_injector_10containers___pyx_scope_struct_2_genexpr *)o;
|
||||
if (p->__pyx_outer_scope) {
|
||||
e = (*v)(((PyObject*)p->__pyx_outer_scope), a); if (e) return e;
|
||||
e = (*v)(((PyObject *)p->__pyx_outer_scope), a); if (e) return e;
|
||||
}
|
||||
if (p->__pyx_v_base) {
|
||||
e = (*v)(p->__pyx_v_base, a); if (e) return e;
|
||||
|
@ -9702,12 +9785,12 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = {
|
|||
{&__pyx_kp_s_Dynamic_inversion_of_control_con, __pyx_k_Dynamic_inversion_of_control_con, sizeof(__pyx_k_Dynamic_inversion_of_control_con), 0, 0, 1, 0},
|
||||
{&__pyx_n_s_Error, __pyx_k_Error, sizeof(__pyx_k_Error), 0, 0, 1, 1},
|
||||
{&__pyx_n_s_IS_CONTAINER, __pyx_k_IS_CONTAINER, sizeof(__pyx_k_IS_CONTAINER), 0, 0, 1, 1},
|
||||
{&__pyx_kp_s_Users_romanmogilatov_ets_labs_p, __pyx_k_Users_romanmogilatov_ets_labs_p, sizeof(__pyx_k_Users_romanmogilatov_ets_labs_p), 0, 0, 1, 0},
|
||||
{&__pyx_n_s_add_metaclass, __pyx_k_add_metaclass, sizeof(__pyx_k_add_metaclass), 0, 0, 1, 1},
|
||||
{&__pyx_n_s_args, __pyx_k_args, sizeof(__pyx_k_args), 0, 0, 1, 1},
|
||||
{&__pyx_n_s_attributes, __pyx_k_attributes, sizeof(__pyx_k_attributes), 0, 0, 1, 1},
|
||||
{&__pyx_n_s_bases, __pyx_k_bases, sizeof(__pyx_k_bases), 0, 0, 1, 1},
|
||||
{&__pyx_n_s_class_name, __pyx_k_class_name, sizeof(__pyx_k_class_name), 0, 0, 1, 1},
|
||||
{&__pyx_n_s_cline_in_traceback, __pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 0, 1, 1},
|
||||
{&__pyx_n_s_close, __pyx_k_close, sizeof(__pyx_k_close), 0, 0, 1, 1},
|
||||
{&__pyx_n_s_cls, __pyx_k_cls, sizeof(__pyx_k_cls), 0, 0, 1, 1},
|
||||
{&__pyx_n_s_cls_providers, __pyx_k_cls_providers, sizeof(__pyx_k_cls_providers), 0, 0, 1, 1},
|
||||
|
@ -9758,6 +9841,7 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = {
|
|||
{&__pyx_n_s_setattr, __pyx_k_setattr, sizeof(__pyx_k_setattr), 0, 0, 1, 1},
|
||||
{&__pyx_n_s_six, __pyx_k_six, sizeof(__pyx_k_six), 0, 0, 1, 1},
|
||||
{&__pyx_n_s_source_provider, __pyx_k_source_provider, sizeof(__pyx_k_source_provider), 0, 0, 1, 1},
|
||||
{&__pyx_kp_s_src_dependency_injector_containe, __pyx_k_src_dependency_injector_containe, sizeof(__pyx_k_src_dependency_injector_containe), 0, 0, 1, 0},
|
||||
{&__pyx_n_s_super, __pyx_k_super, sizeof(__pyx_k_super), 0, 0, 1, 1},
|
||||
{&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1},
|
||||
{&__pyx_n_s_throw, __pyx_k_throw, sizeof(__pyx_k_throw), 0, 0, 1, 1},
|
||||
|
@ -9811,7 +9895,7 @@ static int __Pyx_InitCachedConstants(void) {
|
|||
__pyx_tuple__3 = PyTuple_Pack(1, __pyx_n_s_overriding_container); if (unlikely(!__pyx_tuple__3)) __PYX_ERR(0, 330, __pyx_L1_error)
|
||||
__Pyx_GOTREF(__pyx_tuple__3);
|
||||
__Pyx_GIVEREF(__pyx_tuple__3);
|
||||
__pyx_codeobj__4 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__3, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_romanmogilatov_ets_labs_p, __pyx_n_s_decorator, 330, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__4)) __PYX_ERR(0, 330, __pyx_L1_error)
|
||||
__pyx_codeobj__4 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__3, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_dependency_injector_containe, __pyx_n_s_decorator, 330, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__4)) __PYX_ERR(0, 330, __pyx_L1_error)
|
||||
|
||||
/* "dependency_injector/containers.pyx":350
|
||||
* :rtype: callable(:py:class:`DeclarativeContainer`)
|
||||
|
@ -9823,7 +9907,7 @@ static int __Pyx_InitCachedConstants(void) {
|
|||
__pyx_tuple__5 = PyTuple_Pack(6, __pyx_n_s_copied_container, __pyx_n_s_memo, __pyx_n_s_name, __pyx_n_s_provider, __pyx_n_s_source_provider, __pyx_n_s_providers_copy); if (unlikely(!__pyx_tuple__5)) __PYX_ERR(0, 350, __pyx_L1_error)
|
||||
__Pyx_GOTREF(__pyx_tuple__5);
|
||||
__Pyx_GIVEREF(__pyx_tuple__5);
|
||||
__pyx_codeobj__6 = (PyObject*)__Pyx_PyCode_New(1, 0, 6, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__5, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_romanmogilatov_ets_labs_p, __pyx_n_s_decorator, 350, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__6)) __PYX_ERR(0, 350, __pyx_L1_error)
|
||||
__pyx_codeobj__6 = (PyObject*)__Pyx_PyCode_New(1, 0, 6, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__5, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_dependency_injector_containe, __pyx_n_s_decorator, 350, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__6)) __PYX_ERR(0, 350, __pyx_L1_error)
|
||||
|
||||
/* "dependency_injector/containers.pyx":47
|
||||
* __IS_CONTAINER__ = True
|
||||
|
@ -9835,7 +9919,7 @@ static int __Pyx_InitCachedConstants(void) {
|
|||
__pyx_tuple__7 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__7)) __PYX_ERR(0, 47, __pyx_L1_error)
|
||||
__Pyx_GOTREF(__pyx_tuple__7);
|
||||
__Pyx_GIVEREF(__pyx_tuple__7);
|
||||
__pyx_codeobj__8 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__7, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_romanmogilatov_ets_labs_p, __pyx_n_s_init, 47, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__8)) __PYX_ERR(0, 47, __pyx_L1_error)
|
||||
__pyx_codeobj__8 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__7, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_dependency_injector_containe, __pyx_n_s_init, 47, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__8)) __PYX_ERR(0, 47, __pyx_L1_error)
|
||||
|
||||
/* "dependency_injector/containers.pyx":57
|
||||
* super(DynamicContainer, self).__init__()
|
||||
|
@ -9847,7 +9931,7 @@ static int __Pyx_InitCachedConstants(void) {
|
|||
__pyx_tuple__9 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_name, __pyx_n_s_value); if (unlikely(!__pyx_tuple__9)) __PYX_ERR(0, 57, __pyx_L1_error)
|
||||
__Pyx_GOTREF(__pyx_tuple__9);
|
||||
__Pyx_GIVEREF(__pyx_tuple__9);
|
||||
__pyx_codeobj__10 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__9, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_romanmogilatov_ets_labs_p, __pyx_n_s_setattr, 57, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__10)) __PYX_ERR(0, 57, __pyx_L1_error)
|
||||
__pyx_codeobj__10 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__9, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_dependency_injector_containe, __pyx_n_s_setattr, 57, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__10)) __PYX_ERR(0, 57, __pyx_L1_error)
|
||||
|
||||
/* "dependency_injector/containers.pyx":76
|
||||
* super(DynamicContainer, self).__setattr__(name, value)
|
||||
|
@ -9859,7 +9943,7 @@ static int __Pyx_InitCachedConstants(void) {
|
|||
__pyx_tuple__11 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_name); if (unlikely(!__pyx_tuple__11)) __PYX_ERR(0, 76, __pyx_L1_error)
|
||||
__Pyx_GOTREF(__pyx_tuple__11);
|
||||
__Pyx_GIVEREF(__pyx_tuple__11);
|
||||
__pyx_codeobj__12 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__11, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_romanmogilatov_ets_labs_p, __pyx_n_s_delattr, 76, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__12)) __PYX_ERR(0, 76, __pyx_L1_error)
|
||||
__pyx_codeobj__12 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__11, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_dependency_injector_containe, __pyx_n_s_delattr, 76, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__12)) __PYX_ERR(0, 76, __pyx_L1_error)
|
||||
|
||||
/* "dependency_injector/containers.pyx":91
|
||||
* super(DynamicContainer, self).__delattr__(name)
|
||||
|
@ -9871,7 +9955,7 @@ static int __Pyx_InitCachedConstants(void) {
|
|||
__pyx_tuple__13 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_overriding, __pyx_n_s_name, __pyx_n_s_provider); if (unlikely(!__pyx_tuple__13)) __PYX_ERR(0, 91, __pyx_L1_error)
|
||||
__Pyx_GOTREF(__pyx_tuple__13);
|
||||
__Pyx_GIVEREF(__pyx_tuple__13);
|
||||
__pyx_codeobj__14 = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__13, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_romanmogilatov_ets_labs_p, __pyx_n_s_override, 91, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__14)) __PYX_ERR(0, 91, __pyx_L1_error)
|
||||
__pyx_codeobj__14 = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__13, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_dependency_injector_containe, __pyx_n_s_override, 91, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__14)) __PYX_ERR(0, 91, __pyx_L1_error)
|
||||
|
||||
/* "dependency_injector/containers.pyx":114
|
||||
* pass
|
||||
|
@ -9883,7 +9967,7 @@ static int __Pyx_InitCachedConstants(void) {
|
|||
__pyx_tuple__15 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_provider); if (unlikely(!__pyx_tuple__15)) __PYX_ERR(0, 114, __pyx_L1_error)
|
||||
__Pyx_GOTREF(__pyx_tuple__15);
|
||||
__Pyx_GIVEREF(__pyx_tuple__15);
|
||||
__pyx_codeobj__16 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__15, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_romanmogilatov_ets_labs_p, __pyx_n_s_reset_last_overriding, 114, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__16)) __PYX_ERR(0, 114, __pyx_L1_error)
|
||||
__pyx_codeobj__16 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__15, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_dependency_injector_containe, __pyx_n_s_reset_last_overriding, 114, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__16)) __PYX_ERR(0, 114, __pyx_L1_error)
|
||||
|
||||
/* "dependency_injector/containers.pyx":127
|
||||
* provider.reset_last_overriding()
|
||||
|
@ -9895,7 +9979,7 @@ static int __Pyx_InitCachedConstants(void) {
|
|||
__pyx_tuple__17 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_provider); if (unlikely(!__pyx_tuple__17)) __PYX_ERR(0, 127, __pyx_L1_error)
|
||||
__Pyx_GOTREF(__pyx_tuple__17);
|
||||
__Pyx_GIVEREF(__pyx_tuple__17);
|
||||
__pyx_codeobj__18 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__17, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_romanmogilatov_ets_labs_p, __pyx_n_s_reset_override, 127, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__18)) __PYX_ERR(0, 127, __pyx_L1_error)
|
||||
__pyx_codeobj__18 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__17, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_dependency_injector_containe, __pyx_n_s_reset_override, 127, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__18)) __PYX_ERR(0, 127, __pyx_L1_error)
|
||||
|
||||
/* "dependency_injector/containers.pyx":141
|
||||
* """Declarative inversion of control container meta class."""
|
||||
|
@ -9907,7 +9991,7 @@ static int __Pyx_InitCachedConstants(void) {
|
|||
__pyx_tuple__19 = PyTuple_Pack(11, __pyx_n_s_mcs, __pyx_n_s_class_name, __pyx_n_s_bases, __pyx_n_s_attributes, __pyx_n_s_cls_providers, __pyx_n_s_inherited_providers, __pyx_n_s_cls, __pyx_n_s_provider, __pyx_n_s_genexpr, __pyx_n_s_genexpr, __pyx_n_s_genexpr); if (unlikely(!__pyx_tuple__19)) __PYX_ERR(0, 141, __pyx_L1_error)
|
||||
__Pyx_GOTREF(__pyx_tuple__19);
|
||||
__Pyx_GIVEREF(__pyx_tuple__19);
|
||||
__pyx_codeobj__20 = (PyObject*)__Pyx_PyCode_New(4, 0, 11, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__19, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_romanmogilatov_ets_labs_p, __pyx_n_s_new, 141, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__20)) __PYX_ERR(0, 141, __pyx_L1_error)
|
||||
__pyx_codeobj__20 = (PyObject*)__Pyx_PyCode_New(4, 0, 11, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__19, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_dependency_injector_containe, __pyx_n_s_new, 141, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__20)) __PYX_ERR(0, 141, __pyx_L1_error)
|
||||
|
||||
/* "dependency_injector/containers.pyx":168
|
||||
* return cls
|
||||
|
@ -9919,7 +10003,7 @@ static int __Pyx_InitCachedConstants(void) {
|
|||
__pyx_tuple__21 = PyTuple_Pack(3, __pyx_n_s_cls, __pyx_n_s_name, __pyx_n_s_value); if (unlikely(!__pyx_tuple__21)) __PYX_ERR(0, 168, __pyx_L1_error)
|
||||
__Pyx_GOTREF(__pyx_tuple__21);
|
||||
__Pyx_GIVEREF(__pyx_tuple__21);
|
||||
__pyx_codeobj__22 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__21, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_romanmogilatov_ets_labs_p, __pyx_n_s_setattr, 168, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__22)) __PYX_ERR(0, 168, __pyx_L1_error)
|
||||
__pyx_codeobj__22 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__21, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_dependency_injector_containe, __pyx_n_s_setattr, 168, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__22)) __PYX_ERR(0, 168, __pyx_L1_error)
|
||||
|
||||
/* "dependency_injector/containers.pyx":188
|
||||
* super(DeclarativeContainerMetaClass, cls).__setattr__(name, value)
|
||||
|
@ -9931,7 +10015,7 @@ static int __Pyx_InitCachedConstants(void) {
|
|||
__pyx_tuple__23 = PyTuple_Pack(2, __pyx_n_s_cls, __pyx_n_s_name); if (unlikely(!__pyx_tuple__23)) __PYX_ERR(0, 188, __pyx_L1_error)
|
||||
__Pyx_GOTREF(__pyx_tuple__23);
|
||||
__Pyx_GIVEREF(__pyx_tuple__23);
|
||||
__pyx_codeobj__24 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__23, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_romanmogilatov_ets_labs_p, __pyx_n_s_delattr, 188, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__24)) __PYX_ERR(0, 188, __pyx_L1_error)
|
||||
__pyx_codeobj__24 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__23, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_dependency_injector_containe, __pyx_n_s_delattr, 188, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__24)) __PYX_ERR(0, 188, __pyx_L1_error)
|
||||
|
||||
/* "dependency_injector/containers.pyx":256
|
||||
* """
|
||||
|
@ -9943,7 +10027,7 @@ static int __Pyx_InitCachedConstants(void) {
|
|||
__pyx_tuple__25 = PyTuple_Pack(6, __pyx_n_s_cls, __pyx_n_s_args, __pyx_n_s_kwargs, __pyx_n_s_container, __pyx_n_s_name, __pyx_n_s_provider); if (unlikely(!__pyx_tuple__25)) __PYX_ERR(0, 256, __pyx_L1_error)
|
||||
__Pyx_GOTREF(__pyx_tuple__25);
|
||||
__Pyx_GIVEREF(__pyx_tuple__25);
|
||||
__pyx_codeobj__26 = (PyObject*)__Pyx_PyCode_New(1, 0, 6, 0, CO_VARARGS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__25, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_romanmogilatov_ets_labs_p, __pyx_n_s_new, 256, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__26)) __PYX_ERR(0, 256, __pyx_L1_error)
|
||||
__pyx_codeobj__26 = (PyObject*)__Pyx_PyCode_New(1, 0, 6, 0, CO_VARARGS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__25, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_dependency_injector_containe, __pyx_n_s_new, 256, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__26)) __PYX_ERR(0, 256, __pyx_L1_error)
|
||||
|
||||
/* "dependency_injector/containers.pyx":271
|
||||
*
|
||||
|
@ -9955,7 +10039,7 @@ static int __Pyx_InitCachedConstants(void) {
|
|||
__pyx_tuple__27 = PyTuple_Pack(4, __pyx_n_s_cls, __pyx_n_s_overriding, __pyx_n_s_name, __pyx_n_s_provider); if (unlikely(!__pyx_tuple__27)) __PYX_ERR(0, 271, __pyx_L1_error)
|
||||
__Pyx_GOTREF(__pyx_tuple__27);
|
||||
__Pyx_GIVEREF(__pyx_tuple__27);
|
||||
__pyx_codeobj__28 = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__27, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_romanmogilatov_ets_labs_p, __pyx_n_s_override, 271, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__28)) __PYX_ERR(0, 271, __pyx_L1_error)
|
||||
__pyx_codeobj__28 = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__27, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_dependency_injector_containe, __pyx_n_s_override, 271, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__28)) __PYX_ERR(0, 271, __pyx_L1_error)
|
||||
|
||||
/* "dependency_injector/containers.pyx":295
|
||||
*
|
||||
|
@ -9967,7 +10051,7 @@ static int __Pyx_InitCachedConstants(void) {
|
|||
__pyx_tuple__29 = PyTuple_Pack(2, __pyx_n_s_cls, __pyx_n_s_provider); if (unlikely(!__pyx_tuple__29)) __PYX_ERR(0, 295, __pyx_L1_error)
|
||||
__Pyx_GOTREF(__pyx_tuple__29);
|
||||
__Pyx_GIVEREF(__pyx_tuple__29);
|
||||
__pyx_codeobj__30 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__29, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_romanmogilatov_ets_labs_p, __pyx_n_s_reset_last_overriding, 295, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__30)) __PYX_ERR(0, 295, __pyx_L1_error)
|
||||
__pyx_codeobj__30 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__29, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_dependency_injector_containe, __pyx_n_s_reset_last_overriding, 295, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__30)) __PYX_ERR(0, 295, __pyx_L1_error)
|
||||
|
||||
/* "dependency_injector/containers.pyx":309
|
||||
*
|
||||
|
@ -9979,7 +10063,7 @@ static int __Pyx_InitCachedConstants(void) {
|
|||
__pyx_tuple__31 = PyTuple_Pack(2, __pyx_n_s_cls, __pyx_n_s_provider); if (unlikely(!__pyx_tuple__31)) __PYX_ERR(0, 309, __pyx_L1_error)
|
||||
__Pyx_GOTREF(__pyx_tuple__31);
|
||||
__Pyx_GIVEREF(__pyx_tuple__31);
|
||||
__pyx_codeobj__32 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__31, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_romanmogilatov_ets_labs_p, __pyx_n_s_reset_override, 309, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__32)) __PYX_ERR(0, 309, __pyx_L1_error)
|
||||
__pyx_codeobj__32 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__31, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_dependency_injector_containe, __pyx_n_s_reset_override, 309, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__32)) __PYX_ERR(0, 309, __pyx_L1_error)
|
||||
|
||||
/* "dependency_injector/containers.pyx":320
|
||||
*
|
||||
|
@ -9991,7 +10075,7 @@ static int __Pyx_InitCachedConstants(void) {
|
|||
__pyx_tuple__33 = PyTuple_Pack(3, __pyx_n_s_container, __pyx_n_s_decorator, __pyx_n_s_decorator); if (unlikely(!__pyx_tuple__33)) __PYX_ERR(0, 320, __pyx_L1_error)
|
||||
__Pyx_GOTREF(__pyx_tuple__33);
|
||||
__Pyx_GIVEREF(__pyx_tuple__33);
|
||||
__pyx_codeobj__34 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__33, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_romanmogilatov_ets_labs_p, __pyx_n_s_override, 320, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__34)) __PYX_ERR(0, 320, __pyx_L1_error)
|
||||
__pyx_codeobj__34 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__33, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_dependency_injector_containe, __pyx_n_s_override, 320, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__34)) __PYX_ERR(0, 320, __pyx_L1_error)
|
||||
|
||||
/* "dependency_injector/containers.pyx":337
|
||||
*
|
||||
|
@ -10003,7 +10087,7 @@ static int __Pyx_InitCachedConstants(void) {
|
|||
__pyx_tuple__35 = PyTuple_Pack(3, __pyx_n_s_container, __pyx_n_s_decorator, __pyx_n_s_decorator); if (unlikely(!__pyx_tuple__35)) __PYX_ERR(0, 337, __pyx_L1_error)
|
||||
__Pyx_GOTREF(__pyx_tuple__35);
|
||||
__Pyx_GIVEREF(__pyx_tuple__35);
|
||||
__pyx_codeobj__36 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__35, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_romanmogilatov_ets_labs_p, __pyx_n_s_copy, 337, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__36)) __PYX_ERR(0, 337, __pyx_L1_error)
|
||||
__pyx_codeobj__36 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__35, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_dependency_injector_containe, __pyx_n_s_copy, 337, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__36)) __PYX_ERR(0, 337, __pyx_L1_error)
|
||||
__Pyx_RefNannyFinishContext();
|
||||
return 0;
|
||||
__pyx_L1_error:;
|
||||
|
@ -10085,6 +10169,7 @@ PyMODINIT_FUNC PyInit_containers(void)
|
|||
__pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error)
|
||||
Py_INCREF(__pyx_d);
|
||||
__pyx_b = PyImport_AddModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error)
|
||||
__pyx_cython_runtime = PyImport_AddModule((char *) "cython_runtime"); if (unlikely(!__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error)
|
||||
#if CYTHON_COMPILING_IN_PYPY
|
||||
Py_INCREF(__pyx_b);
|
||||
#endif
|
||||
|
@ -10763,7 +10848,7 @@ PyMODINIT_FUNC PyInit_containers(void)
|
|||
__Pyx_XDECREF(__pyx_t_11);
|
||||
if (__pyx_m) {
|
||||
if (__pyx_d) {
|
||||
__Pyx_AddTraceback("init dependency_injector.containers", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
||||
__Pyx_AddTraceback("init dependency_injector.containers", 0, __pyx_lineno, __pyx_filename);
|
||||
}
|
||||
Py_DECREF(__pyx_m); __pyx_m = 0;
|
||||
} else if (!PyErr_Occurred()) {
|
||||
|
@ -10854,17 +10939,22 @@ static CYTHON_INLINE PyObject * __Pyx_PyCFunction_FastCall(PyObject *func_obj, P
|
|||
PyCFunctionObject *func = (PyCFunctionObject*)func_obj;
|
||||
PyCFunction meth = PyCFunction_GET_FUNCTION(func);
|
||||
PyObject *self = PyCFunction_GET_SELF(func);
|
||||
int flags = PyCFunction_GET_FLAGS(func);
|
||||
assert(PyCFunction_Check(func));
|
||||
assert(METH_FASTCALL == (PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST)));
|
||||
assert(METH_FASTCALL == (flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS)));
|
||||
assert(nargs >= 0);
|
||||
assert(nargs == 0 || args != NULL);
|
||||
/* _PyCFunction_FastCallDict() must not be called with an exception set,
|
||||
because it may clear it (directly or indirectly) and so the
|
||||
caller loses its exception */
|
||||
assert(!PyErr_Occurred());
|
||||
return (*((__Pyx_PyCFunctionFast)meth)) (self, args, nargs, NULL);
|
||||
if ((PY_VERSION_HEX < 0x030700A0) || unlikely(flags & METH_KEYWORDS)) {
|
||||
return (*((__Pyx_PyCFunctionFastWithKeywords)meth)) (self, args, nargs, NULL);
|
||||
} else {
|
||||
return (*((__Pyx_PyCFunctionFast)meth)) (self, args, nargs);
|
||||
}
|
||||
}
|
||||
#endif // CYTHON_FAST_PYCCALL
|
||||
#endif
|
||||
|
||||
/* PyFunctionFastCall */
|
||||
#if CYTHON_FAST_PYCALL
|
||||
|
@ -10983,8 +11073,8 @@ done:
|
|||
Py_LeaveRecursiveCall();
|
||||
return result;
|
||||
}
|
||||
#endif // CPython < 3.6
|
||||
#endif // CYTHON_FAST_PYCALL
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* PyObjectCallMethO */
|
||||
#if CYTHON_COMPILING_IN_CPYTHON
|
||||
|
@ -11024,11 +11114,7 @@ static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObjec
|
|||
return __Pyx_PyFunction_FastCall(func, &arg, 1);
|
||||
}
|
||||
#endif
|
||||
#ifdef __Pyx_CyFunction_USED
|
||||
if (likely(PyCFunction_Check(func) || PyObject_TypeCheck(func, __pyx_CyFunctionType))) {
|
||||
#else
|
||||
if (likely(PyCFunction_Check(func))) {
|
||||
#endif
|
||||
if (likely(PyCFunction_GET_FLAGS(func) & METH_O)) {
|
||||
return __Pyx_PyObject_CallMethO(func, arg);
|
||||
#if CYTHON_FAST_PYCCALL
|
||||
|
@ -12574,6 +12660,40 @@ static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObj
|
|||
return NULL;
|
||||
}
|
||||
|
||||
/* CLineInTraceback */
|
||||
static int __Pyx_CLineForTraceback(int c_line) {
|
||||
#ifdef CYTHON_CLINE_IN_TRACEBACK
|
||||
return ((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0;
|
||||
#else
|
||||
PyObject **cython_runtime_dict;
|
||||
PyObject *use_cline;
|
||||
cython_runtime_dict = _PyObject_GetDictPtr(__pyx_cython_runtime);
|
||||
if (unlikely(!cython_runtime_dict)) {
|
||||
PyObject *ptype, *pvalue, *ptraceback;
|
||||
PyObject *use_cline_obj;
|
||||
PyErr_Fetch(&ptype, &pvalue, &ptraceback);
|
||||
use_cline_obj = __Pyx_PyObject_GetAttrStr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback);
|
||||
if (use_cline_obj) {
|
||||
use_cline = PyObject_Not(use_cline_obj) ? Py_False : Py_True;
|
||||
Py_DECREF(use_cline_obj);
|
||||
} else {
|
||||
use_cline = NULL;
|
||||
}
|
||||
PyErr_Restore(ptype, pvalue, ptraceback);
|
||||
} else {
|
||||
use_cline = PyDict_GetItem(*_PyObject_GetDictPtr(__pyx_cython_runtime), __pyx_n_s_cline_in_traceback);
|
||||
}
|
||||
if (!use_cline) {
|
||||
c_line = 0;
|
||||
PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False);
|
||||
}
|
||||
else if (PyObject_Not(use_cline) != 0) {
|
||||
c_line = 0;
|
||||
}
|
||||
return c_line;
|
||||
#endif
|
||||
}
|
||||
|
||||
/* CodeObjectCache */
|
||||
static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) {
|
||||
int start = 0, mid = 0, end = count - 1;
|
||||
|
@ -12714,12 +12834,15 @@ static void __Pyx_AddTraceback(const char *funcname, int c_line,
|
|||
int py_line, const char *filename) {
|
||||
PyCodeObject *py_code = 0;
|
||||
PyFrameObject *py_frame = 0;
|
||||
py_code = __pyx_find_code_object(c_line ? c_line : py_line);
|
||||
if (c_line) {
|
||||
c_line = __Pyx_CLineForTraceback(c_line);
|
||||
}
|
||||
py_code = __pyx_find_code_object(c_line ? -c_line : py_line);
|
||||
if (!py_code) {
|
||||
py_code = __Pyx_CreateCodeObjectForTraceback(
|
||||
funcname, c_line, py_line, filename);
|
||||
if (!py_code) goto bad;
|
||||
__pyx_insert_code_object(c_line ? c_line : py_line, py_code);
|
||||
__pyx_insert_code_object(c_line ? -c_line : py_line, py_code);
|
||||
}
|
||||
py_frame = PyFrame_New(
|
||||
PyThreadState_GET(), /*PyThreadState *tstate,*/
|
||||
|
@ -14249,6 +14372,8 @@ bad:
|
|||
#endif
|
||||
if (!*t->p)
|
||||
return -1;
|
||||
if (PyObject_Hash(*t->p) == -1)
|
||||
PyErr_Clear();
|
||||
++t;
|
||||
}
|
||||
return 0;
|
||||
|
@ -14257,11 +14382,11 @@ bad:
|
|||
static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) {
|
||||
return __Pyx_PyUnicode_FromStringAndSize(c_str, (Py_ssize_t)strlen(c_str));
|
||||
}
|
||||
static CYTHON_INLINE char* __Pyx_PyObject_AsString(PyObject* o) {
|
||||
static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject* o) {
|
||||
Py_ssize_t ignore;
|
||||
return __Pyx_PyObject_AsStringAndSize(o, &ignore);
|
||||
}
|
||||
static CYTHON_INLINE char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
|
||||
static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
|
||||
#if CYTHON_COMPILING_IN_CPYTHON && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT)
|
||||
if (
|
||||
#if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
|
||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user