hunk.code_window: def emit_endpoint_deprecation_notice(
       handler: tornado.web.RequestHandler, new_path: str
   ) -> None:
       """
       Emits the warning about deprecation of HTTP endpoint both in the HTTP header
       and in the application logs.
       """
  
hunk.labels: keep keep keep keep keep replace replace keep
hunk.after_edit:     Emits the warning about deprecation of HTTP endpoint in the HTTP header.
  
hunk.file_path: lib/streamlit/web/server/server_util.py
hunk.type: replace
file: # Copyright (c) Streamlit Inc. (2018-2022) Snowflake Inc. (2022)
  #
  # Licensed under the Apache License, Version 2.0 (the "License");
  # you may not use this file except in compliance with the License.
  # You may obtain a copy of the License at
  #
  #     http://www.apache.org/licenses/LICENSE-2.0
  #
  # Unless required by applicable law or agreed to in writing, software
  # distributed under the License is distributed on an "AS IS" BASIS,
  # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  # See the License for the specific language governing permissions and
  # limitations under the License.
  
  from datetime import date
  
  import pandas as pd
  
  import streamlit as st
  
  df = pd.DataFrame(
      {
          "index": [
              date(2019, 8, 9),
              date(2019, 8, 10),
              date(2019, 8, 11),
              date(2019, 8, 12),
          ],
          "numbers": [10, 50, 30, 40],
      }
  )
  
  df.set_index("index", inplace=True)
  
  # st._legacy_area/_legacy_bar/_legacy_line_chart all use Altair/Vega-Lite under the hood.
  # By default, Vega-Lite displays time values in the browser's local
  # time zone. In `altair.generate_chart`, we explicitly set the time
  # display to UTC, so that our results are consistent. This test verifies
  # that change!
  st._legacy_area_chart(df)
  st._legacy_bar_chart(df)
  st._legacy_line_chart(df)
  