Skip to content

Commit

Permalink
Merge pull request #21 from grumBit/Change-regexp-syntax
Browse files Browse the repository at this point in the history
Change regexp syntax to make ignoring case compatible with python 3.12
  • Loading branch information
grumBit authored Feb 7, 2024
2 parents 83b3424 + 4243520 commit 7cff1b9
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
5 changes: 5 additions & 0 deletions RELEASENOTES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Release History

### v1.1.11 [2024-02-08]

- Fixes;
- [Latest version 1.1.10 does not seem to work with Python 3.12](https://github.com/grumBit/aws_cron_expression_validator/issues/20)

### v1.1.10 [2024-02-01]

- Fixes;
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "aws_cron_expression_validator"
version = "1.1.10"
version = "1.1.11"
authors = [
{ name="Graham Coster", email="bitjugglers@gmail.com" },
]
Expand Down
4 changes: 2 additions & 2 deletions src/aws_cron_expression_validator/validator.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ class AWSCronExpressionValidator:
minute_values = r"(0?[0-9]|[1-5][0-9])" # [0]0-59
hour_values = r"(0?[0-9]|1[0-9]|2[0-3])" # [0]0-23
month_of_day_values = r"(0?[1-9]|[1-2][0-9]|3[0-1])" # [0]1-31
month_values = r"(?i)(0?[1-9]|1[0-2]|JAN|FEB|MAR|APR|MAY|JUN|JUL|AUG|SEP|OCT|NOV|DEC)" # [0]1-12 or JAN-DEC
day_of_week_values = r"(?i)([1-7]|SUN|MON|TUE|WED|THU|FRI|SAT)" # 1-7 or SAT-SUN
month_values = r"(?i:0?[1-9]|1[0-2]|JAN|FEB|MAR|APR|MAY|JUN|JUL|AUG|SEP|OCT|NOV|DEC)" # [0]1-12 or JAN-DEC
day_of_week_values = r"(?i:[1-7]|SUN|MON|TUE|WED|THU|FRI|SAT)" # 1-7 or SAT-SUN
day_of_week_hash = rf"({day_of_week_values}#[1-5])" # Day of the week in the Nth week of the month
year_values = r"((19[7-9][0-9])|(2[0-1][0-9][0-9]))" # 1970-2199
natural_number = r"([0-9]*[1-9][0-9]*)" # Integers greater than 0
Expand Down

0 comments on commit 7cff1b9

Please sign in to comment.