Skip to content

SNOW-3010254: Move snowflake.* packages to PEP 420 implicit namespace packages (remove .pth-based namespace bootstrap) #4052

@BwL1289

Description

@BwL1289

Snowflake packages (e.g. snowflake-snowpark-python, snowflake-connector-python) currently rely on setuptools legacy namespace packages, implemented via auto-generated *-nspkg.pth files in site-packages.

Example installed artifact snowflake_snowpark_python-1.39.0-py3.12-nspkg.pth.

This .pth file executes code at interpreter startup to synthesize the snowflake namespace and mutate sys.modules / __path__.

It would be nice to migrate snowflake.* packages to PEP 420 implicit namespace packages, specifically:

  1. Remove namespace_packages = ["snowflake"] and any setuptools legacy namespace configuration
  2. Ensure no snowflake/__init__.py exists in any distribution, all Snowflake subpackages rely on implicit namespace resolution, and stop shipping *-nspkg.pth files in wheels

This would make Snowflake packages behave like modern namespace ecosystems (e.g. google.*).

Metadata

Metadata

Assignees

Labels

featureNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions