Skip to content

Backport Python 3.10 NewTypes #156

@effigies

Description

@effigies

As of Python 3.10, the following types are picklable:

from pathlib import Path
from typing import NewType

File = NewType("File", Path)
Directory = NewType("Directory", Path)

Prior to that, this fails. Would it be possible to backport the NewType class to Python 3.7+?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions