Opened 8 months ago

Closed 8 months ago

Last modified 8 months ago

#34795 closed New feature (wontfix)

ConnectionProxy (and likely others) do not expose the `__dir__` of the object they are proxying

Reported by: Willem Van Onsem Owned by: nobody
Component: Core (Other) Version: 4.2
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Based on this question: https://stackoverflow.com/q/76963171/67579 the ConnectionProxy does not communicate the __dir__ of the object it is exposing. As a result, shells, etc. can not help with code completion.

Overriding __dir__ and returning the dir(..) of the items it exposes is however quite easy.

Change History (2)

comment:1 by Natalia Bidart, 8 months ago

Resolution: wontfix
Status: newclosed

Hello, thank you for your ticket.

I don't see much value in providing this vs the potential side effects of calling dir on the proxied connection.

If you disagree, the recommended path forward in cases like this is to first propose and discuss the idea with the community and gain consensus. To do that, please start a new conversation on the Django Forum, where you'll reach a wider audience and likely get richer feedback.

I'll close the ticket for now, but once that there is a community agreement for the feature request, you are welcome to come back to the ticket and point to the forum topic, so we can then re-open it. For more details, please see the documented guidelines for requesting features.

Thanks!

comment:2 by Natalia Bidart, 8 months ago

Easy pickings: unset
Type: UncategorizedNew feature
Note: See TracTickets for help on using tickets.
Back to Top