Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suggest to loosen the dependency on nameko #7

Open
Agnes-U opened this issue Dec 5, 2022 · 0 comments
Open

Suggest to loosen the dependency on nameko #7

Agnes-U opened this issue Dec 5, 2022 · 0 comments

Comments

@Agnes-U
Copy link

Agnes-U commented Dec 5, 2022

Hi, your project nameko-bayeux-client requires "nameko==2.8.5" in its dependency. After analyzing the source code, we found that some other versions of nameko can also be suitable without affecting your project, i.e., nameko 2.8.3, 2.8.4. Therefore, we suggest to loosen the dependency on nameko from "nameko==2.8.5" to "nameko>=2.8.3,<=2.8.5" to avoid any possible conflict for importing more packages or for downstream projects that may use nameko-bayeux-client.

May I pull a request to loosen the dependency on nameko?

By the way, could you please tell us whether such dependency analysis may be potentially helpful for maintaining dependencies easier during your development?



For your reference, here are details in our analysis.

Your project nameko-bayeux-client(commit id: 0807dff) directly uses 5 APIs from package nameko.

nameko.extensions.Entrypoint.__init__, nameko.extensions.Entrypoint.decorator, nameko.extensions.ProviderCollector.__init__, nameko.extensions.SharedExtension.__init__, nameko.testing.utils.find_free_port

From which, 4 functions are then indirectly called, including 0 nameko's internal APIs and 4 outsider APIs, as follows (neglecting some repeated function occurrences).

[/nameko/nameko-bayeux-client]
+--nameko.extensions.Entrypoint.__init__
|      +--warnings.warn
+--nameko.extensions.Entrypoint.decorator
|      +--nameko.extensions.register_entrypoint
|      +--functools.partial
+--nameko.extensions.ProviderCollector.__init__
|      +--eventlet.event.Event
+--nameko.extensions.SharedExtension.__init__
+--nameko.testing.utils.find_free_port
|      +--socket.socket

We scan nameko's versions among [2.8.3, 2.8.4] and 2.8.5, the changing functions (diffs being listed below) have none intersection with any function or API we mentioned above (either directly or indirectly called by this project).

diff: 2.8.5(original) 2.8.3
['nameko.containers.WorkerContext', 'nameko.web.server.WebServer', 'nameko.standalone.rpc.PollingQueueConsumer.get_message', 'nameko.web.handlers.HttpRequestHandler.get_url_rule', 'nameko.web.handlers.HttpRequestHandler', 'nameko.containers.WorkerContext.origin_call_id', 'nameko.messaging.QueueConsumer.requeue_message', 'nameko.messaging.QueueConsumer', 'nameko.containers.WorkerContext.immediate_parent_call_id', 'nameko.web.server.WebServer.start', 'nameko.standalone.rpc.PollingQueueConsumer', 'nameko.cli.run.setup_backdoor', 'nameko.messaging.QueueConsumer.ack_message']

diff: 2.8.5(original) 2.8.4
['nameko.web.server.WebServer', 'nameko.cli.run.setup_backdoor', 'nameko.web.server.WebServer.start']

diff: 2.8.5(original) 2.9.0rc0
['nameko.messaging.QueueConsumer.on_connection_error', 'nameko.containers.ServiceContainer.__init__', 'nameko.messaging.Publisher.serializer', 'nameko.exceptions.RpcConnectionError', 'nameko.rpc.Responder.send_response', 'nameko.serialization.setup', 'nameko.messaging.Publisher', 'nameko.rpc.ReplyListener.on_consume_ready', 'nameko.messaging.QueueConsumer', 'nameko.rpc.Responder', 'nameko.cli.main._replace_env_var', 'nameko.standalone.rpc.PollingQueueConsumer.get_message', 'nameko.rpc.ReplyListener.setup', 'nameko.containers.ServiceContainer', 'nameko.exceptions.ReplyQueueExpiredWithPendingReplies', 'nameko.standalone.rpc.PollingQueueConsumer.register_provider', 'nameko.messaging.QueueConsumer.on_consume_ready', 'nameko.rpc.ReplyListener', 'nameko.standalone.rpc.ConsumeEvent.wait', 'nameko.standalone.events.event_dispatcher', 'nameko.standalone.rpc.ConsumeEvent', 'nameko.standalone.rpc.PollingQueueConsumer']

diff: 2.8.5(original) 2.9.0
['nameko.messaging.QueueConsumer.on_connection_error', 'nameko.containers.ServiceContainer.__init__', 'nameko.messaging.Publisher.serializer', 'nameko.exceptions.RpcConnectionError', 'nameko.rpc.Responder.send_response', 'nameko.serialization.setup', 'nameko.messaging.Publisher', 'nameko.rpc.ReplyListener.on_consume_ready', 'nameko.messaging.QueueConsumer', 'nameko.rpc.Responder', 'nameko.cli.main._replace_env_var', 'nameko.standalone.rpc.PollingQueueConsumer.get_message', 'nameko.rpc.ReplyListener.setup', 'nameko.containers.ServiceContainer', 'nameko.exceptions.ReplyQueueExpiredWithPendingReplies', 'nameko.standalone.rpc.PollingQueueConsumer.register_provider', 'nameko.messaging.QueueConsumer.on_consume_ready', 'nameko.rpc.ReplyListener', 'nameko.standalone.rpc.ConsumeEvent.wait', 'nameko.standalone.events.event_dispatcher', 'nameko.standalone.rpc.ConsumeEvent', 'nameko.standalone.rpc.PollingQueueConsumer']

