muffin 0.101.0__tar.gz → 0.102.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,13 +1,13 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: muffin
3
- Version: 0.101.0
3
+ Version: 0.102.1
4
4
  Summary: Muffin is a fast, simple and asyncronous web-framework for Python 3 (asyncio, trio, curio)
5
5
  Home-page: https://github.com/klen/muffin
6
6
  License: MIT
7
7
  Keywords: asgi,web,web framework,asyncio,trio,curio
8
8
  Author: Kirill Klenov
9
9
  Author-email: horneds@gmail.com
10
- Requires-Python: >=3.8,<4.0
10
+ Requires-Python: >=3.9,<4.0
11
11
  Classifier: Development Status :: 5 - Production/Stable
12
12
  Classifier: Framework :: AsyncIO
13
13
  Classifier: Framework :: Trio
@@ -15,7 +15,6 @@ Classifier: Intended Audience :: Developers
15
15
  Classifier: License :: OSI Approved :: MIT License
16
16
  Classifier: Programming Language :: Python
17
17
  Classifier: Programming Language :: Python :: 3
18
- Classifier: Programming Language :: Python :: 3.8
19
18
  Classifier: Programming Language :: Python :: 3.9
20
19
  Classifier: Programming Language :: Python :: 3.10
21
20
  Classifier: Programming Language :: Python :: 3.11
@@ -23,7 +22,7 @@ Classifier: Programming Language :: Python :: 3.12
23
22
  Classifier: Programming Language :: Python :: Implementation :: PyPy
24
23
  Classifier: Topic :: Internet :: WWW/HTTP
25
24
  Provides-Extra: standard
26
- Requires-Dist: asgi-tools (>=0,<1)
25
+ Requires-Dist: asgi-tools (>=1,<2)
27
26
  Requires-Dist: gunicorn (>=20.1.0,<21.0.0) ; extra == "standard"
28
27
  Requires-Dist: modconfig (>=1,<2)
29
28
  Requires-Dist: ujson
@@ -5,7 +5,7 @@ import logging
5
5
  from contextvars import ContextVar
6
6
  from inspect import isawaitable, stack
7
7
  from logging.config import dictConfig
8
- from typing import TYPE_CHECKING, Any, Dict, Final, Mapping, Union
8
+ from typing import TYPE_CHECKING, Any, Final, Mapping, Union
9
9
 
10
10
  from asgi_tools import App as BaseApp
11
11
  from asgi_tools._compat import aio_wait
@@ -57,7 +57,7 @@ class Application(BaseApp):
57
57
  :param **options: Configuration options
58
58
 
59
59
  """
60
- self.plugins: Dict[str, BasePlugin] = {}
60
+ self.plugins: dict[str, BasePlugin] = {}
61
61
 
62
62
  # Setup the configuration
63
63
  self.cfg = Config(**self.defaults, config_config={"update_from_env": False})
@@ -3,7 +3,7 @@
3
3
  from __future__ import annotations
4
4
 
5
5
  import inspect
6
- from typing import TYPE_CHECKING, Any, Awaitable, Callable, Dict, Optional, Tuple, Type, cast
6
+ from typing import TYPE_CHECKING, Any, Awaitable, Callable, Optional, cast
7
7
 
8
8
  from asgi_tools.utils import is_awaitable
9
9
  from asgi_tools.view import HTTP_METHODS, HTTPView
@@ -20,9 +20,9 @@ if TYPE_CHECKING:
20
20
  class HandlerMeta(type):
21
21
  """Prepare handlers."""
22
22
 
23
- def __new__(mcs: Type[HandlerMeta], name: str, bases: Tuple[type], params: Dict[str, Any]):
23
+ def __new__(mcs: type[HandlerMeta], name: str, bases: tuple[type], params: dict[str, Any]):
24
24
  """Prepare a Handler Class."""
25
- cls = cast(Type["Handler"], super().__new__(mcs, name, bases, params))
25
+ cls = cast(type["Handler"], super().__new__(mcs, name, bases, params))
26
26
 
27
27
  # Ensure that the class methods are exist and iterable
28
28
  if not cls.methods:
@@ -9,7 +9,7 @@ import sys
9
9
  from contextlib import AsyncExitStack, suppress
10
10
  from importlib import metadata
11
11
  from pathlib import Path
12
- from typing import TYPE_CHECKING, AsyncContextManager, Callable, Dict, Optional, overload
12
+ from typing import TYPE_CHECKING, AsyncContextManager, Callable, Optional, overload
13
13
 
14
14
  from muffin.constants import CONFIG_ENV_VARIABLE
15
15
  from muffin.errors import AsyncRequiredError
@@ -22,7 +22,7 @@ if TYPE_CHECKING:
22
22
  from .types import TVShellCtx
23
23
 
24
24
  VERSION = metadata.version("muffin")
25
- PARAM_RE = re.compile(r"^\s+:param (\w+): (.+)$", re.M)
25
+ PARAM_RE = re.compile(r"^\s+:param (\w+): (.+)$", re.MULTILINE)
26
26
 
27
27
 
28
28
  class Manager:
@@ -70,7 +70,7 @@ class Manager:
70
70
  )
71
71
 
72
72
  self.subparsers = self.parser.add_subparsers(dest="subparser")
73
- self.commands: Dict[str, Callable] = {} # noqa: FA100
73
+ self.commands: dict[str, Callable] = {}
74
74
 
75
75
  self.shell(
76
76
  getattr(
@@ -11,7 +11,7 @@ import threading
11
11
  from collections import OrderedDict
12
12
  from contextlib import suppress
13
13
  from logging import getLogger
14
- from typing import TYPE_CHECKING, Callable, Coroutine, Dict, Iterable, TypeVar
14
+ from typing import TYPE_CHECKING, Callable, Coroutine, Iterable, TypeVar
15
15
 
16
16
  from asgi_tools.utils import is_awaitable, to_awaitable
17
17
  from sniffio import current_async_library
@@ -35,7 +35,7 @@ __all__ = (
35
35
 
36
36
  AIOLIB = threading.local()
37
37
  AIOLIB.current = None
38
- AIOLIBS: Dict[str, ModuleType] = OrderedDict()
38
+ AIOLIBS: dict[str, ModuleType] = OrderedDict()
39
39
 
40
40
  with suppress(ImportError):
41
41
  import curio
@@ -78,7 +78,7 @@ def aio_run(corofn: Callable[..., Coroutine[None, None, TV]], *args, **kwargs) -
78
78
 
79
79
  def import_submodules(
80
80
  package_name: str, *module_names: str, silent: bool = False, exclude: Iterable[str] = ()
81
- ) -> Dict[str, ModuleType]:
81
+ ) -> dict[str, ModuleType]:
82
82
  """Import all submodules by the given package name."""
83
83
  package = sys.modules[package_name]
84
84
  res = {}
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "muffin"
3
- version = "0.101.0"
3
+ version = "0.102.1"
4
4
  description = "Muffin is a fast, simple and asyncronous web-framework for Python 3 (asyncio, trio, curio)"
5
5
  readme = "README.rst"
6
6
  license = "MIT"
@@ -12,10 +12,10 @@ classifiers = [
12
12
  "License :: OSI Approved :: MIT License",
13
13
  "Programming Language :: Python",
14
14
  "Programming Language :: Python :: 3",
15
- "Programming Language :: Python :: 3.8",
16
15
  "Programming Language :: Python :: 3.9",
17
16
  "Programming Language :: Python :: 3.10",
18
17
  "Programming Language :: Python :: 3.11",
18
+ "Programming Language :: Python :: 3.12",
19
19
  "Programming Language :: Python :: Implementation :: PyPy",
20
20
  "Topic :: Internet :: WWW/HTTP",
21
21
  "Framework :: AsyncIO",
@@ -30,8 +30,8 @@ packages = [{ include = "muffin" }]
30
30
  changelog = "https://raw.githubusercontent.com/klen/muffin/master/CHANGELOG.md"
31
31
 
32
32
  [tool.poetry.dependencies]
33
- python = "^3.8"
34
- asgi-tools = "^0"
33
+ python = "^3.9"
34
+ asgi-tools = "^1"
35
35
  modconfig = "^1"
36
36
  ujson = "*"
37
37
 
@@ -77,24 +77,26 @@ ignore_missing_imports = true
77
77
 
78
78
  [tool.ruff]
79
79
  line-length = 100
80
- target-version = "py38"
80
+ target-version = "py39"
81
81
  exclude = [".venv", "docs", "example"]
82
+
83
+ [tool.ruff.lint]
82
84
  select = ["ALL"]
83
85
  ignore = ["D", "UP", "ANN", "DJ", "EM", "RSE", "SLF", "RET", "S101", "PLR2004", "N804", "COM"]
84
86
 
85
- [tool.ruff.per-file-ignores]
87
+ [tool.ruff.lint.per-file-ignores]
86
88
  "tests/*" = ["ARG", "TRY", "F", "PGH", "PLR", "PLW", "PTH", "SIM", "RET504", "T20"]
87
89
 
88
90
  [tool.black]
89
91
  line-length = 100
90
- target-version = ["py38", "py39", "py310", "py311"]
92
+ target-version = ["py39", "py310", "py311", "py312"]
91
93
  preview = true
92
94
 
93
95
  [tool.tox]
94
96
  legacy_tox_ini = """
95
97
  [tox]
96
98
  isolated_build = true
97
- envlist = py38,py39,py310,py311,pypy310
99
+ envlist = py39,py310,py311,py312,pypy310
98
100
 
99
101
  [testenv]
100
102
  allowlist_externals = poetry
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes