Skip to content

side effect after importing containers #922

@minutiaes

Description

@minutiaes

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions