From bb03f7c41a89ff4a2f71c0e58091b7246358b3dd Mon Sep 17 00:00:00 2001 From: Michal Horejsek Date: Sun, 16 Jun 2024 19:33:20 +0200 Subject: [PATCH] Improved regexp for ipv4 format to comfort test suite --- CHANGELOG.txt | 1 + fastjsonschema/draft04.py | 2 +- tests/json_schema/test_draft04.py | 1 - tests/json_schema/test_draft06.py | 1 - tests/json_schema/test_draft07.py | 2 +- tests/json_schema/test_draft2019.py | 1 - 6 files changed, 3 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 25a25d8..db53c99 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -6,6 +6,7 @@ * Fixed that everything with empty `not` is invalid * Improved regexp for email format to comfort test suite * Improved regexp for date format to comfort test suite +* Improved regexp for ipv4 format to comfort test suite === 2.20.0 (2024-06-15) diff --git a/fastjsonschema/draft04.py b/fastjsonschema/draft04.py index cf6cd8f..e4cf74a 100644 --- a/fastjsonschema/draft04.py +++ b/fastjsonschema/draft04.py @@ -29,7 +29,7 @@ class CodeGeneratorDraft04(CodeGenerator): 'date-time': r'^\d{4}-[01]\d-[0-3]\d(t|T)[0-2]\d:[0-5]\d:[0-5]\d(?:\.\d+)?(?:[+-][0-2]\d:[0-5]\d|[+-][0-2]\d[0-5]\d|z|Z)\Z', 'email': r'^(?!.*\.\..*@)[^@.][^@]*(?