Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#21867 closed Cleanup/optimization (fixed)

AppStaticStorage is still using app_module.__file__

Reported by: Aymeric Augustin Owned by: Carl Meyer
Component: contrib.staticfiles Version: dev
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

Description

It should perhaps be updated to use app_config.path.

Reported here: https://code.djangoproject.com/ticket/21862#comment:5

Change History (6)

comment:1 by Carl Meyer, 11 years ago

Owner: changed from nobody to Carl Meyer
Status: newassigned
Triage Stage: UnreviewedAccepted

comment:2 by Carl Meyer, 11 years ago

Has patch: set

Filed https://github.com/django/django/pull/2211 as a suggested fix for this.

comment:3 by Aymeric Augustin, 11 years ago

Severity: NormalRelease blocker

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

comment:4 by Jannis Leidel, 11 years ago

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? https://sourcegraph.com/search?q=AppStaticStorage

comment:5 by Carl Meyer <carl@…>, 11 years ago

Resolution: fixed
Status: assignedclosed

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 by Jannis Leidel <jannis@…>, 11 years ago

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