Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix compatibility with Python 3.11 and Python 3.12 #271

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ntfy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def notify(message, title, config=None, **kwargs):
notifier = e.module
e = e.exception

args, _, _, defaults = getfullargspec(notifier.notify)
args, _, _, defaults, *_ = getfullargspec(notifier.notify)
possible_args = set(args)
required_args = set(args) if defaults is None else set(args[:-len(defaults)])
required_args -= set(['title', 'message', 'retcode'])
Expand Down
2 changes: 1 addition & 1 deletion tests/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ class TestMain(TestCase):
@patch('ntfy.backends.default.notify')
def test_args(self, mock_notify):
mock_notify.return_value = None
self.assertEquals(0,
self.assertEqual(0,
ntfy_main([
'-o', 'foo', 'bar', '-b', 'default', '-t',
'TITLE', 'send', 'test'
Expand Down