dstanek / snake-guice

A lightweight dependency injection framework for Python
MIT License
7 stars 2 forks source link

Better massaging when using the inject decorator incorrectly #9

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
We are getting this traceback:
{{{
  File "/home/mgriffith/src/sandbox/src/applib/app/pw/controller/test.py",
line 35, in TestController
    @inject(customer_facade=cf.CustomerFacade)
  File "build\bdist.win32\egg\peak\util\decorators.py", line 576, in tracer
  File "build/bdist.linux-i686/egg/snakeguice/decorators.py", line 66, in
callback
    _validate_property_args(func, args, kwargs)
  File "build/bdist.linux-i686/egg/snakeguice/decorators.py", line 46, in
_validate_property_args
    raise DecorationError('only 1 decorator argument allowed')
DecorationError: only 1 decorator argument allowed
}}}

when using inject incorrectly. We were specifying property injection and
including a keyword arg that was unexpected. Can we make this more obvious?

Original issue reported on code.google.com by tracebac...@gmail.com on 30 Apr 2009 at 4:10

GoogleCodeExporter commented 9 years ago
snake-guice no longer supports property injection. I don't believe that this is 
an 
issue anymore.

Original comment by tracebac...@gmail.com on 25 Jan 2010 at 3:11