Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#21867 closed Cleanup/optimization (fixed)

AppStaticStorage is still using app_module.__file__

Reported by: aaugustin Owned by: carljm
Component: contrib.staticfiles Version: master
Severity: Release blocker Keywords: app-loading
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


It should perhaps be updated to use app_config.path.

Reported here:

Change History (6)

comment:1 Changed 3 years ago by carljm

  • Owner changed from nobody to carljm
  • Status changed from new to assigned
  • Triage Stage changed from Unreviewed to Accepted

comment:2 Changed 3 years ago by carljm

  • Has patch set

Filed as a suggested fix for this.

comment:3 Changed 3 years ago by aaugustin

  • Severity changed from Normal to Release blocker

If we take the risk of breaking things, let's take it only in one release.

comment:4 Changed 3 years ago by jezdez

Yeah, I think we should tread carefully and add this to a list of APIs that could be cleaned up in a future version. Whether we can actually get rid of AppStaticStorage right away, I'm not sure. Maybe check with sourcegraph if there are many uses out there?

comment:5 Changed 3 years ago by Carl Meyer <carl@…>

  • Resolution set to fixed
  • Status changed from assigned to closed

In f56c88a8eed91f68f6845bbf730f7b7361c5cfb1:

Fixed #21867 -- Removed AppStaticStorage; app paths are now AppConfig's job.

AppStaticStorage only provided one thing over FileSystemStorage, which was
taking an app name (import path) and translating it into a filesystem
path. This is now something that should be done via app_config.path instead,
leaving AppStaticStorage with no reason for existence. It should be safe to
remove, as it was undocumented internal API.

There was some kind of feature in the AppDirectoriesFinder code related to a
"prefix" attribute on the storage class used by AppDirectoriesFinder. Since
this feature was undocumented, untested, and of unclear purpose, I removed it
as well.

comment:6 Changed 3 years ago by Jannis Leidel <jannis@…>

In b9e0ea3cb4ad25f767c77cb85a05f800aefda65b:

Merge pull request #2211 from carljm/t21867

Fixed #21867 -- Removed AppStaticStorage; app paths are now AppConfig's job.

Note: See TracTickets for help on using tickets.
Back to Top