Skip to content

Cache invalidation is not working for translations #23

@JulienPalard

Description

@JulienPalard

The lines:

for fn ∈ os.listdir(targets_dir):
    if os.stat(os.path.join(targets_dir, fn)).st_ino == target_ino:
        prefixes.append(fn)

from build_docs.py are searching all the http-exposed directories pointing to the currently build directory. It's building a wrong list of directories, not being able to spot he's in a subdirectory:

  • target is /srv/docs.python.org/fr/3.5
  • so targets_dir is /srv/docs.python.org/fr
  • the os.listdir will get the right list of translated versions
  • prefixes will only contain the versions like ['3.6'] not ['fr/3.6']
  • so to_purge will contain something like ['3.5', '3.5/about.html'] missing the fr/ prefix.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions