Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(Deps) Support Django 4 and Python 3.10 + drop Django <3.2 and Python 3.7 #127

Merged
merged 1 commit into from
Jan 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,16 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python: [3.7, 3.8, 3.9]
django: ["3.0", 3.1, 3.2]
python: [3.8, 3.9, "3.10"]
django: [3.2, "4.0", 4.1]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}
- run: pip install pipenv
- run: pipenv install --dev --python ${{ matrix.python }}
- run: pipenv install django~=${{ matrix.django }}
- run: pipenv install django~=${{ matrix.django }} --skip-lock
- run: pipenv run pytest --cov

lint:
Expand Down
2 changes: 1 addition & 1 deletion .python-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.9.13
3.10.9
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.9.13-buster
FROM python:3.10.9-buster

RUN apt-get update -y && \
apt-get install -y git && \
Expand All @@ -13,4 +13,4 @@ COPY Pipfile.lock Pipfile.lock
COPY setup.py setup.py
COPY worf/ worf/

RUN pipenv install --dev --deploy --python 3.9.13
RUN pipenv install --dev --deploy --python 3.10.9
3 changes: 0 additions & 3 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,6 @@ pytest-watch = "*"
pytest-xdist = {extras = ["psutil"], version = "*"}
twine = "*"

[requires]
python_version = "3.8"

[scripts]
install_linters = "pipenv install autoflake black flake8 isort --dev --skip-lock"
check = "./script/check"
Expand Down
624 changes: 225 additions & 399 deletions Pipfile.lock

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ INSTALLED_APPS = [
Requirements
------------

- Python (3.7, 3.8, 3.9)
- Django (3.0, 3.1, 3.2)
- Python (3.8, 3.9, 3.10)
- Django (3.2, 4.0, 4.1)


Roadmap
Expand Down
2 changes: 1 addition & 1 deletion pytest.ini
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ addopts =
--dist loadscope
--numprocesses auto
filterwarnings =
ignore:Passing None for the middleware get_response argument is deprecated
ignore:django.utils.translation.ungettext_lazy\(\) is deprecated
ignore:The --rsyncdir command line argument and rsyncdirs config variable are deprecated
python_files = tests.py test_*.py *_tests.py
testpaths = tests
10 changes: 5 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,25 +36,25 @@ def get_version(rel_path):
classifiers=[
"Development Status :: 4 - Beta",
"Environment :: Web Environment",
"Framework :: Django :: 3.0",
"Framework :: Django :: 3.1",
"Framework :: Django :: 3.2",
"Framework :: Django :: 4.0",
"Framework :: Django :: 4.1",
"Framework :: Django",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python",
"Topic :: Software Development :: Libraries :: Python Modules",
],
include_package_data=True,
install_requires=[
"Django>=3.0.0,<3.3",
"Django>=3.0.0,<4.2",
"django-url-filter>=0.3.15",
"marshmallow>=3.14.0",
],
packages=find_packages(exclude=["tests*"]),
python_requires=">=3.7",
python_requires=">=3.8",
zip_safe=False,
)
4 changes: 2 additions & 2 deletions tests/test_actions.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ def test_invalid_arguments(user_client, profile):
response = user_client.put(f"/profiles/{profile.pk}/subscribe/", kwargs)
result = response.json()
assert response.status_code == 400, result
message = "Invalid arguments: subscribe() got an unexpected keyword argument 'text'"
assert result["message"] == message
assert result["message"].startswith("Invalid arguments:")
assert result["message"].endswith("unexpected keyword argument 'text'")


@parametrize("method", ["GET", "DELETE", "PATCH", "POST"])
Expand Down