[PR #12355] [MERGED] fix: update datetime and logging imports #9697

Closed
opened 2025-11-11 18:29:11 -06:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/open-webui/open-webui/pull/12355
Author: @silentoplayz
Created: 4/2/2025
Status: Merged
Merged: 4/3/2025
Merged by: @tjbck

Base: devHead: logging-fix


📝 Commits (2)

📊 Changes

1 file changed (+3 additions, -1 deletions)

View changed files

📝 backend/open_webui/utils/auth.py (+3 -1)

📄 Description

Pull Request Checklist:

  • Target branch: Please verify that the pull request targets the dev branch.
  • Description: Provide a concise description of the changes made in this pull request.
  • Changelog: Ensure a changelog entry following the format of Keep a Changelog is added at the bottom of the PR description.
  • Documentation: No documentation updates required for this change.
  • Dependencies: No new dependencies were added.
  • Testing: No new tests were written, but compatibility testing was performed to ensure fixes didn't introduce new issues.
  • Code review: A self-review of the code was performed to address any coding standard issues and ensure adherence to the project's coding standards.
  • Prefix: The prefix "fix" was used to categorize this pull request.

Changelog Entry

Description

  • Updated datetime imports to use pytz for UTC handling and updated logging imports to handle deprecation issues in Python 3.11.

Changed

  • Replaced from datetime import UTC, datetime, timedelta with from datetime import datetime, timedelta and from pytz import UTC or from datetime import timezone as tz.

Fixed

  • Fixed compatibility issue with Python 3.11 by updating datetime import.

No further changes were made beyond the minimum required for compatibility.

Screenshots or Videos

After: (Success!)
image


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/open-webui/open-webui/pull/12355 **Author:** [@silentoplayz](https://github.com/silentoplayz) **Created:** 4/2/2025 **Status:** ✅ Merged **Merged:** 4/3/2025 **Merged by:** [@tjbck](https://github.com/tjbck) **Base:** `dev` ← **Head:** `logging-fix` --- ### 📝 Commits (2) - [`d65471c`](https://github.com/open-webui/open-webui/commit/d65471c4201381d0d4fc8b99d595c8dce8871235) fix - [`dd5bafe`](https://github.com/open-webui/open-webui/commit/dd5bafe8afcc22c53da5c38989a5b19bf11cc198) Update env.py ### 📊 Changes **1 file changed** (+3 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `backend/open_webui/utils/auth.py` (+3 -1) </details> ### 📄 Description **Pull Request Checklist:** - [x] **Target branch:** Please verify that the pull request targets the `dev` branch. - [x] **Description:** Provide a concise description of the changes made in this pull request. - [x] **Changelog:** Ensure a changelog entry following the format of [Keep a Changelog](https://keepachangelog.com/) is added at the bottom of the PR description. - [x] **Documentation:** No documentation updates required for this change. - [x] **Dependencies:** No new dependencies were added. - [x] **Testing:** No new tests were written, but compatibility testing was performed to ensure fixes didn't introduce new issues. - [x] **Code review:** A self-review of the code was performed to address any coding standard issues and ensure adherence to the project's coding standards. - [x] **Prefix:** The prefix "fix" was used to categorize this pull request. # Changelog Entry ### Description - Updated datetime imports to use `pytz` for UTC handling and updated logging imports to handle deprecation issues in Python 3.11. ### Changed - Replaced `from datetime import UTC, datetime, timedelta` with `from datetime import datetime, timedelta` and `from pytz import UTC` or `from datetime import timezone as tz`. ### Fixed - Fixed compatibility issue with Python 3.11 by updating `datetime` import. --- No further changes were made beyond the minimum required for compatibility. ### Screenshots or Videos **After: (Success!)** ![image](https://github.com/user-attachments/assets/ed89a9dc-6520-4e73-81b3-708fa2ec8342) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2025-11-11 18:29:11 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#9697