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 responder #5

Open
Agnes-U opened this issue Nov 29, 2022 · 0 comments
Open

Suggest to loosen the dependency on responder #5

Agnes-U opened this issue Nov 29, 2022 · 0 comments

Comments

@Agnes-U
Copy link

Agnes-U commented Nov 29, 2022

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

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

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 Signpeaker(commit id: db00f6f) directly uses 3 APIs from package responder.

responder.api.API.route, responder.api.API.__init__, responder.api.API.run

From which, 27 functions are then indirectly called, including 14 responder's internal APIs and 13 outsider APIs, as follows (neglecting some repeated function occurrences).

[/Noxturnix/Signpeaker]
+--responder.api.API.route
|      +--responder.api.API.add_route
|      |      +--responder.routes.Router.add_route
|      |      |      +--responder.routes.WebSocketRoute.__init__
|      |      |      |      +--responder.routes.compile_path
|      |      |      |      |      +--re.compile
|      |      |      +--responder.routes.Route.__init__
|      |      |      |      +--responder.routes.compile_path
+--responder.api.API.__init__
|      +--responder.background.BackgroundQueue.__init__
|      |      +--multiprocessing.cpu_count
|      |      +--concurrent.futures.ThreadPoolExecutor
|      +--responder.routes.Router.__init__
|      |      +--starlette.routing.Lifespan
|      +--pathlib.Path
|      +--os.path.abspath
|      +--os.makedirs
|      +--responder.api.API.mount
|      +--responder.formats.get_formats
|      +--starlette.exceptions.ExceptionMiddleware
|      +--responder.api.API.add_middleware
|      +--responder.ext.schema.Schema.__init__
|      |      +--apispec.ext.marshmallow.MarshmallowPlugin
|      |      +--pathlib.Path
|      +--responder.templates.Templates.__init__
|      |      +--jinja2.Environment
|      |      +--jinja2.FileSystemLoader
|      +--responder.api.API.session
|      |      +--starlette.testclient.TestClient
+--responder.api.API.run
|      +--responder.api.API.serve
|      |      +--uvicorn.run

We scan responder's versions among [2.0.4] and 2.0.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.0.5(original) 2.0.4
['responder.models.Response.__init__', 'responder.models.Response', 'responder.api.API']

As for other packages, the APIs of @outside_package_name are called by responder 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 responder from "responder==2.0.5" to "responder>=2.0.4,<=2.0.5". This will improve the applicability of Signpeaker 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