From 5ef7e7d79b49ad331b11da8524c698dd48552c32 Mon Sep 17 00:00:00 2001 From: Thijs Triemstra Date: Thu, 10 Aug 2017 20:01:36 +0200 Subject: [PATCH 1/2] use trafaret.IP --- demos/polls/aiohttpdemo_polls/utils.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/demos/polls/aiohttpdemo_polls/utils.py b/demos/polls/aiohttpdemo_polls/utils.py index 45688130b65..f2c2f309900 100644 --- a/demos/polls/aiohttpdemo_polls/utils.py +++ b/demos/polls/aiohttpdemo_polls/utils.py @@ -1,8 +1,5 @@ import trafaret as T - -primitive_ip_regexp = r'^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$' - TRAFARET = T.Dict({ T.Key('postgres'): T.Dict({ @@ -14,6 +11,6 @@ 'minsize': T.Int(), 'maxsize': T.Int(), }), - T.Key('host'): T.String(regex=primitive_ip_regexp), + T.Key('host'): T.IP, T.Key('port'): T.Int(), }) From 2e5688ae75b50bf19a098e330ccb4cc1e38e1587 Mon Sep 17 00:00:00 2001 From: Thijs Triemstra Date: Thu, 10 Aug 2017 20:04:33 +0200 Subject: [PATCH 2/2] Create 2187.misc --- changes/2187.misc | 1 + 1 file changed, 1 insertion(+) create mode 100644 changes/2187.misc diff --git a/changes/2187.misc b/changes/2187.misc new file mode 100644 index 00000000000..8b137891791 --- /dev/null +++ b/changes/2187.misc @@ -0,0 +1 @@ +