Skip to content
This repository was archived by the owner on May 23, 2025. It is now read-only.

Commit a909eb7

Browse files
authored
chore: add support for Django 4.2+, and drop support for Django 3.x. (#724)
https://endoflife.date/django
1 parent 77f9bf1 commit a909eb7

File tree

14 files changed

+1442
-1219
lines changed

14 files changed

+1442
-1219
lines changed

.github/workflows/test.yml

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,19 +11,20 @@ on:
1111

1212
jobs:
1313
test:
14+
strategy:
15+
fail-fast: false
16+
matrix:
17+
python-version: ["3.10", "3.13"]
1418
runs-on: ubuntu-latest
1519
steps:
1620
- name: Checkout
17-
uses: actions/checkout@v3
18-
- name: Install Python
19-
run: sudo apt-get update && sudo apt-get install -y python3.10-dev python3.10-venv
20-
- name: Install Poetry
21-
run: |
22-
sudo mkdir -p /usr/local/poetry
23-
sudo python3.10 -m venv /usr/local/poetry
24-
sudo /usr/local/poetry/bin/pip install poetry
25-
sudo ln -s /usr/local/poetry/bin/poetry /bin/poetry
26-
export PATH=/bin:$PATH
21+
uses: actions/checkout@v4
22+
- name: Setup Python ${{ matrix.python-version }}
23+
uses: actions/setup-python@v5
24+
with:
25+
python-version: ${{ matrix.python-version }}
26+
- name: Install poetry
27+
run: pip install poetry
2728
- name: Install Package
2829
run: poetry install
2930
- name: Test Package

README.rst

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,22 @@
22
Django Polaris
33
==============
44

5-
.. image:: https://circleci.com/gh/stellar/django-polaris.svg?style=shield
6-
:target: https://circleci.com/gh/stellar/django-polaris
5+
.. image:: https://img.shields.io/github/actions/workflow/status/stellar/django-polaris/test.yml?branch=master
6+
:alt: GitHub Workflow Status
7+
:target: https://github.com/stellar/django-polaris/actions
78

89
.. image:: https://codecov.io/gh/stellar/django-polaris/branch/master/graph/badge.svg?token=3DaW3jM6Q8
10+
:alt: Code Coverage
911
:target: https://codecov.io/gh/stellar/django-polaris
1012

11-
.. image:: https://img.shields.io/badge/python-3.7%20%7C%20%7C%203.8%20%7C%203.9%20%7C%203.10-blue?style=shield
13+
.. image:: https://img.shields.io/badge/python-3.10%20%7C%203.11%20%7C%203.12%20%7C%203.13-blue?style=shield
1214
:alt: Python - Version
1315
:target: https://pypi.python.org/pypi/django-polaris
1416

17+
.. image:: https://img.shields.io/badge/django-%3E=4.2-blue?style=shield
18+
:alt: Django - Version
19+
:target: https://pypi.python.org/pypi/django-polaris
20+
1521
.. _`email list`: https://groups.google.com/g/stellar-polaris
1622
.. _Stellar Development Foundation: https://www.stellar.org/
1723
.. _github: https://github.com/stellar/django-polaris

docs/glossary.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ Currently, multisignature asset support is only relevant in the context of SEP-6
307307
Rate Limiting
308308
=============
309309

310-
.. _`custom middleware`: https://docs.djangoproject.com/en/3.2/topics/http/middleware/#writing-your-own-middleware
310+
.. _`custom middleware`: https://docs.djangoproject.com/en/5.1/topics/http/middleware/#writing-your-own-middleware
311311

312312
It is highly encouraged to employ a rate limiting strategy when running Polaris to ensure the service
313313
remains available for all client applications. Many endpoints retrieve and create database records on

docs/index.rst

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,26 @@
22
Django Polaris
33
==============
44

5-
.. image:: https://circleci.com/gh/stellar/django-polaris.svg?style=shield
6-
:target: https://circleci.com/gh/stellar/django-polaris
5+
.. image:: https://img.shields.io/github/actions/workflow/status/stellar/django-polaris/test.yml?branch=master
6+
:alt: GitHub Workflow Status
7+
:target: https://github.com/stellar/django-polaris/actions
78

89
.. image:: https://codecov.io/gh/stellar/django-polaris/branch/master/graph/badge.svg?token=3DaW3jM6Q8
10+
:alt: Code Coverage
911
:target: https://codecov.io/gh/stellar/django-polaris
1012

11-
.. image:: https://img.shields.io/badge/python-3.7%20%7C%20%7C%203.8%20%7C%203.9%20%7C%203.10-blue?style=shield
13+
.. image:: https://img.shields.io/badge/python-3.10%20%7C%203.11%20%7C%203.12%20%7C%203.13-blue?style=shield
1214
:alt: Python - Version
1315
:target: https://pypi.python.org/pypi/django-polaris
1416

17+
.. image:: https://img.shields.io/badge/django-%3E=4.2-blue?style=shield
18+
:alt: Django - Version
19+
:target: https://pypi.python.org/pypi/django-polaris
20+
1521
.. _`email list`: https://groups.google.com/g/stellar-polaris
1622
.. _Stellar Development Foundation: https://www.stellar.org/
1723
.. _github: https://github.com/stellar/django-polaris
18-
.. _django app: https://docs.djangoproject.com/en/3.0/intro/reusable-apps/
24+
.. _django app: https://docs.djangoproject.com/en/5.1/intro/reusable-apps/
1925
.. _`demo wallet`: http://demo-wallet.stellar.org
2026

2127
Polaris is an extendable `django app`_ for Stellar Ecosystem Proposal (SEP) implementations

docs/installation.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ Configure the Database
100100
======================
101101

102102
.. _Fernet symmetric encryption: https://cryptography.io/en/latest/fernet/
103-
.. _`supported by Django`: https://docs.djangoproject.com/en/3.2/ref/databases/
103+
.. _`supported by Django`: https://docs.djangoproject.com/en/5.1/ref/databases/
104104
.. _`SQLite3`: https://www.sqlite.org/index.html
105105

106106
Polaris works with all databases `supported by Django`_. Django's template code uses `SQLite3`_ by default, but you can install your database driver of choice and update the ``DATABASES`` setting appropriately if you'd like.

docs/requirements.txt

Lines changed: 60 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -1,60 +1,60 @@
1-
aiohttp-sse-client==0.2.1 ; python_version >= "3.8" and python_version < "4.0"
2-
aiohttp==3.9.5 ; python_version >= "3.8" and python_version < "4.0"
3-
aiosignal==1.3.1 ; python_version >= "3.8" and python_version < "4.0"
4-
alabaster==0.7.13 ; python_version >= "3.8" and python_version < "4.0"
5-
annotated-types==0.7.0 ; python_version >= "3.8" and python_version < "4.0"
6-
asgiref==3.8.1 ; python_version >= "3.8" and python_version < "4.0"
7-
async-timeout==4.0.3 ; python_version >= "3.8" and python_version < "3.11"
8-
attrs==23.2.0 ; python_version >= "3.8" and python_version < "4.0"
9-
babel==2.15.0 ; python_version >= "3.8" and python_version < "4.0"
10-
backports-zoneinfo==0.2.1 ; python_version >= "3.8" and python_version < "3.9"
11-
certifi==2024.6.2 ; python_version >= "3.8" and python_version < "4.0"
12-
cffi==1.16.0 ; python_version >= "3.8" and python_version < "4.0"
13-
charset-normalizer==3.3.2 ; python_version >= "3.8" and python_version < "4.0"
14-
colorama==0.4.6 ; python_version >= "3.8" and python_version < "4.0" and sys_platform == "win32"
15-
cryptography==41.0.7 ; python_version >= "3.8" and python_version < "4.0"
16-
django-cors-headers==3.14.0 ; python_version >= "3.8" and python_version < "4.0"
17-
django-environ==0.11.2 ; python_version >= "3.8" and python_version < "4"
18-
django-model-utils==4.5.1 ; python_version >= "3.8" and python_version < "4.0"
19-
django==3.2.25 ; python_version >= "3.8" and python_version < "4.0"
20-
djangorestframework==3.15.1 ; python_version >= "3.8" and python_version < "4.0"
21-
docutils==0.17.1 ; python_version >= "3.8" and python_version < "4.0"
22-
frozenlist==1.4.1 ; python_version >= "3.8" and python_version < "4.0"
23-
idna==3.7 ; python_version >= "3.8" and python_version < "4.0"
24-
imagesize==1.4.1 ; python_version >= "3.8" and python_version < "4.0"
25-
importlib-metadata==7.1.0 ; python_version >= "3.8" and python_version < "3.10"
26-
jinja2==3.1.4 ; python_version >= "3.8" and python_version < "4.0"
27-
markupsafe==2.1.5 ; python_version >= "3.8" and python_version < "4.0"
28-
mnemonic==0.20 ; python_version >= "3.8" and python_version < "4.0"
29-
multidict==6.0.5 ; python_version >= "3.8" and python_version < "4.0"
30-
packaging==24.1 ; python_version >= "3.8" and python_version < "4.0"
31-
pycparser==2.22 ; python_version >= "3.8" and python_version < "4.0"
32-
pydantic-core==2.18.4 ; python_version >= "3.8" and python_version < "4.0"
33-
pydantic==2.7.4 ; python_version >= "3.8" and python_version < "4.0"
34-
pygments==2.18.0 ; python_version >= "3.8" and python_version < "4.0"
35-
pyjwt==2.8.0 ; python_version >= "3.8" and python_version < "4.0"
36-
pynacl==1.5.0 ; python_version >= "3.8" and python_version < "4.0"
37-
pytz==2024.1 ; python_version >= "3.8" and python_version < "4.0"
38-
readthedocs-sphinx-ext==2.2.5 ; python_version >= "3.8" and python_version < "4.0"
39-
requests-sse==0.3.2 ; python_version >= "3.8" and python_version < "4.0"
40-
requests==2.32.3 ; python_version >= "3.8" and python_version < "4.0"
41-
snowballstemmer==2.2.0 ; python_version >= "3.8" and python_version < "4.0"
42-
sphinx-autodoc-typehints==1.19.1 ; python_version >= "3.8" and python_version < "4.0"
43-
sphinx-rtd-theme==1.3.0 ; python_version >= "3.8" and python_version < "4.0"
44-
sphinx==4.5.0 ; python_version >= "3.8" and python_version < "4.0"
45-
sphinxcontrib-applehelp==1.0.4 ; python_version >= "3.8" and python_version < "4.0"
46-
sphinxcontrib-devhelp==1.0.2 ; python_version >= "3.8" and python_version < "4.0"
47-
sphinxcontrib-htmlhelp==2.0.1 ; python_version >= "3.8" and python_version < "4.0"
48-
sphinxcontrib-jquery==4.1 ; python_version >= "3.8" and python_version < "4.0"
49-
sphinxcontrib-jsmath==1.0.1 ; python_version >= "3.8" and python_version < "4.0"
50-
sphinxcontrib-qthelp==1.0.3 ; python_version >= "3.8" and python_version < "4.0"
51-
sphinxcontrib-serializinghtml==1.1.5 ; python_version >= "3.8" and python_version < "4.0"
52-
sqlparse==0.4.4 ; python_version >= "3.8" and python_version < "4.0"
53-
stellar-sdk[aiohttp]==10.0.0 ; python_version >= "3.8" and python_version < "4.0"
54-
toml==0.10.2 ; python_version >= "3.8" and python_version < "4.0"
55-
typing-extensions==4.12.2 ; python_version >= "3.8" and python_version < "4.0"
56-
urllib3==2.2.1 ; python_version >= "3.8" and python_version < "4.0"
57-
whitenoise==5.3.0 ; python_version >= "3.8" and python_version < "4"
58-
xdrlib3==0.1.1 ; python_version >= "3.8" and python_version < "4.0"
59-
yarl==1.9.4 ; python_version >= "3.8" and python_version < "4.0"
60-
zipp==3.19.2 ; python_version >= "3.8" and python_version < "3.10"
1+
aiohappyeyeballs==2.4.6 ; python_version >= "3.10" and python_version < "4.0"
2+
aiohttp-sse-client==0.2.1 ; python_version >= "3.10" and python_version < "4.0"
3+
aiohttp==3.11.12 ; python_version >= "3.10" and python_version < "4.0"
4+
aiosignal==1.3.2 ; python_version >= "3.10" and python_version < "4.0"
5+
alabaster==0.7.16 ; python_version >= "3.10" and python_version < "4.0"
6+
annotated-types==0.7.0 ; python_version >= "3.10" and python_version < "4.0"
7+
asgiref==3.8.1 ; python_version >= "3.10" and python_version < "4.0"
8+
async-timeout==5.0.1 ; python_version >= "3.10" and python_version < "3.11"
9+
attrs==25.1.0 ; python_version >= "3.10" and python_version < "4.0"
10+
babel==2.17.0 ; python_version >= "3.10" and python_version < "4.0"
11+
certifi==2025.1.31 ; python_version >= "3.10" and python_version < "4.0"
12+
cffi==1.17.1 ; python_version >= "3.10" and python_version < "4.0"
13+
charset-normalizer==3.4.1 ; python_version >= "3.10" and python_version < "4.0"
14+
colorama==0.4.6 ; python_version >= "3.10" and python_version < "4.0" and sys_platform == "win32"
15+
cryptography==44.0.1 ; python_version >= "3.10" and python_version < "4.0"
16+
django-cors-headers==4.7.0 ; python_version >= "3.10" and python_version < "4.0"
17+
django-environ==0.12.0 ; python_version >= "3.10" and python_version < "4"
18+
django-model-utils==5.0.0 ; python_version >= "3.10" and python_version < "4.0"
19+
django==5.1.6 ; python_version >= "3.10" and python_version < "4.0"
20+
djangorestframework==3.15.2 ; python_version >= "3.10" and python_version < "4.0"
21+
docutils==0.17.1 ; python_version >= "3.10" and python_version < "4.0"
22+
frozenlist==1.5.0 ; python_version >= "3.10" and python_version < "4.0"
23+
idna==3.10 ; python_version >= "3.10" and python_version < "4.0"
24+
imagesize==1.4.1 ; python_version >= "3.10" and python_version < "4.0"
25+
jinja2==3.1.5 ; python_version >= "3.10" and python_version < "4.0"
26+
markupsafe==3.0.2 ; python_version >= "3.10" and python_version < "4.0"
27+
mnemonic==0.20 ; python_version >= "3.10" and python_version < "4.0"
28+
multidict==6.1.0 ; python_version >= "3.10" and python_version < "4.0"
29+
packaging==24.2 ; python_version >= "3.10" and python_version < "4.0"
30+
propcache==0.2.1 ; python_version >= "3.10" and python_version < "4.0"
31+
pycparser==2.22 ; python_version >= "3.10" and python_version < "4.0"
32+
pydantic-core==2.27.2 ; python_version >= "3.10" and python_version < "4.0"
33+
pydantic==2.10.6 ; python_version >= "3.10" and python_version < "4.0"
34+
pygments==2.19.1 ; python_version >= "3.10" and python_version < "4.0"
35+
pyjwt==2.10.1 ; python_version >= "3.10" and python_version < "4.0"
36+
pynacl==1.5.0 ; python_version >= "3.10" and python_version < "4.0"
37+
pytz==2025.1 ; python_version >= "3.10" and python_version < "4.0"
38+
readthedocs-sphinx-ext==2.2.5 ; python_version >= "3.10" and python_version < "4.0"
39+
requests-sse==0.3.2 ; python_version >= "3.10" and python_version < "4.0"
40+
requests==2.32.3 ; python_version >= "3.10" and python_version < "4.0"
41+
snowballstemmer==2.2.0 ; python_version >= "3.10" and python_version < "4.0"
42+
sphinx-autodoc-typehints==1.19.1 ; python_version >= "3.10" and python_version < "4.0"
43+
sphinx-rtd-theme==1.3.0 ; python_version >= "3.10" and python_version < "4.0"
44+
sphinx==4.5.0 ; python_version >= "3.10" and python_version < "4.0"
45+
sphinxcontrib-applehelp==2.0.0 ; python_version >= "3.10" and python_version < "4.0"
46+
sphinxcontrib-devhelp==2.0.0 ; python_version >= "3.10" and python_version < "4.0"
47+
sphinxcontrib-htmlhelp==2.1.0 ; python_version >= "3.10" and python_version < "4.0"
48+
sphinxcontrib-jquery==4.1 ; python_version >= "3.10" and python_version < "4.0"
49+
sphinxcontrib-jsmath==1.0.1 ; python_version >= "3.10" and python_version < "4.0"
50+
sphinxcontrib-qthelp==2.0.0 ; python_version >= "3.10" and python_version < "4.0"
51+
sphinxcontrib-serializinghtml==2.0.0 ; python_version >= "3.10" and python_version < "4.0"
52+
sqlparse==0.5.3 ; python_version >= "3.10" and python_version < "4.0"
53+
stellar-sdk[aiohttp]==12.1.0 ; python_version >= "3.10" and python_version < "4.0"
54+
toml==0.10.2 ; python_version >= "3.10" and python_version < "4.0"
55+
typing-extensions==4.12.2 ; python_version >= "3.10" and python_version < "4.0"
56+
tzdata==2025.1 ; python_version >= "3.10" and python_version < "4.0" and sys_platform == "win32"
57+
urllib3==2.3.0 ; python_version >= "3.10" and python_version < "4.0"
58+
whitenoise==6.9.0 ; python_version >= "3.10" and python_version < "4.0"
59+
xdrlib3==0.1.1 ; python_version >= "3.10" and python_version < "4.0"
60+
yarl==1.18.3 ; python_version >= "3.10" and python_version < "4.0"

docs/sep-24.rst

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ SEP-24 is the `hosted` version of this solution, meaning the user's application
1212
Configure Settings
1313
==================
1414

15-
.. _`SessionMiddleware`: https://docs.djangoproject.com/en/3.2/ref/middleware/#module-django.contrib.sessions.middleware
15+
.. _`SessionMiddleware`: https://docs.djangoproject.com/en/5.1/ref/middleware/#module-django.contrib.sessions.middleware
1616

1717
Activate SEP-24
1818
---------------
@@ -69,7 +69,7 @@ Polaris requires this setting to be ``True`` for SEP-24 deployments if not in ``
6969
Configure Static Assets
7070
-----------------------
7171

72-
.. _serving static files: https://docs.djangoproject.com/en/3.0/howto/static-files/
72+
.. _serving static files: https://docs.djangoproject.com/en/5.1/howto/static-files/
7373

7474
Polaris comes with a UI for displaying forms and transaction information. This UI will be rendered in a webview by the user's application when they initiate a deposit or withdrawal.
7575

@@ -200,7 +200,7 @@ However, the values assigned to the :class:`~polaris.models.Asset` are fixed. If
200200
Defining Django Forms
201201
---------------------
202202

203-
.. _`Django form objects`: https://docs.djangoproject.com/en/3.2/topics/forms/#building-a-form-in-django
203+
.. _`Django form objects`: https://docs.djangoproject.com/en/5.1/topics/forms/#building-a-form-in-django
204204

205205
SEP-24 anchors must implement a user web-based interface that collects KYC and transaction information from the user of the client application. Because the information necessary to complete transactions differs for each business, Polaris expects the anchor to provide `Django form objects`_ that can be rendered as HTML to the user.
206206

@@ -369,9 +369,9 @@ Once you've implemented the integration functions, you need to register them via
369369
Working with Templates
370370
----------------------
371371

372-
.. _`Django's template system`: https://docs.djangoproject.com/en/3.1/ref/templates/
373-
.. _`template syntax documentation`: https://docs.djangoproject.com/en/3.1/ref/templates/language/#
374-
.. _`block documentation`: https://docs.djangoproject.com/en/3.1/ref/templates/language/#template-inheritance
372+
.. _`Django's template system`: https://docs.djangoproject.com/en/5.1/ref/templates/
373+
.. _`template syntax documentation`: https://docs.djangoproject.com/en/5.1/ref/templates/language/#the-django-template-language
374+
.. _`block documentation`: https://docs.djangoproject.com/en/5.1/ref/templates/language/#template-inheritance
375375

376376
Polaris uses `Django's template system`_ for defining the UI content rendered to users. If you're interested in customizing Polaris' UI, read Django's template documentation before continuing.
377377

@@ -463,7 +463,7 @@ Simply include a `template_name` key in the dictionary returned by :meth:`~polar
463463
Providing Context to Templates
464464
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
465465

466-
.. _`context`: https://docs.djangoproject.com/en/3.1/ref/templates/api/#rendering-a-context
466+
.. _`context`: https://docs.djangoproject.com/en/5.1/ref/templates/api/#rendering-a-context
467467

468468
Whenever a template is rendered and displayed to the user, its rendered using a `context`_, which is a Python dictionary containing key-value pairs that can be used to alter the content rendered.
469469

0 commit comments

Comments
 (0)