Bug 16498 - layerindex: URL form fields warn about the default scheme changing in Django 6.0
Summary: layerindex: URL form fields warn about the default scheme changing in Django 6.0
Status: IN PROGRESS REVIEW
Alias: None
Product: Layer Index
Classification: Yocto Project Subprojects
Component: Layer Index (show other bugs)
Version: unspecified
Hardware: x86 Multiple
: Medium normal
Target Milestone: 6.2 M2
Assignee: Tim Orling
QA Contact: apoorv sangal
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2026-11-14 06:54 UTC by Tim Orling
Modified: 2026-11-14 07:23 UTC (History)
0 users

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tim Orling 2026-11-14 06:54:43 UTC
With Django 5.2, the test suite and the web application show:

  RemovedInDjango60Warning: The default scheme will be changed from 'http' to 'https' in Django 6.0. Pass the forms.URLField.assume_scheme argument to silence this warning, or set the FORMS_URLFIELD_ASSUME_HTTPS transitional setting to True to opt into using 'https' as the new default scheme.

It comes from the form fields Django creates for the URL fields of the models:

- EditLayerForm (layerindex/forms.py): vcs_web_url and mailing_list_url of LayerItem
- RecipeChangeForm (layerindex/forms.py, bulk change): homepage and bugtracker of RecipeChange
- the LayerItem admin page

When someone enters a URL without a scheme (e.g. "github.com/foo/meta-bar"), Django 5.2 stores it as http://, and Django 6.0 will store it as https://. The forms should say which scheme they mean, so that the behaviour does not change silently when upgrading to Django 6.0, and the warning goes away.

Proposed fix: use https, as Django 6.0 will, by passing assume_scheme="https" to these URL form fields. The FORMS_URLFIELD_ASSUME_HTTPS setting is itself deprecated and removed in Django 6.0, so it is not used.
Comment 1 Tim Orling 2026-11-14 07:04:47 UTC
Patch sent for review, staged on master-next:

layerindex: use https for URLs entered without a scheme
https://lore.kernel.org/yocto-patches/20261114070115.28388-1-tim.orling@konsulko.com/