diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 2898c57cb..08df8e873 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -9,7 +9,7 @@ // Update 'VARIANT' to pick a Python version: 3, 3.10, 3.9, 3.8, 3.7, 3.6 // Append -bullseye or -buster to pin to an OS version. // Use -bullseye variants on local on arm64/Apple Silicon. - "VARIANT": "3.11", + "VARIANT": "3.12", // Options "NODE_VERSION": "none" } @@ -40,4 +40,4 @@ // "postCreateCommand": "pip3 install --user -r requirements.txt", // Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root. "remoteUser": "vscode" -} +} \ No newline at end of file diff --git a/.dockerignore b/.dockerignore index b8c474012..dc9372d52 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,7 +1,6 @@ .devcontainer .github .venv -.semgrep_rules .vscode htmlcov logs diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a3ad84dce..da67a0172 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,7 +13,7 @@ jobs: strategy: matrix: - python-version: ["3.9"] + python-version: ["3.10"] steps: - uses: actions/checkout@v3 @@ -56,7 +56,7 @@ jobs: strategy: matrix: - python-version: ["3.9", "3.10", "3.11"] + python-version: ["3.10", "3.11", "3.12"] steps: - uses: actions/checkout@v3 @@ -88,7 +88,7 @@ jobs: strategy: matrix: - python-version: ["3.9"] + python-version: ["3.10"] steps: - uses: actions/checkout@v3 @@ -117,7 +117,7 @@ jobs: strategy: matrix: - python-version: ["3.9"] + python-version: ["3.10"] steps: - uses: actions/checkout@v3 @@ -158,14 +158,10 @@ jobs: - name: Upload coverage reports to Codecov with GitHub Action uses: codecov/codecov-action@v2 - - name: Check semgrep rules - if: steps.changed-files.outputs.all_changed_files - run: semgrep -c .semgrep_rules -c r/python --error --skip-unknown-extensions ${{ steps.changed-files.outputs.all_changed_files }} - containerbuild: strategy: matrix: - python-version: ["3.9", "3.10", "3.11"] + python-version: ["3.10", "3.11", "3.12"] runs-on: ubuntu-latest steps: diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index bb315fc9a..6d3cdeb49 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -11,7 +11,7 @@ jobs: strategy: matrix: - python-version: ["3.9"] + python-version: ["3.10"] steps: - uses: actions/checkout@v3 @@ -54,7 +54,7 @@ jobs: strategy: matrix: - python-version: ["3.9", "3.10", "3.11"] + python-version: ["3.10", "3.11", "3.12"] steps: - uses: actions/checkout@v3 @@ -86,7 +86,7 @@ jobs: strategy: matrix: - python-version: ["3.9"] + python-version: ["3.10"] steps: - uses: actions/checkout@v3 @@ -127,7 +127,3 @@ jobs: - name: Upload coverage reports to Codecov with GitHub Action uses: codecov/codecov-action@v2 - - - name: Check semgrep rules - if: steps.changed-files.outputs.all_changed_files - run: semgrep -c .semgrep_rules -c r/python --error --skip-unknown-extensions ${{ steps.changed-files.outputs.all_changed_files }} diff --git a/.github/workflows/publish-latest-dev-release-to-pypi.yml b/.github/workflows/publish-latest-dev-release-to-pypi.yml index 5e9fac4cc..c80893953 100644 --- a/.github/workflows/publish-latest-dev-release-to-pypi.yml +++ b/.github/workflows/publish-latest-dev-release-to-pypi.yml @@ -17,7 +17,7 @@ jobs: - name: Initialize Python uses: actions/setup-python@v1 with: - python-version: 3.9 + python-version: 3.10 - name: Install dependencies run: | @@ -39,7 +39,7 @@ jobs: containerbuild: strategy: matrix: - python-version: ["3.9", "3.10", "3.11"] + python-version: ["3.10", "3.11", "3.12"] runs-on: ubuntu-latest steps: diff --git a/.github/workflows/publish-release-to-pypi.yml b/.github/workflows/publish-release-to-pypi.yml index eb7166bfa..03837bbdd 100644 --- a/.github/workflows/publish-release-to-pypi.yml +++ b/.github/workflows/publish-release-to-pypi.yml @@ -16,7 +16,7 @@ jobs: - name: Initialize Python uses: actions/setup-python@v1 with: - python-version: 3.9 + python-version: 3.10 cache: "pip" - name: Install dependencies @@ -55,7 +55,7 @@ jobs: containerbuild: strategy: matrix: - python-version: ["3.9", "3.10", "3.11"] + python-version: ["3.10", "3.11", "3.12"] runs-on: ubuntu-latest needs: publish-latest-release-to-pypi diff --git a/.readthedocs.yaml b/.readthedocs.yaml index 2daba0585..b9163f614 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -11,7 +11,7 @@ build: apt_packages: - "pandoc" tools: - python: "3.9" + python: "3.10" # You can also specify other tool versions: # nodejs: "16" # rust: "1.55" diff --git a/.semgrep_rules/logprep_specific/processor-rules.yml b/.semgrep_rules/logprep_specific/processor-rules.yml deleted file mode 100644 index 06fb037ad..000000000 --- a/.semgrep_rules/logprep_specific/processor-rules.yml +++ /dev/null @@ -1,39 +0,0 @@ -rules: - - id: processor-implements-apply-rules-method - message: Processor must implement apply_rules method - severity: INFO - languages: [python] - patterns: - - pattern: | - class $X(Processor): - ... - - pattern-not: | - class $X(Processor): - def _apply_rules(...): - ... - - - id: processor-iterates-over-rules-in-apply-rules-method - message: Processor should use the process method to iterate over rules - severity: INFO - languages: [python] - patterns: - - pattern: | - class $X(Processor): - def _apply_rules(...): - ... - for rule in ...: - ... - - - id: processor-initialized-without-configuration-dict - message: Processor should be initialized with name, configuration and logger - severity: INFO - languages: [python] - patterns: - - pattern: | - class $X(Processor): - def __init__(self,...): - ... - - pattern-not: | - class $X(Processor): - def __init__(self, name, configuration, logger): - ... diff --git a/.semgrepignore b/.semgrepignore deleted file mode 100644 index 145f5d746..000000000 --- a/.semgrepignore +++ /dev/null @@ -1 +0,0 @@ -test_* diff --git a/.vscode/settings.json b/.vscode/settings.json index 770a06c10..295cdc3c6 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,10 +1,6 @@ { "python.testing.pytestEnabled": true, "python.testing.unittestEnabled": false, - "python.testing.pytestArgs": [ - "tests", - "-v", - ], "python.analysis.importFormat": "absolute", "editor.formatOnSave": true, "editor.rulers": [ @@ -36,4 +32,4 @@ "editor.defaultFormatter": "ms-python.black-formatter", "editor.formatOnSave": true }, -} \ No newline at end of file +} diff --git a/CHANGELOG.md b/CHANGELOG.md index b4d2fd8c4..978483f68 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -24,6 +24,7 @@ - removed `max_caching_days` config option - add `max_cached_pseudonymized_urls` config option which defaults to 1000 - add lru caching for peudonymizatin of urls +* add support for python 3.12 and remove support for python 3.9 ### Bugfix diff --git a/Dockerfile b/Dockerfile index 75fe27929..46b6c22fe 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -ARG PYTHON_VERSION=3.9 +ARG PYTHON_VERSION=3.10 FROM python:${PYTHON_VERSION}-bullseye as build ARG LOGPREP_VERSION=latest @@ -11,7 +11,7 @@ WORKDIR /logprep RUN python -m venv /opt/venv # Make sure we use the virtualenv: ENV PATH="/opt/venv/bin:$PATH" -RUN python -m pip install --upgrade pip wheel +RUN python -m pip install --upgrade pip wheel setuptools RUN if [ "$LOGPREP_VERSION" = "dev" ]; then python setup.py sdist bdist_wheel && pip install ./dist/logprep-*.whl;\ elif [ "$LOGPREP_VERSION" = "latest" ]; then pip install git+https://github.com/fkie-cad/Logprep.git@latest; \ diff --git a/README.md b/README.md index c86d72de4..6be7777fb 100644 --- a/README.md +++ b/README.md @@ -236,7 +236,7 @@ Details about the rule language and how to write rules for the processors can be ### Installation -Python should be present on the system, currently supported are the versions 3.9 - 3.11. +Python should be present on the system, currently supported are the versions 3.10 - 3.12. To install Logprep you have following options: @@ -283,16 +283,16 @@ Those can be executed via: `tox -e [name of the test environment]`. For Example: ``` -tox -e py39-all +tox -e py310-all ``` This runs all tests, calculates the test coverage and evaluates the code quality for the python -3.9 version. +3.10 version. Multiple environments can be tested within one call: ``` -tox -e py39-all -e py310-all -e py311-all +tox -e py310-all -e py311-all -e py312-all ``` If you want to run them in parallel attach the option `-p`. @@ -308,21 +308,7 @@ tox -av In case the requirements change, the test environments must be rebuilt with the parameter `-r`: ``` -tox -e py39 -e py310 -e py311 -r -``` - -### Semgrep - -If you want to run semgrep rules run - -``` -pip install semgrep -``` - -Afterwards you can just call the tox environment with for example - -``` -tox -e py39-semgrep +tox -e py310 -e py311 -e py312 -r ``` ### Running Logprep @@ -479,7 +465,7 @@ Building the documentation is done by executing the following command from withi the project root directory: ``` -tox -e py39-docs +tox -e py310-docs ``` A HTML documentation can be then found in `doc/_build/html/index.html`. diff --git a/doc/source/getting_started.rst b/doc/source/getting_started.rst index d17a60b59..5f5a63afe 100644 --- a/doc/source/getting_started.rst +++ b/doc/source/getting_started.rst @@ -5,7 +5,7 @@ Getting Started Installation ============ -Python should be present on the system. Currently, Python 3.9 - 3.11 are supported. +Python should be present on the system. Currently, Python 3.10 - 3.12 are supported. To install Logprep you have following options: **1. Option:** Installation via PyPI: diff --git a/pyproject.toml b/pyproject.toml index 99ee5f2d2..88b236eff 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.black] line-length = 100 -target-version = ['py39', 'py310', 'py311'] +target-version = ['py310', 'py311', 'py312'] [tool.isort] profile = "black" diff --git a/requirements.in b/requirements.in index 138d52dc4..2d2d04bc5 100644 --- a/requirements.in +++ b/requirements.in @@ -11,7 +11,7 @@ hyperscan>=0.4.0; sys_platform == 'linux' and platform_machine == 'x86_64' jsonref luqum mysql-connector-python -numpy>=1.24.1 +numpy>=1.26.0 opensearch-py prometheus_client protobuf>=3.20.2 diff --git a/requirements.txt b/requirements.txt index a35ea88cb..8c4d36bed 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,10 +1,10 @@ # -# This file is autogenerated by pip-compile with Python 3.9 +# This file is autogenerated by pip-compile with Python 3.12 # by the following command: # # pip-compile ./requirements.in # -aiohttp==3.8.6 +aiohttp==3.9.0 # via # -r ./requirements.in # geoip2 @@ -16,45 +16,39 @@ anyio==3.7.1 # via # fastapi # starlette -async-timeout==4.0.3 - # via aiohttp attrs==23.1.0 # via # -r ./requirements.in # aiohttp -boto3==1.28.62 +boto3==1.29.4 # via -r ./requirements.in -botocore==1.31.62 +botocore==1.32.4 # via # boto3 # s3transfer -certifi==2023.7.22 +certifi==2023.11.17 # via # -r ./requirements.in # elasticsearch # opensearch-py # requests -charset-normalizer==3.3.0 - # via - # aiohttp - # requests -ciso8601==2.3.0 +charset-normalizer==3.3.2 + # via requests +ciso8601==2.3.1 # via -r ./requirements.in click==8.1.7 # via uvicorn colorama==0.4.6 # via -r ./requirements.in -confluent-kafka==2.2.0 +confluent-kafka==2.3.0 # via -r ./requirements.in -deepdiff==6.6.0 +deepdiff==6.7.1 # via -r ./requirements.in elasticsearch==7.17.9 # via -r ./requirements.in -exceptiongroup==1.1.3 - # via anyio -fastapi==0.103.2 +fastapi==0.104.1 # via -r ./requirements.in -filelock==3.12.4 +filelock==3.13.1 # via # tldextract # urlextract @@ -66,7 +60,7 @@ geoip2==4.7.0 # via -r ./requirements.in h11==0.14.0 # via uvicorn -hyperscan==0.5.0 ; sys_platform == "linux" and platform_machine == "x86_64" +hyperscan==0.6.0 ; sys_platform == "linux" and platform_machine == "x86_64" # via -r ./requirements.in idna==3.4 # via @@ -87,7 +81,7 @@ jsonref==1.1.0 # via -r ./requirements.in luqum==0.13.0 # via -r ./requirements.in -maxminddb==2.4.0 +maxminddb==2.5.1 # via geoip2 msgspec==0.18.4 # via -r ./requirements.in @@ -95,22 +89,22 @@ multidict==6.0.4 # via # aiohttp # yarl -mysql-connector-python==8.1.0 +mysql-connector-python==8.2.0 # via -r ./requirements.in -numpy==1.26.0 +numpy==1.26.2 # via # -r ./requirements.in # scikit-learn # scipy -opensearch-py==2.3.1 +opensearch-py==2.4.2 # via -r ./requirements.in ordered-set==4.1.0 # via deepdiff -platformdirs==3.11.0 +platformdirs==4.0.0 # via urlextract ply==3.11 # via luqum -prometheus-client==0.17.1 +prometheus-client==0.19.0 # via -r ./requirements.in protobuf==4.21.12 # via @@ -118,9 +112,9 @@ protobuf==4.21.12 # mysql-connector-python pycryptodome==3.19.0 # via -r ./requirements.in -pydantic==2.4.2 +pydantic==2.5.1 # via fastapi -pydantic-core==2.10.1 +pydantic-core==2.14.3 # via pydantic pygrok==1.0.0 # via -r ./requirements.in @@ -145,7 +139,7 @@ requests==2.31.0 # tldextract requests-file==1.5.1 # via tldextract -ruamel-yaml==0.17.35 +ruamel-yaml==0.18.5 # via -r ./requirements.in ruamel-yaml-clib==0.2.8 # via ruamel-yaml @@ -153,9 +147,9 @@ s3transfer==0.7.0 # via boto3 schedule==1.2.1 # via -r ./requirements.in -scikit-learn==1.3.1 +scikit-learn==1.3.2 # via -r ./requirements.in -scipy==1.11.3 +scipy==1.11.4 # via # -r ./requirements.in # scikit-learn @@ -170,29 +164,30 @@ starlette==0.27.0 # via fastapi threadpoolctl==3.2.0 # via scikit-learn -tldextract==3.6.0 +tldextract==5.1.1 # via -r ./requirements.in typing-extensions==4.8.0 # via # fastapi # pydantic # pydantic-core - # starlette - # uvicorn uritools==4.0.2 # via urlextract urlextract==1.8.0 # via -r ./requirements.in -urllib3==1.26.17 +urllib3==1.26.18 # via # -r ./requirements.in # botocore # elasticsearch # opensearch-py # requests -uvicorn==0.23.2 +uvicorn==0.24.0.post1 # via -r ./requirements.in -wheel==0.41.2 +wheel==0.41.3 # via -r ./requirements.in -yarl==1.9.2 +yarl==1.9.3 # via aiohttp + +# The following packages are considered to be unsafe in a requirements file: +# setuptools diff --git a/requirements_dev.in b/requirements_dev.in index c6b776b68..23faf2c5f 100644 --- a/requirements_dev.in +++ b/requirements_dev.in @@ -6,5 +6,4 @@ pylint pytest pytest-cov responses -semgrep jinja2 diff --git a/requirements_dev.txt b/requirements_dev.txt index 9b9d6a180..6d4f0607c 100644 --- a/requirements_dev.txt +++ b/requirements_dev.txt @@ -1,10 +1,10 @@ # -# This file is autogenerated by pip-compile with Python 3.9 +# This file is autogenerated by pip-compile with Python 3.12 # by the following command: # # pip-compile ./requirements_dev.in # -aiohttp==3.8.6 +aiohttp==3.9.0 # via # -r ./requirements.txt # geoip2 @@ -20,39 +20,24 @@ anyio==3.7.1 # via # -r ./requirements.txt # fastapi - # httpcore + # httpx # starlette -astroid==3.0.0 +astroid==3.0.1 # via pylint -async-timeout==4.0.3 - # via - # -r ./requirements.txt - # aiohttp attrs==23.1.0 # via # -r ./requirements.txt # aiohttp - # glom - # jsonschema - # referencing - # semgrep -black==23.9.1 +black==23.11.0 # via -r ./requirements_dev.in -boltons==21.0.0 - # via - # face - # glom - # semgrep -boto3==1.28.62 +boto3==1.29.4 # via -r ./requirements.txt -botocore==1.31.62 +botocore==1.32.4 # via # -r ./requirements.txt # boto3 # s3transfer -bracex==2.4 - # via wcmatch -certifi==2023.7.22 +certifi==2023.11.17 # via # -r ./requirements.txt # elasticsearch @@ -60,48 +45,32 @@ certifi==2023.7.22 # httpx # opensearch-py # requests -charset-normalizer==3.3.0 +charset-normalizer==3.3.2 # via # -r ./requirements.txt - # aiohttp # requests -ciso8601==2.3.0 +ciso8601==2.3.1 # via -r ./requirements.txt click==8.1.7 # via # -r ./requirements.txt # black - # click-option-group - # semgrep # uvicorn -click-option-group==0.5.6 - # via semgrep colorama==0.4.6 - # via - # -r ./requirements.txt - # semgrep -confluent-kafka==2.2.0 + # via -r ./requirements.txt +confluent-kafka==2.3.0 # via -r ./requirements.txt coverage[toml]==7.3.2 # via pytest-cov -deepdiff==6.6.0 +deepdiff==6.7.1 # via -r ./requirements.txt -defusedxml==0.7.1 - # via semgrep dill==0.3.7 # via pylint elasticsearch==7.17.9 # via -r ./requirements.txt -exceptiongroup==1.1.3 - # via - # -r ./requirements.txt - # anyio - # pytest -face==22.0.0 - # via glom -fastapi==0.103.2 +fastapi==0.104.1 # via -r ./requirements.txt -filelock==3.12.4 +filelock==3.13.1 # via # -r ./requirements.txt # tldextract @@ -113,18 +82,16 @@ frozenlist==1.4.0 # aiosignal geoip2==4.7.0 # via -r ./requirements.txt -glom==22.1.0 - # via semgrep h11==0.14.0 # via # -r ./requirements.txt # httpcore # uvicorn -httpcore==0.18.0 +httpcore==1.0.2 # via httpx -httpx==0.25.0 +httpx==0.25.1 # via -r ./requirements_dev.in -hyperscan==0.5.0 ; sys_platform == "linux" and platform_machine == "x86_64" +hyperscan==0.6.0 ; sys_platform == "linux" and platform_machine == "x86_64" # via -r ./requirements.txt idna==3.4 # via @@ -154,24 +121,16 @@ joblib==1.3.2 # scikit-learn jsonref==1.1.0 # via -r ./requirements.txt -jsonschema==4.19.1 - # via semgrep -jsonschema-specifications==2023.7.1 - # via jsonschema luqum==0.13.0 # via -r ./requirements.txt -markdown-it-py==3.0.0 - # via rich markupsafe==2.1.3 # via jinja2 -maxminddb==2.4.0 +maxminddb==2.5.1 # via # -r ./requirements.txt # geoip2 mccabe==0.7.0 # via pylint -mdurl==0.1.2 - # via markdown-it-py msgspec==0.18.4 # via -r ./requirements.txt multidict==6.0.4 @@ -181,14 +140,14 @@ multidict==6.0.4 # yarl mypy-extensions==1.0.0 # via black -mysql-connector-python==8.1.0 +mysql-connector-python==8.2.0 # via -r ./requirements.txt -numpy==1.26.0 +numpy==1.26.2 # via # -r ./requirements.txt # scikit-learn # scipy -opensearch-py==2.3.1 +opensearch-py==2.4.2 # via -r ./requirements.txt ordered-set==4.1.0 # via @@ -198,12 +157,9 @@ packaging==23.2 # via # black # pytest - # semgrep pathspec==0.11.2 # via black -peewee==3.16.3 - # via semgrep -platformdirs==3.11.0 +platformdirs==4.0.0 # via # -r ./requirements.txt # black @@ -215,7 +171,7 @@ ply==3.11 # via # -r ./requirements.txt # luqum -prometheus-client==0.17.1 +prometheus-client==0.19.0 # via -r ./requirements.txt protobuf==4.21.12 # via @@ -223,23 +179,21 @@ protobuf==4.21.12 # mysql-connector-python pycryptodome==3.19.0 # via -r ./requirements.txt -pydantic==2.4.2 +pydantic==2.5.1 # via # -r ./requirements.txt # fastapi -pydantic-core==2.10.1 +pydantic-core==2.14.3 # via # -r ./requirements.txt # pydantic -pygments==2.16.1 - # via rich pygrok==1.0.0 # via -r ./requirements.txt -pylint==3.0.1 +pylint==3.0.2 # via -r ./requirements_dev.in pyparsing==3.1.1 # via -r ./requirements.txt -pytest==7.4.2 +pytest==7.4.3 # via # -r ./requirements_dev.in # pytest-cov @@ -250,18 +204,12 @@ python-dateutil==2.8.2 # -r ./requirements.txt # botocore # opensearch-py -python-lsp-jsonrpc==1.0.0 - # via semgrep pytz==2023.3.post1 # via -r ./requirements.txt pyyaml==6.0.1 # via # -r ./requirements.txt # responses -referencing==0.30.2 - # via - # jsonschema - # jsonschema-specifications regex==2023.10.3 # via # -r ./requirements.txt @@ -273,24 +221,15 @@ requests==2.31.0 # opensearch-py # requests-file # responses - # semgrep # tldextract requests-file==1.5.1 # via # -r ./requirements.txt # tldextract -responses==0.23.3 +responses==0.24.1 # via -r ./requirements_dev.in -rich==13.6.0 - # via semgrep -rpds-py==0.10.4 - # via - # jsonschema - # referencing -ruamel-yaml==0.17.35 - # via - # -r ./requirements.txt - # semgrep +ruamel-yaml==0.18.5 + # via -r ./requirements.txt ruamel-yaml-clib==0.2.8 # via # -r ./requirements.txt @@ -301,14 +240,12 @@ s3transfer==0.7.0 # boto3 schedule==1.2.1 # via -r ./requirements.txt -scikit-learn==1.3.1 +scikit-learn==1.3.2 # via -r ./requirements.txt -scipy==1.11.3 +scipy==1.11.4 # via # -r ./requirements.txt # scikit-learn -semgrep==1.43.0 - # via -r ./requirements_dev.in six==1.16.0 # via # -r ./requirements.txt @@ -319,7 +256,6 @@ sniffio==1.3.0 # via # -r ./requirements.txt # anyio - # httpcore # httpx starlette==0.27.0 # via @@ -329,40 +265,23 @@ threadpoolctl==3.2.0 # via # -r ./requirements.txt # scikit-learn -tldextract==3.6.0 +tldextract==5.1.1 # via -r ./requirements.txt -tomli==2.0.1 - # via - # black - # coverage - # pylint - # pytest - # semgrep -tomlkit==0.12.1 +tomlkit==0.12.3 # via pylint -types-pyyaml==6.0.12.12 - # via responses typing-extensions==4.8.0 # via # -r ./requirements.txt - # astroid - # black # fastapi # pydantic # pydantic-core - # pylint - # semgrep - # starlette - # uvicorn -ujson==5.8.0 - # via python-lsp-jsonrpc uritools==4.0.2 # via # -r ./requirements.txt # urlextract urlextract==1.8.0 # via -r ./requirements.txt -urllib3==1.26.17 +urllib3==1.26.18 # via # -r ./requirements.txt # botocore @@ -370,14 +289,14 @@ urllib3==1.26.17 # opensearch-py # requests # responses - # semgrep -uvicorn==0.23.2 +uvicorn==0.24.0.post1 # via -r ./requirements.txt -wcmatch==8.5 - # via semgrep -wheel==0.41.2 +wheel==0.41.3 # via -r ./requirements.txt -yarl==1.9.2 +yarl==1.9.3 # via # -r ./requirements.txt # aiohttp + +# The following packages are considered to be unsafe in a requirements file: +# setuptools diff --git a/setup.py b/setup.py index 13abf93c4..8f23f59ec 100644 --- a/setup.py +++ b/setup.py @@ -1,7 +1,7 @@ # pylint: disable=missing-module-docstring from pathlib import Path -from setuptools import setup, find_packages +from setuptools import find_packages, setup import versioneer @@ -36,7 +36,7 @@ packages=find_packages(), include_package_data=True, install_requires=["setuptools"] + requirements, - python_requires=">=3.9", + python_requires=">=3.10", entry_points={ "console_scripts": [ "logprep = logprep.run_logprep:main", diff --git a/tox.ini b/tox.ini index 0a5d54e90..332e4b002 100644 --- a/tox.ini +++ b/tox.ini @@ -1,12 +1,12 @@ [tox] -envlist = py{39,310,311} +envlist = py{310,311,312} minversion = 3.9 [testenv] deps = -rrequirements_dev.txt -[testenv:py{39,310,311}-unit] +[testenv:py{310,311,312}-unit] description = Run unit-tests usedevelop = True deps = {[testenv]deps} @@ -14,7 +14,7 @@ commands = pytest -vv tests/unit {posargs} -[testenv:py{39,310,311}-acceptance] +[testenv:py{310,311,312}-acceptance] description = Run acceptance-tests usedevelop = True deps = @@ -24,7 +24,7 @@ commands = pytest -vv -s tests/acceptance {posargs} -[testenv:py{39,310,311}-lint] +[testenv:py{310,311,312}-lint] description = Run pylint to determine code-quality usedevelop = True deps = pylint @@ -34,15 +34,7 @@ commands = - pylint logprep -[testenv:py{37,38,39}-semgrep] -description = Run semgrep to detect any code issues -usedevelop = True -deps = semgrep -commands = - semgrep -c .semgrep_rules -c r/python --error --emacs - - -[testenv:py{39,310,311}-docs] +[testenv:py{310,311,312}-docs] description = Build sphinx HTML documentation changedir = doc usedevelop = True @@ -54,7 +46,7 @@ commands = sphinx-apidoc -fT -o source/module_reference ../logprep make clean html -[testenv:py{39,310,311}-all] +[testenv:py{310,311,312}-all] description = Run all tests with coverage and lint usedevelop = True deps = diff --git a/versioneer.py b/versioneer.py index 5715279ab..0e28fb52d 100644 --- a/versioneer.py +++ b/versioneer.py @@ -1,3 +1,4 @@ +# pylint:disable-all # Version: 0.22 """The Versioneer - like a rocketeer, but for versions. @@ -281,13 +282,13 @@ import configparser import errno +import functools import json import os import re import subprocess import sys from typing import Callable, Dict -import functools class VersioneerConfig: @@ -1798,11 +1799,7 @@ def get_cmdclass(cmdclass=None): cmds = {} if cmdclass is None else cmdclass.copy() - # we add "version" to both distutils and setuptools - try: - from setuptools import Command - except ImportError: - from distutils.core import Command + from setuptools import Command class cmd_version(Command): description = "report generated version string"