Skip to content

Commit a7a973d

Browse files
mitya57AWhetter
authored andcommitted
Make _need_to_load not assume that file ordering remained the same
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
1 parent 6fdc914 commit a7a973d

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

autoapi/_mapper.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,9 @@ def _need_to_load(self, files):
394394
if self.app.env.config_status != sphinx.environment.CONFIG_OK:
395395
return True
396396

397-
return last_files != files or not last_mtime or last_mtime < this_mtime
397+
return (
398+
set(last_files) != set(files) or not last_mtime or last_mtime < this_mtime
399+
)
398400

399401
def _find_files(self, patterns, dirs, ignore):
400402
for dir_ in dirs:

docs/changes/502.misc.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Make _need_to_load not assume that file ordering remained the same

0 commit comments

Comments
 (0)