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

ERROR: No matching distribution found for pymdown-extensions~=10.3 (from mkdocs-material) #5974

Closed
4 tasks done
Enonya opened this issue Sep 6, 2023 · 8 comments
Closed
4 tasks done

Comments

@Enonya
Copy link

Enonya commented Sep 6, 2023

Context

No response

Bug description

I have tried to install mkdocs and mkdocs-material, but I got an error, pip told me that: ERROR: No matching distribution found for pymdown-extensions~=10.3 (from mkdocs-material)

I couldn't install mkdocs-material because of this bug so I cannot provide a minimal reproduction..

I guess that some updates in the latest version of mkdocs-material cause this, so I tried pip3 install mkdocs mkdocs-material==9.2.0 mkdocs-encryptcontent-plugin mkdocs-git-revision-date-localized-plugin and the error disappeared.

I wonder why this bug appears, I've tried to find the reason but I only found a similar issue(#3866), it seems like that its reason is not the same as this..

(I'm using windows10 and python 3.9.13 and pip 22.0.4)

Related links

Reproduction

I couldn't install mkdocs-material because of this bug so I cannot provide a minimal reproduction..

Steps to reproduce

  1. run pip3 install mkdocs mkdocs-material mkdocs-encryptcontent-plugin mkdocs-git-revision-date-localized-plugin
  2. then the bug appears.

Browser

No response

Before submitting

@facelessuser
Copy link
Contributor

Are you on Python 3.7? If so, Pymdown Extensions 10.3 has dropped support for Python 3.7 which is end of life: https://endoflife.date/python.

@Enonya
Copy link
Author

Enonya commented Sep 6, 2023

Are you on Python 3.7? If so, Pymdown Extensions 10.3 has dropped support for Python 3.7 which is end of life: https://endoflife.date/python.

I've mentioned that I'm using 3.9.13 :)

@facelessuser
Copy link
Contributor

facelessuser commented Sep 6, 2023

I missed that. It may be a local issue as I can upgrade to the latest MkDocs Material with Pymdown Extensions 10.3 with no issues on Python 3.9:

Successfully installed MarkupSafe-2.1.3 babel-2.12.1 jinja2-3.1.2 markdown-3.4.4 mkdocs-1.5.2 mkdocs-material-9.2.8 mkdocs-material-extensions-1.1.1 paginate-0.5.6 pathspec-0.11.2 pygments-2.16.1 pymdown-extensions-10.3 regex-2023.8.8 requests-2.31.0

@Enonya
Copy link
Author

Enonya commented Sep 6, 2023

I missed that. It may be a local issue as I can upgrade to the latest MkDocs Material with Pymdown Extensions 10.3 with no issues on Python 3.9:

Successfully installed MarkupSafe-2.1.3 babel-2.12.1 jinja2-3.1.2 markdown-3.4.4 mkdocs-1.5.2 mkdocs-material-9.2.8 mkdocs-material-extensions-1.1.1 paginate-0.5.6 pathspec-0.11.2 pygments-2.16.1 pymdown-extensions-10.3 regex-2023.8.8 requests-2.31.0

I've found that I'm installing mkdocs-material via GitBash, Though I input python3 --version in cmd and it shows 3.9.13, actually I'm using python3.7 inside GitBash.

And I've tried to install them on another PC with windows10, python 3.9.13 and nothing happends.

So it seems like the problem is what you mentioned above, thanks for that!

@Enonya Enonya closed this as completed Sep 6, 2023
@squidfunk
Copy link
Owner

Are you on Python 3.7? If so, Pymdown Extensions 10.3 has dropped support for Python 3.7 which is end of life: https://endoflife.date/python.

@facelessuser ah, good to know! We recently switched to the compatible release operator (as I understand it Python's take on semvar), as it should better ensure that things remain installable and runnable – at least that's what I'm hoping for. This didn't came to my mind. What's the last version that supports 3.7? We're currently still supporting 3.7, but want to up that requirement in the next bigger release. Do you know, if there's a way to easily find out which versions are the last version that supports a specific Python version?

The idea is that we want to keep older versions of Material for MkDocs easily installable without the need to bisect which explicit versions of dependencies you need to go back to. Some installations might run in environments that can't be updated, e.g. for internal documentation, so making this smooth and keeping it runnable would be the goal.

@facelessuser
Copy link
Contributor

What's the last version that supports 3.7?

10.2.X

Do you know, if there's a way to easily find out which versions are the last version that supports a specific Python version?

I'm not quite sure what you mean by this. In general, I don't usually bump the minimum unless I have an explicit reason to and/or I'm certain it is safe to. And if I do, I'm also running tests to ensure all the versions of Python I support still work before I commit such a change.

It is rare that I cap a maximum version. That only happens when there is an explicit issue with a version.

So, in short, I let the package manager pull the latest version that works for their Python version. Now, this also means that people can sometimes be stuck on an older version of a dependency if they do not explicitly upgrade them or I haven't explicitly bumped the minimum.

I understand someone would prefer one approach over the other, but admittedly, no approach is perfect.

@squidfunk
Copy link
Owner

Thanks! My experience with checking out and trying to run older versions of Material for MkDocs revealed that only setting a minimum version is not enough, because newer releases of dependencies might not work. Thus, IMHO, a minimum range is a little too loose. I wasn't aware of the compatible release operator, but in the JavaScript we have ^ to opt into semantic versioning and compatible release is kind of similar, which is why I've changed to that.

So, in short, I let the package manager pull the latest version that works for their Python version. Now, this also means that people can sometimes be stuck on an older version of a dependency if they do not explicitly upgrade them or I haven't explicitly bumped the minimum.

Okay, it might be a good idea to specify the minimum version but not bump it unless absolutely necessary, and let the package manager decide what's the last compatible version that works with their environment. I actually only bumped the versions because of dependabot, but I think we should revert the bump to allow for a wider supported range.

Thanks again for your input!

@squidfunk
Copy link
Owner

Done in 49ebe51 and 4f6b213.

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

No branches or pull requests

3 participants