-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update Python and Django versions (#19)
- Use latest supported Python and Django versions and drop Python 2 support - Remove some deprecation warnings - Use GitHub Actions instead of TravisCI - Support passing None to validate_file_infection (#18) - Bump version to 1.0.0
- Loading branch information
Showing
11 changed files
with
111 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
name: Python CI | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
pull_request: | ||
branches: [ master ] | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-20.04 | ||
|
||
services: | ||
clamav: | ||
image: clamav/clamav:stable | ||
ports: | ||
- 3310 | ||
|
||
strategy: | ||
max-parallel: 4 | ||
matrix: | ||
python-version: ["3.12", "3.11", "3.10", "3.9", "3.8", "3.7"] | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install Dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install tox tox-gh-actions | ||
- name: Run Tests | ||
env: | ||
CLAMD_USE_TCP: True | ||
CLAMD_TCP_SOCKET: ${{ job.services.clamav.ports[3310] }} | ||
run: tox |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,5 +2,6 @@ | |
*.egg* | ||
.tox | ||
.tags | ||
.coverage* | ||
dist | ||
build |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
services: | ||
clamav: | ||
image: clamav/clamav:stable | ||
ports: | ||
- 3310 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
[wheel] | ||
universal=1 | ||
|
||
[flake8] | ||
ignore=E402 | ||
max-line-length = 110 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ | |
|
||
setup( | ||
name="django-clamd", | ||
version='0.4.0', | ||
version='1.0.0', | ||
author="Venelin Stoykov", | ||
author_email="[email protected]", | ||
maintainer="Venelin Stoykov", | ||
|
@@ -27,29 +27,26 @@ | |
"Development Status :: 5 - Production/Stable", | ||
"Environment :: Web Environment", | ||
"Framework :: Django", | ||
"Framework :: Django :: 1.8", | ||
"Framework :: Django :: 1.11", | ||
"Framework :: Django :: 2.0", | ||
"Framework :: Django :: 2.1", | ||
"Framework :: Django :: 3.2", | ||
"Framework :: Django :: 4.2", | ||
"Framework :: Django :: 5.0", | ||
"Intended Audience :: Developers", | ||
"License :: OSI Approved :: GNU Library or Lesser General Public License (LGPL)", | ||
"License :: OSI Approved :: GNU Library or Lesser General Public License (LGPL)", # noqa | ||
"Operating System :: OS Independent", | ||
"Programming Language :: Python", | ||
"Programming Language :: Python :: 2", | ||
"Programming Language :: Python :: 2.7", | ||
"Programming Language :: Python :: 3", | ||
"Programming Language :: Python :: 3.4", | ||
"Programming Language :: Python :: 3.5", | ||
"Programming Language :: Python :: 3.6", | ||
"Programming Language :: Python :: 3.7", | ||
"Programming Language :: Python :: 3.8", | ||
"Programming Language :: Python :: 3.9", | ||
"Programming Language :: Python :: 3.9", | ||
"Programming Language :: Python :: 3.10", | ||
"Programming Language :: Python :: 3.11", | ||
"Programming Language :: Python :: 3.12", | ||
], | ||
install_requires=( | ||
"clamd", | ||
"Django>=1.4", | ||
), | ||
tests_require=( | ||
"nose==1.3.7", | ||
), | ||
test_suite='nose.collector', | ||
zip_safe=False, | ||
include_package_data=True, | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,36 @@ | ||
[tox] | ||
envlist = | ||
py{36,35}-dj{21,20,111} | ||
py{34,27}-{dj18,dj111} | ||
py37-django32 | ||
py38-django{42, 32} | ||
py39-django{42, 32} | ||
py310-django{42, 32} | ||
py311-django{50, 42} | ||
py312-django{50, 42} | ||
py312-djangomain | ||
|
||
[gh-actions] | ||
python = | ||
3.7: py37 | ||
3.8: py38 | ||
3.9: py39 | ||
3.10: py310 | ||
3.11: py311 | ||
3.12: py312 | ||
|
||
[testenv] | ||
commands = python setup.py test | ||
setenv = COVERAGE_FILE=.coverage.{envname} | ||
passenv = | ||
CLAMD_USE_TCP | ||
CLAMD_TCP_SOCKET | ||
commands = python -Wdefault -m pytest --cov --cov-report term-missing:skip-covered src/django_clamd/tests/test.py | ||
deps = | ||
dj21: Django>=2.1,<2.2 | ||
dj20: Django>=2.0,<2.1 | ||
dj111: Django>=1.11,<2.0 | ||
dj18: Django>=1.8,<1.9 | ||
pytest | ||
pytest-cov | ||
django32: django~=3.2.0 | ||
django41: django~=4.1.0 | ||
django42: django~=4.2.0 | ||
django50: django~=5.0.0 | ||
djangomain: https://github.com/django/django/archive/refs/heads/main.zip | ||
|
||
ignore_outcome = | ||
djangomain: true |