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 chalice #2

Open
Agnes-U opened this issue Jul 12, 2022 · 0 comments
Open

Suggest to loosen the dependency on chalice #2

Agnes-U opened this issue Jul 12, 2022 · 0 comments

Comments

@Agnes-U
Copy link

Agnes-U commented Jul 12, 2022

Hi, your project meuparlamento-backend-api requires "chalice==1.9.0" in its dependency. After analyzing the source code, we found that the following versions of chalice can also be suitable without affecting your project, i.e., chalice 1.9.1. Therefore, we suggest to loosen the dependency on chalice from "chalice==1.9.0" to "chalice>=1.9.0,<=1.9.1" to avoid any possible conflict for importing more packages or for downstream projects that may use meuparlamento-backend-api.

May I pull a request to further loosen the dependency on chalice?

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



We also give our detailed analysis as follows for your reference:

Your project meuparlamento-backend-api directly uses 4 APIs from package chalice.

chalice.app.Chalice.__init__, chalice.app.DecoratorAPI.route, chalice.app.BadRequestError.__init__, chalice.app.Response.__init__

Beginning from the 4 APIs above, 15 functions are then indirectly called, including 11 chalice's internal APIs and 4 outsider APIs. The specific call graph is listed as follows (neglecting some repeated function occurrences).

[/meuparlamento/meuparlamento-backend-api]
+--chalice.app.Chalice.__init__
|      +--chalice.app._HandlerRegistration.__init__
|      |      +--collections.defaultdict
|      +--chalice.app.APIGateway.__init__
|      +--logging.getLogger
|      +--chalice.app.Chalice._initialize
|      |      +--chalice.app.Chalice._configure_logging
|      |      |      +--chalice.app.Chalice._already_configured
|      |      |      +--logging.StreamHandler
|      |      |      +--logging.Formatter
|      |      |      +--chalice.app.Chalice._configure_log_level
+--chalice.app.DecoratorAPI.route
|      +--chalice.app.DecoratorAPI._create_registration_function
|      |      +--chalice.app.DecoratorAPI._wrap_handler
|      |      |      +--chalice.app.EventSourceHandler.__init__
|      |      |      +--chalice.app.ChaliceAuthorizer.__init__
|      |      +--chalice.app.DecoratorAPI._register_handler
+--chalice.app.BadRequestError.__init__
|      +--chalice.app.ChaliceViewError.__init__
+--chalice.app.Response.__init__

We scan chalice's versions and observe that during its evolution between any version from [1.9.1] and 1.9.0, 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: 1.9.0(original) 1.9.1
['chalice.app.MultiDict.__setitem__', 'chalice.app.MultiDict.__str__', 'chalice.app.MultiDict.getlist', 'chalice.app.MultiDict.__repr__', 'chalice.app.MultiDict', 'chalice.app.MultiDict.__delitem__', 'chalice.app.MultiDict.__getitem__']

As for other packages, the APIs of logging and collections are called by chalice 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 chalice from "chalice==1.9.0" to "chalice>=1.9.0,<=1.9.1". This will improve the applicability of meuparlamento-backend-api and reduce the possibility of any further dependency conflict with other projects.

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