Modify ↓
#11544 closed defect (fixed)
Version argument in Resource object is ignored when initializing a WikiPage
Reported by: | Ryan J Ollos | Owned by: | Ryan J Ollos |
---|---|---|---|
Priority: | normal | Milestone: | 1.1.2 |
Component: | wiki system | Version: | |
Severity: | normal | Keywords: | |
Cc: | Branch: | ||
Release Notes: | |||
API Changes: |
|
||
Internal Changes: |
Description
The version
of the Resource
object is ignored when initializing a WikiPage
object.
Python 2.7.4 (default, Sep 26 2013, 03:20:26) [GCC 4.7.3] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> from trac.env import Environment >>> from trac.resource import Resource >>> from trac.wiki.model import WikiPage >>> env = Environment('/home/user/Workspace/t11518/tracdev') >>> resource = Resource('wiki', 'WikiStart', 1) >>> page = WikiPage(env, resource) >>> page.version 4
This was previously discussed in comment:4:ticket:11518. It was suggested to also allow the version
parameter to take precedence over Resource.version
, which would preserve existing behavior.
We should also:
- Improve the behavior when
version
can't be cast to anint
, as exhibited by the tests: trunk/trac/wiki/tests/model.py@12587:285-295#L285. Should an invalid version by coerced toNone
? - Improve docstring for
WikiPage
.
Attachments (0)
Change History (5)
comment:1 by , 11 years ago
Milestone: | 1.1.3 → 1.1.2 |
---|---|
Owner: | set to |
Status: | new → assigned |
comment:2 by , 11 years ago
comment:3 by , 11 years ago
API Changes: | modified (diff) |
---|---|
Resolution: | → fixed |
Status: | assigned → closed |
Committed to trunk in [12659].
comment:4 by , 10 years ago
API Changes: | modified (diff) |
---|
Note:
See TracTickets
for help on using tickets.
Proposed changes in log:rjollos.git:t11544.