From 7718a3935322fab38f0bc5c2378440cd57d6f686 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=B0brahim=20Sait=20Akar=C3=A7e=C5=9Fme?= <72226290+saitakarcesme@users.noreply.github.com> Date: Tue, 22 Sep 2026 03:17:48 +0200 Subject: [PATCH 1/2] Make the writer datetime test independent of local timezone --- test/test_streams.py | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/test/test_streams.py b/test/test_streams.py index 14fe1bb..cd663cc 100644 --- a/test/test_streams.py +++ b/test/test_streams.py @@ -99,7 +99,7 @@ def test_writer(wfile, writer): class JsonDatetime(datetime.datetime): - """Monkey path json datetime.""" + """Datetime with a custom JSON representation for ujson.""" def __json__(self): if sys.version_info.major == 3: dif = int(self.timestamp()) @@ -112,14 +112,14 @@ def test_writer_bad_message(wfile, writer): # A datetime isn't serializable(or poorly serializable), # ensure the write method doesn't throw, but the result could be empty # or the correct datetime - datetime.datetime = JsonDatetime - writer.write(datetime.datetime( + writer.write(JsonDatetime( year=2019, month=1, day=1, hour=1, minute=1, second=1, + tzinfo=datetime.timezone.utc, )) assert wfile.getvalue() in [ @@ -127,9 +127,5 @@ def test_writer_bad_message(wfile, writer): b'Content-Length: 10\r\n' b'Content-Type: application/vscode-jsonrpc; charset=utf8\r\n' b'\r\n' - b'1546304461', - b'Content-Length: 10\r\n' - b'Content-Type: application/vscode-jsonrpc; charset=utf8\r\n' - b'\r\n' - b'1546322461' + b'1546304461' ] From de8445ffd1f6a705a4e8b8ed25df60e03666c64d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=B0brahim=20Sait=20Akar=C3=A7e=C5=9Fme?= <72226290+saitakarcesme@users.noreply.github.com> Date: Wed, 21 Oct 2026 17:33:19 +0200 Subject: [PATCH 2/2] Run macOS tests on the supported Intel runner --- .github/workflows/test-mac.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-mac.yml b/.github/workflows/test-mac.yml index a0fcbce..6961c6e 100644 --- a/.github/workflows/test-mac.yml +++ b/.github/workflows/test-mac.yml @@ -12,7 +12,7 @@ on: jobs: build: name: Mac Py${{ matrix.PYTHON_VERSION }} - runs-on: macos-13 + runs-on: macos-15-intel env: CI: 'true' OS: 'macos'