Add patches for python 3.13 compatibility
This commit is contained in:
parent
c3d71503b1
commit
d9f5cfb43d
3 changed files with 52 additions and 0 deletions
30
python-jupytext-chdir.patch
Normal file
30
python-jupytext-chdir.patch
Normal 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
|
||||
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue