python / python/mypy

Allow saving Type objects to TypeInfo.metadata

Open
#6,506 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature needs discussion topic-plugins
Dominant language
Python
Stars
20.6k
Forks
3.3k
PR merge metrics
PR metrics pending

Description

They are already being saved to cache and have serializer/deserialize methods.

It could also be generalized by creating smth like Serializable interface

class Serializable:
   serialize

   @classmethod
   deserialize

and require all cache serializable objects to implement it to be able to be saved to cache.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing TypeInfo.metadata and the existing cache serialization path described in the issue. Review how Type objects already use serializer/deserialize, then determine how metadata persistence should support them and whether a shared Serializable interface is needed. Done means Type objects can be saved to and restored from TypeInfo.metadata without breaking existing cache behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
devtools
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.