[Django] #20687: Document that the max_age argument of TimeStampSigner.unsign should be a number of seconds

3 views
Skip to first unread message

Django

unread,
Jul 2, 2013, 6:28:47 AM7/2/13
to django-...@googlegroups.com
#20687: Document that the max_age argument of TimeStampSigner.unsign should be a
number of seconds
--------------------------------------+--------------------
Reporter: bmispelon | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Core (Other) | Version: master
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 1 | UI/UX: 0
--------------------------------------+--------------------
Currently, neither the documentation [1] or the code [2] are very explicit
about what kind of value `max_age` is supposed to receive (a `timedelta`,
a `datetime`, ...?).

It's only by looking at the error message that you can guess it's
expecting seconds.

[1] https://docs.djangoproject.com/en/dev/topics/signing/#verifying-
timestamped-values
[2]
https://github.com/django/django/blob/master/django/core/signing.py#L185

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

Django

unread,
Jul 2, 2013, 7:54:29 AM7/2/13
to django-...@googlegroups.com
#20687: Document that the max_age argument of TimeStampSigner.unsign should be a
number of seconds
--------------------------------------+------------------------------------

Reporter: bmispelon | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Core (Other) | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

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

* needs_better_patch: => 0
* needs_docs: => 0
* needs_tests: => 0
* stage: Unreviewed => Accepted


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

Django

unread,
Jul 3, 2013, 2:24:15 AM7/3/13
to django-...@googlegroups.com
#20687: Document that the max_age argument of TimeStampSigner.unsign should be a
number of seconds
--------------------------------------+------------------------------------

Reporter: bmispelon | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Core (Other) | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

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

* cc: tomas.ehrlich@… (added)
* has_patch: 0 => 1


Comment:

I was looking for it this morning. Added documentation for signing data
structures too (wasn't mentioned, it uses TimestampSigner neither).

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

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

Django

unread,
Jul 3, 2013, 8:27:01 AM7/3/13
to django-...@googlegroups.com
#20687: Document that the max_age argument of TimeStampSigner.unsign should be a
number of seconds
--------------------------------------+------------------------------------

Reporter: bmispelon | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Core (Other) | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1

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

* needs_better_patch: 0 => 1


Comment:

Left a couple comments on the PR.

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

Django

unread,
Jul 3, 2013, 8:37:45 AM7/3/13
to django-...@googlegroups.com
#20687: Document that the max_age argument of TimeStampSigner.unsign should be a
number of seconds
--------------------------------------+------------------------------------

Reporter: bmispelon | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Core (Other) | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

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

* needs_better_patch: 1 => 0


Comment:

Updated PR https://github.com/django/django/pull/1323#commits-pushed-
63810d3

Thanks for review

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

Django

unread,
Jul 3, 2013, 10:38:20 AM7/3/13
to django-...@googlegroups.com
#20687: Document that the max_age argument of TimeStampSigner.unsign should be a
number of seconds
--------------------------------------+------------------------------------
Reporter: bmispelon | Owner: nobody
Type: Cleanup/optimization | Status: closed

Component: Core (Other) | Version: master
Severity: Normal | Resolution: fixed

Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

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

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


Comment:

In [changeset:"c5bc98d7e1779263dc870843cab296f052e9a318"]:
{{{
#!CommitTicketReference repository=""
revision="c5bc98d7e1779263dc870843cab296f052e9a318"
Fixed #20687 -- Added documentation for django.core.signing API.

Thanks Baptiste Mispelon for the suggestion.
}}}

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

Django

unread,
Jul 3, 2013, 10:39:14 AM7/3/13
to django-...@googlegroups.com
#20687: Document that the max_age argument of TimeStampSigner.unsign should be a
number of seconds
--------------------------------------+------------------------------------
Reporter: bmispelon | Owner: nobody
Type: Cleanup/optimization | Status: closed

Component: Core (Other) | Version: master
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

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

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

In [changeset:"2f9e5483f6e65bcc0364833517fdae26f1b8c885"]:
{{{
#!CommitTicketReference repository=""
revision="2f9e5483f6e65bcc0364833517fdae26f1b8c885"
[1.6.x] Fixed #20687 -- Added documentation for django.core.signing API.

Thanks Baptiste Mispelon for the suggestion.

Backport of c5bc98d7e1 from master.
}}}

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

Django

unread,
Jul 3, 2013, 10:39:30 AM7/3/13
to django-...@googlegroups.com
#20687: Document that the max_age argument of TimeStampSigner.unsign should be a
number of seconds
--------------------------------------+------------------------------------
Reporter: bmispelon | Owner: nobody
Type: Cleanup/optimization | Status: closed

Component: Core (Other) | Version: master
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

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

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

In [changeset:"6151fdf930c9a513597e94fe8e8aee5e88c69ca1"]:
{{{
#!CommitTicketReference repository=""
revision="6151fdf930c9a513597e94fe8e8aee5e88c69ca1"
[1.5.x] Fixed #20687 -- Added documentation for django.core.signing API.

Thanks Baptiste Mispelon for the suggestion.

Backport of c5bc98d7e1 from master.
}}}

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

Reply all
Reply to author
Forward
0 new messages