Skip to content

Commit

Permalink
Add support for python 3.12
Browse files Browse the repository at this point in the history
  • Loading branch information
marteinn committed Dec 30, 2023
1 parent abe25cf commit cd0f49b
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 5 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,11 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]
django: ["3.2", "4.2"]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
django: ["3.2", "4.2.8"]
exclude:
- python-version: "3.12"
django: "3.2"
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]

### Added
- Add support for python 3.12 (@marteinn)

### Changed
### Fixed
- Add django 4.2 support (@marteinn)
Expand Down
4 changes: 2 additions & 2 deletions django_react_templatetags/tests/test_filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def test_multiple_tags(self):
).render(self.mocked_context)

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

def test_component_name_from_variable(self):
"The react_render inserts with a component id as a variable"
Expand Down Expand Up @@ -80,7 +80,7 @@ def test_print_tag(self):

self.assertTrue("ReactDOM.render(" in out)
self.assertTrue("React.createElement(Component" in out)
self.assertEquals(len(self.mocked_context.get("REACT_COMPONENTS")), 0)
self.assertEqual(len(self.mocked_context.get("REACT_COMPONENTS")), 0)

@override_settings(REACT_COMPONENT_PREFIX="ReactNamespace.")
def test_print_tag_prefix(self):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ class MyObj(RepresentationMixin, object):
with self.assertRaises(NotImplementedError) as err:
instance.to_react_representation()

self.assertEquals(
self.assertEqual(
str(err.exception), "Missing property to_react_representation in class"
)
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Framework :: Django",
"Framework :: Django :: 3.2",
"Framework :: Django :: 4.2",
Expand Down

0 comments on commit cd0f49b

Please sign in to comment.