diff: 2.8.5(original) 2.9.0-rc0
['nameko.messaging.QueueConsumer.on_connection_error', 'nameko.containers.ServiceContainer.__init__', 'nameko.messaging.Publisher.serializer', 'nameko.exceptions.RpcConnectionError', 'nameko.rpc.Responder.send_response', 'nameko.serialization.setup', 'nameko.messaging.Publisher', 'nameko.rpc.ReplyListener.on_consume_ready', 'nameko.messaging.QueueConsumer', 'nameko.rpc.Responder', 'nameko.cli.main._replace_env_var', 'nameko.standalone.rpc.PollingQueueConsumer.get_message', 'nameko.rpc.ReplyListener.setup', 'nameko.containers.ServiceContainer', 'nameko.exceptions.ReplyQueueExpiredWithPendingReplies', 'nameko.standalone.rpc.PollingQueueConsumer.register_provider', 'nameko.messaging.QueueConsumer.on_consume_ready', 'nameko.rpc.ReplyListener', 'nameko.standalone.rpc.ConsumeEvent.wait', 'nameko.standalone.events.event_dispatcher', 'nameko.standalone.rpc.ConsumeEvent', 'nameko.standalone.rpc.PollingQueueConsumer']

diff: 2.8.5(original) 2.9.1rc0
['nameko.rpc.RpcConsumer', 'nameko.messaging.QueueConsumer.on_connection_error', 'nameko.messaging.Publisher.setup', 'nameko.containers.ServiceContainer.__init__', 'nameko.messaging.Publisher.serializer', 'nameko.messaging.QueueConsumer.connection', 'nameko.exceptions.RpcConnectionError', 'nameko.rpc.Responder.send_response', 'nameko.serialization.setup', 'nameko.amqp.publish.get_producer', 'nameko.messaging.Publisher', 'nameko.rpc.ReplyListener.on_consume_ready', 'nameko.messaging.QueueConsumer', 'nameko.testing.pytest.pytest_addoption', 'nameko.rpc.Responder', 'nameko.cli.main._replace_env_var', 'nameko.amqp.publish.get_connection', 'nameko.standalone.rpc.PollingQueueConsumer.get_message', 'nameko.amqp.publish.Publisher.publish', 'nameko.rpc.ReplyListener.setup', 'nameko.containers.ServiceContainer', 'nameko.exceptions.ReplyQueueExpiredWithPendingReplies', 'nameko.standalone.rpc.PollingQueueConsumer.register_provider', 'nameko.rpc.Responder.__init__', 'nameko.messaging.QueueConsumer.setup', 'nameko.rpc.MethodProxy.ssl', 'nameko.messaging.QueueConsumer.on_consume_ready', 'nameko.rpc.MethodProxy', 'nameko.rpc.ReplyListener', 'nameko.rpc.RpcConsumer.handle_result', 'nameko.testing.pytest.rabbit_ssl_config', 'nameko.standalone.rpc.ConsumeEvent.wait', 'nameko.standalone.events.event_dispatcher', 'nameko.standalone.rpc.ConsumeEvent', 'nameko.amqp.utils.verify_amqp_uri', 'nameko.amqp.publish.Publisher.__init__', 'nameko.standalone.rpc.PollingQueueConsumer', 'nameko.testing.pytest.parse_config_option', 'nameko.amqp.publish.Publisher']

diff: 2.8.5(original) 2.9.1-rc0
['nameko.rpc.RpcConsumer', 'nameko.messaging.QueueConsumer.on_connection_error', 'nameko.messaging.Publisher.setup', 'nameko.containers.ServiceContainer.__init__', 'nameko.messaging.Publisher.serializer', 'nameko.messaging.QueueConsumer.connection', 'nameko.exceptions.RpcConnectionError', 'nameko.rpc.Responder.send_response', 'nameko.serialization.setup', 'nameko.amqp.publish.get_producer', 'nameko.messaging.Publisher', 'nameko.rpc.ReplyListener.on_consume_ready', 'nameko.messaging.QueueConsumer', 'nameko.testing.pytest.pytest_addoption', 'nameko.rpc.Responder', 'nameko.cli.main._replace_env_var', 'nameko.amqp.publish.get_connection', 'nameko.standalone.rpc.PollingQueueConsumer.get_message', 'nameko.amqp.publish.Publisher.publish', 'nameko.rpc.ReplyListener.setup', 'nameko.containers.ServiceContainer', 'nameko.exceptions.ReplyQueueExpiredWithPendingReplies', 'nameko.standalone.rpc.PollingQueueConsumer.register_provider', 'nameko.rpc.Responder.__init__', 'nameko.messaging.QueueConsumer.setup', 'nameko.rpc.MethodProxy.ssl', 'nameko.messaging.QueueConsumer.on_consume_ready', 'nameko.rpc.MethodProxy', 'nameko.rpc.ReplyListener', 'nameko.rpc.RpcConsumer.handle_result', 'nameko.testing.pytest.rabbit_ssl_config', 'nameko.standalone.rpc.ConsumeEvent.wait', 'nameko.standalone.events.event_dispatcher', 'nameko.standalone.rpc.ConsumeEvent', 'nameko.amqp.utils.verify_amqp_uri', 'nameko.amqp.publish.Publisher.__init__', 'nameko.standalone.rpc.PollingQueueConsumer', 'nameko.testing.pytest.parse_config_option', 'nameko.amqp.publish.Publisher']

As for other packages, the APIs of @outside_package_name are called by nameko in the call graph and the dependencies on these packages also stay the same in our suggested versions, thus avoiding any outside conflict.

Therefore, we believe that it is quite safe to loose your dependency on nameko from "nameko==2.8.5" to "nameko>=2.8.3,<=2.8.5". This will improve the applicability of nameko-bayeux-client and reduce the possibility of any further dependency conflict with other projects/packages.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant