Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#31280 closed Cleanup/optimization (wontfix)

Rename DEBUG_PROPAGATE_EXCEPTIONS to PROPAGATE_EXCEPTIONS.

Reported by: Adam Johnson Owned by: nobody
Component: HTTP handling Version: dev
Severity: Normal Keywords:
Cc: Luke Plant Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

The rarely needed setting DEBUG_PROPAGATE_EXCEPTIONS is confusingly named. It applies all the time, not just when DEBUG = True.

I propose renaming it to PROPAGATE_EXCEPTIONS with the standard deprecation period.

Change History (4)

comment:1 by Mariusz Felisiak, 5 years ago

Cc: Luke Plant added
Summary: Rename DEBUG_PROPAGATE_EXCEPTIONS to PROPAGATE_EXCEPTIONSRename DEBUG_PROPAGATE_EXCEPTIONS to PROPAGATE_EXCEPTIONS.

As far as I'm concerned a DEBUG_ prefix is to emphasize that this should be used only for debug and not on live sites. It's also documented properly:

If set to True, Django's exception handling of view functions (handler500, or the debug view if DEBUG is True) and logging of 500 responses (django-request-logger) is skipped and exceptions propagate upwards.

It's not misleading, IMO. I would keep the current name.

comment:2 by Mariusz Felisiak, 5 years ago

Resolution: wontfix
Status: newclosed

comment:3 by Adam Johnson, 5 years ago

I think there are use cases outside of DEBUG=True, for example in tests to check what exceptions are raised when using test client/webtest (how I have used it) or if you want to use WSGI middleware to serve your error pages. Agree the documentation is probably fine though.

in reply to:  3 comment:4 by Mariusz Felisiak, 5 years ago

Replying to Adam (Chainz) Johnson:

I think there are use cases outside of DEBUG=True, for example in tests to check what exceptions are raised when using test client/webtest (how I have used it) or if you want to use WSGI middleware to serve your error pages.

I totally agree, I meant ... only for debugging ... (with no implication to the DEBUG setting).

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