douglaspands / api-server-py Goto Github PK
View Code? Open in Web Editor NEWFastAPI Server
FastAPI Server
Hi, your project api-server-py requires "databases==0.4.3" in its dependency. After analyzing the source code, we found that the following versions of databases can also be suitable without affecting your project, i.e., databases 0.4.0, 0.4.1, 0.4.2, 0.5.0, 0.5.1, 0.5.2, 0.5.3, 0.5.4, 0.5.5. Therefore, we suggest to loosen the dependency on databases from "databases==0.4.3" to "databases>=0.4.0,<=0.5.5" to avoid any possible conflict for importing more packages or for downstream projects that may use api-server-py.
May I pull a request to further loosen the dependency on databases?
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 api-server-py directly uses 2 APIs from package databases.
databases.core.Transaction.__init__, databases.core.Database.__init__
Beginning from the 2 APIs above, 5 functions are then indirectly called, including 2 databases's internal APIs and 3 outsider APIs. The specific call graph is listed as follows (neglecting some repeated function occurrences).
[/douglaspands/api-server-py]
+--databases.core.Transaction.__init__
+--databases.core.Database.__init__
| +--databases.core.DatabaseURL.__init__
| +--databases.importer.import_from_string
| | +--databases.importer.ImportFromStringError.__init__
| | +--importlib.import_module
| +--aiocontextvars.ContextVar
| +--contextvars.ContextVar
We scan databases's versions and observe that during its evolution between any version from [0.4.0, 0.4.1, 0.4.2, 0.5.0, 0.5.1, 0.5.2, 0.5.3, 0.5.4, 0.5.5] and 0.4.3, 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: 0.4.3(original) 0.4.0
['databases.backends.postgres.Record', 'databases.backends.postgres.PostgresBackend._get_connection_kwargs', 'databases.backends.postgres.Record.__getitem__', 'databases.backends.postgres.PostgresBackend']
diff: 0.4.3(original) 0.4.1
['databases.backends.postgres.Record', 'databases.backends.postgres.PostgresBackend._get_connection_kwargs', 'databases.backends.postgres.Record.__getitem__', 'databases.backends.postgres.PostgresBackend']
diff: 0.4.3(original) 0.4.2
[](no clear difference between the source codes of two versions)
diff: 0.4.3(original) 0.5.0
['databases.backends.postgres.Record.values', 'databases.backends.postgres.Record._mapping', 'databases.core.Database._new_connection', 'databases.core.Database.connection', 'databases.backends.postgres.Record', 'databases.core.Database.connect', 'databases.backends.aiopg.AiopgConnection', 'databases.backends.sqlite.SQLiteConnection', 'databases.backends.mysql.MySQLConnection', 'databases.core.Database', 'databases.backends.postgres.Record.keys']
diff: 0.4.3(original) 0.5.1
['databases.backends.postgres.PostgresConnection', 'databases.core.Database', 'databases.backends.postgres.Record.values', 'databases.backends.postgres.Record._mapping', 'databases.core.Database._new_connection', 'databases.core.Database.connection', 'databases.backends.postgres.Record', 'databases.core.Database.connect', 'databases.backends.aiopg.AiopgConnection', 'databases.backends.sqlite.SQLiteConnection', 'databases.backends.mysql.MySQLConnection', 'databases.backends.postgres.PostgresConnection._compile', 'databases.backends.postgres.Record.keys']
diff: 0.4.3(original) 0.5.2
['databases.backends.postgres.PostgresConnection', 'databases.core.Database', 'databases.backends.postgres.Record.values', 'databases.backends.postgres.Record._mapping', 'databases.core.Database._new_connection', 'databases.core.Database.connection', 'databases.backends.postgres.Record', 'databases.core.Database.connect', 'databases.backends.aiopg.AiopgConnection', 'databases.backends.sqlite.SQLiteConnection', 'databases.backends.postgres.Record.keys', 'databases.backends.mysql.MySQLConnection', 'databases.backends.postgres.PostgresConnection._compile', 'databases.core.Connection']
diff: 0.4.3(original) 0.5.3
['databases.backends.postgres.PostgresConnection', 'databases.core.Database', 'databases.backends.postgres.Record.values', 'databases.backends.postgres.Record._mapping', 'databases.core.Database._new_connection', 'databases.core.Database.connection', 'databases.core.Database._get_backend', 'databases.backends.postgres.Record', 'databases.core.Database.connect', 'databases.backends.aiopg.AiopgConnection', 'databases.backends.sqlite.SQLiteConnection', 'databases.backends.postgres.Record.keys', 'databases.backends.mysql.MySQLConnection', 'databases.backends.postgres.PostgresConnection._compile', 'databases.core.Connection']
diff: 0.4.3(original) 0.5.4
['databases.backends.asyncmy.AsyncMyConnection.iterate', 'databases.backends.asyncmy.AsyncMyConnection.raw_connection', 'databases.backends.asyncmy.AsyncMyConnection.release', 'databases.backends.asyncmy.AsyncMyConnection.fetch_all', 'databases.backends.asyncmy.AsyncMyConnection.__init__', 'databases.backends.asyncmy.AsyncMyTransaction.__init__', 'databases.backends.postgres.Record._mapping', 'databases.core.Database._new_connection', 'databases.backends.aiopg.AiopgConnection', 'databases.backends.asyncmy.AsyncMyTransaction', 'databases.core.Connection', 'databases.backends.asyncmy.AsyncMyConnection._compile', 'databases.backends.asyncmy.AsyncMyConnection.fetch_one', 'databases.backends.asyncmy.AsyncMyTransaction.rollback', 'databases.backends.asyncmy.AsyncMyConnection.transaction', 'databases.backends.asyncmy.CompilationContext.__init__', 'databases.backends.asyncmy.AsyncMyConnection.acquire', 'databases.backends.sqlite.SQLiteConnection', 'databases.backends.postgres.PostgresConnection._compile', 'databases.backends.postgres.PostgresConnection', 'databases.backends.asyncmy.CompilationContext', 'databases.interfaces.ConnectionBackend', 'databases.backends.asyncmy.AsyncMyBackend.__init__', 'databases.core.Database.connection', 'databases.backends.asyncmy.AsyncMyBackend.disconnect', 'databases.backends.asyncmy.AsyncMyBackend', 'databases.core.DatabaseURL', 'databases.backends.asyncmy.AsyncMyBackend._get_connection_kwargs', 'databases.core.Database.connect', 'databases.backends.asyncmy.AsyncMyTransaction.commit', 'databases.core.Database', 'databases.backends.asyncmy.AsyncMyBackend.connection', 'databases.backends.asyncmy.AsyncMyConnection', 'databases.backends.asyncmy.AsyncMyTransaction.start', 'databases.backends.postgres.Record.keys', 'databases.backends.asyncmy.AsyncMyConnection.execute', 'databases.backends.postgres.Record.values', 'databases.backends.asyncmy.AsyncMyConnection.execute_many', 'databases.core.Database._get_backend', 'databases.backends.postgres.Record', 'databases.backends.asyncmy.AsyncMyBackend.connect', 'databases.backends.mysql.MySQLConnection', 'databases.core.DatabaseURL.hostname']
diff: 0.4.3(original) 0.5.5
['databases.backends.asyncmy.AsyncMyConnection.iterate', 'databases.backends.asyncmy.AsyncMyConnection.raw_connection', 'databases.backends.asyncmy.AsyncMyConnection.release', 'databases.backends.asyncmy.AsyncMyConnection.fetch_all', 'databases.backends.asyncmy.AsyncMyConnection.__init__', 'databases.backends.asyncmy.AsyncMyTransaction.__init__', 'databases.backends.postgres.Record._mapping', 'databases.core.Database._new_connection', 'databases.backends.aiopg.AiopgConnection', 'databases.backends.asyncmy.AsyncMyTransaction', 'databases.core.Connection', 'databases.backends.asyncmy.AsyncMyConnection._compile', 'databases.backends.asyncmy.AsyncMyConnection.fetch_one', 'databases.backends.asyncmy.AsyncMyTransaction.rollback', 'databases.backends.asyncmy.AsyncMyConnection.transaction', 'databases.backends.asyncmy.CompilationContext.__init__', 'databases.backends.asyncmy.AsyncMyConnection.acquire', 'databases.backends.sqlite.SQLiteConnection', 'databases.backends.postgres.PostgresConnection._compile', 'databases.backends.postgres.PostgresConnection', 'databases.backends.asyncmy.CompilationContext', 'databases.backends.asyncmy.AsyncMyBackend.__init__', 'databases.core.Database.connection', 'databases.backends.asyncmy.AsyncMyBackend.disconnect', 'databases.backends.asyncmy.AsyncMyBackend', 'databases.core.DatabaseURL', 'databases.backends.asyncmy.AsyncMyBackend._get_connection_kwargs', 'databases.backends.postgres.Record.__getattr__', 'databases.core.Database.connect', 'databases.backends.asyncmy.AsyncMyTransaction.commit', 'databases.core.Database', 'databases.backends.asyncmy.AsyncMyBackend.connection', 'databases.backends.asyncmy.AsyncMyConnection', 'databases.backends.asyncmy.AsyncMyTransaction.start', 'databases.backends.postgres.Record.keys', 'databases.backends.asyncmy.AsyncMyConnection.execute', 'databases.backends.postgres.Record.values', 'databases.backends.asyncmy.AsyncMyConnection.execute_many', 'databases.core.Database._get_backend', 'databases.backends.postgres.Record', 'databases.backends.asyncmy.AsyncMyBackend.connect', 'databases.backends.mysql.MySQLConnection', 'databases.core.DatabaseURL.hostname']
As for other packages, the APIs of aiocontextvars, contextvars and importlib are called by databases 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 databases from "databases==0.4.3" to "databases>=0.4.0,<=0.5.5". This will improve the applicability of api-server-py and reduce the possibility of any further dependency conflict with other projects.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.