Edgewall Software

Opened 9 years ago

Last modified 9 years ago

#12027 closed enhancement

Use namedtuple for RevCache in PyGIT module — at Version 2

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

Utilized namedtuple in RevCache class definition to replace hard-coded definition of a namedtuple-equivalent class.

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].

Change History (2)

comment:1 by Ryan J Ollos, 9 years ago

Proposed changes in log:rjollos.git:t12027.

comment:2 by Jun Omae, 9 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).

Note: See TracTickets for help on using tickets.