diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a4169f2..0e1826e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -8,7 +8,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ["3.12", "3.13"] + python-version: ["3.12", "3.13", "3.14"] steps: - uses: actions/checkout@v6 - name: Set up python version ${{ matrix.python-version }} for testing diff --git a/Dockerfile b/Dockerfile index e11875e..27e8ce9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ ARG EXTENSIONS="prometheus" # space delimited string -FROM python:3.13-alpine +FROM python:3.14-alpine ARG EXTENSIONS diff --git a/log_parser/log_parser.py b/log_parser/log_parser.py index 1b9c616..9acf42f 100644 --- a/log_parser/log_parser.py +++ b/log_parser/log_parser.py @@ -1,4 +1,5 @@ import asyncio +import inspect import logging import os from collections.abc import Callable @@ -88,7 +89,7 @@ async def track_file( if file_state == _FileState.NOCHANGE: async for line in log_io: for line_parser in line_parsers: - if asyncio.iscoroutinefunction(line_parser): + if inspect.iscoroutinefunction(line_parser): await line_parser(line) else: line_parser(line) diff --git a/pyproject.toml b/pyproject.toml index f79a5f5..56d4b1b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "log_parser" -version = "1.1.1" +version = "1.2.0" description = "A simple asynchronous log file parsing library" readme = "README.md" requires-python = ">=3.12" @@ -17,6 +17,7 @@ classifiers = [ "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", + "Programming Language :: Python :: 3.14", "Programming Language :: Python :: 3 :: Only", ] dependencies = ["anyio~=4.13.0"]