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

Change getargspec to getfullargspec for python 3.11 compatibility #263

Merged
merged 1 commit into from
Dec 27, 2023

Conversation

kdkd
Copy link

@kdkd kdkd commented Mar 7, 2023

This fixes issue #262 by changing getargspec to getfullargspec. Tested and appears to work with 3.10 and 3.11.

@novalis
Copy link

novalis commented Jun 28, 2023

This doesn't seem to work -- getfullargspec returns more than four values.

@zakariassen
Copy link

Can confirm patch is working on python 3.11 tested in several different settings.

Besides, that Appveyor build with getfullargspec on python 2.7 fails is totally to be expected - getfullargspec is python 3 only.

@novalis
Copy link

novalis commented Nov 1, 2023

Just tried 3.11. Yes, you can build it. But:

$ ntfy send test
Traceback (most recent call last):
  File "/tmp/ve/lib/python3.11/site-packages/ntfy-2.7.1-py3.11.egg/ntfy/backends/default.py", line 20, in notify
  File "/tmp/ve/lib/python3.11/site-packages/ntfy-2.7.1-py3.11.egg/ntfy/backends/linux.py", line 15, in notify
ModuleNotFoundError: No module named 'dbus'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/tmp/ve/lib/python3.11/site-packages/ntfy-2.7.1-py3.11.egg/ntfy/__init__.py", line 53, in notify
  File "/tmp/ve/lib/python3.11/site-packages/ntfy-2.7.1-py3.11.egg/ntfy/backends/default.py", line 22, in notify
ntfy.backends.default.DefaultNotifierError: (ModuleNotFoundError("No module named 'dbus'"), <module 'ntfy.backends.linux' from '/tmp/ve/lib/python3.11/site-packages/ntfy-2.7.1-py3.11.egg/ntfy/backends/linux.py'>)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/tmp/ve/bin/ntfy", line 33, in <module>
    sys.exit(load_entry_point('ntfy==2.7.1', 'console_scripts', 'ntfy')())
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/tmp/ve/lib/python3.11/site-packages/ntfy-2.7.1-py3.11.egg/ntfy/cli.py", line 362, in main
  File "/tmp/ve/lib/python3.11/site-packages/ntfy-2.7.1-py3.11.egg/ntfy/__init__.py", line 68, in notify
ValueError: too many values to unpack (expected 4)

@zakariassen
Copy link

zakariassen commented Nov 1, 2023 via email

@dschep dschep merged commit 398014e into dschep:master Dec 27, 2023
@novalis
Copy link

novalis commented Dec 27, 2023

Just to clarify: this doesn't work and it shouldn't have been merged. See the docs for getfullargspec:


FullArgSpec(args, varargs, varkw, defaults, kwonlyargs, kwonlydefaults, annotations)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants