python-dependency-injector icon indicating copy to clipboard operation
python-dependency-injector copied to clipboard

side effect after importing containers

Open minutiaes opened this issue 3 months ago • 1 comments

Hello, one of our software uses dependency injector library in its core. I have noticed an unexpected side effect on Win11. The script that uses dependency injector is in a zip file. After executing the line in which containers is imported, it is not possible to modify the zip file anymore. On Win10 there is not such an effect. I could only test it on 2 machines. There is a minimal example below.

Python version: 3.11.9 dependency injector version: 4.48.1

File Structure

main.py
foo.zip/
├─ foo.py

# foo.py
import os
from dependency_injector import containers
# main.py
import sys

from time import sleep


sys.path.insert(0, "foo.zip")

import foo


while True:
    sleep(1)

minutiaes avatar Aug 21 '25 20:08 minutiaes