django-extensions shell_plus command breaks with ptpython v3.0
See original GitHub issueThe django-extensions package’s shell_plus
command doesn’t work with v3.0 of ptpython.
I’ve also opened an issue on django-extensions detailing the problem: https://github.com/django-extensions/django-extensions/issues/1473
It seems like this may be a problem with the changes in the run_config
function. The breaking changes from v2.0.5 to v3.0.0 can be seen here:
- def run_config(repl, config_file='~/.ptpython/config.py'):
+ def run_config(repl: PythonInput, config_file: str) -> None:
What was the reason for removing the default config_file
argument? Would it be ok to add the updated default path back?
default_config_file = os.path.join(
appdirs.user_config_dir("ptpython", "prompt_toolkit"),
"config.py",
)
def run_config(repl: PythonInput, config_file: str = None) -> None:
if not config_file:
# try the default
if os.path.exists(default_config_file):
config_file = default_config_file
elif not os.path.exists(config_file):
...
Issue Analytics
- State:
- Created 4 years ago
- Reactions:4
- Comments:5 (3 by maintainers)
Top Results From Across the Web
django-extensions/shell_plus.py at main - GitHub
This is a repository for collecting global custom management extensions for the Django Framework. - django-extensions/shell_plus.py at main ...
Read more >django-extensions Documentation - Read the Docs
synopsis Django shell with autoloading of the apps database models and subclasses of user-defined classes. The default resolution order is: ...
Read more >shell_plus — django-extensions 3.2.1 documentation
It is possible to directly add command line arguments to the underlying Python ... The default resolution order is: ptpython, bpython, ipython, python....
Read more >django-extensions Changelog - pyup.io
Improvement: sqldsn, Added more styles to the sqldsn management command ... Fix: shell_plus, fix postgresql debug wrapper on django 3.0 or higher
Read more >Unknown command: shell_plus and --settings - Stack Overflow
Make sure you have installed django-extensions . pip install django-extensions. Add django_extensions (note the underscore between) to the ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I just pushed a new release: 3.0.1 Can you see whether everything is fine now?
Should’ve been fixed already: https://github.com/prompt-toolkit/ptpython/pull/344 Pip install from GitHub or wait for next release on pypi.