GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Make the writer datetime test independent of local timezone by saitakarcesme · Pull Request #32 · python-lsp/python-lsp-jsonrpc

Conversation

@saitakarcesme

@saitakarcesme saitakarcesme commented Sep 22, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Fixes #6. test_writer_bad_message calls timestamp() on a naive datetime, so its expected bytes depend on the host timezone. The two hard-coded timestamps only cover some environments; adding another timestamp as in the closed #7 would leave the underlying problem.

Use a UTC-aware JsonDatetime and keep a single timestamp expectation (1546304461), while retaining the existing empty-output allowance for the standard JSON fallback. Instantiate the subclass directly instead of permanently replacing the global datetime.datetime class.

Validation on Python 3.13.5:

  • Before the change, the test passes in UTC and America/New_York but fails in Europe/Luxembourg, Asia/Kathmandu and Pacific/Chatham.
  • After the change, all 27 tests pass in each of those five timezones with both ujson 6.0.0 and the standard-library JSON fallback (10 separate processes). Also verified datetime.datetime retains its original identity after each suite run.
  • Repository-wide pylint (10.00/10), pycodestyle, pyflakes and git diff --check pass.

This changes tests and macOS CI only; it does not alter production serialization or the separate orjson migration in #29. No Windows/OpenBSD run was performed locally.

CI follow-up:

  • The old macOS jobs requested the retired macos-13 runner and were cancelled without executing any steps.
  • Switch only the runner label to macos-15-intel, preserving the x64 architecture and Python 3.8/3.9/3.10 matrix.
  • YAML semantic comparison confirms only the runner label changed. git diff --check passes, and all 27 tests pass on Linux / Python 3.13.15 with TZ=Europe/Luxembourg. GitHub macOS execution is still required.

AI disclosure: prepared and tested by OpenAI Codex acting on behalf of @saitakarcesme. No independent human review is claimed.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@saitakarcesme
Make the writer datetime test independent of local timezone
7718a39
@blouirts123 blouirts123 mentioned this pull request Oct 16, 2026
Handle LSP header order and case when reading messages #33
Open
@saitakarcesme
Run macOS tests on the supported Intel runner
de8445f
@saitakarcesme

saitakarcesme commented Oct 21, 2026

Copy link
Copy Markdown
Author

Fixed the macOS CI blocker in a separate commit on this branch. The previous Mac tests run shows all three jobs cancelled with no runner assigned and no steps executed; each requested macos-13.

GitHub has retired that image and documents macos-15-intel as the standard Intel replacement. Changed only that runner label, preserving the x64 architecture, Python 3.8/3.9/3.10 matrix, test commands and timeout.

Validation: YAML parses and its only semantic difference is the runner label; git diff --check passes; all 27 tests pass locally on Linux / Python 3.13.15 with TZ=Europe/Luxembourg. The previous Linux, Windows and static-analysis workflows passed. The new macOS run must still execute on GitHub; no local macOS result is claimed.

The new Mac, Linux, Windows and static-analysis runs are now awaiting fork-workflow approval. Could a maintainer approve them, starting with the new Mac run?

Fix and follow-up prepared with Codex assistance.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Test test_writer_bad_message fails with ujson

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@saitakarcesme
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.