Skip to content
This repository was archived by the owner on Oct 4, 2023. It is now read-only.

async w/ python 3.8 compatibility sans warnings#11

Open
kapilt wants to merge 1 commit into
RazerM:masterfrom
kapilt:async-3.8-compat
Open

async w/ python 3.8 compatibility sans warnings#11
kapilt wants to merge 1 commit into
RazerM:masterfrom
kapilt:async-3.8-compat

Conversation

@kapilt

@kapilt kapilt commented Feb 18, 2020

Copy link
Copy Markdown

this closes #10 by using async syntax that doesn't trigger warnings.

this pr also removes from travis the versions of python3 that are end of life'd (3.3, 3.4) adds the newer ones (3.7, 3.8) and increments the version (post0->post1) for release to pypi.

@kapilt kapilt requested a review from RazerM February 18, 2020 20:16
@smthfrmn

smthfrmn commented May 6, 2020

Copy link
Copy Markdown

@RazerM can you look into this PR? I would like to have the update as well

@daggy1234

Copy link
Copy Markdown

With 3.9 this would be great. I also have another issue with

https://mystb.in/RepresentativeBestApplications.apache

Would love a fix!

@dhimmel

dhimmel commented Oct 31, 2020

Copy link
Copy Markdown

Thanks @kapilt for this update. Really hoping @RazerM sees this and can review/merge/release.

@musicinmybrain

Copy link
Copy Markdown

This seems to still work correctly in a development version of Python 3.11, in which the warned-about asyncio.coroutine decorator is actually removed.

@gshuflin

gshuflin commented Apr 7, 2022

Copy link
Copy Markdown

Any movement on this issue? I see that pypi/support#954 resuled in @gear4s being added as a maintainer by @RazerM . I'd like to use this library and it would help me out if this PR could get merged and a new PyPi release happen.

@gear4s

gear4s commented Apr 7, 2022

Copy link
Copy Markdown
Collaborator

Any movement on this issue? I see that pypi/support#954 resuled in @gear4s being added as a maintainer by @RazerM . I'd like to use this library and it would help me out if this PR could get merged and a new PyPi release happen.

I will review and test this week, if all's good I will merge.

@gshuflin

gshuflin commented Apr 7, 2022

Copy link
Copy Markdown

Any movement on this issue? I see that pypa/pypi-support#954 resuled in @gear4s being added as a maintainer by @RazerM . I'd like to use this library and it would help me out if this PR could get merged and a new PyPi release happen.

I will review and test this week, if all's good I will merge.

Awesome, looking forward to seeing this merged.

@gshuflin

Copy link
Copy Markdown

@gear4s have you had a chance to review and test this yet?

@gear4s

gear4s commented Apr 13, 2022

Copy link
Copy Markdown
Collaborator

@gear4s have you had a chance to review and test this yet?

Not yet - I've dedicated some time Saturday to do this. Work is beating me right now unfortunately

@gshuflin

gshuflin commented May 4, 2022

Copy link
Copy Markdown

@gear4s did you ever have a chance to try this?

@MilesCranmer

MilesCranmer commented Nov 6, 2022

Copy link
Copy Markdown

This is officially removed in Python 3.11 so dependent packages are now breaking. Please merge asap.

e.g., the entirety of snakemake: https://github.com/snakemake/snakemake is now breaking on Python 3.11.

cc @RazerM

@MilesCranmer

Copy link
Copy Markdown

FWIW @gshuflin I patched my local version with this PR and it works fine. But merging would be preferred so users don't encounter the same error.

@dhimmel

dhimmel commented Nov 6, 2022

Copy link
Copy Markdown

@gear4s would be great to have this merged and released now that projects that use ratelimiter are stuck from upgrading to Python 3.11

@uburuntu

Copy link
Copy Markdown

Hello folks, it's kinda self-promoting, but since this repo was not updated since 2018 consider using https://github.com/uburuntu/throttler for async cases -- it has pretty close syntax and is a bit more efficient.

Migration for context managers

from ratelimiter import RateLimiter

rate_limiter = RateLimiter(max_calls=10, period=1)
with rate_limiter:
    do_something()

from throttler import Throttler

rate_limiter = Throttler(rate_limit=10, period=1)
async with rate_limiter:
    await do_something()

https://github.com/uburuntu/throttler#simple-example

Migration for decorators

from ratelimiter import RateLimiter

@RateLimiter(max_calls=10, period=1)
def do_something():
    pass

from throttler import throttle

@throttle(rate_limit=10, period=1)
async def do_something():
    pass

https://github.com/uburuntu/throttler#throttler-and-throttlersimultaneous

Migration example

snakemake/snakemake#1958

@RazerM

RazerM commented Nov 22, 2022

Copy link
Copy Markdown
Owner

I use and recommend rush

@RazerM

RazerM commented Nov 22, 2022

Copy link
Copy Markdown
Owner

P.S. See #17

@jayaddison jayaddison mentioned this pull request Jan 5, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix warning that coroutine decorator is deprecated since Python 3.8