Skip to content

Commit d0b86fa

Browse files
committed
Merge branch release/3.4.8
2 parents bc398ce + 67745f8 commit d0b86fa

File tree

7 files changed

+52
-100
lines changed

7 files changed

+52
-100
lines changed

Makefile

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,12 @@ check:
5858
pydocstyle examples/
5959

6060
publish: cythonize
61-
# Create and upload build
62-
python setup.py sdist upload
61+
# Merge release to master branch
62+
git checkout master
63+
git merge --no-ff release/$(VERSION) -m 'Merge branch release/$(VERSION)'
64+
git push origin master
6365
# Create and upload tag
6466
git tag -a $(VERSION) -m 'version $(VERSION)'
6567
git push --tags
68+
# Create and upload build
69+
python setup.py sdist upload

docs/main/changelog.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ Development version
1111
-------------------
1212
- No features.
1313

14+
3.4.8
15+
-----
16+
- Code style fixes in ``providers`` module.
17+
1418
3.4.7
1519
-----
1620
- Correct typo in changelog.

src/dependency_injector/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"""Dependency injector top-level package."""
22

3-
__version__ = '3.4.7'
3+
__version__ = '3.4.8'
44
"""Version number that follows semantic versioning.
55
66
:type: str

src/dependency_injector/containers.c

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/dependency_injector/providers.c

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/dependency_injector/providers.pxd

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -243,8 +243,8 @@ cdef inline object __callable_call(Callable self, tuple args, dict kwargs):
243243
self.__args,
244244
self.__args_len)
245245
keyword_args = __provide_keyword_args(kwargs,
246-
self.__kwargs,
247-
self.__kwargs_len)
246+
self.__kwargs,
247+
self.__kwargs_len)
248248

249249
return self.__provides(*positional_args, **keyword_args)
250250

tests/performance/test.py

Lines changed: 29 additions & 85 deletions
Original file line numberDiff line numberDiff line change
@@ -38,42 +38,6 @@ def run(self):
3838
gc.enable()
3939
print('\n')
4040

41-
# def test_simple_object(self, providers):
42-
# """Test simple object's creation."""
43-
# class Test(object):
44-
# pass
45-
#
46-
# for x in xrange(int(5000000 * self.duration_factor)):
47-
# Test()
48-
#
49-
# def test_simple_object_factory(self, providers):
50-
# """Test simple object's factory."""
51-
# class Test(object):
52-
# pass
53-
#
54-
# test_factory = providers.Factory(Test)
55-
# for x in xrange(int(5000000 * self.duration_factor)):
56-
# test_factory()
57-
#
58-
# def test_3_ctx_positional_injections(self, providers):
59-
# """Test factory with 3 context positional injections."""
60-
# class Test(object):
61-
# def __init__(self, a, b, c):
62-
# pass
63-
#
64-
# for x in xrange(int(5000000 * self.duration_factor)):
65-
# Test(1, 2, 3)
66-
#
67-
# def test_factory_3_ctx_positional_injections(self, providers):
68-
# """Test factory with 3 context positional injections."""
69-
# class Test(object):
70-
# def __init__(self, a, b, c):
71-
# pass
72-
#
73-
# test_factory = providers.Factory(Test)
74-
# for x in xrange(int(5000000 * self.duration_factor)):
75-
# test_factory(1, 2, 3)
76-
7741
def test_raw_3_kw_injections(self, providers):
7842
"""Test 3 keyword argument injections."""
7943
class A(object):
@@ -143,55 +107,35 @@ def __init__(self, a, b, c):
143107
for x in xrange(int(5000000 * self.duration_factor)):
144108
test_factory()
145109

146-
# def test_factory_subcls_3_factory_subcls_kw_injections(self, providers):
147-
# """Test factory with 3 keyword argument injections via factories."""
148-
# class MyFactory(providers.Factory):
149-
# pass
150-
#
151-
# class A(object):
152-
# pass
153-
#
154-
# class B(object):
155-
# pass
156-
#
157-
# class C(object):
158-
# pass
159-
#
160-
# class Test(object):
161-
# def __init__(self, a, b, c):
162-
# pass
163-
#
164-
# a_factory = MyFactory(A)
165-
# b_factory = MyFactory(B)
166-
# c_factory = MyFactory(C)
167-
# test_factory = MyFactory(Test,
168-
# a=a_factory,
169-
# b=b_factory,
170-
# c=c_factory)
171-
# for x in xrange(int(5000000 * self.duration_factor)):
172-
# test_factory()
173-
174-
# def test_singleton(self, providers):
175-
# """Test factory with 3 keyword argument injections via factories."""
176-
# class Test(object):
177-
# def __init__(self):
178-
# pass
179-
#
180-
# test_factory = providers.Singleton(Test)
181-
# for x in xrange(int(5000000 * self.duration_factor)):
182-
# test_factory()
183-
#
184-
# def test_singleton_subcls(self, providers):
185-
# """Test factory with 3 keyword argument injections via factories."""
186-
# class MySingleton(providers.Singleton):
187-
# pass
188-
#
189-
# class Test(object):
190-
# pass
191-
#
192-
# test_factory = MySingleton(Test)
193-
# for x in xrange(int(5000000 * self.duration_factor)):
194-
# test_factory()
110+
def test_factory_6_factory_kw_injections_0_context(self, providers):
111+
"""Test factory with 6 keyword argument injections."""
112+
class Test(object):
113+
def __init__(self, a, b, c, d, e, f):
114+
pass
115+
116+
test_factory = providers.Factory(Test, a=1, b=2, c=3, d=4, e=5, f=6)
117+
for x in xrange(int(5000000 * self.duration_factor)):
118+
test_factory()
119+
120+
def test_factory_6_factory_kw_injections_1_context(self, providers):
121+
"""Test factory with 6 keyword argument injections."""
122+
class Test(object):
123+
def __init__(self, a, b, c, d, e, f):
124+
pass
125+
126+
test_factory = providers.Factory(Test, f=6)
127+
for x in xrange(int(5000000 * self.duration_factor)):
128+
test_factory(a=1, b=2, c=3, d=4, e=5)
129+
130+
def test_factory_6_factory_kw_injections_3_context(self, providers):
131+
"""Test factory with 6 keyword argument injections."""
132+
class Test(object):
133+
def __init__(self, a, b, c, d, e, f):
134+
pass
135+
136+
test_factory = providers.Factory(Test, a=1, b=2, c=3)
137+
for x in xrange(int(5000000 * self.duration_factor)):
138+
test_factory(d=4, e=5, f=6)
195139

196140

197141
if __name__ == '__main__':

0 commit comments

Comments
 (0)