Add support for RENAMED_FIELD_TYPES in the legacy pickler.

Review Request #14208 — Created Oct. 17, 2024 and updated

Information

Django Evolution
release-2.x

Reviewers

Django Evolution's modern JSON-based serializer gained support for
RENAMED_FIELD_TYPES, which allowed codebases to map legacy field
classes to new ones. However, the legacy pickle-based deserializer
didn't have this capability, meaning that older codebases would still
fail to find renamed modules.

This change adds support for RENAMED_FIELD_TYPES in the legacy
unpickler. This unpickler already hard-codes support for some legacy
types, making this pretty straightforward.

Tested an upgrade with the legacy unpickler referencing a module we
wanted to rename. Verified the upgrade worked successfully.

Summary ID
Add support for RENAMED_FIELD_TYPES in the legacy pickler.
Django Evolution's modern JSON-based serializer gained support for `RENAMED_FIELD_TYPES`, which allowed codebases to map legacy field classes to new ones. However, the legacy pickle-based deserializer didn't have this capability, meaning that older codebases would still fail to find renamed modules. This change adds support for `RENAMED_FIELD_TYPES` in the legacy unpickler. This unpickler already hard-codes support for some legacy types, making this pretty straightforward.
20159690070da6caa01c43475c776c21aceee3f4
Description From Last Updated

Oops just noticed this as I clicked Ship It for my last review, these two imports should be flipped (M …

maubinmaubin
Checks run (2 succeeded)
flake8 passed.
JSHint passed.
david
  1. Ship It!
  2. 
      
maubin
  1. Ship It!
  2. 
      
maubin
  1. 
      
  2. django_evolution/compat/picklers.py (Diff revision 1)
     
     
     
    Show all issues

    Oops just noticed this as I clicked Ship It for my last review, these two imports should be flipped (M before N)

    1. Nvm, realizing this is because the first import is shallower. Disregard this.

    2. We actually do it completely lexigraphically, so your comment was right.

  3.