Skip to content
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

5.0: Update django.conf #2008

Merged
merged 1 commit into from
Mar 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions django-stubs/conf/__init__.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ ENVIRONMENT_VARIABLE: Literal["DJANGO_SETTINGS_MODULE"]
DEFAULT_STORAGE_ALIAS: Literal["default"]
STATICFILES_STORAGE_ALIAS: Literal["staticfiles"]

# RemovedInDjango60Warning.
FORMS_URLFIELD_ASSUME_HTTPS_DEPRECATED_MSG: str

# required for plugin to be able to distinguish this specific instance of LazySettings from others
@type_check_only
class _DjangoConfLazyObject(LazyObject):
Expand Down
9 changes: 5 additions & 4 deletions django-stubs/conf/global_settings.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,11 @@ TEMPLATES: list[dict[str, Any]]
# Default form rendering class.
FORM_RENDERER: str

# RemovedInDjango60Warning: It's a transitional setting helpful in early
# adoption of "https" as the new default value of forms.URLField.assume_scheme.
# Set to True to assume "https" during the Django 5.x release cycle.
FORMS_URLFIELD_ASSUME_HTTPS: bool

# Default email address to use for various automated correspondence from
# the site managers.
DEFAULT_FROM_EMAIL: str
Expand Down Expand Up @@ -429,10 +434,6 @@ CSRF_HEADER_NAME: str
CSRF_TRUSTED_ORIGINS: list[str]
CSRF_USE_SESSIONS: bool

# Whether to mask CSRF cookie value. It's a transitional setting helpful in
# migrating multiple instance of the same project to Django 4.1+.
CSRF_COOKIE_MASKED: bool

############
# MESSAGES #
############
Expand Down
3 changes: 0 additions & 3 deletions scripts/stubtest/allowlist_todo_django50.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@
# Only discrepancies that appeared after Django 4.2 -> 5.0 update.
# Unsorted: there are real problems and things we can really ignore.

django.conf.FORMS_URLFIELD_ASSUME_HTTPS_DEPRECATED_MSG
django.conf.global_settings.CSRF_COOKIE_MASKED
django.conf.global_settings.FORMS_URLFIELD_ASSUME_HTTPS
django.contrib.admin.AdminSite.get_model_admin
django.contrib.admin.AllValuesFieldListFilter.get_facet_counts
django.contrib.admin.BooleanFieldListFilter.get_facet_counts
Expand Down