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

Fix Python 3.7 and PEP 479 incompatibility #1518

Closed
wants to merge 46 commits into from
Closed

Conversation

@moigagoo
Copy link

@moigagoo moigagoo commented Jun 28, 2018

With PEP 479 implemented in Python 3.7, raised StopIteration is now translated into RuntimeError, which breaks mkdocs build command.

The recommended way to exit generators is to use return instead of raising StopIteartion: https://www.python.org/dev/peps/pep-0479/#id39

PissedCapslock and others added 30 commits Nov 27, 2017
PyPI's documentation hosting has been deprecated, and in fact, it
is no longer possable to upload documentation to PyPI. Therefore,
it is a disservice to our users to document how to deploy to that
service.

See the mailing list dicussions for the official announcement:
https://mail.python.org/pipermail/distutils-sig/2015-May/026327.html
https://mail.python.org/pipermail/distutils-sig/2015-May/026381.html
Python-Markdown has moved its documentation to
https://python-markdown.github.io/. See Python-Markdown/markdown#601
for details. The docs now point to the new location.

The Python-Markdown GitHub repo was also moved to
https://github.com/Python-Markdown/markdown so any links to the repo
have been updated as well.
Outline that the path where the search index is written to has changed slightly from `mkdocs/` to `search/`
Fixes #686.
Present the sections in a logical manner:

1. File Layout (where to save documents)
   * Configure Navigation...
2. Writing with Markdown
   * Supported extensions...

Added documentation for all included extensions. Also added some basic
information about Markdown; pointing to the implementation and rules.
Fixes #1385, fixes #316, and fixes #1172.
This should help when providing support to users with multiple Pythons
installed on their system. The `--version` flag's output mimics pip.
Specifically, the location `mkdocs` is installed at and the Python
version it is installed under.

Typical output might look like:

    mkdocs, version 0.17.2 from /usr/local/lib/python2.7/site-packages/mkdocs (Python 2.7)
Is faster, safer and the recommended method by Google.
Polyfill for media queries.
REF: https://github.com/scottjehl/Respond/releases
Currently, page rendering is delayed until all scripts are loaded. But these scripts are not essential to the main content. The `defer` attribute allows the browser to render the page before the scripts are completely loaded so the user can see the webpage earlier.
* Use a web worker in the browser with a fallback (fixes #859 & closes #1396).
* Optionally pre-build search index (fixes #859 & closes #1061).
* Upgrade to lunr.js 2.x (fixes #1319).
* Support search in languages other than English (fixes #826).
* Allow the user to define the word separators (fixes #867).
* Only run searches for queries of length > 2 (fixes #1127).
* Remove dependency on require.js, mustache, etc. (fixes #1218).
* Compress the search index (fixes #1128).
We don't need most of the functionality in pathname2url so we might as
well only use the part we need. Fixes #1429.
Uses the `mdx_gh_links` Markdown extension. Fixes #644.
Fixes #1391.
Note that the icons in the themes will not show up until FontAwesome is
updated to at least version 4.6 and/or an up-to-date version of the
upstream readthedocs css is imported.

This commit also fixes a slight documentation error regarding the
default value of `repo_name` and removes some tautological tests.
Whoops, forgot to add this in 71ebf35.
waylan and others added 7 commits Apr 6, 2018
If/when deploying to usr/org pages, the deploy script is run from the
Pages repo, not the project repo. Therefore, we need ot get the current
sha from the project repo.
Fixes #640.
The previous version worked only when ../mkdocs was pointing back
to the current directory.

Fixes #1490.
With [PEP 479](https://www.python.org/dev/peps/pep-0479/) implemented in Python 3.7, raised `StopIteration` is now translated into `RuntimeError`, which breaks `mkdocs build` command.

The recommended way to exit generators is to use `return` instead of raising `StopIteartion`: https://www.python.org/dev/peps/pep-0479/#id39
@waylan
Copy link
Member

@waylan waylan commented Jun 28, 2018

Thanks for your contribution. However, this is being closed in favor of #1504 which completely replaces the offending code with a new implementation that does not exhibit the problem.

@waylan
Copy link
Member

@waylan waylan commented Jul 6, 2018

Including a mailing list report, we have received 5 separate reports in 8 days. I guess we should probably apply this fix and do a bugfix release. However, this PR needs to be against the 0.17 branch for that and it's currently against master.

@waylan waylan reopened this Jul 6, 2018
@waylan waylan changed the base branch from master to 0.17 Jul 6, 2018
@waylan waylan changed the base branch from 0.17 to master Jul 6, 2018
@moigagoo moigagoo changed the base branch from master to 0.17 Jul 6, 2018
@moigagoo
Copy link
Author

@moigagoo moigagoo commented Jul 6, 2018

However, this PR needs to be against the 0.17 branch for that and it's currently against master.

@moigagoo
Copy link
Author

@moigagoo moigagoo commented Jul 6, 2018

@waylan

However, this PR needs to be against the 0.17 branch for that and it's currently against master.

Fixed.

@moigagoo
Copy link
Author

@moigagoo moigagoo commented Jul 6, 2018

@waylan Oh, I just noticed that you had changed the base yourself back and forth, sorry :-(

Should I revert it to master?

@waylan
Copy link
Member

@waylan waylan commented Jul 6, 2018

Notice that by switching the branch we get all of the commits on master up to and including the relevant commit. However, we only want the one relevant commit. Therefore, I cloned your repo locally, cherry-picked your commit and pushed it to #1536. No need for you to do do anything else at this point.

@waylan
Copy link
Member

@waylan waylan commented Jul 6, 2018

Fixed in #1536.

@waylan waylan closed this Jul 6, 2018
@waylan
Copy link
Member

@waylan waylan commented Jul 6, 2018

Version 0.17.5 is now available with this fix.

@tinkerbell3386

This comment has been minimized.

Copy link

@tinkerbell3386 tinkerbell3386 commented on mkdocs/themes/mkdocs/base.html in d4c5832 Jun 15, 2020

Cf you bcnnxg.

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

Successfully merging this pull request may close these issues.

None yet

You can’t perform that action at this time.