﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
37227	test_double_replaced_migrations_are_checked_correctly fails on CI system	Chris Lamb		"{{{
======================================================================
ERROR: test_double_replaced_migrations_are_checked_correctly (migrations.test_commands.SquashMigrationsTests.test_double_replaced_migrations_are_checked_correctly)
If replaced migrations are already applied and replacing migrations
----------------------------------------------------------------------
Traceback (most recent call last):
  File ""/usr/lib/python3.14/unittest/case.py"", line 58, in testPartExecutor
    yield
  File ""/usr/lib/python3.14/unittest/case.py"", line 669, in run
    self._callTestMethod(testMethod)
    
  File ""/usr/lib/python3.14/unittest/case.py"", line 615, in _callTestMethod
    result = method()
    ^^^^^^^^^^^^^^^
  File ""/build/reproducible-path/python-django-6.1~rc1/tests/migrations/test_commands.py"", line 3263, in test_double_replaced_migrations_are_checked_correctly
    call_command(""migrate"", ""migrations"", interactive=False, verbosity=0)
    ^^^^^^^^^^^
  File ""/build/reproducible-path/python-django-6.1~rc1/django/core/management/__init__.py"", line 195, in call_command
    return command.execute(*args, **defaults)
      ^^^^^^^^^^^^^^^^^
  File ""/build/reproducible-path/python-django-6.1~rc1/django/core/management/base.py"", line 466, in execute
    output = self.handle(*args, **options)
    ^^^^^^^^^^^^^^^
  File ""/build/reproducible-path/python-django-6.1~rc1/django/core/management/base.py"", line 113, in wrapper
    res = handle_func(*args, **kwargs)
    ^^^^^^^^^^^
  File ""/build/reproducible-path/python-django-6.1~rc1/django/core/management/commands/migrate.py"", line 115, in handle
    executor = MigrationExecutor(connection, self.migration_progress_callback)
    ^^^^^^^^^^^^^^^
  File ""/build/reproducible-path/python-django-6.1~rc1/django/db/migrations/executor.py"", line 18, in __init__
    self.loader = MigrationLoader(self.connection)
    ^^^^^^^^^^^^^^^
  File ""/build/reproducible-path/python-django-6.1~rc1/django/db/migrations/loader.py"", line 59, in __init__
    self.build_graph()
    ^^^^^^^^^^^
  File ""/build/reproducible-path/python-django-6.1~rc1/django/db/migrations/loader.py"", line 282, in build_graph
    self.load_disk()
    ^^^^^^^^^^^^^^^
  File ""/build/reproducible-path/python-django-6.1~rc1/django/db/migrations/loader.py"", line 121, in load_disk
    migration_module = import_module(migration_path)
    ^^^
  File ""/usr/lib/python3.14/importlib/__init__.py"", line 88, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
      ^^^^^^^^^^^^^^^^^
  File ""<frozen importlib._bootstrap>"", line 1406, in _gcd_import
  File ""<frozen importlib._bootstrap>"", line 1371, in _find_and_load
  File ""<frozen importlib._bootstrap>"", line 1335, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'tmpw833bckt.migrations.0001_initial_squashed_0002_auto_20260723_1257_squashed_0003_auto_20260723_1257'
}}}

I can reproduce this in two places:

* On the official Debian build servers (https://buildd.debian.org/status/fetch.php?pkg=python-django&arch=all&ver=3%3A6.1~rc1-1&stamp=1784829536&file=log)

* and on Debian's CI system (https://salsa.debian.org/python-team/packages/python-django/-/jobs/9998879/raw).

Note in both cases, the tests are run with Python 3.13 and 3.14 seriatim.

However, I can't reproduce this locally on my own machine. Anything in particular to look out for? In all cases, I am using SQLite 3.53.3 and Python 3.14.6."	Bug	closed	Migrations	6.1	Normal	duplicate			Unreviewed	0	0	0	0	0	0
