Python UDFs and stored procedures: Stop implicit auto-injection of the psutil package (Preview)

Attention

This behavior change is in the 2025_03 bundle.

For the current status of the bundle, refer to Bundle History.

psutil is a Python library that provides convenient functions for retrieving information about system utilization. Currently Snowflake installs the psutil package implicitly inside a sandbox when a UDF or stored procedure is created. But this can lead to a violation of the packages policy blocklist if you set the blocklist, and it contains psutil.

Hence this behavior change stops auto-injection of the psutil package. When this behavior change bundle is enabled, you have to mention the psutil package explicitly inside the package list while creating the UDF stored procedure if you require it.

Before the change:

Snowflake installs the psutil package implicitly inside a sandbox when a UDF or stored procedure is created.

After the change:

You now have to add the psutil package explicitly inside the package list while creating the UDF or stored procedure if you require it.

Ref: 1948