Skip to content

Commit

Permalink
packaging is a dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
mwouts committed Nov 23, 2023
1 parent a2cd5c7 commit 23fdd2d
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 18 deletions.
5 changes: 3 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,11 @@ classifiers = [
]
dependencies = [
"nbformat",
"pyyaml",
"toml",
"mdit_py_plugins",
"markdown-it-py>=1.0.0",
"packaging",
"pyyaml",
"toml",
]
dynamic = ["version"]

Expand Down
4 changes: 2 additions & 2 deletions src/jupytext/cell_reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@
from copy import copy

from nbformat.v4.nbbase import new_code_cell, new_markdown_cell, new_raw_cell
from packaging.version import parse

from .doxygen import doxygen_to_markdown
from .languages import _SCRIPT_EXTENSIONS
from .parse_version import parse_version

# Sphinx Gallery is an optional dependency. And we intercept the SyntaxError for #301
try:
from sphinx_gallery import __version__ as sg_version

if parse_version(sg_version) <= parse_version("0.7.0"):
if parse(sg_version) <= parse("0.7.0"):
from sphinx_gallery.notebook import rst2md
else:
warnings.warn(
Expand Down
3 changes: 1 addition & 2 deletions src/jupytext/pandoc.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@
# Copy nbformat reads and writes to avoid them being patched in the contents manager!!
from nbformat import reads as ipynb_reads
from nbformat import writes as ipynb_writes

from .parse_version import parse_version as parse
from packaging.version import parse


class PandocError(OSError):
Expand Down
10 changes: 0 additions & 10 deletions src/jupytext/parse_version.py

This file was deleted.

3 changes: 1 addition & 2 deletions src/jupytext/quarto.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@
# Copy nbformat reads and writes to avoid them being patched in the contents manager!!
from nbformat import reads as ipynb_reads
from nbformat import writes as ipynb_writes

from .parse_version import parse_version as parse
from packaging.version import parse

QUARTO_MIN_VERSION = "0.2.134"

Expand Down

0 comments on commit 23fdd2d

Please sign in to comment.