[Django] #20691: Documentation for "Choosing between __str__() and __unicode__()" is written for Python2 specifically

19 views
Skip to first unread message

Django

unread,
Jul 2, 2013, 10:18:20 AM7/2/13
to django-...@googlegroups.com
#20691: Documentation for "Choosing between __str__() and __unicode__()" is written
for Python2 specifically
-------------------------------+--------------------
Reporter: garrison | Owner: nobody
Type: Uncategorized | Status: new
Component: Documentation | Version: 1.5
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------
At https://docs.djangoproject.com/en/dev/ref/unicode/#choosing-between-
str-and-unicode it should be mentioned that {{{__str__()}}} is to be used
instead of {{{__unicode__()}}} in Python3. And a note about
[https://docs.djangoproject.com/en/dev/ref/utils/#django.utils.encoding.python_2_unicode_compatible
Python2 compatibility for using] {{{__str__()}}} should be provided.

--
Ticket URL: <https://code.djangoproject.com/ticket/20691>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Jul 2, 2013, 10:58:17 AM7/2/13
to django-...@googlegroups.com
#20691: Documentation for "Choosing between __str__() and __unicode__()" is written
for Python2 specifically
--------------------------------------+------------------------------------
Reporter: garrison | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Documentation | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by timo):

* cc: timograham@… (added)
* needs_better_patch: => 0
* needs_tests: => 0
* version: 1.5 => master
* needs_docs: => 0
* has_patch: 0 => 1
* type: Uncategorized => Cleanup/optimization
* stage: Unreviewed => Accepted


--
Ticket URL: <https://code.djangoproject.com/ticket/20691#comment:1>

Django

unread,
Jul 2, 2013, 3:58:25 PM7/2/13
to django-...@googlegroups.com
#20691: Documentation for "Choosing between __str__() and __unicode__()" is written
for Python2 specifically
--------------------------------------+------------------------------------
Reporter: garrison | Owner: nobody

Type: Cleanup/optimization | Status: new
Component: Documentation | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1

Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by claudep):

* needs_better_patch: 0 => 1


Comment:

I think I would have written a note at the start of the subsection: `If
you are on Python 3, you can skip this section because you'll always
create __str__()...`. This can prevent a Python 3 user to read the
paragraph just to finally realize that he's not concerned.

--
Ticket URL: <https://code.djangoproject.com/ticket/20691#comment:2>

Django

unread,
Jul 2, 2013, 4:03:01 PM7/2/13
to django-...@googlegroups.com
#20691: Documentation for "Choosing between __str__() and __unicode__()" is written
for Python2 specifically
--------------------------------------+------------------------------------
Reporter: garrison | Owner: nobody

Type: Cleanup/optimization | Status: new
Component: Documentation | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by timo):

* needs_better_patch: 1 => 0


--
Ticket URL: <https://code.djangoproject.com/ticket/20691#comment:3>

Django

unread,
Jul 3, 2013, 8:41:23 AM7/3/13
to django-...@googlegroups.com
#20691: Documentation for "Choosing between __str__() and __unicode__()" is written
for Python2 specifically
-------------------------------------+-------------------------------------
Reporter: garrison | Owner: nobody
Type: | Status: new
Cleanup/optimization | Version: master
Component: Documentation | Resolution:
Severity: Normal | Triage Stage: Ready for
Keywords: | checkin

Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by claudep):

* stage: Accepted => Ready for checkin


Comment:

LVGTM :-)

--
Ticket URL: <https://code.djangoproject.com/ticket/20691#comment:4>

Django

unread,
Jul 3, 2013, 8:46:05 AM7/3/13
to django-...@googlegroups.com
#20691: Documentation for "Choosing between __str__() and __unicode__()" is written
for Python2 specifically
-------------------------------------+-------------------------------------
Reporter: garrison | Owner: nobody
Type: | Status: closed
Cleanup/optimization | Version: master
Component: Documentation | Resolution: fixed

Severity: Normal | Triage Stage: Ready for
Keywords: | checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Tim Graham <timograham@…>):

* status: new => closed
* resolution: => fixed


Comment:

In [changeset:"8a679386c3924026f8558f9cd0164890a9461e2c"]:
{{{
#!CommitTicketReference repository=""
revision="8a679386c3924026f8558f9cd0164890a9461e2c"
Fixed #20691 -- Added a note for __str__() vs. __unicode__() and Python 3.

Thanks garrison for the suggestion.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/20691#comment:5>

Django

unread,
Jul 3, 2013, 8:46:33 AM7/3/13
to django-...@googlegroups.com
#20691: Documentation for "Choosing between __str__() and __unicode__()" is written
for Python2 specifically
-------------------------------------+-------------------------------------
Reporter: garrison | Owner: nobody

Type: | Status: closed
Cleanup/optimization | Version: master
Component: Documentation | Resolution: fixed
Severity: Normal | Triage Stage: Ready for
Keywords: | checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Tim Graham <timograham@…>):

In [changeset:"b36f55c5a5bc7e3dac8a811973c7f7ad1c92d7c5"]:
{{{
#!CommitTicketReference repository=""
revision="b36f55c5a5bc7e3dac8a811973c7f7ad1c92d7c5"
[1.6.x] Fixed #20691 -- Added a note for __str__() vs. __unicode__() and
Python 3.

Thanks garrison for the suggestion.

Backport of 8a679386c3 from master.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/20691#comment:6>

Django

unread,
Jul 3, 2013, 8:46:55 AM7/3/13
to django-...@googlegroups.com
#20691: Documentation for "Choosing between __str__() and __unicode__()" is written
for Python2 specifically
-------------------------------------+-------------------------------------
Reporter: garrison | Owner: nobody

Type: | Status: closed
Cleanup/optimization | Version: master
Component: Documentation | Resolution: fixed
Severity: Normal | Triage Stage: Ready for
Keywords: | checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Tim Graham <timograham@…>):

In [changeset:"4453d8651af4579b3b83d873cadbda0707b7ab2a"]:
{{{
#!CommitTicketReference repository=""
revision="4453d8651af4579b3b83d873cadbda0707b7ab2a"
[1.5.x] Fixed #20691 -- Added a note for __str__() vs. __unicode__() and
Python 3.

Thanks garrison for the suggestion.

Backport of 8a679386c3 from master.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/20691#comment:7>

Reply all
Reply to author
Forward
0 new messages