From daf88e778bd39d908dca9efc3571d37adbd2ff4a Mon Sep 17 00:00:00 2001 From: Mariusz Felisiak Date: Thu, 12 Jan 2023 12:34:42 +0100 Subject: Refs #25916 -- Removed SitemapIndexItem.__str__() per deprecation timeline. --- django/contrib/sitemaps/views.py | 11 ----------- 1 file changed, 11 deletions(-) (limited to 'django') diff --git a/django/contrib/sitemaps/views.py b/django/contrib/sitemaps/views.py index 679f7ed611..d696639932 100644 --- a/django/contrib/sitemaps/views.py +++ b/django/contrib/sitemaps/views.py @@ -1,5 +1,4 @@ import datetime -import warnings from dataclasses import dataclass from functools import wraps @@ -9,7 +8,6 @@ from django.http import Http404 from django.template.response import TemplateResponse from django.urls import reverse from django.utils import timezone -from django.utils.deprecation import RemovedInDjango50Warning from django.utils.http import http_date @@ -18,15 +16,6 @@ class SitemapIndexItem: location: str last_mod: bool = None - # RemovedInDjango50Warning - def __str__(self): - msg = ( - "Calling `__str__` on SitemapIndexItem is deprecated, use the `location` " - "attribute instead." - ) - warnings.warn(msg, RemovedInDjango50Warning, stacklevel=2) - return self.location - def x_robots_tag(func): @wraps(func) -- cgit v1.3