rusackas commented on code in PR #41502:
URL: https://github.com/apache/superset/pull/41502#discussion_r3564110455


##########
superset/commands/report/execute.py:
##########
@@ -761,7 +775,7 @@ def _get_embedded_data(self) -> pd.DataFrame:
         """
         Return data as a Pandas dataframe, to embed in notifications as a 
table.
         """
-        start_time = datetime.utcnow()
+        start_time = datetime.now(timezone.utc).replace(tzinfo=None)

Review Comment:
   Added the annotation here too.



##########
superset/commands/report/execute.py:
##########
@@ -1390,7 +1413,7 @@ def run(self) -> None:
             )
             user = security_manager.find_user(username)
 
-            start_time = datetime.utcnow()
+            start_time = datetime.now(timezone.utc).replace(tzinfo=None)

Review Comment:
   Added the annotation here too.



##########
superset/utils/cache.py:
##########
@@ -226,7 +226,7 @@ def wrapper(*args: Any, **kwargs: Any) -> Response:  # 
noqa: C901
 
             # Check if the cache is stale. Default the content_changed_time to 
now
             # if we don't know when it was last modified.
-            content_changed_time = datetime.utcnow()
+            content_changed_time = 
datetime.now(timezone.utc).replace(tzinfo=None)
             if get_last_modified:

Review Comment:
   Added the annotation on `content_changed_time`.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to