From e9b36e1b6949acbad70530405ef47521969f320d Mon Sep 17 00:00:00 2001 From: Thomas A Caswell Date: Mon, 13 May 2024 14:24:28 -0400 Subject: [PATCH 1/2] TST: more py312 compatibility changes in tests --- .../tests/test_allowed_schemas.py | 4 ++++ .../tests/test_category_filtering.py | 20 +++++++++++++++++++ 2 files changed, 24 insertions(+) diff --git a/jupyter_telemetry/tests/test_allowed_schemas.py b/jupyter_telemetry/tests/test_allowed_schemas.py index 6812b1e..ae12069 100644 --- a/jupyter_telemetry/tests/test_allowed_schemas.py +++ b/jupyter_telemetry/tests/test_allowed_schemas.py @@ -206,5 +206,9 @@ def test_allowed_schemas(schema, allowed_schemas, expected_output): allowed_schemas ) + # Cope with python3.12 + if "taskName" in event_data: + del event_data["taskName"] + # Verify that *exactly* the right properties are recorded. assert expected_output == event_data diff --git a/jupyter_telemetry/tests/test_category_filtering.py b/jupyter_telemetry/tests/test_category_filtering.py index ac86280..cf1f3a2 100644 --- a/jupyter_telemetry/tests/test_category_filtering.py +++ b/jupyter_telemetry/tests/test_category_filtering.py @@ -136,6 +136,10 @@ def test_category_filtering(allowed_schemas, expected_output): allowed_schemas ) + # Cope with python3.12 + if "taskName" in event_data: + del event_data["taskName"] + # Verify that *exactly* the right properties are recorded. assert expected_output == event_data @@ -291,6 +295,10 @@ def test_array_category_filtering(allowed_schemas, expected_output): allowed_schemas ) + # Cope with python3.12 + if "taskName" in event_data: + del event_data["taskName"] + # Verify that *exactly* the right properties are recorded. assert expected_output == event_data @@ -395,6 +403,10 @@ def test_no_additional_properties(allowed_schemas, expected_output): allowed_schemas ) + # Cope with python3.12 + if "taskName" in event_data: + del event_data["taskName"] + # Verify that *exactly* the right properties are recorded. assert expected_output == event_data @@ -488,6 +500,10 @@ def test_category_filtering_ref(allowed_schemas, expected_output): allowed_schemas ) + # Cope with python3.12 + if "taskName" in event_data: + del event_data["taskName"] + # Verify that *exactly* the right properties are recorded. assert expected_output == event_data @@ -504,5 +520,9 @@ def test_category_filtering_allof(allowed_schemas, expected_output): allowed_schemas ) + # Cope with python3.12 + if "taskName" in event_data: + del event_data["taskName"] + # Verify that *exactly* the right properties are recorded. assert expected_output == event_data From fdb49d663e92d633b5e182a2ddf2e627c0264255 Mon Sep 17 00:00:00 2001 From: Thomas A Caswell Date: Wed, 8 May 2024 22:28:02 -0400 Subject: [PATCH 2/2] TST: extend GHA test matrix to current Python versions 3.6 is not available on the runners anymore. There is only limited Python support on macos runners --- .github/workflows/unittest.yml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/unittest.yml b/.github/workflows/unittest.yml index 0ca4218..15cb042 100644 --- a/.github/workflows/unittest.yml +++ b/.github/workflows/unittest.yml @@ -10,11 +10,13 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-latest, macos-latest, windows-latest] - python-version: ["3.6", "3.7", "3.8", "3.9"] - exclude: - - os: macos-latest - python-version: "3.6" + os: [ubuntu-latest, windows-latest] + python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"] + include: + - os: macos-12 # This runner is on Intel chips. + python-version: 3.9 + - os: macos-14 # This runner is on M1 (arm64) chips. + python-version: '3.12' steps: - name: Checkout uses: actions/checkout@v1