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

mkdocs-material@8.2.12 requires python >= 3.7 instead of python 3.6 #3866

Closed
4 of 5 tasks
dennispan opened this issue May 2, 2022 · 12 comments · Fixed by #3877
Closed
4 of 5 tasks

mkdocs-material@8.2.12 requires python >= 3.7 instead of python 3.6 #3866

dennispan opened this issue May 2, 2022 · 12 comments · Fixed by #3877

Comments

@dennispan
Copy link

Contribution guidelines

I've found a bug and checked that ...

  • ... the problem doesn't occur with the mkdocs or readthedocs themes
  • ... the problem persists when all overrides are removed, i.e. custom_dir, extra_javascript and extra_css
  • ... the documentation does not mention anything about my problem
  • ... there are no open or closed issues that are related to my problem

Description

Installing mkdocs-material@8.2.12 on an environment with python 3.6 would fail because one of the dependencies pymdown-extensions is now required to be >=9.4. However, since pymdown-extensions@9.2, it has dropped support for python 3.6 and now requires python 3.7 or above.

Here's the error message:

  Could not find a version that satisfies the requirement pymdown-extensions>=9.4 (from mkdocs-material) (from versions: 1.0.0, 1.0.1, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.6.1, 1.7, 1.8, 2.0, 3.0, 3.1, 3.2, 3.2.1, 3.3, 3.4, 3.5, 4.0, 4.1, 4.2, 4.3, 4.4, 4.5, 4.5.1, 4.6, 4.7, 4.8, 4.9, 4.9.1, 4.9.2, 4.10, 4.10.1, 4.10.2, 4.11, 4.12, 5.0, 6.0, 6.1, 6.2, 6.2.1, 6.3, 7.0b1, 7.0b2, 7.0rc1, 7.0rc2, 7.0, 7.1, 8.0, 8.0.1, 8.1, 8.1.1, 8.2, 9.0.dev0, 9.0, 9.1)
No matching distribution found for pymdown-extensions>=9.4 (from mkdocs-material)

Expected behaviour

Install mkdocs-material on python 3.6 environment would succeed (i.e. it installs mkdocs-material@8.2.11, which is the last version that support python 3.6)

Actual behaviour

It fails with the error message mentioned in description

Steps to reproduce

On an environment with python 3.6, run

pip3 install mkdocs-material

Package versions

  • Python: python3 --version: 3.6.9
  • MkDocs: mkdocs --version: unrelated
  • Material: pip show mkdocs-material | grep -E ^Version: unrelated

Configuration

Unrelated

System information

  • Operating system: Ubuntu 18.04
  • Browser: Unrelated
@dennispan
Copy link
Author

@squidfunk How do we trigger a new release?

@squidfunk
Copy link
Owner

I've released your changes as part of 8.2.13 8 minutes ago.

@dennispan
Copy link
Author

@squidfunk I wonder if we should remove the 8.2.12 release, given the python version requirement is wrong? Or update the release to fix the python version requirement?

@squidfunk
Copy link
Owner

squidfunk commented May 2, 2022

No, removing a release is not an option. If you're already on Python 3.7+, 8.2.12 will work without problems for you. Removing a release retrospectively will break a lot of things downstream and is considered malpractice.

@fhamori
Copy link

fhamori commented May 2, 2022

@squidfunk
Thank you for fixing this so quickly. We also ran into this problem.
We are using Python 3.6.8, and it is not easy to upgrade to Python 3.7+ in all of our release branches, altogether. Other possible way to modify everywhere the maximum version of that module, but it seems, for the Python 3.6.x users, the latest version of that module, would cause always a trouble, everyone should go through this error, find the issue, understand and fix the maximum version.

Do you see any other way (best would be to remove the release) to solve that problem for Python 3.6.x users?

@squidfunk
Copy link
Owner

Python 3.7 is demanded by Python Markdown Extensions, so the only thing we can do is to ask @facelessuser.

@facelessuser
Copy link
Contributor

I'm not sure what specifically is being asked. Python 3.6 reached EOL 4 months ago. Currently, I have no intentions of spending time ensuring testing and compatibility for Python 3.6. Python 3.11 is just around the corner, and resources will be dedicated to ensuring the latest is supported as we phase out EOL releases.

A request for support of Python 3.6 could last for an indefinite amount of time as there is no timeline for when I can drop support. I guess if we are targeting the EOL of Ubuntu 18.04, then I am looking at Apr 2028, which is another 6 years. Organizations may sit on Python 3.6 for a long time. I am then chained to a vague sense of "whenever enough organizations have moved on from Python 3.6".

I understand why organizations stay on older Python versions, but some software will move on. Even if Material or Pymdown-Extensions keep supporting Python 3.6, it is very likely that Python Markdown or some other dependency in the chain will drop Python 3.6 in the next release. Python Markdown usually does drop old EOL Python versions that reach EOL.

@squidfunk
Copy link
Owner

Thanks @facelessuser! Full support.

@fhamori
Copy link

fhamori commented May 2, 2022

Thank you for the detailed answer here!

Just to make it sure, it is not a problem at all if the support has been dropped. This is completely fine and normal.
The problem is that currently, the latest release of markdown to Python 3.6.x support is practically not supporting that Python. Therefore we and anyone who is in the same shoe needs to maximise the version in their configs if they did not have this in the past.

That ends up changes on all of the product branches a maintainer has, as this will come up for all the hotfix releases as well.

So my point here is that there is a last mkdocs version for Python 3.6, which does not support Python 3.6.

@facelessuser
Copy link
Contributor

Ah, so you want a final version of mkdocs that you can pin that will work for Python 3.6 always. Material would have to pin all the versions of everything to make sure that is the case since it is not the bottom of the stack. It'd have to pin its dependencies and the dependencies of all of those dependencies. Something can surely break things in the future. I'm sure a Py3.6 compatible release that works with things as they are right now with minimal effort could be created, but I'll leave that up to @squidfunk to decide.

If Material was interested in ensuring no future breakage for specific Python versions, it may be in its interest to create some test jobs that install the package on various Python versions. Since there are currently no tests to do this, stuff like this will probably happen again. But even then, things can retroactively break unless your package is at the bottom of the stack.

@squidfunk
Copy link
Owner

squidfunk commented May 3, 2022

I have no interest to maintain a Python 3.6 compatible version, as this is an uphill battle with more of our upstream dependencies moving on to higher versions. Remember that Material for MkDocs is a leaf dependency – we have almost no dependents, but we depend on several other packages. However, Material for MkDocs is Open Source, so I imagine that this can surely be done as part of a fork by somehow who is familiar with the Python ecosystem.

For the time being, you can pin the version to 8.2.11, as this is the last one working with Python 3.6.

@fhamori
Copy link

fhamori commented May 3, 2022

We moved forward by pinning this version throughout our codebase!
Thank you for considering our suggestion and the detailed quick answers here.

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.

4 participants