[Django] #20224: Documentation fix of allow_lazy usage example

52 views
Skip to first unread message

Django

unread,
Apr 8, 2013, 5:15:39 PM4/8/13
to django-...@googlegroups.com
#20224: Documentation fix of allow_lazy usage example
--------------------------------------+--------------------
Reporter: void | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Documentation | Version: master
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+--------------------
There is a line in the usage example of `allow_lazy`:
`fancy_utility_function = allow_lazy(fancy_utility_function, unicode)`
It would be better to use `six.text_type` instead of `unicode`, because
`unicode` does not exist of python3

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

Django

unread,
Apr 9, 2013, 4:40:22 AM4/9/13
to django-...@googlegroups.com
#20224: Documentation fix of allow_lazy usage example
--------------------------------------+------------------------------------

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

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

* cc: bmispelon@… (added)
* needs_better_patch: => 0
* needs_tests: => 0
* keywords: => python3
* needs_docs: => 0
* stage: Unreviewed => Accepted


Comment:

There's a lot of places in the documentation with code examples that don't
work in python3 (see #19841 for example).

I think we need to decide what to do about it in general.

From what I understand, the current position is that python3 support is
"experimental", so the documentation stays python2-oriented. This will
surely change at some point, and probably soon.

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

Django

unread,
Apr 9, 2013, 8:12:40 AM4/9/13
to django-...@googlegroups.com
#20224: Documentation fix of allow_lazy usage example
--------------------------------------+------------------------------------

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

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

Comment (by claudep):

Python 3 support will not be called experimental in 1.6, so yes, a fix is
welcome here. However, I'm not sure if always using `six` is a good idea.
It's the right thing to do to support both Python 2 and Python 3, but most
users will probably target either one or the other. An alternative could
be adding a str/unicode note somewhere in the docs and refer to that note
each time we are using `unicode` in examples.

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

Django

unread,
Apr 9, 2013, 8:21:18 AM4/9/13
to django-...@googlegroups.com
#20224: Documentation fix of allow_lazy usage example
--------------------------------------+------------------------------------

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

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

Comment (by bmispelon):

For what it's worth, I'm +1 on claudep's proposal.

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

Django

unread,
Jul 3, 2013, 1:59:26 PM7/3/13
to django-...@googlegroups.com
#20224: Update allow_lazy usage example for Python 3
--------------------------------------+------------------------------------

Reporter: void | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Documentation | Version: master
Severity: Normal | Resolution:
Keywords: python3 | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by timo):

* easy: 0 => 1


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

Django

unread,
Jul 4, 2013, 9:22:14 AM7/4/13
to django-...@googlegroups.com
#20224: Update allow_lazy usage example for Python 3
--------------------------------------+------------------------------------
Reporter: void | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Documentation | Version: master
Severity: Normal | Resolution:
Keywords: python3 | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by claudep):

* has_patch: 0 => 1


Comment:

https://github.com/django/django/pull/1330

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

Django

unread,
Jul 4, 2013, 2:30:18 PM7/4/13
to django-...@googlegroups.com
#20224: Update allow_lazy usage example for Python 3
-------------------------------------+-------------------------------------
Reporter: void | Owner: nobody
Type: | Status: new
Cleanup/optimization | Version: master
Component: Documentation | Resolution:
Severity: Normal | Triage Stage: Ready for
Keywords: python3 | checkin

Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by timo):

* stage: Accepted => Ready for checkin


Comment:

Left minor comments on the PR, should be good to go without another review
though, thanks!

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

Django

unread,
Jul 5, 2013, 1:28:13 PM7/5/13
to django-...@googlegroups.com
#20224: Update allow_lazy usage example for Python 3
-------------------------------------+-------------------------------------
Reporter: void | Owner: nobody
Type: | Status: closed
Cleanup/optimization | Version: master
Component: Documentation | Resolution: fixed

Severity: Normal | Triage Stage: Ready for
Keywords: python3 | checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Claude Paroz <claude@…>):

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


Comment:

In [changeset:"7442eb1a242ecf9d186d4e7de1b94e360e04782d"]:
{{{
#!CommitTicketReference repository=""
revision="7442eb1a242ecf9d186d4e7de1b94e360e04782d"
Fixed #20224 -- Update docs examples which mention __unicode__

Thanks Marc Tamlyn and Tim Graham for the review.
}}}

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

Django

unread,
Jul 5, 2013, 1:30:55 PM7/5/13
to django-...@googlegroups.com
#20224: Update allow_lazy usage example for Python 3
-------------------------------------+-------------------------------------
Reporter: void | Owner: nobody

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

Comment (by Claude Paroz <claude@…>):

In [changeset:"a9dd6221af2148410c8a26dcbafd1ff8cc0fb107"]:
{{{
#!CommitTicketReference repository=""
revision="a9dd6221af2148410c8a26dcbafd1ff8cc0fb107"
[1.6.x] Fixed #20224 -- Update docs examples which mention __unicode__

Thanks Marc Tamlyn and Tim Graham for the review.

Backport of 7442eb1a24 from master.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/20224#comment:8>

Reply all
Reply to author
Forward
0 new messages