Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#27592 closed Cleanup/optimization (fixed)

QueryDict docs don't mention that iter methods are available only on Python 2

Reported by: Tzu-ping Chung Owned by: nobody
Component: Documentation Version: dev
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

The documentation does not make distinctions between Python 2 and 3 APIs, and lists both iter- and non-iter- methods. This gives an impression that both names are available for all Python versions, while in fact Python 3 does not have the iterator-based methods under iter- names. While the rule makes sense (being consistent with core Python), it should be made clear in documentation.

Attachments (1)

27592.diff (976 bytes ) - added by Tim Graham 8 years ago.

Download all attachments as: .zip

Change History (7)

comment:1 by Tim Graham, 8 years ago

Has patch: set
Summary: QueryDict documentation is misleadingQueryDict docs don't mention that iter methods are available only on Python 2
Triage Stage: UnreviewedAccepted

Is the attached patch sufficient?

by Tim Graham, 8 years ago

Attachment: 27592.diff added

comment:2 by Tzu-ping Chung, 8 years ago

I think it’s useful to document at least lists() to mention it behaves differently on Python 2 and 3. It would be nice if there are refs in iter- methods to non-iter- methods and vice versa, but that might be just me thinking too much.

comment:3 by Tim Graham, 8 years ago

If you want to submit a patch, I'll take a look, but I don't know if it's worth spending much time on considering that Django will drop Python 2 support in master next month.

comment:4 by Tzu-ping Chung, 8 years ago

I don't know if it's worth spending much time on considering that Django will drop Python 2 support in master next month.

Ah, good point. The previous patch would be enough then.

comment:5 by Tim Graham <timograham@…>, 8 years ago

Resolution: fixed
Status: newclosed

In 7ff301ca:

[1.10.x] Fixed #27592 -- Doc'd that QueryDict iter methods are Python 2 only.

Backport of 2e9fa516fde57fd58405481034a5a08b3746b257 from master

comment:6 by Tim Graham <timograham@…>, 8 years ago

In 2e9fa51:

Fixed #27592 -- Doc'd that QueryDict iter methods are Python 2 only.

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