Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Custom environments in subinterpreters #126977

Open
@FFY00

Description

@FFY00

Feature or enhancement

Proposal:

I wanted to explore the viability of having custom environments in subinterpreters. There are several use-cases that could be enabled by this feature.

So far, from informal discussion with others about this, there are a couple possible issues to take into consideration.

Issues

  1. Some of the immortal objects shared between subinterpreter may be environment-dependent (pointed out by@Yhg1s)
  2. Complications around dynamic loading, by having extension modules from different environments
    2.1) Symbol conflicts from their dependencies (pointed out by@Yhg1s)
    2.2) Since subinterpreters share the same process, when loading the same shared object, they get the same pointer (pointed out by@pablogsal)

Implementation

The main thing we need is a way to disable thesite initialization, which could be aenable_site option in the interpreter config. This should disable the environment customizations, and result in a bare environment without anything extrasys.path.

However, to make the use of different environments more ergonomic, we could add anenvironment_path location pointing to a directory containing apyvenv.cfg, which would perform thesite initialization for that environment.

Has this already been discussed elsewhere?

No response given

Links to previous discussion of this feature:

No response

Metadata

Metadata

Assignees

No one assigned

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp