Skip to content

Commit

Permalink
Fix for Python 3.14
Browse files Browse the repository at this point in the history
  • Loading branch information
avylove committed Nov 23, 2024
1 parent 351ecf8 commit 0a44f7c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
12 changes: 5 additions & 7 deletions pluginlib/_parent.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2014 - 2022 Avram Lubkin, All Rights Reserved
# Copyright 2014 - 2024 Avram Lubkin, All Rights Reserved

# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
Expand All @@ -19,17 +19,15 @@
from pluginlib._util import (allow_bare_decorator, ClassProperty, DictWithDotNotation,
LOGGER, Undefined)

try:
from asyncio import iscoroutinefunction
except ImportError: # pragma: no cover
# pylint: disable=unnecessary-lambda-assignment
iscoroutinefunction = lambda func: False # noqa: E731


DEFAULT = '_default'
UNDEFINED = Undefined()

isfunction = inspect.isfunction # pylint: disable=invalid-name

# Asyncio is not available in 2.7
iscoroutinefunction = getattr(inspect, 'iscoroutinefunction', lambda func: False)

# Support for deprecated method in 2.7
getfullargspec = getattr(inspect, 'getfullargspec', getattr(inspect, 'getargspec', None))

Expand Down
2 changes: 1 addition & 1 deletion pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ spelling-dict=en_US
spelling-ignore-words=
abstractattribute, abstractmethod, abstractclassmethod, abstractstaticmethod,
argspecs, assertRaisesRegexp, assertNotRegexpMatches, assertRegexpMatches,
attr, autoattribute, Args, Avram, Lubkin,
asyncio, attr, autoattribute, Args, Avram, Lubkin,
basename, BlacklistEntry, bool, Boolean,
classmethod, cls, coroutine,
EntryPointWarning, errorcode, exc,
Expand Down

0 comments on commit 0a44f7c

Please sign in to comment.