Multiversion Python Thoughts
Briefly

Python's import system relies heavily on its module cache in sys.modules, which registers every module based on its import path before initialization, raising complexities in multi-version imports.
Dave discusses the intricacies of Python's package and module structures, where a standard module becomes a package when it includes an __init__.py file, which creates further complexities in managing dependencies.
In the context of multi-version imports, the challenge is to enable simultaneous usage of incompatible library versions, such as pydantic 1.x and 2.x, without significant changes.
The article highlights the importance of understanding Python's varied terminology around modules, packages, and distributions, as these terms are often used interchangeably, complicating discussions on package management.
Read at Armin Ronacher's Thoughts and Writings
[
]
[
|
]