Skip to content

Commit 1bf1481

Browse files
author
Carl Crowder
committed
Converting to poetry-based packaging, and dropping python 3.6 support
1 parent c22f31b commit 1bf1481

File tree

10 files changed

+775
-117
lines changed

10 files changed

+775
-117
lines changed

.github/workflows/build.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838
strategy:
3939
fail-fast: false
4040
matrix:
41-
python-version: [3.8, 3.9]
41+
python-version: [3.8, 3.9, "3.10", "3.11"]
4242
django-version: [-main, "4.0"]
4343

4444
steps:
@@ -72,8 +72,8 @@ jobs:
7272
strategy: # TODO: use a YAML anchor - not supported in GitHub actions "yet"
7373
fail-fast: false
7474
matrix:
75-
python-version: [3.6, 3.7, 3.8, 3.9]
76-
django-version: [3.2, 3.1, "3.0", "2.0", 1.11]
75+
python-version: [3.7, 3.8, 3.9]
76+
django-version: [3.2, 3.1, "3.0", "2.0", "2.2", "1.11"]
7777

7878
steps:
7979
- uses: actions/checkout@v2
@@ -104,7 +104,7 @@ jobs:
104104
runs-on: ubuntu-latest
105105
strategy:
106106
matrix:
107-
python-version: [3.6]
107+
python-version: [3.7]
108108

109109
steps:
110110
- uses: actions/checkout@v2

.pre-commit-config.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ repos:
1515
- id: flake8
1616
args: [ --max-line-length=120 ]
1717
- repo: https://github.com/psf/black
18-
rev: 22.12.0
18+
rev: 23.3.0
1919
hooks:
2020
- id: black
2121
args: [--safe, --line-length=120]

CHANGELOG.rst

+7
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,13 @@ Changelog
44
Version 2.6.0 (14 May 2023)
55
---------------------------
66

7+
NOTICE
8+
~~~~~~
9+
10+
This version drops support for Python 3.6
11+
12+
Bugfixes
13+
~~~~~~~~
714

815

916

MANIFEST.in

-6
This file was deleted.

poetry.lock

+743-15
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pylint_django/tests/input/func_noerror_model_unicode_lambda.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"""
22
Ensures that django models without a __unicode__ method are flagged
33
"""
4-
# pylint: disable=missing-docstring,wrong-import-position,unnecessary-lambda-assignment
4+
# pylint: disable=missing-docstring,wrong-import-position
55

66
from django.db import models
77

pyproject.toml

