Skip to content

ThemeFilesFinder.find() got an unexpected keyword argument 'find_all' #36862

Closed

Description

@awais786

In Django 5.2, the BaseFinder.find() method signature has changed from:

def find(self, path, all=False):
to:
def find(self, path, find_all=False, **kwargs):

However, in ThemeFilesFinder, the find() method still uses the old signature:

def find(self, path, all=False):

This causes compatibility issues when running collectstatic or when Django attempts to use the finder, resulting in a TypeError or warning about method signature mismatch.

Activity

  1. awais786 commented on Jun 5, 2025

    @awais786
    ContributorAuthor

    Ideally, we should fix this in a way that maintains compatibility with both Django 4.2 and 5.2. If that's not feasible, we can defer the change and include it as part of the final Django 5.2 upgrade PR.

    @feanil FYI

  2. moved this to Todo in Arbi-BOMon Jun 5, 2025
  3. feanil commented on Jun 9, 2025

    @feanil
    Contributor

    I think there are hacky ways to do this by making a function signature that takes both all and find_all as keyword params and uses sentinel values to choose between them, but I think it's fine to just include this change in the PR that makes the upgrade from 4.2 to 5.2.

  4. self-assigned this
    on Aug 8, 2025
  5. moved this from Todo to Done in Arbi-BOMon Aug 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions