Code Monkey home page Code Monkey logo

Comments (8)

mschoettle avatar mschoettle commented on May 24, 2024 3

Can you please release a new version to have Django 3.1 support?

from django-test-migrations.

skarzi avatar skarzi commented on May 24, 2024 3

Django 3.1 support was added to the project in #123 and it's already present on master (see last test workflow run), but we need to release a new version of our package. Currently, I'm testing master branch on a few bigger projects to be sure it works correctly

from django-test-migrations.

skarzi avatar skarzi commented on May 24, 2024 2

@mchels thank you for the report! 👍
I will investigate it whenever I find some time and prepare PR with fixes

from django-test-migrations.

mschoettle avatar mschoettle commented on May 24, 2024 2

For those on here that missed the release: v1.1.0 with Django 3.1 support was released.

from django-test-migrations.

mchels avatar mchels commented on May 24, 2024

I have run into https://code.djangoproject.com/ticket/31477 which gives an error

Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/django_test_migrations/contrib/unittest_case.py", line 36, in setUp
    self.migrate_from,
  File "/usr/local/lib/python3.7/site-packages/django_test_migrations/migrator.py", line 46, in apply_initial_migration
    sql.drop_models_tables(self._database, style)
  File "/usr/local/lib/python3.7/site-packages/django_test_migrations/sql.py", line 32, in drop_models_tables
    get_execute_sql_flush_for(connection)(database_name, sql_drop_tables)
TypeError: execute_sql_flush() takes 2 positional arguments but 3 were given

It's also in the django 3.1 release notes: https://docs.djangoproject.com/en/3.1/releases/3.1/#backwards-incompatible-changes-in-3-1. Potentially the fix is simply to remove this line


and remove database_name from
https://github.com/wemake-services/django-test-migrations/blob/master/django_test_migrations/sql.py#L32
but I am not sure.

I am also hitting

Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/django_test_migrations/contrib/unittest_case.py", line 36, in setUp
    self.migrate_from,
  File "/usr/local/lib/python3.7/site-packages/django_test_migrations/migrator.py", line 47, in apply_initial_migration
    sql.flush_django_migrations_table(self._database, style)
  File "/usr/local/lib/python3.7/site-packages/django_test_migrations/sql.py", line 60, in flush_django_migrations_table
    allow_cascade=False,
  File "/usr/local/lib/python3.7/site-packages/django/db/backends/postgresql/operations.py", line 130, in sql_flush
    style.SQL_KEYWORD('TRUNCATE'),
AttributeError: 'list' object has no attribute 'SQL_KEYWORD'

probably because the signature for sql_flush has changed (also in https://docs.djangoproject.com/en/3.1/releases/3.1/#backwards-incompatible-changes-in-3-1). Compare
https://github.com/django/django/blob/3.0.9/django/db/backends/base/operations.py#L384
vs
https://github.com/django/django/blob/3.1/django/db/backends/base/operations.py#L392
I am not sure how to handle this one.

from django-test-migrations.

mijamo avatar mijamo commented on May 24, 2024

Would it be possible to push a release with the new Django version support reasonably soon? This is actually the only dependency blocking me from updating a Django project right now.

from django-test-migrations.

james-ecd avatar james-ecd commented on May 24, 2024

Has there been any movement on this? Currently the only thing holding us back from Django 3.1

from django-test-migrations.

james-ecd avatar james-ecd commented on May 24, 2024

@skarzi great news! Thankyou

from django-test-migrations.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.