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

Sphinx docs may not be compatible with html_context #54

Open
nutjob4life opened this issue Mar 18, 2022 · 4 comments
Open

Sphinx docs may not be compatible with html_context #54

nutjob4life opened this issue Mar 18, 2022 · 4 comments
Assignees
Labels
bug Something isn't working icebox s.low

Comments

@nutjob4life
Copy link
Member

nutjob4life commented Mar 18, 2022

🐛 Describe the bug

When building documentation with the template-repo-python, the docs/source/conf.py specifies a html_context. However, the html_context feature is available only with Sphinx ≥ 0.5. The setup.cfg doesn't give a version specification for sphinx. Depending on your virtual environment and the system Python from whence it came, it may use an older version of Sphinx that's incompatible.

The setup.cfg should stipulate a higher version of Sphinx.

(Actually, the fact there are no version specifications for any of the dependencies listed is a version-maximizing dependency confusion attack just waiting to happen 😮)

📜 To Reproduce

  • Install sphinx on Windows:
pip install -U sphinx
  • run sphinx-quickstart to generate make files
  • copy make.bat to docs folder of a newly created repo (with "template-repo-python" template).
  • run make.bat html
  • open build/html/index.html
  • The page looks wrong. No CSS are applied.

🕵️ Expected behavior

Good clean HTML docs.

📚 Version of Software Used

Windows:

C:\>sphinx-build --version
sphinx-build 4.4.0
C:\>sphinx-quickstart --version
sphinx-quickstart 4.4.0 

pip list:

Sphinx       4.4.0

🩺 Test Data / Additional context

N/A.

🏞Screenshots

sphinx-no-css

🖥 System Info

Windows 10 (21H2)


🦄 Related requirements

⚙️ Engineering Details

This issue can be fixed by using html_css_files :

html_css_files = [
    'theme_overrides.css',
]
@jordanpadams
Copy link
Member

@nutjob4life is this still an issue?

@nutjob4life
Copy link
Member Author

@jordanpadams, afraid so.

In fact, none of these requirements have version specifications:

[options.extras_require]
dev =
    black
    flake8
    flake8-bugbear
    flake8-docstrings
    pep8-naming
    mypy
    pydocstyle
    coverage
    pytest
    pytest-cov
    pytest-watch
    pytest-xdist
    pre-commit
    sphinx
    sphinx-rtd-theme
    tox
    types-setuptools

which means they are all attack vectors for the version-maximizing dependency confusion attack.

@jordanpadams
Copy link
Member

@nutjob4life copy. how critical of an issue do you think this is? can it be tabled for a bit, or you think we should get on this pronto?

@nutjob4life
Copy link
Member Author

@jordanpadams I think we can sit on it for awhile 😁

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working icebox s.low
Projects
Status: ToDo
Development

No branches or pull requests

2 participants