- Python Home
- About
- News
- Documentation
- Downloads
- Community
- Foundation
- Developer's Guide
- Issue Tracker
- Issues
- Summaries
- User
- Administration
- Help
Issue22537
This issue tracker has been migrated to GitHub,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
Created on 2014-10-02 03:09 by terry.reedy, last changed 2022-04-11 14:58 by admin. This issue is now closed.
| Messages (5) | |||
|---|---|---|---|
| msg228152 - (view) | Author: Terry J. Reedy (terry.reedy) * ![]() |
Date: 2014-10-02 03:09 | |
I was able to build docs of all versions with the old system. When 3.4 was changed to the new system, 'pip install sphinx' installed everything needed so that 'sphinx-build -bhtml . build/html' in .../Doc (Devguide 7.5.2) works for 3.4 (and 3.5). "PYTHON=C:\programs\python27\python.exe" does not seem to matter. After the recent conversion for 2.7, that command and 'make html' (devguide 7.5.1) do not work for 2.7. The devguide instructions are version-independent, but the reality does not seem to be. Both commands give this. Running Sphinx v1.2.2 Configuration error: There is a syntax error in your configuration file: invalid syntax (patchlevel.py, line 71) Did you change the syntax from 2.x to 3.x? tools/patchlevel.py. line 71, is "print x'. When I added ()s, this error goes away and I get Running Sphinx v1.2.2 Exception occurred: File "F:\Python\dev\2\py27\Doc\tools\pyspecific.py", line 247, in <module> import suspicious File "F:\Python\dev\2\py27\Doc\tools\suspicious.py", line 57 detect_all = re.compile(ur''' ::(?=[^=])| # two :: (but NOT ::=) :[a-zA-Z][a-zA-Z0-9]+| # :foo `| # ` (seldom used by itself) (?<!\.)\.\.[ \t]*\w+: # .. foo: (but NOT ... else:) ''', re.UNICODE | re.VERBOSE).finditer ^ SyntaxError: invalid syntax I expect the problem is the 'ur' prefix, invalid in 3.4+. I tried to install a 2.7 version of sphinx, but pip refuses. C:\Programs\Python27>pip install sphinx Requirement already satisfied (use --upgrade to upgrade): sphinx in c:\programs\python34\lib\site-packages So I don't know how to sensibly proceed without disabling 3.x builds. |
|||
| msg228154 - (view) | Author: Ned Deily (ned.deily) * ![]() |
Date: 2014-10-02 03:34 | |
Your analysis is correct: you now do need to use a 2.7 sphinx to build 2.7 docs. It looks like you may be using a 3.4 version of pip. However you invoke python2.7, try "python -m pip install sphinx". |
|||
| msg228160 - (view) | Author: Georg Brandl (georg.brandl) * ![]() |
Date: 2014-10-02 06:07 | |
> you now do need You always did :) However, it should not be a problem to make the extensions 2.x and 3.x compatible in both branches. |
|||
| msg228161 - (view) | Author: Roundup Robot (python-dev) ![]() |
Date: 2014-10-02 06:27 | |
New changeset fd2530294d50 by Georg Brandl in branch '2.7': Closes #22537: Make sphinx extensions compatible with Python 2 or 3, like in the 3.x branches https://hg.python.org/cpython/rev/fd2530294d50 |
|||
| msg228237 - (view) | Author: Terry J. Reedy (terry.reedy) * ![]() |
Date: 2014-10-02 16:24 | |
Works great. Thanks. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022-04-11 14:58:08 | admin | set | github: 66727 |
| 2014-10-02 16:24:54 | terry.reedy | set | messages: + msg228237 |
| 2014-10-02 06:27:25 | python-dev | set | status: open -> closed nosy: + python-dev messages: + msg228161 resolution: fixed stage: needs patch -> resolved |
| 2014-10-02 06:07:57 | georg.brandl | set | messages: + msg228160 |
| 2014-10-02 03:34:34 | ned.deily | set | nosy:
+ ned.deily messages: + msg228154 |
| 2014-10-02 03:09:34 | terry.reedy | create | |



