Ticket #992 defect closed fixed

Opened 8 years ago

Last modified 6 years ago

session.getComponent doesn't work with 'default' keyword arg

Reported by: justinj Owned by:
Priority: highest Milestone:
Component: core Keywords:
Cc: itamarst, justinj, jknight Branch:
Author: Launchpad Bug:

Description


Change History

1

Changed 8 years ago by justinj

After upgrading to Twisted 2.0 on Windows 2000, and changing code to use 
zope.interface, lines like following never pick up passed in default value.

thing = session.getComponent(IThing, default="blah")

Instead, thing is set to None.  Removing default= so that the default is just 
passed in as the 2nd arg fixes the problem.  Heard on irc that default keyword 
arg shouldn't be used anymore because zope doesn't support it.  I didn't see 
any doc on this anywhere, so I'm assuming it's a bug.

2

Changed 8 years ago by jknight

Agree, looks like a bug in Componentized.getComponent. => itamarst.

3

Changed 6 years ago by exarkun

  • priority changed from high to highest
  • keywords review added
  • component set to core
  • owner itamarst deleted

Fixed in getcomponent-992. Please review.

4

Changed 6 years ago by exarkun

  • owner set to dreid

5

Changed 6 years ago by dreid

  • keywords review removed
  • status changed from new to assigned

6

Changed 6 years ago by dreid

  • status changed from assigned to new
  • owner changed from dreid to exarkun

There isn't anything bad to note about this branch. The change is simple and functional and the tests pass. Ok to merge.

7

Changed 6 years ago by exarkun

  • status changed from new to closed
  • resolution set to fixed

(In [18897]) Merge getcomponent-992

Author: exarkun Reviewer: dreid Fixes #992

Add tests for twisted.python.components.Componentized.getComponent's default argument and fix a bug which caused it to always be ignored.

8

Changed 2 years ago by <automation>

  • owner exarkun deleted
Note: See TracTickets for help on using tickets.