sphinx-doc/sphinx

autosummary: Autogenerating stubs on case-insensitive filesystem sometimes fails

Open

#1,495 opened on Jan 3, 2015

View on GitHub
 (5 comments) (0 reactions) (0 assignees)Python (1,985 forks)batch import
extensions:autosummaryhelp wantedtype:bug

Repository metrics

Stars
 (5,625 stars)
PR merge metrics
 (Avg merge 10d 11h) (11 merged PRs in 30d)

Description

If I attempt to autogenerate API docs for a class that has two method names that are identical except for uppercase/lowercase, autogeneration will fail on case-insenstive filesystems.

I ran into this today generating documentation for a class that sublcasses Sympy's Expr class. Expr defines both as_coeff_Add and as_coeff_add as member functions.

When the autosummary extension tries to autogenerate stub .rst files for these two functions, it fails on the second one because the os.path.isfile() call here will return True.

I'd ignore the issue except for the fact that it generates thousands of warning messages in my builds logs, since sphinx still tries to access the nonexistent file every time it traverses the toctree.


Contributor guide