Skip to content

Fix deprecated datetime.utcfromtimestamp usage and stop union() mutating its arguments - #264

Merged
norkans7 merged 2 commits into
mainfrom
utils-fixes
Jul 27, 2026
Merged

Fix deprecated datetime.utcfromtimestamp usage and stop union() mutating its arguments#264
norkans7 merged 2 commits into
mainfrom
utils-fixes

Conversation

@norkans7

Copy link
Copy Markdown
Contributor

ms_to_datetime used datetime.utcfromtimestamp(), deprecated since Python 3.12 — replaced with datetime.fromtimestamp(..., tz=timezone.utc) with an identical aware-UTC return value. union() also extended its first argument in place, silently growing a caller's (possibly shared) list — it now builds a new list with the same dedup/ordering semantics. Tests cover the round-trip and non-mutation.

@norkans7
norkans7 merged commit c48940f into main Jul 27, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant