Skip to content

fix(plugins:getstream): Use python 3.10 compatible timezone#267

Merged
Nash0x7E2 merged 1 commit intoGetStream:mainfrom
alisaifee:fix-python-3.10-compatibility
Dec 30, 2025
Merged

fix(plugins:getstream): Use python 3.10 compatible timezone#267
Nash0x7E2 merged 1 commit intoGetStream:mainfrom
alisaifee:fix-python-3.10-compatibility

Conversation

@alisaifee
Copy link
Contributor

@alisaifee alisaifee commented Dec 17, 2025

Description

The datetime.UTC alias was only added in python 3.11

Fixes

Summary by CodeRabbit

Bug Fixes

  • Fixed timezone handling in timestamp operations to prevent potential errors. Timestamp fields now use correct timezone specifications for reliable date-time processing.

✏️ Tip: You can customize this high-level summary in your review settings.

The datetime.UTC alias was only added in python 3.11
@coderabbitai
Copy link

coderabbitai bot commented Dec 17, 2025

Walkthrough

A minor fix corrects timezone handling in the stream edge transport module by replacing datetime.UTC with the proper datetime.timezone.utc constant in the created_at and updated_at fields, preventing potential AttributeError exceptions.

Changes

Cohort / File(s) Summary
Timezone constant correction
plugins/getstream/vision_agents/plugins/getstream/stream_edge_transport.py
Updated timezone specifications from datetime.UTC to datetime.timezone.utc for created_at and updated_at fields to ensure correct timezone handling and prevent AttributeError

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

  • Single file modification with straightforward constant replacement
  • No logic changes or control flow alterations
  • No new dependencies or architectural concerns

Poem

In the darkness where hours pool and gather,
A single fix descends like morning—
UTC replaces its ghost twin,
and timestamps breathe correctly again,
no more phantom AttributeErrors haunting the wire.

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and accurately summarizes the main change: fixing Python 3.10 compatibility by replacing datetime.UTC with a compatible timezone approach.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between b5649a8 and 5f45393.

📒 Files selected for processing (1)
  • plugins/getstream/vision_agents/plugins/getstream/stream_edge_transport.py (1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
**/*.py

📄 CodeRabbit inference engine (.cursor/rules/python.mdc)

**/*.py: Never adjust sys.path in Python code
Never write except Exception as e - use specific exception handling
Avoid using getattr, hasattr, delattr and setattr; prefer normal attribute access in Python
Docstrings should follow the Google style guide for docstrings

Files:

  • plugins/getstream/vision_agents/plugins/getstream/stream_edge_transport.py
🔇 Additional comments (1)
plugins/getstream/vision_agents/plugins/getstream/stream_edge_transport.py (1)

415-427: Python 3.10 compatibility fix is complete and correct.

The changes from datetime.UTC to datetime.timezone.utc at lines 420 and 423 properly address Python 3.10 compatibility, since the UTC alias was only introduced in Python 3.11. Both resolve to the identical timezone object with no behavioral changes. Verification confirms no remaining datetime.UTC instances exist in the codebase.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@Nash0x7E2 Nash0x7E2 merged commit e3f7793 into GetStream:main Dec 30, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants