Add patches for python 3.13 compatibility

This commit is contained in:
Jerry James 2024-06-18 09:03:01 -06:00
commit d9f5cfb43d
3 changed files with 52 additions and 0 deletions

View file

@ -0,0 +1,30 @@
Fixes this error:
_____________ ERROR at setup of test_cm_config_log_only_if_changed _____________
tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_cm_config_log_only_if_cha0')
@pytest.fixture()
def cwd_tmp_path(tmp_path):
# Run the whole test from inside tmp_path
> with tmp_path.cwd():
E TypeError: 'PosixPath' object does not support the context manager protocol
/builddir/build/BUILD/python-jupytext-1.16.2-build/jupytext-1.16.2/tests/conftest.py:50: TypeError
--- jupytext-1.16.2/tests/conftest.py.orig 2024-05-05 16:34:48.000000000 -0600
+++ jupytext-1.16.2/tests/conftest.py 2024-06-18 08:13:53.192133400 -0600
@@ -1,3 +1,4 @@
+import contextlib
import itertools
import os.path
import re
@@ -47,7 +48,7 @@ def cwd_tmpdir(tmpdir):
@pytest.fixture()
def cwd_tmp_path(tmp_path):
# Run the whole test from inside tmp_path
- with tmp_path.cwd():
+ with contextlib.chdir(tmp_path):
yield tmp_path