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 gf shell not being able to access globals inside user defined functions. #437

Merged
merged 1 commit into from
Aug 7, 2024

Conversation

antoinevg
Copy link
Member

This PR fixes an issue introduced in #414 where executing the following code in the GreatFET shell will fail with a NameError: name 'time' is not defined error:

import time
def read(x):
    time.sleep(x)
    print("Done")
read(2)

The fix has been tested on IPython versions 8.12.3 and 8.26.0.

This PR also rolls back the version of IPython specified in the package dependencies to "ipython~=8.12" as this was the final version supported by Python 3.8 which is our minimum Python specification for the package.

The current latest version IPython is 8.26.0 which requires Python >=3.10.

If GreatFET is installed on systems with Python >=3.10 then the dependency spec ~=8.12 will resolve as: >=8.12, ==8.* .

This ensures that the latest IPython will be installed on those systems.


Closes #435

@antoinevg antoinevg requested a review from mossmann August 7, 2024 10:24
@antoinevg antoinevg force-pushed the antoinevg/fix-gf-shell branch from eef558f to 0190c99 Compare August 7, 2024 10:25
Copy link
Member

@mossmann mossmann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I love it!

@antoinevg antoinevg merged commit 390bf5e into greatscottgadgets:main Aug 7, 2024
3 checks passed
@antoinevg antoinevg deleted the antoinevg/fix-gf-shell branch August 7, 2024 13:00
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.

gf shell is not passing python globals into user defined functions
2 participants