youknowone/ring

TypeError when using positional-only parameters

nonamethanks opened this issue · 1 comments

import ring 

class Klass1:
    def __str__(self):
        return "Klass1<>"
        
    @ring.lru() 
    def test1(self, **kwargs):
        print(kwargs)
        
class Klass2:
    def __str__(self):
        return "Klass2<>"
        
    @ring.lru()
    def test2(self, /, **kwargs):
        print(kwargs)
        
Klass1().test1(a=2, b=3)
Klass2().test2(a=2, b=3)

Klass1.test1 works, but Klass2.test2 fails. The two functions are identical save for the presence of the slash, which is the positional-only delimiter.

0.10.1 is released with bugfix.
Thank you for reporting!

https://pypi.org/project/ring/0.10.1/