Skip to content

App-data migration moves virtualenv.ini into the cache #3594

Closed

Description

@gaborbernat

When virtualenv migrates its legacy app-data directory to the cache on macOS or Windows, it moves virtualenv.ini with the cached files. Later runs look in the original location and fall back to defaults.

Affected code

The migration moves the entire directory for sibling paths and moves the directory entries for nested paths. The INI loader still looks in the platform configuration directory. Migration Config lookup

Reproduction

On ea7688a0, put virtualenv.ini and a cached file in a temporary legacy app-data directory. Stub the platform directory functions so the cache path is either a sibling or a child of that directory, then call make_app_data(None, read_only=False, env={}). Both layouts moved both files. The INI should remain in the legacy directory.

Impact

Reproduction is moderate and exposure is niche. The user must have a config file in the legacy directory, and the cache directory must be absent.

Credits

Report ANT-2026-14OSSA8S.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions