diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index e57b17330..fa0126157 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -23,7 +23,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] + python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"] services: redis: image: redis/redis-stack-server:latest diff --git a/chatterbot/parsing.py b/chatterbot/parsing.py index 2926866fa..98531f86e 100644 --- a/chatterbot/parsing.py +++ b/chatterbot/parsing.py @@ -730,10 +730,13 @@ def next_week_day(base_date: datetime, weekday: int) -> datetime: return day -def datetime_parsing(text: str, base_date: datetime = datetime.now()) -> list[tuple[str, datetime, tuple[int, int]]]: +def datetime_parsing(text: str, base_date: datetime = None) -> list[tuple[str, datetime, tuple[int, int]]]: """ Extract datetime objects from a string of text. """ + if base_date is None: + base_date = datetime.now() + matches = [] found_array = [] diff --git a/pyproject.toml b/pyproject.toml index 9fec33533..563cb34c7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -18,7 +18,7 @@ version = {attr = "chatterbot.__version__"} [project] name = "ChatterBot" -requires-python = ">=3.9,<3.14" +requires-python = ">=3.9,<3.15" urls = { Documentation = "https://docs.chatterbot.us", Repository = "https://github.com/gunthercox/ChatterBot", Changelog = "https://github.com/gunthercox/ChatterBot/releases" } description = "ChatterBot is a machine learning, conversational dialog engine" authors = [