diff --git a/awx/conf/fields.py b/awx/conf/fields.py index 3296c29c04..ae809ca9b6 100644 --- a/awx/conf/fields.py +++ b/awx/conf/fields.py @@ -6,7 +6,7 @@ import urllib.parse as urlparse from collections import OrderedDict # Django -from django.core.validators import URLValidator, _lazy_re_compile +from django.core.validators import URLValidator, DomainNameValidator, _lazy_re_compile from django.utils.translation import gettext_lazy as _ # Django REST Framework @@ -160,10 +160,11 @@ class StringListIsolatedPathField(StringListField): class URLField(CharField): # these lines set up a custom regex that allow numbers in the # top-level domain + tld_re = ( r'\.' # dot r'(?!-)' # can't start with a dash - r'(?:[a-z' + URLValidator.ul + r'0-9' + '-]{2,63}' # domain label, this line was changed from the original URLValidator + r'(?:[a-z' + DomainNameValidator.ul + r'0-9' + '-]{2,63}' # domain label, this line was changed from the original URLValidator r'|xn--[a-z0-9]{1,59})' # or punycode label r'(?=5.2,<5.3 # Django 5.2 LTS, allow patch updates django-cors-headers django-crum django-extensions diff --git a/requirements/requirements.txt b/requirements/requirements.txt index 3e65649908..f88df90e25 100644 --- a/requirements/requirements.txt +++ b/requirements/requirements.txt @@ -124,7 +124,7 @@ dispatcherd==2025.5.21 # via -r /awx_devel/requirements/requirements.in distro==1.9.0 # via -r /awx_devel/requirements/requirements.in -django==4.2.26 +django==5.2.8 # via # -r /awx_devel/requirements/requirements.in # channels diff --git a/requirements/requirements_dev.txt b/requirements/requirements_dev.txt index 92ef46f576..7c6a84ceb3 100644 --- a/requirements/requirements_dev.txt +++ b/requirements/requirements_dev.txt @@ -1,5 +1,5 @@ build -django-debug-toolbar==3.2.4 +django-debug-toolbar>=6.0 # Django 5.2 compatibility django-test-migrations drf-spectacular>=0.27.0 # Modern OpenAPI 3.0 schema generator # pprofile - re-add once https://github.com/vpelletier/pprofile/issues/41 is addressed @@ -28,4 +28,3 @@ pip>=21.3,<=24.0 # PEP 660 – Editable installs for pyproject.toml based builds debugpy remote-pdb sdb -