Drop regexes lib (#258)
This was needed until #227 as the Ruby script did not support multiple regexes. Now that all regexes has been split / simplified in https://github.com/endoflife-date/endoflife.date/pull/4317 and https://github.com/endoflife-date/endoflife.date/pull/4383 the regexes lib is not needed anymore.
This commit is contained in:
@@ -5,7 +5,6 @@ packaging==23.2 # used in latest.py
|
||||
pre-commit==3.5.0 # used to check code before commit
|
||||
python-frontmatter==1.0.1 # used in endoflife.py to parse products YAML frontmatters
|
||||
python-liquid==1.10.0 # used in endoflife.py to render version templates
|
||||
regex==2023.10.3 # used in endoflife.py instead of re to support identically named groups
|
||||
requests==2.31.0 # used in http.py to make HTTP requests simpler
|
||||
requests-html==0.10.0 # used by a few scripts to parse html that needs javascript to be rendered
|
||||
requests-futures==1.0.1 # used in http.py to be able to make async HTTP requests
|
||||
|
||||
@@ -2,7 +2,7 @@ import frontmatter
|
||||
import json
|
||||
import logging
|
||||
import os
|
||||
import regex as re # Python re module does not support identically named groups (as used in the mariadb product)
|
||||
import re
|
||||
from datetime import datetime
|
||||
from glob import glob
|
||||
from liquid import Template
|
||||
@@ -26,7 +26,6 @@ class AutoConfig:
|
||||
|
||||
regexes = config.get("regex", DEFAULT_VERSION_REGEX)
|
||||
regexes = regexes if isinstance(regexes, list) else [regexes]
|
||||
regexes = [regex.replace("(?<", "(?P<") for regex in regexes] # convert ruby to python regex
|
||||
self.version_patterns = [re.compile(regex) for regex in regexes]
|
||||
|
||||
def first_match(self, version: str) -> re.Match:
|
||||
|
||||
Reference in New Issue
Block a user