+10-16
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,22 @@
11
[tool.poetry]
22
name = "pylint-django"
3-
version = "2.5.3"
3+
version = "2.6.0a0"
44
readme = "README.rst"
55
description = "A Pylint plugin to help Pylint understand the Django web framework"
66
repository = "https://github.com/PyCQA/pylint-django"
77
authors = ["Carl Crowder <[email protected]>"]
8-
license="GPLv2"
98
classifiers=[
109
"Development Status :: 5 - Production/Stable",
1110
"Environment :: Console",
1211
"Intended Audience :: Developers",
1312
"Operating System :: Unix",
1413
"Topic :: Software Development :: Quality Assurance",
1514
"Programming Language :: Python :: 3",
16-
"Programming Language :: Python :: 3.6",
1715
"Programming Language :: Python :: 3.7",
1816
"Programming Language :: Python :: 3.8",
1917
"Programming Language :: Python :: 3.9",
2018
"Programming Language :: Python :: 3.10",
2119
"Programming Language :: Python :: 3.11",
22-
"Framework :: Django :: 1.11",
23-
"Framework :: Django :: 2.0",
24-
"Framework :: Django :: 2.1",
2520
"Framework :: Django :: 2.2",
2621
"Framework :: Django :: 3",
2722
"Framework :: Django :: 3.0",
@@ -46,32 +41,31 @@ exclude = ["**/tests/**", "**/testutils.py", "**/tests.py"]
4641

4742
[tool.poetry.dependencies]
4843
python = ">=3.7,<4.0"
49-
pylint-plugin-utils = ">=0.7"
44+
pylint-plugin-utils = ">=0.8"
5045
pylint = ">=2.0,<3"
46+
Django = {version=">=2.2", optional = true}
5147

5248
[tool.poetry.group.dev.dependencies]
49+
tox = "^4.5.1"
50+
pytest = "^7.3.1"
5351
pylint = ">=2.13"
54-
django-tables2 = "^2.5.3"
55-
factory-boy = "^3.2.1"
5652
coverage = "^7.2.5"
57-
pytest = "^7.3.1"
53+
twine = "^4.0.2"
5854
wheel = "^0.40.0"
59-
django-tastypie = "^0.14.5"
55+
django-tables2 = {version="^2.5.3", optional = true}
56+
factory-boy = {version="^3.2.1", optional = true}
57+
django-tastypie = {version="^0.14.5", optional = true}
6058

6159
[tool.poetry.extras]
6260
with_django = ["Django"]
61+
for_tests = ['django-tastypie', 'django-tables2', 'factory-boy']
6362

6463
[build-system]
6564
requires = ["poetry-core>=1.0.0"]
6665
build-backend = "poetry.core.masonry.api"
6766

6867
[tool.black]
6968
line-length = 120
70-
exclude = '''
71-
/(
72-
tests/
73-
)/
74-
'''
7569

7670
[tool.isort]
7771
multi_line_output = 3

scripts/build.sh

+2-4
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,7 @@ tox -e readme
1919
# then build the packages
2020
echo "..... Building PyPI packages"
2121
set -e
22-
python setup.py sdist >/dev/null
23-
python setup.py bdist_wheel >/dev/null
22+
poetry build --quiet
2423
set +e
2524

2625
# then run some sanity tests
@@ -40,7 +39,7 @@ echo "..... Trying to verify that all source files are present"
4039
# remove pylint_django/*.egg-info/ generated during build
4140
find . -type d -name '*.egg-info' | xargs rm -rf
4241

43-
source_files=`find ./pylint_django/ -type f | sed 's|./||'`
42+
source_files=`find ./pylint_django/ -type f ! -path '**/tests/**' | sed 's|./||'`
4443

4544
# verify for .tar.gz package
4645
package_files=`tar -tvf dist/*.tar.gz`
@@ -77,7 +76,6 @@ rm -rf .venv/
7776
echo "..... Trying to install the new wheel inside a virtualenv"
7877
virtualenv .venv/test-wheel
7978
source .venv/test-wheel/bin/activate
80-
pip install pylint-plugin-utils # because it does not provide a wheel package
8179
pip install --only-binary :all: -f dist/ pylint_django
8280
deactivate
8381
rm -rf .venv/

setup.py

-59
This file was deleted.

tox.ini

+7-11
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,8 @@ envlist =
88
flake8
99
pylint
1010
readme
11-
py{36}-django{111,20,-master}
12-
py{36,37,38,39}-django{22,30,31,32}
13-
py{38,39}-django40
11+
py{37,38,39}-django{22,30,31,32}
12+
py{38,39,310,311}-django{40,41,42}
1413

1514
requires =
1615
pip >=21.0.1
@@ -22,9 +21,8 @@ commands =
2221
django_is_installed: pylint --rcfile=tox.ini --load-plugins=pylint_django --disable=E5110 setup.py
2322
flake8: flake8
2423
pylint: pylint --rcfile=tox.ini -d missing-docstring,too-many-branches,too-many-return-statements,too-many-ancestors,fixme --ignore=tests pylint_django setup
25-
readme: bash -c "python setup.py -q sdist && twine check dist/*"
26-
py{36}-django{111,20,-main}: coverage run pylint_django/tests/test_func.py -v
27-
py{36,37,38,39}-django{22,30,31,32}: coverage run pylint_django/tests/test_func.py -v
24+
readme: bash -c "poetry build && twine check dist/*"
25+
py{37,38,39,310,311}-django{22,30,31,32,40,41,42}: coverage run pylint_django/tests/test_func.py -v
2826
clean: find . -type f -name '*.pyc' -delete
2927
clean: find . -type d -name __pycache__ -delete
3028
clean: rm -rf build/ .cache/ dist/ .eggs/ pylint_django.egg-info/ .tox/
@@ -35,14 +33,13 @@ deps =
3533
pylint: Django
3634
readme: twine
3735
readme: wheel
38-
django111: Django>=1.11,<2.0
39-
django20: Django>=2.0,<2.1
40-
django21: Django>=2.1,<2.2
4136
django22: Django>=2.2,<3.0
4237
django30: Django>=3.0,<3.1
4338
django31: Django>=3.1,<3.2
4439
django32: Django>=3.2,<4.0
4540
django40: Django>=4.0,<4.1
41+
django41: Django>=4.1,<4.2
42+
django42: Django>=4.2,<4.3
4643
django-main: Django
4744
django-main: git+https://github.com/pycqa/astroid@main
4845
django-main: git+https://github.com/pycqa/pylint@main
@@ -52,8 +49,7 @@ setenv =
5249
allowlist_externals =
5350
django_not_installed: bash
5451
readme: bash
55-
py{36}-django{111,20,-main}: coverage
56-
py{36,37,38,39}-django{22,30,31,32,40}: coverage
52+
py{37,38,39,310,311}-django{22,30,31,32,40,41,42}: coverage
5753
clean: find
5854
clean: rm
5955

0 commit comments

Comments
 (0)