-
Notifications
You must be signed in to change notification settings - Fork 11
Description
Hi!
django-pgcli
doesn't seem to be compatible with Django 3.1. Here's the issue I encountered:
🚂 pipenv run ./manage.py dbshell
Traceback (most recent call last):
File "./manage.py", line 20, in <module>
execute_from_command_line(sys.argv)
File "/Users/jrheard/.local/share/virtualenvs/djscoots-zK00EcLC-/Users/jrheard/.pyenv/shims/python/lib/python3.7/site-packages/django/core/management/__init__.py", line 401, in execute_from_command_line
utility.execute()
File "/Users/jrheard/.local/share/virtualenvs/djscoots-zK00EcLC-/Users/jrheard/.pyenv/shims/python/lib/python3.7/site-packages/django/core/management/__init__.py", line 395, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/Users/jrheard/.local/share/virtualenvs/djscoots-zK00EcLC-/Users/jrheard/.pyenv/shims/python/lib/python3.7/site-packages/django/core/management/base.py", line 330, in run_from_argv
self.execute(*args, **cmd_options)
File "/Users/jrheard/.local/share/virtualenvs/djscoots-zK00EcLC-/Users/jrheard/.pyenv/shims/python/lib/python3.7/site-packages/django/core/management/base.py", line 371, in execute
output = self.handle(*args, **options)
File "/Users/jrheard/.local/share/virtualenvs/djscoots-zK00EcLC-/Users/jrheard/.pyenv/shims/python/lib/python3.7/site-packages/django/core/management/commands/dbshell.py", line 26, in handle
connection.client.runshell(options['parameters'])
TypeError: runshell() takes 1 positional argument but 2 were given
I think that this is related to django/django@5b884d4 , a change made in Django 3.1 that modifies the signature of the .runshell()
method.
I note that in that Django commit linked above, .runshell()
was updated to take args self, parameters
, but in https://github.com/ashchristopher/django-pgcli/blob/master/django_pgcli/__init__.py , django-pgcli
's .runshell()
takes args self
.
That's about as deeply as I've looked into this issue - I'm not clear on the exact semantics of this parameters
argument, and it's not immediately clear to me what django-pgcli
should do with that argument. The main thing that I'm clear on is that the current release version of django-pgcli
isn't compatible with Django 3.1 - hopefully it's an easy fix! 🙏
Thanks for making this library! :)