Skip to content

Commit

Permalink
Merge branch 'using-nest-asyncio' into 0.16
Browse files Browse the repository at this point in the history
  • Loading branch information
KShivendu committed Sep 19, 2023
2 parents 34887f8 + dbca4da commit 7d0ca24
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 8 deletions.
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [unreleased]

## [0.16.1] - 2023-09-19

- Uses `nest_asyncio` patch in event loop - sync to async
- Retry Querier request on `AsyncLibraryNotFoundError`

## [0.16.0] - 2023-09-13

Expand Down Expand Up @@ -535,6 +539,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
}
```

## [0.14.10] - 2023-09-31

- Uses nest_asyncio patch in event loop - sync to async

## [0.14.9] - 2023-09-28

- Add logic to retry network calls if the core returns status 429

## [0.14.8] - 2023-07-07
## Fixes

Expand Down
6 changes: 0 additions & 6 deletions addDevTag
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
#!/bin/bash

# check if we need to merge master into this branch------------
if [[ $(git log origin/master ^HEAD) ]]; then
echo "You need to merge master into this branch. Exiting"
exit 1
fi

# get version------------
version=`cat setup.py | grep -e 'version='`
while IFS='"' read -ra ADDR; do
Expand Down
2 changes: 1 addition & 1 deletion html/supertokens_python/constants.html
Original file line number Diff line number Diff line change
Expand Up @@ -87,4 +87,4 @@ <h2>Index</h2>
<p>Generated by <a href="https://pdoc3.github.io/pdoc" title="pdoc: Python API documentation generator"><cite>pdoc</cite> 0.10.0</a>.</p>
</footer>
</body>
</html>
</html>
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@

setup(
name="supertokens_python",
version="0.16.0",
version="0.16.1",
author="SuperTokens",
license="Apache 2.0",
author_email="[email protected]",
Expand Down Expand Up @@ -112,6 +112,7 @@
"twilio==7.9.1",
"aiosmtplib==1.1.6",
"pkce==1.0.3",
"nest-asyncio==1.5.1",
],
python_requires=">=3.7",
include_package_data=True,
Expand Down
2 changes: 2 additions & 0 deletions supertokens_python/async_to_sync_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
# License for the specific language governing permissions and limitations
# under the License.

import nest_asyncio # type: ignore
import asyncio
from typing import Any, Coroutine, TypeVar

Expand All @@ -24,6 +25,7 @@ def check_event_loop():
except RuntimeError as ex:
if "There is no current event loop in thread" in str(ex):
loop = asyncio.new_event_loop()
nest_asyncio.apply(loop) # type: ignore
asyncio.set_event_loop(loop)


Expand Down

0 comments on commit 7d0ca24

Please sign in to comment.