executablebooks / mdformat-myst

Mdformat plugin for MyST compatibility
MIT License
7 stars 3 forks source link

Dependency conflict with `myst-parser` #27

Open devmcp opened 1 year ago

devmcp commented 1 year ago

Describe the bug

When I add mdformat-myst to my Poetry environment it downgrades myst-parser to an extremely early and pretty much unusable version (0.7.1). I think this is because of the restriction on mdit-py-plugins:

"mdit-py-plugins >=0.3.0,<0.4.0",

Is the restriction to < 0.4.0 necessary?

Reproduce the bug

In a poetry environment (or presumably using any other dependency management tool) add md-format and myst-parser to the environment.

List your environment

No response

kdeldycke commented 11 months ago

I confirm the issue between the last 2 release of mdformat-myst and mdformat-admon:

❯ pip install --dry-run mdformat-myst==0.1.4 mdformat-admon==1.0.2
Collecting mdformat-myst==0.1.4
  Using cached mdformat_myst-0.1.4-py3-none-any.whl (6.8 kB)
Collecting mdformat-admon==1.0.2
  Obtaining dependency information for mdformat-admon==1.0.2 from https://files.pythonhosted.org/packages/83/b5/ae19f582ceabe514044838c4e9bb68e1903dfc224106d3e2fe19759af1e4/mdformat_admon-1.0.2-py3-none-any.whl.metadata
  Using cached mdformat_admon-1.0.2-py3-none-any.whl.metadata (3.6 kB)
Collecting mdformat<0.8.0,>=0.7.0 (from mdformat-myst==0.1.4)
  Obtaining dependency information for mdformat<0.8.0,>=0.7.0 from https://files.pythonhosted.org/packages/bf/d9/4790d04eb7bcc77f02000232b75e8356c5443ee9f6fe28a7786de96485c0/mdformat-0.7.17-py3-none-any.whl.metadata
  Using cached mdformat-0.7.17-py3-none-any.whl.metadata (8.7 kB)
Collecting mdit-py-plugins<0.3.0,>=0.2.7 (from mdformat-myst==0.1.4)
  Using cached mdit_py_plugins-0.2.8-py3-none-any.whl (41 kB)
Collecting mdformat-tables>=0.4.0 (from mdformat-myst==0.1.4)
  Using cached mdformat_tables-0.4.1-py3-none-any.whl (4.6 kB)
Collecting mdformat-frontmatter>=0.3.2 (from mdformat-myst==0.1.4)
  Using cached mdformat_frontmatter-2.0.1-py3-none-any.whl (4.5 kB)
Collecting ruamel.yaml>=0.16.0 (from mdformat-myst==0.1.4)
  Obtaining dependency information for ruamel.yaml>=0.16.0 from https://files.pythonhosted.org/packages/d9/0e/2a05efa11ea33513fbdf4a2e2576fe94fd8fa5ad226dbb9c660886390974/ruamel.yaml-0.17.32-py3-none-any.whl.metadata
  Using cached ruamel.yaml-0.17.32-py3-none-any.whl.metadata (17 kB)
INFO: pip is looking at multiple versions of mdformat-admon to determine which version is compatible with other requirements. This could take a while.
ERROR: Cannot install mdformat-admon==1.0.2 and mdformat-myst==0.1.4 because these package versions have conflicting dependencies.

The conflict is caused by:
    mdformat-myst 0.1.4 depends on mdit-py-plugins<0.3.0 and >=0.2.7
    mdformat-admon 1.0.2 depends on mdit-py-plugins>=0.4.0

To fix this you could try to:
1. loosen the range of package versions you've specified
2. remove package versions to allow pip attempt to solve the dependency conflict

ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/topics/dependency-resolution/#dealing-with-dependency-conflicts

Relates to:

kdeldycke commented 11 months ago

I proposed a fix at: https://github.com/executablebooks/mdformat-myst/pull/28

arwedus commented 8 months ago

@hukkin : Are you on this? Is the fix by @kdeldycke working? I had to uninstall mdformat-myst now, which means probably having to uninstall mdformat soon-ish. When forced to choose, we prefer using myst-parser 2.0 (instead 1.0) over using mdformat.