Skip to content

Commit 0ac6d94

Browse files
committed
Fixed critical issue that lead to deletion of non-empty domain router
+ Upgraded version to 1.3.0 & added version constant
1 parent 840e4c9 commit 0ac6d94

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

aiohttp_dynamic/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,5 @@
1515
# import public classes
1616
from .routing import AbstractPathRouter, PlainPathRouter, DynamicPathRouter, DomainRouter, DynamicRouter, Handler
1717
from .middlewares import DynamicMiddleware
18+
19+
VERSION = '1.3.0'

aiohttp_dynamic/routing.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -881,7 +881,7 @@ def del_handler(self, method: str, path: str, domain: str = '*') -> bool:
881881
domain_router.del_router(path)
882882

883883
# Try to remove empty domain router
884-
if len(domain_router.routes):
884+
if len(domain_router.routes) == 0:
885885
self.del_domain(domain)
886886

887887
return True

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
setup(
44
name = 'aiohttp_dynamic',
55
packages = ['aiohttp_dynamic'],
6-
version = '1.2.0',
6+
version = '1.3.0',
77
license='Apache License 2.0',
88
description = 'aiohttp extension for creating and modifying dynamic routes in runtime',
99
author = 'bitrate16',

0 commit comments

Comments
 (0)