From 76de5d8fa1784de2e7e5317902c8b5f9383ad3f1 Mon Sep 17 00:00:00 2001 From: James B Date: Wed, 10 Dec 2025 17:20:45 +0000 Subject: [PATCH] Upgrade python dependencies, which includes upgrading from Django 3 to 5 This removes the favicon app and does not replace it with anything. However, this is broken on the live site anyway so no features are lost. --- prefix_finder/frontend/codelist.xsd | 4 +- prefix_finder/frontend/templates/base.html | 2 - prefix_finder/frontend/tests_functional.py | 2 +- prefix_finder/frontend/urls.py | 24 ++-- prefix_finder/settings.py | 1 - prefix_finder/urls.py | 5 +- requirements.in | 3 +- requirements.txt | 58 +++++---- requirements_dev.txt | 137 ++++++++++++--------- 9 files changed, 128 insertions(+), 108 deletions(-) diff --git a/prefix_finder/frontend/codelist.xsd b/prefix_finder/frontend/codelist.xsd index 10a5c9c..7dee6d5 100644 --- a/prefix_finder/frontend/codelist.xsd +++ b/prefix_finder/frontend/codelist.xsd @@ -14,7 +14,7 @@ - + ISO 639-1 code specifying the language of text in this element. If a default language is specified in the iati-activity element it does not have to be repeated here. @@ -82,7 +82,7 @@ - + diff --git a/prefix_finder/frontend/templates/base.html b/prefix_finder/frontend/templates/base.html index c21a211..05347cf 100644 --- a/prefix_finder/frontend/templates/base.html +++ b/prefix_finder/frontend/templates/base.html @@ -1,5 +1,4 @@ {% load static %} -{% load favicon %} {% load i18n %} @@ -19,7 +18,6 @@ - {% get_favicons prefix="favicons/" %} diff --git a/prefix_finder/frontend/tests_functional.py b/prefix_finder/frontend/tests_functional.py index 9ae63df..c597a4e 100644 --- a/prefix_finder/frontend/tests_functional.py +++ b/prefix_finder/frontend/tests_functional.py @@ -21,7 +21,7 @@ def browser(request): elif BROWSER == 'ChromeHeadless': chrome_options = Options() chrome_options.add_argument("--headless") - browser = webdriver.Chrome(chrome_options=chrome_options) + browser = webdriver.Chrome(options=chrome_options) else: browser = getattr(webdriver, BROWSER)() browser.implicitly_wait(3) diff --git a/prefix_finder/frontend/urls.py b/prefix_finder/frontend/urls.py index cbe74f2..3ffc14d 100644 --- a/prefix_finder/frontend/urls.py +++ b/prefix_finder/frontend/urls.py @@ -1,19 +1,19 @@ -from django.conf.urls import url +from django.urls import include, path from django.views.generic import TemplateView from django.views.generic.base import RedirectView from . import views urlpatterns = [ - url(r'^$', views.home, name='home'), - url(r'^results$', views.results, name='results'), - url(r'^_update_lists$', views.update_lists, name='update_lists'), - url(r'^_preview_branch/([A-Za-z0-9-]+)$', views.preview_branch, name='preview_branch'), - url(r'^terms', TemplateView.as_view(template_name='terms.html'), name='terms'), - url(r'^about', TemplateView.as_view(template_name='about.html'), name='about'), - url(r'^list/(.+)$', views.list_details, name='list'), - url(r'^download$', RedirectView.as_view(url='/results', permanent=False), name='download'), - url(r'^download.json$', views.json_download, name='json_download'), - url(r'^download.csv$', views.csv_download, name='csv_download'), - url(r'^download.xml$', views.xml_download, name='xml_download'), + path('', views.home, name='home'), + path('results', views.results, name='results'), + path('_update_lists', views.update_lists, name='update_lists'), + path('_preview_branch/([A-Za-z0-9-]+)', views.preview_branch, name='preview_branch'), + path('terms', TemplateView.as_view(template_name='terms.html'), name='terms'), + path('about', TemplateView.as_view(template_name='about.html'), name='about'), + path('list/', views.list_details, name='list'), + path('download', RedirectView.as_view(url='/results', permanent=False), name='download'), + path('download.json', views.json_download, name='json_download'), + path('download.csv', views.csv_download, name='csv_download'), + path('download.xml', views.xml_download, name='xml_download'), ] diff --git a/prefix_finder/settings.py b/prefix_finder/settings.py index d7f5379..48612d0 100644 --- a/prefix_finder/settings.py +++ b/prefix_finder/settings.py @@ -73,7 +73,6 @@ 'bootstrap3', 'prefix_finder.frontend', 'raven.contrib.django.raven_compat', - 'favicon', ) MIDDLEWARE = ( diff --git a/prefix_finder/urls.py b/prefix_finder/urls.py index ba7c277..bc1340f 100644 --- a/prefix_finder/urls.py +++ b/prefix_finder/urls.py @@ -13,8 +13,9 @@ 1. Import the include() function: from django.conf.urls import url, include 2. Add a URL to urlpatterns: url(r'^blog/', include('blog.urls')) """ -from django.conf.urls import include, url + +from django.urls import include, path urlpatterns = [ - url(r'^', include('prefix_finder.frontend.urls')), + path('', include('prefix_finder.frontend.urls')), ] diff --git a/requirements.in b/requirements.in index 552bfce..44ad9bd 100644 --- a/requirements.in +++ b/requirements.in @@ -1,4 +1,4 @@ -Django>3.2,<3.3 +Django>5.2,<5.3 django-bootstrap3 requests django-environ @@ -7,7 +7,6 @@ python-dateutil titlecase dealer ratelimit -django-super-favicon jsonschema lxml urllib3>=1.24.2 diff --git a/requirements.txt b/requirements.txt index 2e33089..90a5625 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,53 +4,61 @@ # # pip-compile requirements.in # -asgiref==3.6.0 +asgiref==3.11.0 # via django -attrs==22.2.0 - # via jsonschema -certifi==2022.12.7 +attrs==25.4.0 + # via + # jsonschema + # referencing +certifi==2025.11.12 # via requests -charset-normalizer==3.0.1 +charset-normalizer==3.4.4 # via requests dealer==2.1.0 # via -r requirements.in -django==3.2.18 +django==5.2.9 # via # -r requirements.in # django-bootstrap3 -django-bootstrap3==22.2 - # via -r requirements.in -django-environ==0.9.0 +django-bootstrap3==25.3 # via -r requirements.in -django-super-favicon==0.6.1 +django-environ==0.12.0 # via -r requirements.in -idna==3.4 +idna==3.11 # via requests -jsonschema==4.17.3 +jsonschema==4.25.1 # via -r requirements.in -lxml==4.9.2 - # via -r requirements.in -pillow==9.4.0 - # via django-super-favicon -pyrsistent==0.19.3 +jsonschema-specifications==2025.9.1 # via jsonschema -python-dateutil==2.8.2 +lxml==6.0.2 + # via -r requirements.in +python-dateutil==2.9.0.post0 # via -r requirements.in -pytz==2022.7.1 - # via django ratelimit==2.2.1 # via -r requirements.in raven==6.10.0 # via -r requirements.in -requests==2.28.2 +referencing==0.37.0 + # via + # jsonschema + # jsonschema-specifications +requests==2.32.5 # via -r requirements.in -six==1.16.0 +rpds-py==0.30.0 + # via + # jsonschema + # referencing +six==1.17.0 # via python-dateutil -sqlparse==0.4.3 +sqlparse==0.5.4 # via django -titlecase==2.4 +titlecase==2.4.1 # via -r requirements.in -urllib3==1.26.14 +typing-extensions==4.15.0 + # via + # asgiref + # referencing +urllib3==2.6.1 # via # -r requirements.in # requests diff --git a/requirements_dev.txt b/requirements_dev.txt index d99107e..e374d60 100644 --- a/requirements_dev.txt +++ b/requirements_dev.txt @@ -4,151 +4,166 @@ # # pip-compile requirements_dev.in # -asgiref==3.6.0 +asgiref==3.11.0 # via django -async-generator==1.10 - # via - # trio - # trio-websocket -attrs==22.2.0 +attrs==25.4.0 # via # jsonschema # outcome - # pytest + # referencing # trio -build==0.10.0 +build==1.3.0 # via pip-tools -certifi==2022.12.7 +certifi==2025.11.12 # via # requests # selenium -charset-normalizer==3.0.1 +charset-normalizer==3.4.4 # via requests -click==8.1.3 +click==8.3.1 # via pip-tools -coverage[toml]==6.5.0 +coverage[toml]==7.13.0 # via # coveralls # pytest-cov -coveralls==3.3.1 +coveralls==4.0.2 # via -r requirements_dev.in dealer==2.1.0 # via -r requirements.in -django==3.2.18 +django==5.2.9 # via # -r requirements.in # django-bootstrap3 -django-bootstrap3==22.2 +django-bootstrap3==25.3 # via -r requirements.in -django-environ==0.9.0 - # via -r requirements.in -django-super-favicon==0.6.1 +django-environ==0.12.0 # via -r requirements.in docopt==0.6.2 # via coveralls -exceptiongroup==1.1.0 +exceptiongroup==1.3.1 # via # pytest # trio -flake8==6.0.0 + # trio-websocket +flake8==7.3.0 # via -r requirements_dev.in -h11==0.14.0 +h11==0.16.0 # via wsproto -idna==3.4 +idna==3.11 # via # requests # trio -iniconfig==2.0.0 +iniconfig==2.3.0 # via pytest -jsonschema==4.17.3 +jsonschema==4.25.1 # via -r requirements.in -lxml==4.9.2 +jsonschema-specifications==2025.9.1 + # via jsonschema +lxml==6.0.2 # via -r requirements.in -markupsafe==2.1.2 +markupsafe==3.0.3 # via werkzeug mccabe==0.7.0 # via flake8 -outcome==1.2.0 - # via trio -packaging==23.0 +outcome==1.3.0.post0 + # via + # trio + # trio-websocket +packaging==25.0 # via # build # pytest -pillow==9.4.0 - # via django-super-favicon -pip-tools==6.12.2 +pip-tools==7.5.2 # via -r requirements_dev.in -pluggy==1.0.0 - # via pytest -pycodestyle==2.10.0 +pluggy==1.6.0 + # via + # pytest + # pytest-cov +pycodestyle==2.14.0 # via flake8 -pyflakes==3.0.1 +pyflakes==3.4.0 # via flake8 -pyproject-hooks==1.0.0 - # via build -pyrsistent==0.19.3 - # via jsonschema +pygments==2.19.2 + # via pytest +pyproject-hooks==1.2.0 + # via + # build + # pip-tools pysocks==1.7.1 # via urllib3 -pytest==7.2.1 +pytest==9.0.2 # via # -r requirements_dev.in # pytest-cov # pytest-django -pytest-cov==4.0.0 +pytest-cov==7.0.0 # via -r requirements_dev.in -pytest-django==4.5.2 +pytest-django==4.11.1 # via -r requirements_dev.in -pytest-localserver==0.7.1 +pytest-localserver==0.10.0 # via -r requirements_dev.in -python-dateutil==2.8.2 +python-dateutil==2.9.0.post0 # via -r requirements.in -pytz==2022.7.1 - # via django ratelimit==2.2.1 # via -r requirements.in raven==6.10.0 # via -r requirements.in -requests==2.28.2 +referencing==0.37.0 + # via + # jsonschema + # jsonschema-specifications +requests==2.32.5 # via # -r requirements.in # coveralls -selenium==4.8.0 +rpds-py==0.30.0 + # via + # jsonschema + # referencing +selenium==4.39.0 # via -r requirements_dev.in -six==1.16.0 +six==1.17.0 # via python-dateutil -sniffio==1.3.0 +sniffio==1.3.1 # via trio sortedcontainers==2.4.0 # via trio -sqlparse==0.4.3 +sqlparse==0.5.4 # via django -titlecase==2.4 +titlecase==2.4.1 # via -r requirements.in -tomli==2.0.1 +tomli==2.3.0 # via # build # coverage - # pyproject-hooks + # pip-tools # pytest -trio==0.22.0 +trio==0.32.0 # via # selenium # trio-websocket -trio-websocket==0.9.2 +trio-websocket==0.12.2 # via selenium -urllib3[socks]==1.26.14 +typing-extensions==4.15.0 + # via + # asgiref + # exceptiongroup + # referencing + # selenium +urllib3[socks]==2.6.1 # via # -r requirements.in # requests # selenium -werkzeug==2.2.3 +websocket-client==1.9.0 + # via selenium +werkzeug==3.1.4 # via # -r requirements_dev.in # pytest-localserver -wheel==0.38.4 +wheel==0.45.1 # via pip-tools -wsproto==1.2.0 +wsproto==1.3.2 # via trio-websocket # The following packages are considered to be unsafe in a requirements file: