Skip to content

Commit

Permalink
Make _need_to_load not assume that file ordering remained the same
Browse files Browse the repository at this point in the history
In Debian, we use disorderfs as part of checking reproducibility, and
without this change test_caching failed:

https://salsa.debian.org/python-team/packages/sphinx-autoapi/-/jobs/6643761
  • Loading branch information
mitya57 committed Nov 24, 2024
1 parent f5c7295 commit 1718fa2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion autoapi/_mapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,9 @@ def _need_to_load(self, files):
if self.app.env.config_status != sphinx.environment.CONFIG_OK:
return True

return last_files != files or not last_mtime or last_mtime < this_mtime
return (
set(last_files) != set(files) or not last_mtime or last_mtime < this_mtime
)

def _find_files(self, patterns, dirs, ignore):
for dir_ in dirs:
Expand Down

0 comments on commit 1718fa2

Please sign in to comment.