Re: [Django] #34380: Make URLField assume "https".

31 views
Skip to first unread message

Django

unread,
Mar 8, 2023, 2:32:32 PM3/8/23
to django-...@googlegroups.com
#34380: Make URLField assume "https".
-------------------------------------+-------------------------------------
Reporter: Coen van der Kamp | Owner: Coen van
Type: | der Kamp
Cleanup/optimization | Status: assigned
Component: Forms | Version: 4.1
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 1
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Coen van der Kamp):

I've updated the PR (improved the patch).
https://github.com/django/django/pull/16614/files
Not sure if I need to update something on this ticket.

--
Ticket URL: <https://code.djangoproject.com/ticket/34380#comment:4>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Apr 27, 2023, 2:32:09 AM4/27/23
to django-...@googlegroups.com
#34380: Make URLField assume "https".
-------------------------------------+-------------------------------------
Reporter: Coen van der Kamp | Owner: Coen van
Type: | der Kamp
Cleanup/optimization | Status: assigned
Component: Forms | Version: 4.1
Severity: Normal | Resolution:
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak):

* needs_better_patch: 1 => 0
* stage: Accepted => Ready for checkin
* needs_docs: 1 => 0


--
Ticket URL: <https://code.djangoproject.com/ticket/34380#comment:5>

Django

unread,
Apr 28, 2023, 1:35:14 AM4/28/23
to django-...@googlegroups.com
#34380: Make URLField assume "https".
-------------------------------------+-------------------------------------
Reporter: Coen van der Kamp | Owner: Coen van
Type: | der Kamp
Cleanup/optimization | Status: closed
Component: Forms | Version: 4.1
Severity: Normal | Resolution: fixed

Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak <felisiak.mariusz@…>):

* status: assigned => closed
* resolution: => fixed


Comment:

