Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replacing pkg_resources.parse_version with packaging.version.parse and equivalents #1085

Closed
fast-90 opened this issue Jun 23, 2023 · 0 comments · Fixed by #1088
Closed

Replacing pkg_resources.parse_version with packaging.version.parse and equivalents #1085

fast-90 opened this issue Jun 23, 2023 · 0 comments · Fixed by #1088

Comments

@fast-90
Copy link

fast-90 commented Jun 23, 2023

Is there any reason why jupytext is using pkg_resources.parse_version over packaging.version.parse?

Currently I am using Jupytext in a virtualenv, and I am trying to convert a qmd file into a ipynb notebook which results in the following error:

  File "/home/duy/repos2/bayvar/.venv/lib/python3.11/site-packages/jupytext/jupytext.py", line 379, in reads
    notebook = reader.reads(text, **kwargs)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/duy/repos2/bayvar/.venv/lib/python3.11/site-packages/jupytext/jupytext.py", line 100, in reads
    return qmd_to_notebook(s)
           ^^^^^^^^^^^^^^^^^^
  File "/home/duy/repos2/bayvar/.venv/lib/python3.11/site-packages/jupytext/quarto.py", line 77, in qmd_to_notebook
    raise_if_quarto_is_not_available()
  File "/home/duy/repos2/bayvar/.venv/lib/python3.11/site-packages/jupytext/quarto.py", line 49, in raise_if_quarto_is_not_available
    raise QuartoError("Please install pkg_resources")
jupytext.quarto.QuartoError: Please install pkg_resources

My understanding is that this is because of I don't have setuptools installed in my virtualenv, and installing it for Jupytext only seems like an overkill. Using packaging would allow people to just install packaging if needed.

Happy to make a PR if needed, but wanted to check-in first in case I'm missing something.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant