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

Commit

Permalink
Merge pull request #240 from bnavigator/fix-ci2
Browse files Browse the repository at this point in the history
Fix CI Fix and support decorated classmethod/staticmethod in Python 3.10
  • Loading branch information
irmen committed Dec 24, 2021
2 parents b303f7e + 41245bd commit b3c6c43
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/main-ci.yml
Expand Up @@ -23,11 +23,11 @@ jobs:

steps:
- name: Checkout source
- uses: actions/checkout@v2
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
Expand Down
2 changes: 1 addition & 1 deletion src/Pyro4/core.py
Expand Up @@ -987,7 +987,7 @@ def expose(method_or_class):
func._pyroExposed = True
return method_or_class
attrname = getattr(method_or_class, "__name__", None)
if not attrname:
if not attrname or isinstance(method_or_class, (classmethod, staticmethod)):
# we could be dealing with a descriptor (classmethod/staticmethod), this means the order of the decorators is wrong
if inspect.ismethoddescriptor(method_or_class):
attrname = method_or_class.__get__(None, dict).__name__
Expand Down

0 comments on commit b3c6c43

Please sign in to comment.