-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Upgrade to Django 5.2 LTS #16185
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upgrade to Django 5.2 LTS #16185
Changes from 4 commits
416a28e
6d66901
4258756
b9df87f
59f895a
1c818df
491e3ef
4432f49
0cfc8e1
f0d7e5d
b412f43
0fff088
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -160,10 +160,13 @@ def to_internal_value(self, paths): | |
| class URLField(CharField): | ||
| # these lines set up a custom regex that allow numbers in the | ||
| # top-level domain | ||
| # Django 5.2 removed URLValidator.ul, it was \u00a1-\uffff for unicode letters | ||
| ul = r'\u00a1-\uffff' | ||
|
||
|
|
||
| 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' + 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'(?<!-)' # can't end with a dash | ||
| r'\.?' # may have a trailing dot | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -11,13 +11,22 @@ def get_dispatcherd_config(for_service: bool = False, mock_publish: bool = False | |
| Parameters: | ||
| for_service: if True, include dynamic options needed for running the dispatcher service | ||
| this will require database access, you should delay evaluation until after app setup | ||
| mock_publish: if True, use mock values that don't require database access | ||
| this is used during tests to avoid database queries during app initialization | ||
| """ | ||
| # When mock_publish=True (e.g., during tests), use a default value to avoid | ||
| # database access in get_auto_max_workers() which queries settings.IS_K8S | ||
| if mock_publish: | ||
| max_workers = 20 # Reasonable default for tests | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ...sure |
||
| else: | ||
| max_workers = get_auto_max_workers() | ||
|
|
||
| config = { | ||
| "version": 2, | ||
| "service": { | ||
| "pool_kwargs": { | ||
| "min_workers": settings.JOB_EVENT_WORKERS, | ||
| "max_workers": get_auto_max_workers(), | ||
| "max_workers": max_workers, | ||
| }, | ||
| "main_kwargs": {"node_id": settings.CLUSTER_HOST_ID}, | ||
| "process_manager_cls": "ForkServerManager", | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| # Generated by Django 5.2.8 on 2025-11-20 18:39 | ||
|
|
||
| from django.db import migrations, models | ||
|
|
||
|
|
||
| class Migration(migrations.Migration): | ||
|
|
||
| dependencies = [ | ||
| ('main', '0204_squashed_deletions'), | ||
| ] | ||
|
|
||
| operations = [ | ||
| migrations.AlterField( | ||
| model_name='instance', | ||
| name='peers', | ||
| field=models.ManyToManyField( | ||
| related_name='peers_from', through='main.InstanceLink', through_fields=('source', 'target'), to='main.receptoraddress' | ||
| ), | ||
| ), | ||
| migrations.AlterField( | ||
| model_name='job', | ||
| name='hosts', | ||
| field=models.ManyToManyField(editable=False, related_name='jobs', through='main.JobHostSummary', through_fields=('job', 'host'), to='main.host'), | ||
| ), | ||
| migrations.AlterField( | ||
| model_name='role', | ||
| name='ancestors', | ||
| field=models.ManyToManyField( | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I saw this in other libraries, I expect it to be a no-op |
||
| related_name='descendents', through='main.RoleAncestorEntry', through_fields=('descendent', 'ancestor'), to='main.role' | ||
| ), | ||
| ), | ||
| ] | ||
Uh oh!
There was an error while loading. Please reload this page.