Edgewall Software
Modify

Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#12027 closed enhancement (fixed)

Use namedtuple for RevCache in PyGIT module

Reported by: Ryan J Ollos Owned by: Jun Omae
Priority: normal Milestone: 1.0.6
Component: plugin/git Version:
Severity: normal Keywords: refactoring
Cc: Branch:
Release Notes:

Replaced inherited tuple in RevCache class definition with inherited object class definition with __slots__ field.

API Changes:
Internal Changes:

Description (last modified by Jun Omae)

There is a refactoring task captured in this comment: tags/trac-1.0.4/tracopt/versioncontrol/git/PyGIT.py@:245-250#L241.

namedtuple is actually available since Python 2.6, however we cannot simply replace the class since it has been extended with methods in [13951]. We can, however, inherit from a namedtuple and implement the methods from [13951].

Attachments (0)

Change History (6)

comment:1 by Ryan J Ollos, 10 years ago

Proposed changes in log:rjollos.git:t12027.

comment:2 by Jun Omae, 10 years ago

Description: modified (diff)

I don't think it is needed to use a tuple for RevCache class while improving it at #11971. We could remove use of a tuple from the RevCache class. See [c5d122a9c/jomae.git] (jomae.git@t12027.2 on 1.0-stable).

comment:3 by Ryan J Ollos, 10 years ago

Those changes look good. I don't know any advantage to using a namedtuple in this case.

comment:4 by Jun Omae, 10 years ago

Milestone: 1.1.51.0.6
Owner: changed from Ryan J Ollos to Jun Omae
Release Notes: modified (diff)
Status: newassigned

Thanks for the reviewing. I'm going to push it to 1.0-stable.

comment:5 by Jun Omae, 10 years ago

Resolution: fixed
Status: assignedclosed

Committed in [13976] and merged to trunk in [13977].

comment:6 by Jun Omae, 10 years ago

Type: taskenhancement

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Jun Omae.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Jun Omae to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.