Comments (3)
I have troubles replicating the issue, you can find my test bundle below.
It creates 3 components providing dummy services, a GrandParent
class (not a factory) declaring a single @Requires
, inherited by a Parent
component factory with its own requirement, itself inherited by the Child
component factory.
Even when commenting the @Requires
(toto
) of Parent
, the child still has the other two requirements injected.
Do you have a sample code to see what happens ?
Which version of iPOPO are you using ?
from pelix.ipopo.decorators import (
ComponentFactory,
Requires,
Instantiate,
Validate,
Provides,
)
from pelix.framework import create_framework
@ComponentFactory()
@Provides("foo")
@Instantiate("foo")
class Foo:
pass
@ComponentFactory()
@Provides("bar")
@Instantiate("bar")
class Bar:
pass
@ComponentFactory()
@Provides("baz")
@Instantiate("baz")
class Baz:
pass
@Requires("tutu", "baz")
class GrandParent:
def __init__(self):
self.tutu = None
@ComponentFactory()
@Requires("toto", "foo")
@Instantiate("parent")
class Parent(GrandParent):
def __init__(self):
super().__init__()
self.toto = None
@Validate
def validate(self, ctx):
print("Parent ## tutu=", self.tutu, "toto=", self.toto)
@ComponentFactory()
@Requires("titi", "bar")
@Instantiate("child")
class Child(Parent):
def __init__(self):
super().__init__()
self.titi = None
@Validate
def validate(self, ctx):
print(
"Child ## tutu=", self.tutu, "toto=", self.toto, "titi=", self.titi
)
Here is a sample output:
Child ## tutu= <check.Baz object at 0x00000209D2BB2940> toto= <check.Foo object at 0x00000209D2BED320> titi= <check.Bar object at 0x00000209D2BB2978>
Parent ## tutu= <check.Baz object at 0x00000209D2BB2940> toto= <check.Foo object at 0x00000209D2BED320>
from ipopo.
I'll see to provide you asap the code sample.
from ipopo.
No news on this issues and I couldn't reproduce it.
Moving it to milestone 0.8.1 waiting for more details.
from ipopo.
Related Issues (20)
- AttributeError: 'Rest_API' object has no attribute '_RestDispatcher__routes' HOT 1
- RSA Xml-RCP Client not working HOT 4
- Always active Publisher bundle question HOT 4
- Error in when normalizing path of some modules
- Improvement HOT 16
- iPOPOv2 development HOT 16
- Autodoc not working on RtD ? HOT 1
- Add support for stdlib LogFormatter in LogService
- Manage components with ConfigurationAdmin HOT 1
- Cannot avoid creating configadmin 'conf' folder HOT 3
- Deadlock using ConfigAdmin? HOT 7
- i got an error, help me,how to HOT 1
- Replace Travis-CI by GitHub Actions HOT 1
- RequiresVarFilter doesn't update bindings
- Upgrading iPOPO to latest Python versions HOT 1
- Upgrade ReadTheDocs configuration HOT 1
- ipopo still active? HOT 11
- Replace use of http with https url for karaf ecf features install HOT 1
- Contribute etc3 discovery provider HOT 26
- Handle Python 3.12 deprecation warnings HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ipopo.