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 handling of 'config file does not exist' when embedding ptpython. #563

Merged
merged 1 commit into from
Dec 13, 2023

Conversation

jonathanslenders
Copy link
Member

No description provided.

@tony
Copy link
Contributor

tony commented Dec 13, 2023

Recreation

Originally discovered by @orhanhenrik in #551 (comment):

  • django-extensions 3.2.4dev0
  • ptpython 3.0.24
  • no configuration
Traceback (most recent call last):
  File ".../ptpython/ptpython/repl.py", line 445, in run_config
    with open(config_file, "rb") as f:
         ^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '~/.config/ptpython/config.py'

Press ENTER to continue...
>>>

With PR (no config)

No error! Buttery smooth!

With PR (with configuration)

Also works!

@jonathanslenders jonathanslenders merged commit 961b945 into master Dec 13, 2023
10 checks passed
@jonathanslenders jonathanslenders deleted the fix-config-file-does-not-exist branch December 13, 2023 21:54
@tony
Copy link
Contributor

tony commented Dec 14, 2023

ptpython 3.0.25 (PyPI, tag, release) launches smoothly with ./manage.py shell_plus with and without config.

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.

2 participants