semanticscholar icon indicating copy to clipboard operation
semanticscholar copied to clipboard

`nest_asyncio` not compatible with modern python environments

Open rgeronimi opened this issue 1 year ago • 2 comments

This library uses nest_asyncio to provide a synchronous API based on its asynchronous API, e.g. :

https://github.com/danielnsilva/semanticscholar/blob/1d94dfff5fa433037f009bd6471e4bd5f86dbc91/semanticscholar/PaginatedResults.py#L43

However, even when using this library in asynchronous mode only, nest_asyncio is still imported.

Unfortunately, the nest_asyncio library is not maintained anymore (sadly its author erdewit has passed this year) and is incompatible with some modern python environments like uvloop: https://github.com/erdewit/nest_asyncio/issues/49

nest_asyncio shall be imported only when the synchronous API is called.

rgeronimi avatar Oct 05 '24 07:10 rgeronimi