In recent versions of Django, the setup_query() method of the SQLCompiler accepts a keyword with_col_aliases. As it currently stands, the method override in SQLCopyToCompiler doesn't accept any keywords. So if with_col_aliases=X is passed to SQLCopyToCompiler's method, you'll get a TypeError. This PR should fix this, and I don't think it will break in older versions of Django.
Tested with Django 4.2.1. I haven't tested an older version. I believe Django 4.0 lacks the with_col_aliases keyword if someone else is up for it.
In recent versions of Django, the
setup_query()
method of theSQLCompiler
accepts a keywordwith_col_aliases
. As it currently stands, the method override inSQLCopyToCompiler
doesn't accept any keywords. So ifwith_col_aliases=X
is passed toSQLCopyToCompiler
's method, you'll get aTypeError
. This PR should fix this, and I don't think it will break in older versions of Django.Tested with Django 4.2.1. I haven't tested an older version. I believe Django 4.0 lacks the
with_col_aliases
keyword if someone else is up for it.