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

Python 2.6 compatibility (markdown dependency issue) #19

Closed
florianlherbette opened this issue Dec 2, 2014 · 1 comment

Comments

Projects
None yet
2 participants
@florianlherbette
Copy link

commented Dec 2, 2014

Hi. It is not a pdoc issue per say, but it might be useful to update the documentation.

You're keeping pdoc compatible with Python 2.6 (which is a good thing for the unlucky people still stuck with it). But the Python markdown package dropped Python 2.6 support in its 2.5 release.

Therefore currently a fresh install of pdoc from PyPi does not work. This is easily worked around by downgrading markdown to version 2.4.1, but the cause of the problem may be difficult to figure out.

The exception raised by markdown is caught and re-raised in html_out() in the pdoc script, so we lose the original backtrace from markdown, so users may have some difficulty seeing that the compatibility issue is with markdown. See this sample backtrace:

Traceback (most recent call last):
  File "/home/ubuntu/py-virtualenv/test-pdoc/bin/pdoc", line 491, in <module>
    html_out(module)
  File "/home/ubuntu/py-virtualenv/test-pdoc/bin/pdoc", line 338, in html_out
    raise e
ImportError: No module named importlib

Or, if installing the backported importlib for 2.6 from PyPi, this other error thrown by markdown:

Traceback (most recent call last):
  File "/home/ubuntu/py-virtualenv/test-pdoc/bin/pdoc", line 491, in <module>
    html_out(module)
  File "/home/ubuntu/py-virtualenv/test-pdoc/bin/pdoc", line 338, in html_out
    raise e
AttributeError: 'module' object has no attribute 'captureWarnings'

@BurntSushi BurntSushi closed this in 7ecae95 Dec 2, 2014

@BurntSushi

This comment has been minimized.

Copy link
Contributor

commented Dec 2, 2014

I don't feel any pressing need to use Markdown >= 2.5, so I just forced the dependency to < 2.5 for now.

The writing is on the wall for Python 2.6 though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.