In [changeset:"7bbbadc69383f0a2b99253e153b974f8783e876d" 7bbbadc6]:
{{{
#!CommitTicketReference repository=""
revision="7bbbadc69383f0a2b99253e153b974f8783e876d"
Fixed #34380 -- Allowed specifying a default URL scheme in forms.URLField.

This also deprecates "http" as the default scheme.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/34380#comment:6>

Django

unread,
Nov 25, 2023, 12:53:33 PM11/25/23
to django-...@googlegroups.com
#34380: Make URLField assume "https".
-------------------------------------+-------------------------------------
Reporter: Coen van der Kamp | Owner: Coen van
Type: | der Kamp
Cleanup/optimization | Status: closed
Component: Forms | Version: 4.1
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Mariusz Felisiak <felisiak.mariusz@…>):

In [changeset:"0203771b626c27c1af24cdeb0e425ccca3d19ad5" 0203771]:
{{{
#!CommitTicketReference repository=""
revision="0203771b626c27c1af24cdeb0e425ccca3d19ad5"
Refs #34380 -- Improved docs for forms.URLField.assume_scheme.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/34380#comment:7>

Django

unread,
Nov 25, 2023, 12:53:59 PM11/25/23
to django-...@googlegroups.com
#34380: Make URLField assume "https".
-------------------------------------+-------------------------------------
Reporter: Coen van der Kamp | Owner: Coen van
Type: | der Kamp
Cleanup/optimization | Status: closed
Component: Forms | Version: 4.1
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Mariusz Felisiak <felisiak.mariusz@…>):

In [changeset:"4c74dff75910ba500ce232c30742c7dfe3bcc4ea" 4c74dff]:
{{{
#!CommitTicketReference repository=""
revision="4c74dff75910ba500ce232c30742c7dfe3bcc4ea"
[5.0.x] Refs #34380 -- Improved docs for forms.URLField.assume_scheme.

Backport of 0203771b626c27c1af24cdeb0e425ccca3d19ad5 from main
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/34380#comment:8>

Django

unread,
Nov 28, 2023, 2:04:31 PM11/28/23
to django-...@googlegroups.com
#34380: Make URLField assume "https".
-------------------------------------+-------------------------------------
Reporter: Coen van der Kamp | Owner: Coen van
Type: | der Kamp
Cleanup/optimization | Status: closed
Component: Forms | Version: 4.1
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by GitHub <noreply@…>):

In [changeset:"a4931cd75a1780923b02e43475ba5447df3adb31" a4931cd7]:
{{{
#!CommitTicketReference repository=""
revision="a4931cd75a1780923b02e43475ba5447df3adb31"
Refs #34380 -- Added FORMS_URLFIELD_ASSUME_HTTPS transitional setting.

This allows early adoption of the new default "https".
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/34380#comment:9>

Django

unread,
Nov 28, 2023, 2:09:17 PM11/28/23
to django-...@googlegroups.com
#34380: Make URLField assume "https".
-------------------------------------+-------------------------------------
Reporter: Coen van der Kamp | Owner: Coen van
Type: | der Kamp
Cleanup/optimization | Status: closed
Component: Forms | Version: 4.1
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Mariusz Felisiak <felisiak.mariusz@…>):

In [changeset:"92af3d4d235448446e53e982275315bedcc4c204" 92af3d4d]:
{{{
#!CommitTicketReference repository=""
revision="92af3d4d235448446e53e982275315bedcc4c204"
[5.0.x] Refs #34380 -- Added FORMS_URLFIELD_ASSUME_HTTPS transitional
setting.

This allows early adoption of the new default "https".

Backport of a4931cd75a1780923b02e43475ba5447df3adb31 from main.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/34380#comment:10>

Django

unread,
Jan 18, 2024, 7:00:24 AM1/18/24
to django-...@googlegroups.com
#34380: Make URLField assume "https".
-------------------------------------+-------------------------------------
Reporter: Coen van der Kamp | Owner: Coen van
Type: | der Kamp
Cleanup/optimization | Status: closed
Component: Forms | Version: 4.1
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Daniel Hahler):

There is no (easy) way to pass/use `assume_scheme` via
`django.db.models.fields.URLField` (directly), avoiding the deprecation
messages (since using the transitional setting
`FORMS_URLFIELD_ASSUME_HTTPS` also triggers a deprecation message
already).

Should `django.db.models.fields.URLField` accept/handle `assume_scheme`?

Or is the way to go to use `FORMS_URLFIELD_ASSUME_HTTPS` for now, ignoring
its `DeprecationMessage`, and to remove the setting with Django 6.0 again?

Might be nice to document this then in the release notes / documentation.

--
Ticket URL: <https://code.djangoproject.com/ticket/34380#comment:11>

Django

unread,
Jan 18, 2024, 7:17:59 AM1/18/24
to django-...@googlegroups.com
#34380: Make URLField assume "https".
-------------------------------------+-------------------------------------
Reporter: Coen van der Kamp | Owner: Coen van
Type: | der Kamp
Cleanup/optimization | Status: closed
Component: Forms | Version: 4.1
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Mariusz Felisiak):

> Or is the way to go to use `FORMS_URLFIELD_ASSUME_HTTPS` for now,
ignoring its `DeprecationMessage`, and to remove the setting with Django
6.0 again?

That was our idea (check out the entire [https://forum.djangoproject.com/t
/stop-the-django-5-0-press-move-urlfield-assume-scheme-change-from-
deprecation-to-hard-cut/25652/20 discussion]). If you agree for an early
adoption of the new (Django 6.0+) default, set
`FORMS_URLFIELD_ASSUME_HTTPS = True` and ignore it's deprecation warning
during Django 5.X release cycle with e.g.
`warnings.filterwarnings("ignore", "FORMS_URLFIELD_ASSUME_HTTPS",
category=RemovedInDjango60Warning)`. In Django 6.0 you will be able to
remove both the `FORMS_URLFIELD_ASSUME_HTTPS` setting and a `warnings`
filter.

--
Ticket URL: <https://code.djangoproject.com/ticket/34380#comment:12>

Django

unread,
Jan 15, 2025, 4:28:47 PM1/15/25
to django-...@googlegroups.com
#34380: Make URLField assume "https".
-------------------------------------+-------------------------------------
Reporter: Coen van der Kamp | Owner: Coen van
Type: | der Kamp
Cleanup/optimization | Status: closed
Component: Forms | Version: 4.1
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Sarah Boyce <42296566+sarahboyce@…>):

In [changeset:"9a3f86e96009c1137b286f6d579b9d812a0dee69" 9a3f86e]:
{{{#!CommitTicketReference repository=""
revision="9a3f86e96009c1137b286f6d579b9d812a0dee69"
Refs #34380 -- Changed the URLField default scheme to https and removed
FORMS_URLFIELD_ASSUME_HTTPS per deprecation timeline.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/34380#comment:13>

Django

unread,
Mar 12, 2025, 11:45:21 AM3/12/25
to django-...@googlegroups.com
#34380: Make URLField assume "https".
-------------------------------------+-------------------------------------
Reporter: Coen van der Kamp | Owner: Coen van
Type: | der Kamp
Cleanup/optimization | Status: closed
Component: Forms | Version: 4.1
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Sarah Boyce <42296566+sarahboyce@…>):

In [changeset:"ed984f2ac4923d6bc625adb4e8d9146765a02ab1" ed984f2a]:
{{{#!CommitTicketReference repository=""
revision="ed984f2ac4923d6bc625adb4e8d9146765a02ab1"
Refs #34380 -- Fixed the documented URLField default scheme to https.

Missed in 9a3f86e96009c1137b286f6d579b9d812a0dee69.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/34380#comment:14>
Reply all
Reply to author
Forward
0 new messages