Skip to content

Commit d473f1c

Browse files
fix tests, deprecate non-supported python versions, add supported python versions
1 parent 42c5cba commit d473f1c

File tree

7 files changed

+20
-23
lines changed

7 files changed

+20
-23
lines changed

.github/workflows/nightly.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
runs-on: ubuntu-latest
1212
strategy:
1313
matrix:
14-
python: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]
14+
python: ["3.9", "3.10", "3.11", "3.12"]
1515

1616
steps:
1717
- uses: actions/checkout@v2

CONTRIBUTING.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,13 @@ pyenv virtualenv 3.9.10 code42cli
5050
pyenv activate code42cli
5151
```
5252

53-
**Note**: The CLI supports pythons versions 3.6 through 3.9 for end users. However due to some of the build dependencies, you'll need a version >=3.7 for your virtual environment. Use `pyenv --versions` to see all versions available for install. There are some known issues installing python 3.6 with pyenv on certain OS.
53+
**Note**: The CLI supports pythons versions 3.9 through 3.12 for end users. Use `pyenv --versions` to see all versions available for install.
5454

5555
Use `source deactivate` to exit the virtual environment and `pyenv activate code42cli` to reactivate it.
5656

5757
### Windows/Linux
5858

59-
Install a version of python 3.6 or higher from [python.org](https://python.org).
59+
Install a version of python 3.9 or higher from [python.org](https://python.org).
6060
Next, in a directory somewhere outside the project, create and activate your virtual environment:
6161

6262
```bash
@@ -86,7 +86,7 @@ point to your virtual environment, and you should be ready to go!
8686

8787
## Run a full build
8888

89-
We use [tox](https://tox.readthedocs.io/en/latest/#) to run our build against Python 3.6, 3.7, and 3.8. When run locally, `tox` will run only against the version of python that your virtual envrionment is running, but all versions will be validated against when you [open a PR](#opening-a-pr).
89+
We use [tox](https://tox.readthedocs.io/en/latest/#) to run our build against Python 3.9, 3.10, 3.11 and 3.12. When run locally, `tox` will run only against the version of python that your virtual envrionment is running, but all versions will be validated against when you [open a PR](#opening-a-pr).
9090

9191
To run all the unit tests, do a test build of the documentation, and check that the code meets all style requirements, simply run:
9292

@@ -97,7 +97,7 @@ If the full process runs without any errors, your environment is set up correctl
9797

9898
## Coding Style
9999

100-
Use syntax and built-in modules that are compatible with Python 3.6+.
100+
Use syntax and built-in modules that are compatible with Python 3.9+.
101101

102102
### Style linter
103103

docs/conf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
]
4444

4545
# Add myst_parser types to suppress warnings
46-
suppress_warnings = ["myst.header"]
46+
suppress_warnings = ["myst.header", "myst.xref_missing"]
4747

4848
# Add any paths that contain templates here, relative to this directory.
4949
templates_path = ["_templates"]
@@ -61,7 +61,7 @@
6161
#
6262
# This is also used if you do content translation via gettext catalogs.
6363
# Usually you set "language" from the command line for these cases.
64-
language = None
64+
# language = None
6565

6666
# List of patterns, relative to source directory, that match files and
6767
# directories to ignore when looking for source files.

setup.py

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
package_dir={"": "src"},
3030
include_package_data=True,
3131
zip_safe=False,
32-
python_requires=">=3.6.2, <4",
32+
python_requires=">=3.9, <4",
3333
install_requires=[
3434
"chardet",
3535
"click>=7.1.1",
@@ -53,9 +53,9 @@
5353
"importlib-metadata<5.0",
5454
],
5555
"docs": [
56-
"sphinx==4.4.0",
57-
"myst-parser==0.16",
58-
"sphinx_rtd_theme==1.0.0",
56+
"sphinx==8.1.3",
57+
"myst-parser==4.0.0",
58+
"sphinx_rtd_theme==3.0.2",
5959
"sphinx-click",
6060
],
6161
},
@@ -65,9 +65,10 @@
6565
"License :: OSI Approved :: MIT License",
6666
"Programming Language :: Python",
6767
"Programming Language :: Python :: 3",
68-
"Programming Language :: Python :: 3.6",
69-
"Programming Language :: Python :: 3.7",
70-
"Programming Language :: Python :: 3.8",
68+
"Programming Language :: Python :: 3.9",
69+
"Programming Language :: Python :: 3.10",
70+
"Programming Language :: Python :: 3.11",
71+
"Programming Language :: Python :: 3.12",
7172
"Programming Language :: Python :: Implementation :: CPython",
7273
],
7374
entry_points={"console_scripts": ["code42=code42cli.main:cli"]},

src/code42cli/output_formats.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import csv
22
import io
33
import json
4-
import warnings
54
from itertools import chain
65
from typing import Generator
76

@@ -17,9 +16,6 @@
1716
from code42cli.util import find_format_width
1817
from code42cli.util import format_to_table
1918

20-
# remove this once we drop support for Python 3.7
21-
warnings.filterwarnings("ignore", category=FutureWarning)
22-
2319
CEF_DEFAULT_PRODUCT_NAME = "Advanced Exfiltration Detection"
2420
CEF_DEFAULT_SEVERITY_LEVEL = "5"
2521

tests/test_output_formats.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
from collections import OrderedDict
33

44
import pytest
5-
from numpy import NaN
5+
from numpy import nan as NaN
66
from pandas import DataFrame
77

88
import code42cli.output_formats as output_formats_module

tox.ini

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tox]
22
envlist =
3-
py{312,311,310,39,38,37}
3+
py{312,311,310,39}
44
docs
55
style
66
skip_missing_interpreters = true
@@ -25,9 +25,9 @@ commands =
2525

2626
[testenv:docs]
2727
deps =
28-
sphinx == 4.4.0
29-
myst-parser == 0.17.2
30-
sphinx_rtd_theme == 1.0.0
28+
sphinx == 8.1.3
29+
myst-parser == 4.0.0
30+
sphinx_rtd_theme == 3.0.2
3131
sphinx-click
3232
whitelist_externals = bash
3333

0 commit comments

Comments
 (0)