python-jupytext/python-jupytext-maxsplit.patch
2024-06-18 09:03:01 -06:00

16 lines
845 B
Diff

Fixes this warning:
/builddir/build/BUILD/python-jupytext-1.16.2-build/BUILDROOT/usr/lib/python3.13/site-packages/jupytext/cell_metadata.py:260: DeprecationWarning: 'maxsplit' is passed as positional argument
options = re.split(r"\s|,", options, 1)
--- jupytext-1.16.2/src/jupytext/cell_metadata.py.orig 2024-05-05 16:34:48.000000000 -0600
+++ jupytext-1.16.2/src/jupytext/cell_metadata.py 2024-06-18 08:15:50.518408511 -0600
@@ -257,7 +257,7 @@ def parse_rmd_options(line):
def rmd_options_to_metadata(options, use_runtools=False):
"""Parse rmd options and return a metadata dictionary"""
- options = re.split(r"\s|,", options, 1)
+ options = re.split(r"\s|,", options, maxsplit=1)
# Special case Wolfram Language, which sadly has a space in the language
# name.
if options[0:2] == ["wolfram", "language"]: