Skip to content

chore(python): use sitecustomize script instead of usercustomize#828

Open
basti1302 wants to merge 1 commit intomainfrom
python-sitecustomize
Open

chore(python): use sitecustomize script instead of usercustomize#828
basti1302 wants to merge 1 commit intomainfrom
python-sitecustomize

Conversation

@basti1302
Copy link
Member

@basti1302 basti1302 commented Feb 24, 2026

This follows a recommendation from the OpenTelemetry injector SIG. The difference between usercustomize and sitecustomize is that usercustomize.py will typically be ignored when using venv (because ENABLE_USER_SITE is set to False for venvs). Notably, some people use venv even in containerized Python applications. sitecustomize.py
will typically not be ignored, even in venv setups. Thus using the sitecustomize mechanism seems preferable for our purposes.

@basti1302 basti1302 force-pushed the python-sitecustomize branch from 99c60de to 054c59a Compare February 24, 2026 08:37
This follows a recommendation from the OpenTelemetry injector SIG.
The difference between usercustomize and sitecustomize is that
usercustomize.py will typically be ignored when using venv (because
ENABLE_USER_SITE is set to False for venvs). Notably, some people use
venv even in containerized Python applications. sitecustomize.py
will typically not be ignored, even in venv setups. Thus using the
sitecustomize mechanism seems preferable for our purposes.
@basti1302 basti1302 force-pushed the python-sitecustomize branch from 054c59a to 0f890bb Compare February 26, 2026 11:19
@sonarqubecloud
Copy link

sonarqubecloud bot commented Feb 26, 2026

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarQube Cloud

@basti1302 basti1302 marked this pull request as ready for review February 26, 2026 11:28
@basti1302 basti1302 requested a review from a team as a code owner February 26, 2026 11:28
@basti1302 basti1302 requested a review from mmanciop February 26, 2026 11:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants