-
-
Notifications
You must be signed in to change notification settings - Fork 248
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
python3.7 and pyroute2 #467
Comments
Yeah, |
A good question, what to do now without breakin' all the things.
First, I plan to add an alias to that argument and raise a deprecation warning in the case of the keyword usage. And let's hope 3.7 will not come too soon, so everyone will have time to fix own code in the case the keyword is used. |
Hi. Any update on this? Do you need help? 3.7 is approaching and we would like to have it in Fedora soon, but this would block us. |
Workaround from OpenMandriva: https://github.com/OpenMandrivaAssociation/python-pyroute2/blob/master/pyroute2-0.4.21-python-3.7.patch |
@hroncok yep, will be fixed asap in the master branch. |
Oh I see now you are the Fedora maintainer and upstream owner as well. Excellent! |
I have an idea about a decorator that might help... give me a minute. |
import functools
import warnings
def deprecated_async(func):
@functools.wraps(func)
def inner(*args, **kwargs):
if 'async' in kwargs:
if 'async_' in kwargs:
raise ValueError('cannot use both async and async_ keyword '
'arguments! the latter obsoletes the first.')
warnings.warn('async keyword argumnt is deprecated, use async_ '
'instead', DeprecationWarning)
kwargs['async_'] = kwargs['async']
del kwargs['async']
return func(*args, **kwargs)
return inner
@deprecated_async
def foo(a, b, async_):
return a, b, async_
print(foo(1, 2, async_=True))
print(foo(1, 2, async=True)) |
May I submit a PR in this manner? |
Sorry, was busy testing another change Almost the same idea, but w/o a decorator |
Whatever works for you. The decorator was there because of DRY. |
@hroncok btw do you know anyone who could become the package maintainer in RH? I have almost no time to update the package as new releases of the library come, so it's quite ancient in the Fedora repo |
You mean if a redhatter could help you maintain the package in Fedora? Since mock requires this, I guess @xsuchy should be able to get someone. Also don't hesitate to make the python-sig FAS group an admin. |
Ok, I do that now. Another question — does it wait until the next weekend (10.06) to cut the next release? Or to release asap? |
@hroncok I made the python-sig group admin on the https://src.fedoraproject.org/rpms/python-pyroute2 , thanks for the hint |
Yes. if not, I can always take the patch and apply it in Fedora. Thanks |
@hroncok ping me pls if there will be any issues or if the release will be needed earlier. Thanks |
The text was updated successfully, but these errors were encountered: