Edgewall Software
Modify

Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#12166 closed defect (fixed)

Calling SizedDict.setdefault will raise a TypeError

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

SizedDict's setdefault method raises NotImplementedError. Previously it incorrectly raised the NotImplemented constant (which doesn't inherit from Exception).

API Changes:
Internal Changes:

Description

SizedDict should raise NotImplementedError rather than NotImplemented: tags/trac-1.1.6/tracopt/versioncontrol/git/PyGIT.py@:197#L171.

>>> from tracopt.versioncontrol.git.PyGIT import SizedDict
>>> s = SizedDict()
>>> s.setdefault(None)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "tracopt/versioncontrol/git/PyGIT.py", line 197, in setdefault
    raise NotImplemented("SizedDict has no setdefault() method")
TypeError: 'NotImplementedType' object is not callable

More info here.

Attachments (0)

Change History (3)

comment:1 by Ryan J Ollos, 5 years ago

Release Notes: modified (diff)
Resolution: fixed
Status: newclosed

Committed to 1.0-stable in [14243], merged to trunk in [14244].

comment:2 by Ryan J Ollos, 5 years ago

Release Notes: modified (diff)

comment:3 by Ryan J Ollos, 5 years ago

Owner: set to Ryan J Ollos

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Ryan J Ollos.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Ryan J Ollos 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.