pysipp icon indicating copy to clipboard operation
pysipp copied to clipboard

Pluggy version 1.0.0 breaks pysipp

Open kontsaki opened this issue 4 years ago • 10 comments

conftest.py:3: in <module>
    import pysipp
/usr/local/lib/python3.9/dist-packages/pysipp/__init__.py:23: in <module>
    from . import launch, report, plugin, netplug, agent
/usr/local/lib/python3.9/dist-packages/pysipp/plugin.py:9: in <module>
    mng = pluggy.PluginManager('pysipp', implprefix='pysipp')
E   TypeError: __init__() got an unexpected keyword argument 'implprefix'

https://pluggy.readthedocs.io/en/latest/changelog.html#deprecations-and-removals

kontsaki avatar Sep 14 '21 15:09 kontsaki

Oof.

I guess we need to port then and pin to pre-1.0.

Any PR takers 😉

goodboy avatar Sep 15 '21 16:09 goodboy

Hello, Any solutions for this one? I am stuck here.

Enkumicahel avatar Dec 03 '21 02:12 Enkumicahel

I mean I can probably do this but I don't really have the bandwidth atm. We kinda need some new contribs to step up and take the reigns.

goodboy avatar Dec 03 '21 03:12 goodboy

Ahh yeah so I think all that needs to be done is drop the kwarg from here.

I'm not entirely sure if that'll fix it but i'm pretty sure we're already using HookimplMarker throughout the code base so it's just a matter of removing that one bit I think.

goodboy avatar Dec 03 '21 03:12 goodboy

I am hoping to be one of your contribs. Just got to step over this hurdle first thing. Thanks for this great repo. Hope more of us can participate.

Enkumicahel avatar Dec 03 '21 05:12 Enkumicahel

Hello, Any solutions for this one? I am stuck here.

I'm no expert but installing the old version of pluggy worked for me:

pip install 'pluggy==0.11.0' --force-reinstall

davemcbride avatar Dec 06 '21 19:12 davemcbride

I'm pretty sure this is a super easy fix y'all.

Please someone give it a try 😉

goodboy avatar Dec 07 '21 16:12 goodboy

I have tried @davemcbride suggestion and it worked for me. I honestly didn't understand what @goodboy suggested. Anyways, thanks, guys. Cheers!

Enkumicahel avatar Dec 08 '21 06:12 Enkumicahel

I have tried @davemcbride suggestion and it worked for me.

So is anyone going to PR this in then 😂

I honestly didn't understand what @goodboy suggested. Anyways, thanks, guys. Cheers!

You would make a patch like this:

diff --git a/pysipp/plugin.py b/pysipp/plugin.py
index cd88b92..23ce90a 100644
--- a/pysipp/plugin.py
+++ b/pysipp/plugin.py
@@ -6,7 +6,7 @@ import contextlib
 from . import hookspec

 hookimpl = pluggy.HookimplMarker("pysipp")
-mng = pluggy.PluginManager("pysipp", implprefix="pysipp")
+mng = pluggy.PluginManager("pysipp")
 mng.add_hookspecs(hookspec)

After this patch there's no more issue on import pysipp..like i said.

goodboy avatar Dec 08 '21 18:12 goodboy

Now the question is whether y'all want to pin to pluggy 1.0 +

goodboy avatar Dec 08 '21 18:12 goodboy