Skip to content

Commit 60cd4ef

Browse files
committed
Merge branch 'release/8.0.0'
2 parents e417bc3 + 0e153f8 commit 60cd4ef

File tree

10 files changed

+81
-22
lines changed

10 files changed

+81
-22
lines changed

.github/workflows/main.yml

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,15 @@ jobs:
88
strategy:
99
fail-fast: false
1010
matrix:
11-
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
12-
django: ["3.2", "4.0", "4.1"]
11+
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
12+
django: ["3.2", "4.2.8", "5.0"]
1313
exclude:
14-
- python-version: "3.7"
15-
django: "4.0"
16-
- python-version: "3.7"
17-
django: "4.1"
14+
- python-version: "3.12"
15+
django: "3.2"
16+
- python-version: "3.8"
17+
django: "5.0"
18+
- python-version: "3.9"
19+
django: "5.0"
1820
steps:
1921
- uses: actions/checkout@v2
2022
- name: Set up Python ${{ matrix.python-version }}
@@ -54,6 +56,20 @@ jobs:
5456
pip install isort
5557
isort . --check-only
5658
59+
lint-ruff:
60+
runs-on: ubuntu-latest
61+
needs: test
62+
steps:
63+
- uses: actions/checkout@v2
64+
- uses: actions/setup-python@v2
65+
with:
66+
python-version: 3.8
67+
- name: Install dependencies
68+
run: |
69+
python -m pip install --upgrade pip
70+
pip install ruff
71+
ruff .
72+
5773
publish:
5874
runs-on: ubuntu-latest
5975
needs: [test, lint-black, lint-isort]

CHANGELOG.md

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,29 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

77
## [Unreleased]
8-
98
### Added
109
### Changed
1110
### Fixed
1211
### Removed
1312

13+
## [8.0.0] - 2023-12-30
14+
15+
### Added
16+
- Add support for python 3.12 (@marteinn)
17+
- Add support for django 4.2 (@marteinn)
18+
- Add support for django 5.0 (@marteinn)
19+
20+
### Fixed
21+
- Add pyproject.toml
22+
- Add ruff linter
23+
- Upgrade python version to 3.12 in example
24+
- Fix install issue with netcat in example
25+
26+
### Removed
27+
- Drop support for django 4.0
28+
- Drop support for django 4.1 (@marteinn)
29+
- Drop support for python 3.7 (@marteinn)
30+
1431
## [7.0.1] - 2023-01-07
1532

1633
### Added

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) 2015-2023 Fröjd Interactive
3+
Copyright (c) 2015-2024 Fröjd Interactive
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

django_react_templatetags/__init__.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
"""
88

99
__title__ = "django_react_templatetags"
10-
__version__ = "7.0.1"
11-
__build__ = 701
10+
__version__ = "8.0.0"
11+
__build__ = 702
1212
__author__ = "Martin Sandström"
1313
__license__ = "MIT"
14-
__copyright__ = "Copyright 2015-2022 Fröjd Interactive"
14+
__copyright__ = "Copyright 2015-2024 Fröjd Interactive"

django_react_templatetags/tests/test_filters.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ def test_multiple_tags(self):
3131
).render(self.mocked_context)
3232

3333
self.assertTrue('<div id="Component_' in out)
34-
self.assertEquals(len(self.mocked_context.get("REACT_COMPONENTS")), 2)
34+
self.assertEqual(len(self.mocked_context.get("REACT_COMPONENTS")), 2)
3535

3636
def test_component_name_from_variable(self):
3737
"The react_render inserts with a component id as a variable"
@@ -80,7 +80,7 @@ def test_print_tag(self):
8080

8181
self.assertTrue("ReactDOM.render(" in out)
8282
self.assertTrue("React.createElement(Component" in out)
83-
self.assertEquals(len(self.mocked_context.get("REACT_COMPONENTS")), 0)
83+
self.assertEqual(len(self.mocked_context.get("REACT_COMPONENTS")), 0)
8484

8585
@override_settings(REACT_COMPONENT_PREFIX="ReactNamespace.")
8686
def test_print_tag_prefix(self):
@@ -165,7 +165,7 @@ class NoRepresentation(object):
165165
self.mocked_context["component_data"] = instance
166166

167167
with self.assertRaises(TypeError) as err:
168-
out = Template(
168+
Template(
169169
"{% load react %}"
170170
'{% react_render component="Component" data=component_data %}'
171171
"{% react_print %}"

django_react_templatetags/tests/test_representation_mixin.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@ class MyObj(RepresentationMixin, object):
1313
with self.assertRaises(NotImplementedError) as err:
1414
instance.to_react_representation()
1515

16-
self.assertEquals(
16+
self.assertEqual(
1717
str(err.exception), "Missing property to_react_representation in class"
1818
)

docs/getting-started.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
### Requirements
44

5-
- Python 3.7+
6-
- Django 3.2+
5+
- Python 3.8+
6+
- Django 3.2, 5.0 and 4.2
77

88

99
### Installation

example_django_react_templatetags/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
FROM python:3.8-slim
1+
FROM python:3.12-slim
22
MAINTAINER Frojd
33

44
ENV PYTHONUNBUFFERED=1 \
55
REQUIREMENTS=requirements.txt
66

77
RUN apt-get update \
8-
&& apt-get install -y netcat gcc libpq-dev \
8+
&& apt-get install -y netcat-traditional gcc libpq-dev \
99
&& apt-get install -y binutils libproj-dev \
1010
&& apt-get install -y gettext \
1111
&& rm -rf /var/lib/apt/lists/*

pyproject.toml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
[tool.ruff]
2+
line-length = 88
3+
4+
# Never enforce `E501` (line length violations).
5+
ignore = ["E501"]
6+
7+
exclude = [
8+
"venv",
9+
"*/migrations/*",
10+
]
11+
12+
[tool.black]
13+
exclude = '''
14+
/(
15+
\.git
16+
| \.hg
17+
| \.mypy_cache
18+
| \.tox
19+
| \.venv
20+
| _build
21+
| buck-out
22+
| build
23+
| dist
24+
| migrations
25+
)/
26+
'''

setup.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,15 +50,15 @@
5050
"License :: OSI Approved :: MIT License",
5151
"Programming Language :: Python",
5252
"Programming Language :: Python :: 3",
53-
"Programming Language :: Python :: 3.7",
5453
"Programming Language :: Python :: 3.8",
5554
"Programming Language :: Python :: 3.9",
5655
"Programming Language :: Python :: 3.10",
5756
"Programming Language :: Python :: 3.11",
57+
"Programming Language :: Python :: 3.12",
5858
"Framework :: Django",
5959
"Framework :: Django :: 3.2",
60-
"Framework :: Django :: 4.0",
61-
"Framework :: Django :: 4.1",
60+
"Framework :: Django :: 4.2",
61+
"Framework :: Django :: 5.0",
6262
"Topic :: Utilities",
6363
"Programming Language :: JavaScript",
6464
],

0 commit comments

Comments
 (0)