-
Notifications
You must be signed in to change notification settings - Fork 4
Add async pubkey cache and key fetch method #71
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
Conversation
uma/uma.py
Outdated
|
|
||
| async def _run_http_get_async(url: str) -> str: | ||
| async with ClientSession() as session: | ||
| async with session.get(url) as response: # pyre-ignore [16] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is the pyre error
uma/uma.py:152:19 Undefined attribute [16]: `aiohttp.client.ClientSession` has no attribute `get`.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we might need to pin to 3.10 on aiohttp due to pyre incompatibility aio-libs/aiohttp#8463
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that fixed it, thanks!
| return public_key | ||
|
|
||
|
|
||
| async def fetch_public_key_for_vasp_async( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we care about using the gen_* convention here like we do internally? I don't have a strong preference, but was curious if anyone else does.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@yunyuyunyu do you have any thoughts?
from quick googling it doesn't seem like a common convention so I almost prefer not to, but also not a strong preference
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a good question. I actually don't see many external libraries using prefix gen for their async functions. Hmm, @vdurmont do you have a preference?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't feel strongly for external stuff.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks all -- going to leave as is then!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, I'd lean towards keeping our consistency and use gen_. I acknowledge it's not widely used in the outside world, but it doesn't hurt at all.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will update!
|
Force merging because the 3.8 test won't run anymore after this. |
No description provided.