Skip to content

Commit e78e884

Browse files
authored
Merge branch 'main' into main
2 parents 96cac83 + 27a62e6 commit e78e884

File tree

6 files changed

+94
-21
lines changed

6 files changed

+94
-21
lines changed

.github/workflows/codeql-analysis.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040

4141
# Initializes the CodeQL tools for scanning.
4242
- name: Initialize CodeQL
43-
uses: github/codeql-action/init@v2
43+
uses: github/codeql-action/init@v3
4444
with:
4545
languages: ${{ matrix.language }}
4646
# If you wish to specify custom queries, you can do so here or in a config file.
@@ -51,7 +51,7 @@ jobs:
5151
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
5252
# If this step fails, then you should remove it and run the build manually (see below)
5353
- name: Autobuild
54-
uses: github/codeql-action/autobuild@v2
54+
uses: github/codeql-action/autobuild@v3
5555

5656
# ℹ️ Command-line programs to run using the OS shell.
5757
# 📚 https://git.io/JvXDl
@@ -65,4 +65,4 @@ jobs:
6565
# make release
6666

6767
- name: Perform CodeQL Analysis
68-
uses: github/codeql-action/analyze@v2
68+
uses: github/codeql-action/analyze@v3

.github/workflows/workflow.yaml

Lines changed: 50 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,16 +30,47 @@ jobs:
3030
strategy:
3131
fail-fast: false
3232
matrix:
33-
python-version:
33+
python:
3434
- 3.8
3535
- 3.9
36+
- "3.10"
37+
- 3.11
38+
- 3.12
3639
django:
3740
- 3.2
3841
- 4.0
42+
- 4.1
43+
- 4.2
44+
- 5.0
45+
- 5.1
3946
database:
4047
- sqlite
4148
- mysql
4249
- postgres
50+
exclude:
51+
# django 3.2
52+
- python: 3.11
53+
django: 3.2
54+
- python: 3.12
55+
django: 3.2
56+
# django 4.0
57+
- python: 3.11
58+
django: 4.0
59+
- python: 3.12
60+
django: 4.0
61+
# django 4.1
62+
- python: 3.12
63+
django: 4.1
64+
# django 5.0
65+
- python: 3.8
66+
django: 5.0
67+
- python: 3.9
68+
django: 5.0
69+
# django 5.1
70+
- python: 3.8
71+
django: 5.1
72+
- python: 3.9
73+
django: 5.1
4374

4475
# additional service containers to run
4576
services:
@@ -83,36 +114,47 @@ jobs:
83114
- uses: actions/checkout@v4
84115

85116
# install python
86-
- name: Set up Python ${{ matrix.python-version }}
87-
uses: actions/setup-python@v4
117+
- name: Set up Python ${{ matrix.python }}
118+
uses: actions/setup-python@v5
88119
with:
89-
python-version: ${{ matrix.python-version }}
120+
python-version: ${{ matrix.python }}
90121

91122
# upgrade pip
92123
- name: Update pip
93124
run: python -m pip install --upgrade pip
94125

95126
# install environment specific dependencies
96127
- name: Install coverage
97-
run: pip install coverage>=5.3
128+
run: pip install coverage>=7.6.0 setuptools
98129

99130
- name: Install Django 3.2
100131
if: matrix.django == 3.2
101132
run: pip install "Django>=3.2,<4.0"
102133
- name: Install Django 4.0
103134
if: matrix.django == 4.0
104135
run: pip install "Django>=4.0,<4.1"
136+
- name: Install Django 4.1
137+
if: matrix.django == 4.1
138+
run: pip install "Django>=4.1,<4.2"
139+
- name: Install Django 4.2
140+
if: matrix.django == 4.2
141+
run: pip install "Django>=4.2,<5.0"
142+
- name: Install Django 5.0
143+
if: matrix.django == 5.0
144+
run: pip install "Django>=5.0,<5.1"
145+
- name: Install Django 5.1
146+
if: matrix.django == 5.1
147+
run: pip install "Django>=5.1,<5.2"
105148
- name: Install MySQL libs
106149
if: matrix.database == 'mysql'
107-
run: pip install mysqlclient>=2.0.1 django-mysql>=3.9.0
150+
run: pip install mysqlclient>=2.2.4 django-mysql>=4.14.0
108151
- name: Install postgres libs
109152
if: matrix.database == 'postgres'
110-
run: pip install psycopg2-binary>=2.8.6
153+
run: pip install psycopg2-binary>=2.9.9
111154

112155
- name: Install Django ReST framework libraries
113156
run: pip install -U django-rest-framework rest-framework-generic-relations drf-spectacular
114157

115-
116158
# install our package
117159
- name: Install package
118160
run: pip install -e .

actstream/actions.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,12 @@ def action_handler(verb, **kwargs):
125125

126126
# We must store the untranslated string
127127
# If verb is an ugettext_lazyed string, fetch the original string
128+
# _proxy____args is a valid attribute in Django <= 4.2
128129
if hasattr(verb, '_proxy____args'):
129130
verb = verb._proxy____args[0]
131+
# _args is the new attribute in Django >= 5.0
132+
elif hasattr(verb, '_args'):
133+
verb = verb._args[0]
130134

131135
newaction = settings.get_action_model()(
132136
actor_content_type=ContentType.objects.get_for_model(actor),

docs/changelog.rst

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,10 @@ Changelog
66
2.0.1
77
-----
88

9-
- Custom Action and Follow models support
9+
- Added support for custom Action and Follow models
10+
- Added support for Django 5.0 and 5.1
11+
- Added support for Python 3.10, 3.11 and 3.12
12+
- Updated GitHub actions
1013

1114
2.0.0
1215
-----

docs/installation.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ Make sure to pick the version of Django and django-activity-stream that supports
6060
Python
6161
******
6262

63-
* **Python 3**: 3.6 to 3.9
63+
* **Python 3**: 3.8 to 3.12
6464
* **PyPy**: 3
6565

6666
Django

tox.ini

Lines changed: 32 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
[tox]
22
envlist =
3-
py{37,38,39}-django32-{mysql,postgres,sqlite}
4-
py{38,39}-django40-{mysql,postgres,sqlite}
5-
py{38,39}-django41-{mysql,postgres,sqlite}
3+
py{38,39,310}-django32-{mysql,postgres-psycopg2,sqlite}
4+
py{38,39,310}-django40-{mysql,postgres-psycopg2,sqlite}
5+
py{38,39,310,311}-django41-{mysql,postgres-psycopg2,sqlite}
6+
py{38,39,310,311,312}-django42-{mysql,postgres-psycopg3,sqlite}
7+
py{310,311,312}-django50-{mysql,postgres-psycopg3,sqlite}
8+
py{310,311,312}-django51-{mysql,postgres-psycopg3,sqlite}
69
toxworkdir=/tmp/.tox
710

811
[testenv]
@@ -20,17 +23,34 @@ deps =
2023
django32: Django>=3.2,<4.0
2124
django40: Django>=4.0,<4.1
2225
django41: Django>=4.1,<4.2
26+
django42: Django>=4.2,<5.0
27+
django50: Django>=5.0,<5.1
28+
django51: Django>=5.1,<5.2
2329
mysql: mysqlclient>=2.0.0
2430
mysql: django-mysql>=2.4.1
25-
postgres: psycopg2-binary>=2.8
31+
postgres-psycopg2: psycopg2-binary>=2.8
32+
postgres-psycopg3: psycopg-binary>=3.2
2633

2734
setenv =
2835
; GITHUB_WORKFLOW=true ; Set this to force enable mysql/postgres dbs
2936
mysql: DATABASE_ENGINE=mysql
30-
postgres: DATABASE_ENGINE=postgresql
37+
postgres-psycopg2: DATABASE_ENGINE=postgresql
38+
postgres-psycopg3: DATABASE_ENGINE=postgresql
3139

3240
; Pass this to force enable mysql/postgres dbs
33-
passenv = GITHUB_WORKFLOW MYSQL_HOST MYSQL_NAME MYSQL_USER MYSQL_PASSWORD MYSQL_PORT POSTGRES_HOST POSTGRES_NAME POSTGRES_PORT POSTGRES_USER POSTGRES_PASSWORD SQLITE_NAME
41+
passenv =
42+
GITHUB_WORKFLOW
43+
MYSQL_HOST
44+
MYSQL_NAME
45+
MYSQL_USER
46+
MYSQL_PASSWORD
47+
MYSQL_PORT
48+
POSTGRES_HOST
49+
POSTGRES_NAME
50+
POSTGRES_PORT
51+
POSTGRES_USER
52+
POSTGRES_PASSWORD
53+
SQLITE_NAME
3454

3555
usedevelop = True
3656

@@ -47,10 +67,14 @@ commands =
4767

4868
[travis:env]
4969
DJANGO =
70+
5.1: django51
71+
5.0: django50
72+
4.2: django42
73+
4.1: django41
5074
4.0: django40
5175
3.2: django32
5276
DATABASE =
5377
mysql: mysql
54-
postgresql: postgresql
78+
postgres-psycopg2: postgresql
79+
postgres-psycopg3: postgresql
5580
sqlite: sqlite
56-

0 commit comments

Comments
 (0)