irmen / Pyro4

Pyro 4.x - Python remote objects
http://pyro4.readthedocs.io/
MIT License
713 stars 83 forks source link

also raise on exposed Python 3.10 cmethod/smethod #237

Closed bnavigator closed 2 years ago

bnavigator commented 2 years ago

tests/PyroTests/test_util.py::TestMetaAndExpose::testClassmethodExposeWrongOrderFail fails on Python 3.10, because there was a change in the API:

abuild@skylab:~/rpmbuild/BUILD/Pyro4-4.80> cat mytest.py
def mydeco(method_or_class):
   attrname = getattr(method_or_class, "__name__", None)
   print(attrname)
   return method_or_class

class TestClass:
  @mydeco
  @classmethod
  def cmethod(cls):
     pass

  @mydeco
  @staticmethod
  def smethod(cls):
     pass

abuild@skylab:~/rpmbuild/BUILD/Pyro4-4.80> python3.8 mytest.py 
None
None
abuild@skylab:~/rpmbuild/BUILD/Pyro4-4.80> python3.10 mytest.py 
cmethod
smethod
bnavigator commented 2 years ago

Oops. The 'cmethod', 'smethod' are my own example names