Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for django 4.0, drop support for python 3.5 #822

Merged
merged 4 commits into from
Oct 5, 2021

Conversation

jieter
Copy link
Owner

@jieter jieter commented Sep 22, 2021

  • Drop support for python 3.5

@jieter
Copy link
Owner Author

jieter commented Sep 22, 2021

Current set of migrations results in the stack trace below with django==4.0a1, if I recreate the migrations they work like charm.

./manage.py test
Found 96 test(s).
Creating test database for alias 'default'...
Traceback (most recent call last):
  File "/Users/jieter/.pyenv/versions/django-tables2/lib/python3.9/site-packages/django/db/backends/utils.py", line 84, in _execute
    return self.cursor.execute(sql, params)
  File "/Users/jieter/.pyenv/versions/django-tables2/lib/python3.9/site-packages/django/db/backends/sqlite3/base.py", line 416, in execute
    return Database.Cursor.execute(self, query, params)
sqlite3.OperationalError: table new__app_occupation has no column named boolean

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/Users/jieter/workspace/django-tables2/./manage.py", line 10, in <module>
    execute_from_command_line(sys.argv)
  File "/Users/jieter/.pyenv/versions/django-tables2/lib/python3.9/site-packages/django/core/management/__init__.py", line 419, in execute_from_command_line
    utility.execute()
  File "/Users/jieter/.pyenv/versions/django-tables2/lib/python3.9/site-packages/django/core/management/__init__.py", line 413, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/Users/jieter/.pyenv/versions/django-tables2/lib/python3.9/site-packages/django/core/management/commands/test.py", line 24, in run_from_argv
    super().run_from_argv(argv)
  File "/Users/jieter/.pyenv/versions/django-tables2/lib/python3.9/site-packages/django/core/management/base.py", line 373, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/Users/jieter/.pyenv/versions/django-tables2/lib/python3.9/site-packages/django/core/management/base.py", line 417, in execute
    output = self.handle(*args, **options)
  File "/Users/jieter/.pyenv/versions/django-tables2/lib/python3.9/site-packages/django/core/management/commands/test.py", line 59, in handle
    failures = test_runner.run_tests(test_labels)
  File "/Users/jieter/.pyenv/versions/django-tables2/lib/python3.9/site-packages/django/test/runner.py", line 922, in run_tests
    old_config = self.setup_databases(
  File "/Users/jieter/.pyenv/versions/django-tables2/lib/python3.9/site-packages/django/test/runner.py", line 825, in setup_databases
    return _setup_databases(
  File "/Users/jieter/.pyenv/versions/django-tables2/lib/python3.9/site-packages/django/test/utils.py", line 208, in setup_databases
    connection.creation.create_test_db(
  File "/Users/jieter/.pyenv/versions/django-tables2/lib/python3.9/site-packages/django/db/backends/base/creation.py", line 74, in create_test_db
    call_command(
  File "/Users/jieter/.pyenv/versions/django-tables2/lib/python3.9/site-packages/django/core/management/__init__.py", line 181, in call_command
    return command.execute(*args, **defaults)
  File "/Users/jieter/.pyenv/versions/django-tables2/lib/python3.9/site-packages/django/core/management/base.py", line 417, in execute
    output = self.handle(*args, **options)
  File "/Users/jieter/.pyenv/versions/django-tables2/lib/python3.9/site-packages/django/core/management/base.py", line 90, in wrapped
    res = handle_func(*args, **kwargs)
  File "/Users/jieter/.pyenv/versions/django-tables2/lib/python3.9/site-packages/django/core/management/commands/migrate.py", line 253, in handle
    post_migrate_state = executor.migrate(
  File "/Users/jieter/.pyenv/versions/django-tables2/lib/python3.9/site-packages/django/db/migrations/executor.py", line 126, in migrate
    state = self._migrate_all_forwards(state, plan, full_plan, fake=fake, fake_initial=fake_initial)
  File "/Users/jieter/.pyenv/versions/django-tables2/lib/python3.9/site-packages/django/db/migrations/executor.py", line 156, in _migrate_all_forwards
    state = self.apply_migration(state, migration, fake=fake, fake_initial=fake_initial)
  File "/Users/jieter/.pyenv/versions/django-tables2/lib/python3.9/site-packages/django/db/migrations/executor.py", line 236, in apply_migration
    state = migration.apply(state, schema_editor)
  File "/Users/jieter/.pyenv/versions/django-tables2/lib/python3.9/site-packages/django/db/migrations/migration.py", line 125, in apply
    operation.database_forwards(self.app_label, schema_editor, old_state, project_state)
  File "/Users/jieter/.pyenv/versions/django-tables2/lib/python3.9/site-packages/django/db/migrations/operations/fields.py", line 100, in database_forwards
    schema_editor.add_field(
  File "/Users/jieter/.pyenv/versions/django-tables2/lib/python3.9/site-packages/django/db/backends/sqlite3/schema.py", line 330, in add_field
    self._remake_table(model, create_field=field)
  File "/Users/jieter/.pyenv/versions/django-tables2/lib/python3.9/site-packages/django/db/backends/sqlite3/schema.py", line 285, in _remake_table
    self.execute("INSERT INTO %s (%s) SELECT %s FROM %s" % (
  File "/Users/jieter/.pyenv/versions/django-tables2/lib/python3.9/site-packages/django/db/backends/base/schema.py", line 151, in execute
    cursor.execute(sql, params)
  File "/Users/jieter/.pyenv/versions/django-tables2/lib/python3.9/site-packages/django/db/backends/utils.py", line 66, in execute
    return self._execute_with_wrappers(sql, params, many=False, executor=self._execute)
  File "/Users/jieter/.pyenv/versions/django-tables2/lib/python3.9/site-packages/django/db/backends/utils.py", line 75, in _execute_with_wrappers
    return executor(sql, params, many, context)
  File "/Users/jieter/.pyenv/versions/django-tables2/lib/python3.9/site-packages/django/db/backends/utils.py", line 84, in _execute
    return self.cursor.execute(sql, params)
  File "/Users/jieter/.pyenv/versions/django-tables2/lib/python3.9/site-packages/django/db/utils.py", line 90, in __exit__
    raise dj_exc_value.with_traceback(traceback) from exc_value
  File "/Users/jieter/.pyenv/versions/django-tables2/lib/python3.9/site-packages/django/db/backends/utils.py", line 84, in _execute
    return self.cursor.execute(sql, params)
  File "/Users/jieter/.pyenv/versions/django-tables2/lib/python3.9/site-packages/django/db/backends/sqlite3/base.py", line 416, in execute
    return Database.Cursor.execute(self, query, params)
django.db.utils.OperationalError: table new__app_occupation has no column named boolean

@jieter jieter force-pushed the feature/django-4.0 branch 3 times, most recently from 3259682 to 1ef609d Compare September 22, 2021 19:05
@felixxm
Copy link
Contributor

felixxm commented Sep 23, 2021

@jieter Yes it's my mistake, thanks for testing with 4.0a1 ⭐ . I created a ticket.

@jieter jieter changed the title Add django==4.0a1 to the build matrix Add support for django 4.0, drop support for python 3.5 Oct 5, 2021
@jieter jieter merged commit bde371f into master Oct 5, 2021
@jieter jieter deleted the feature/django-4.0 branch October 5, 2021 19:23
@dyve
Copy link
Contributor

dyve commented Oct 6, 2021

Schermafbeelding 2021-10-06 om 17 27 36

Python 3.10 is not in the matrix 🔵

Schermafbeelding 2021-10-06 om 17 28 47

Alirezaja1384 pushed a commit to Alirezaja1384/django-tables2 that referenced this pull request Dec 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants