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 SyntaxError: invalid syntax in doc/fill_gpi.py #2341

Merged
merged 3 commits into from
May 22, 2024

Conversation

aryabhatta-dey
Copy link
Contributor

Building the documentation currently fails on the latest develop branch with the following error:

Traceback (most recent call last):
  File "/home/arya/Dev/ganga/doc/fill_gpi.py", line 143, in <module>
    print('    .. method:: {signature}'.format(signature=signature(f)), file=cf)
                                                         ^^^^^^^^^^^^
  File "/home/arya/Dev/ganga/doc/fill_gpi.py", line 69, in signature
    args, varargs, varkw, defaults = inspect.getargspec(func)
                                     ^^^^^^^^^^^^^^^^^^
AttributeError: module 'inspect' has no attribute 'getargspec'. Did you mean: 'getargs'?

This error is due to the getargspec method being deprecated and replaced by getfullargspec, as mentioned here.

Replacing inspect.getargspec with inspect.getfullargspec solves the error.

I have tested the change on Python 3.7.17 (the oldest version that satisfies the dependencies) and on Python 3.12.3. In both the versions running:

cd doc
make html

executes successfully and generates the build as expected.

@aryabhatta-dey aryabhatta-dey had a problem deploying to Integrate Pull Request May 20, 2024 07:10 — with GitHub Actions Failure
@aryabhatta-dey aryabhatta-dey had a problem deploying to Integrate Pull Request May 20, 2024 07:15 — with GitHub Actions Failure
doc/fill_gpi.py Outdated Show resolved Hide resolved
@aryabhatta-dey aryabhatta-dey temporarily deployed to Integrate Pull Request May 22, 2024 03:54 — with GitHub Actions Inactive
@mesmith75 mesmith75 temporarily deployed to Integrate Pull Request May 22, 2024 09:07 — with GitHub Actions Inactive
@mesmith75 mesmith75 merged commit 2e42606 into ganga-devs:develop May 22, 2024
8 of 10 checks passed
mesmith75 added a commit that referenced this pull request May 22, 2024
@aryabhatta-dey aryabhatta-dey deleted the update-docs branch May 22, 2024 21:18
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.

3 participants