A recent update in Django 4.2 has changed the method signatures setup_query() and pre_sql_setup() for the SQLCompiler class to now accept the kwarg with_col_aliases=False. This is undocumented and free to change within Django versions so therefore not considered a breaking change.
SQLCopyToCompiler is a subclass of SQLCompiler and overrides the setup_query() method to add re-ordering of items. However, Django's pre_sql_setup() implementation calls setup_query() with the new with_col_aliases parameter, as shown here. This in turn calls django-postgres-copy's setup_query() resulting in SQLCopyToCompiler.setup_query() got an unexpected keyword argument 'with_col_aliases'.
I think this can be easily fixed by updating django-postgres-copy's method to accept **kwargs and passing through the parent method.
A recent update in Django 4.2 has changed the method signatures
setup_query()
andpre_sql_setup()
for theSQLCompiler
class to now accept the kwargwith_col_aliases=False
. This is undocumented and free to change within Django versions so therefore not considered a breaking change.SQLCopyToCompiler
is a subclass ofSQLCompiler
and overrides thesetup_query()
method to add re-ordering of items. However, Django'spre_sql_setup()
implementation callssetup_query()
with the newwith_col_aliases
parameter, as shown here. This in turn calls django-postgres-copy'ssetup_query()
resulting inSQLCopyToCompiler.setup_query() got an unexpected keyword argument 'with_col_aliases'
.I think this can be easily fixed by updating django-postgres-copy's method to accept
**kwargs
and passing through the parent method.