Bug 16498

Summary: layerindex: URL form fields warn about the default scheme changing in Django 6.0
Product: [Yocto Project Subprojects] Layer Index Reporter: Tim Orling <tim.orling>
Component: Layer IndexAssignee: Tim Orling <tim.orling>
Status: IN PROGRESS REVIEW --- QA Contact: apoorv sangal <apoorvsangal>
Severity: normal    
Priority: Medium    
Version: unspecified   
Target Milestone: 6.2 M2   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)

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/