diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index bfe1b2b..2e0a6b9 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -9,7 +9,7 @@ jobs: runs-on: ubuntu-22.04 strategy: matrix: - python-version: ['3.7', '3.8', '3.9', '3.10', '3.11'] + python-version: ['3.8', '3.9', '3.10', '3.11', '3.12'] steps: - uses: actions/checkout@v1 diff --git a/.gitignore b/.gitignore index f2ee7f9..384189a 100644 --- a/.gitignore +++ b/.gitignore @@ -5,6 +5,7 @@ __pycache__ htmlcov .coverage .tox +.idea *.egg-info build/* dist/* diff --git a/logtail/compat.py b/logtail/compat.py index 1a4f794..4ff47e8 100644 --- a/logtail/compat.py +++ b/logtail/compat.py @@ -4,4 +4,4 @@ try: import queue except ImportError: - import Queue as queue + import Queue as queue # type: ignore[import-not-found, no-redef] diff --git a/mypy.ini b/mypy.ini new file mode 100644 index 0000000..515be77 --- /dev/null +++ b/mypy.ini @@ -0,0 +1,2 @@ +[mypy] +files = logtail diff --git a/py.typed b/py.typed new file mode 100644 index 0000000..e69de29 diff --git a/setup.py b/setup.py index dd33b5e..fb7f3a8 100644 --- a/setup.py +++ b/setup.py @@ -34,11 +34,11 @@ 'License :: OSI Approved :: ISC License (ISCL)', 'Operating System :: OS Independent', 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.7', 'Programming Language :: Python :: 3.8', 'Programming Language :: Python :: 3.9', 'Programming Language :: Python :: 3.10', 'Programming Language :: Python :: 3.11', + 'Programming Language :: Python :: 3.12', 'Programming Language :: Python', 'Topic :: Software Development :: Libraries :: Python Modules', ], diff --git a/test-requirements.txt b/test-requirements.txt index bcd0654..035c9cb 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -2,3 +2,7 @@ coverage>=3.7.1 httpretty>=0.9.4 nose-py3 mock>=1.0.1 +mypy>=1.13.0 +types-setuptools>=75.2.0.20241019 +msgpack-types>=0.5.0 +types-requests>=2.32.0.20241016 diff --git a/tox.ini b/tox.ini index fe5ded1..b596bd8 100644 --- a/tox.ini +++ b/tox.ini @@ -1,13 +1,13 @@ [tox] -envlist = py37, py38, py39, py310, py311 +envlist = py38, py39, py310, py311, py312 [gh-actions] python = - 3.7: py37 3.8: py38 3.9: py39 3.10: py310 3.11: py311 + 3.12: py312 [testenv] deps = @@ -15,3 +15,4 @@ deps = -rrequirements.txt commands = nosetests --with-coverage --cover-branches --cover-package=logtail + mypy logtail