From 9f06411db93c4c8c5ad14a81dc7065cb8c9d5d9f Mon Sep 17 00:00:00 2001 From: Marc Wouts Date: Sun, 30 Jun 2024 12:37:23 +0100 Subject: [PATCH] Test Jupytext with Python 3.13 --- .github/workflows/step_tests-pip.yml | 2 +- CHANGELOG.md | 3 +++ environment.yml | 2 +- pyproject.toml | 1 + tests/conftest.py | 10 ++++++++-- 5 files changed, 14 insertions(+), 4 deletions(-) Index: jupytext/.github/workflows/step_tests-pip.yml =================================================================== --- jupytext.orig/.github/workflows/step_tests-pip.yml 2024-12-08 11:17:10.620053947 +0100 +++ jupytext/.github/workflows/step_tests-pip.yml 2024-12-08 11:17:10.616053910 +0100 @@ -26,7 +26,7 @@ strategy: fail-fast: false matrix: - python-version: [ "3.8", "3.9", "3.10", "3.11", "3.12"] + python-version: [ "3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] experimental: [false] include: # Test pre-release versions Index: jupytext/CHANGELOG.md =================================================================== --- jupytext.orig/CHANGELOG.md 2024-12-08 11:17:10.620053947 +0100 +++ jupytext/CHANGELOG.md 2024-12-08 11:17:10.616053910 +0100 @@ -7,6 +7,9 @@ **Fixed** - We use `asyncio.iscoroutinefunction` to determine whether the current contents manager is sync or async ([#1260](https://github.com/mwouts/jupytext/issues/1260)) +**Added** +- Jupytext is now tested with Python 3.13 ([#1242](https://github.com/mwouts/jupytext/issues/1242)). Thanks to [Jerry James](https://github.com/jamesjer) for the suggested fixes! + 1.16.3 (2024-07-09) ------------------- Index: jupytext/environment.yml =================================================================== --- jupytext.orig/environment.yml 2024-12-08 11:17:10.620053947 +0100 +++ jupytext/environment.yml 2024-12-08 11:17:10.616053910 +0100 @@ -3,7 +3,7 @@ - defaults - conda-forge dependencies: - - python>=3.8,<3.12 + - python>=3.8 - jupyterlab>=4.0.0 - nbformat>=5.1.2 - pre-commit Index: jupytext/pyproject.toml =================================================================== --- jupytext.orig/pyproject.toml 2024-12-08 11:17:10.620053947 +0100 +++ jupytext/pyproject.toml 2024-12-08 11:17:10.616053910 +0100 @@ -27,6 +27,7 @@ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", ] dependencies = [ "nbformat", Index: jupytext/tests/conftest.py =================================================================== --- jupytext.orig/tests/conftest.py 2024-12-08 11:17:10.620053947 +0100 +++ jupytext/tests/conftest.py 2024-12-08 11:17:10.616053910 +0100 @@ -1,3 +1,4 @@ +import contextlib import itertools import os.path import re @@ -47,8 +48,13 @@ @pytest.fixture() def cwd_tmp_path(tmp_path): # Run the whole test from inside tmp_path - with tmp_path.cwd(): - yield tmp_path + if sys.version_info < (3, 11): + with tmp_path.cwd(): + yield tmp_path + else: + # https://github.com/mwouts/jupytext/issues/1242 + with contextlib.chdir(tmp_path): + yield tmp_path @pytest.fixture