• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

ets-labs / python-dependency-injector / 9377728356

05 Jun 2024 03:28AM UTC coverage: 0.0% (-92.0%) from 92.016%
9377728356

Pull #765

github

web-flow
Merge cabf68efc into cc2304e46
Pull Request #765: Add Python 3.12 Support (#752)

0 of 764 relevant lines covered (0.0%)

0.0 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/dependency_injector/ext/aiohttp.py
1
"""Aiohttp extension module."""
2

3
from __future__ import absolute_import
×
4

5
import functools
×
6
import warnings
×
7

8
from dependency_injector import providers
×
9

10

11
warnings.warn(
×
12
    'Module "dependency_injector.ext.aiohttp" is deprecated since '
13
    'version 4.0.0. Use "dependency_injector.wiring" module instead.',
14
    category=DeprecationWarning,
15
)
16

17

18
class Application(providers.Singleton):
×
19
    """Aiohttp application provider."""
20

21

22
class Extension(providers.Singleton):
×
23
    """Aiohttp extension provider."""
24

25

26
class Middleware(providers.DelegatedCallable):
×
27
    """Aiohttp middleware provider."""
28

29
    __middleware_version__ = 1
×
30

31

32
class MiddlewareFactory(providers.Factory):
×
33
    """Aiohttp middleware factory provider."""
34

35

36
class View(providers.Callable):
×
37
    """Aiohttp view provider."""
38

39
    def as_view(self):
×
40
        """Return aiohttp view function."""
41
        @functools.wraps(self.provides)
×
42
        async def _view(request, *args, **kwargs):
×
43
            return await self.__call__(request, *args, **kwargs)
×
44
        return _view
×
45

46

47
class ClassBasedView(providers.Factory):
×
48
    """Aiohttp class-based view provider."""
49

50
    def as_view(self):
×
51
        """Return aiohttp view function."""
52
        async def _view(request, *args, **kwargs):
×
53
            return await self.__call__(request, *args, **kwargs)
×
54
        return _view
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc