Skip to content

Astropy will no longer install on Python 3.2 with latest version of markupsafe package - #1398

Merged
astrofrog merged 1 commit into
astropy:masterfrom
astrofrog:fix-python32
Sep 14, 2013
Merged

astrofrog merged 1 commit into
astropy:masterfrom
astrofrog:fix-python32

Conversation

@astrofrog

Copy link
Copy Markdown
Member

Astropy no longer installs correctly on Python 3.2 if one has the latest version of the markupsafe package:


mac-robitaille2:astropy tom$ python3.2 setup.py install --user
Traceback (most recent call last):
  File "setup.py", line 19, in <module>
    from astropy.setup_helpers import (register_commands, adjust_compiler,
  File "/Users/tom/Dropbox/Code/development/Astropy/astropy/astropy/setup_helpers.py", line 48, in <module>
    from sphinx.setup_command import BuildDoc as SphinxBuildDoc
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/site-packages/sphinx/setup_command.py", line 20, in <module>
    from sphinx.application import Sphinx
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/site-packages/sphinx/application.py", line 26, in <module>
    from sphinx.roles import XRefRole
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/site-packages/sphinx/roles.py", line 20, in <module>
    from sphinx.util import ws_re
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/site-packages/sphinx/util/__init__.py", line 27, in <module>
    import jinja2
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/site-packages/jinja2/__init__.py", line 33, in <module>
    from jinja2.environment import Environment, Template
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/site-packages/jinja2/environment.py", line 13, in <module>
    from jinja2 import nodes
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/site-packages/jinja2/nodes.py", line 18, in <module>
    from jinja2.utils import Markup, MethodType, FunctionType
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/site-packages/jinja2/utils.py", line 585, in <module>
    from markupsafe import Markup, escape, soft_unicode
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/site-packages/markupsafe/__init__.py", line 68
    def __new__(cls, base=u'', encoding=None, errors='strict'):
                            ^
SyntaxError: invalid syntax

The developers have decided to discontinue Python 3.2 support:

pallets/markupsafe#13

So this leaves us either with the option of using a try...except around the Sphinx import, or also discontinuing support for Python 3.2.

@mdboom

mdboom commented Sep 3, 2013

Copy link
Copy Markdown
Contributor

I think the fix is fine. But markupsafe should probably refuse to install itself in 3.2 if it's not supported, particularly if it used to support it. Should we file a bug with them?

@embray

embray commented Sep 3, 2013

Copy link
Copy Markdown
Member

Couldn't we just require an older version of markupsafe that does support 3.2?

That said, this only pertains to building the docs, no? I don't care if we can build the docs on any and all Python versions (in fact for the time being I only care if that works on 2.7).

@astrofrog

Copy link
Copy Markdown
Member Author

Right - in fact most of the time I can't even build the docs on Python 3.x due to Sphinx issues anyway.

@astrofrog

Copy link
Copy Markdown
Member Author

I'm going to merge this for now to prevent any users from running into this.

astrofrog added a commit that referenced this pull request Sep 14, 2013
Astropy will no longer install on Python 3.2 with latest version of ``markupsafe`` package
@astrofrog
astrofrog merged commit a82ed94 into astropy:master Sep 14, 2013
astrofrog added a commit that referenced this pull request Sep 18, 2013
Astropy will no longer install on Python 3.2 with latest version of ``markupsafe`` package
@astrofrog
astrofrog deleted the fix-python32 branch July 5, 2016 18:46
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 this pull request may close these issues.

3 participants