  def parse_http_date_safe(date):
      """
      Same as parse_http_date, but return None if the input is invalid.
      """
      with suppress(Exception):
          return parse_http_date(date)
  
  
  # Base 36 functions: useful for generating compact URLs
  
 
</s> remove             with suppress(Exception):
 </s> add             try: </s> remove     with suppress(AttributeError):
 </s> add     try: </s> remove from contextlib import suppress

 </s> add 
    try:
  def parse_http_date_safe(date):
      """
      Same as parse_http_date, but return None if the input is invalid.
      """
    try:
          return parse_http_date(date)
  
  
  # Base 36 functions: useful for generating compact URLs
  
keep keep keep keep replace keep keep keep keep keep
 Reverted "Fixed #27818 -- Replaced try/except/pass with contextlib.suppress()."

This reverts commit 550cb3a365dee4edfdd1563224d5304de2a57fda
because try/except performs better. 
django/utils/http.py