Conversation
… support Co-Authored-By: Miro Čillík <miro@keboola.com>
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
Co-Authored-By: Miro Čillík <miro@keboola.com>
Co-Authored-By: Miro Čillík <miro@keboola.com>
There was a problem hiding this comment.
Pull request overview
This PR updates the project’s Python packaging and CI configuration to support Python 3.13 by switching the build backend from setuptools to hatchling, tightening dependency compatibility for Snowpark, and updating the publish workflow to run on Python 3.13.
Changes:
- Switched build backend to
hatchlingand configured wheel packaging. - Bumped
requires-pythonto>=3.9, added Python 3.9–3.13 classifiers, and pinnedsnowflake-snowpark-python>=1.35.0. - Updated GitHub Actions workflow to use newer action versions and Python 3.13, and adjusted publish dependencies accordingly.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
pyproject.toml |
Migrates build backend to hatchling, updates supported Python versions/classifiers, and pins Snowpark for 3.13 compatibility. |
.github/workflows/publish.yml |
Updates CI/publish jobs to run on Python 3.13 and refreshes GitHub Action versions and build deps. |
Comments suppressed due to low confidence (1)
pyproject.toml:7
version = "v0.1.3"is not PEP 440–compliant (the leadingvis invalid in core metadata) and may cause hatchling/packaging to reject the build. Consider changing the project version to0.1.3(keep thevprefix only for git tags/releases).
build-backend = "hatchling.build"
[project]
name = "keboola_streamlit"
version = "v0.1.3"
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-Authored-By: Miro Čillík <miro@keboola.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
Comments suppressed due to low confidence (1)
.github/workflows/publish.yml:24
- The workflow installs dependencies from
requirements.txt, which still allows oldersnowflake-snowpark-pythonversions on Python 3.10 even though the package metadata now requiressnowflake-snowpark-python>=1.35.0. To ensure CI matches what users get from PyPI, either pin the requirement inrequirements.txtas well or install the project (e.g.,pip install -e .) so dependencies are resolved frompyproject.toml.
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install pytest pre-commit
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-Authored-By: Miro Čillík <miro@keboola.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-Authored-By: Miro Čillík <miro@keboola.com>
Switch from hatchling to uv_build as the build backend and migrate the CI pipeline to use uv throughout (install, build, publish). This aligns with keboola/python-component and provides significantly faster dependency resolution and package building. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
setup-uv's python-version installs Python into a uv-managed directory that is not recognized as a system Python. Use actions/setup-python for the system Python and setup-uv only for the uv tool itself. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
soustruh
left a comment
There was a problem hiding this comment.
I'd really appreaciate a couple more changes, but as this ticket is close to (or already) breaching SLA, I approve this now 🙏
- Add pytest and pre-commit as dev dependency group in pyproject.toml - Generate uv.lock for proper dependency locking - Remove requirements.txt (superseded by uv.lock) - Use uv sync instead of pip install in CI - Run pre-commit and pytest via uv run - Simplify smoke test with uv run --isolated Co-Authored-By: Miro Čillík <miro@keboola.com>
soustruh
left a comment
There was a problem hiding this comment.
Nice, everything looks OK now! 🎉
Summary
Replace
setuptoolswithuv_buildas the build backend and pinsnowflake-snowpark-python>=1.35.0to fix thepkg_resourcesremoval in setuptools 82.0.0.Problem
setuptools82.0.0 (released 2026-02-08) removed thepkg_resourcesmodule. This broke all DataApps usingkeboola_streamlitbecausesnowflake-snowpark-python(older versions) internally importspkg_resourcesat runtime. Customers hitModuleNotFoundError: No module named 'pkg_resources'on app rebuild without any changes on their side.Relates to: AJDA-2244 / SUPPORT-15269
Changes
Build backend migration (
pyproject.toml):setuptoolswithuv_build>=0.10.3,<0.11.0as the build backend (zero-config, auto-discoverssrc/layout)[tool.setuptools.*]sections (not needed with uv)keboola/python-componentRuntime fix (
pyproject.toml):snowflake-snowpark-python>=1.35.0— this version no longer importspkg_resources, which is the actual fix for the customer-facing errorDependency locking (
pyproject.toml,uv.lock,requirements.txt):requirements.txt— dependencies are now fully declared inpyproject.toml[dependency-groups]withdev = ["pytest", "pre-commit"]uv.lockfor reproducible installsuv sync(single step) instead of separatepip installcallsCI pipeline (
.github/workflows/publish.yml):uvthroughout:uv syncfor deps,uv runfor pre-commit/pytest,uv buildfor packaging,uv publishfor PyPIbuild+twinewith nativeuv build/uv publishastral-sh/setup-uv@v7alongsideactions/setup-python@v5uv run --isolated --with dist/*.whlfor clean validationPython version support:
>=3.10Test plan
KeboolaStreamlitin isolated envuv build+uv publishwith existing PyPI credentialskeboola_streamlitand removesetuptools<82.0.0workaroundReview & Testing Checklist for Human
uv publish: The publish job now usesUV_PUBLISH_USERNAME/UV_PUBLISH_PASSWORDenv vars (mapped from existingPYPI_USERNAME/PYPI_API_TOKENsecrets) instead ofTWINE_USERNAME/TWINE_PASSWORD. This path only runs on tagged releases, so it has not been exercised by CI on this branch. Consider a dry-run build before the first tagged release.uv build --wheel && unzip -l dist/*.whllocally and confirm all expected source files fromsrc/keboola_streamlit/are present. Theuv_buildbackend auto-discovers thesrc/layout, replacing the explicitsetuptoolsconfig.kbcstorageclient calls work in a Python 3.13 environment.requires-python >=3.10is acceptable: Python 3.9 is EOL, but check if any existing users/deployments still rely on 3.8/3.9.Suggested test plan: Install from this branch into clean Python 3.10 and 3.13 venvs (
pip install git+https://github.com/keboola/keboola_streamlit@devin/1770666055-replace-pkg-resources-python313), then runfrom keboola_streamlit import KeboolaStreamlitand the existingpytestsuite in both.Notes
snowflake-snowpark-python1.35.0+ supports Python 3.13 (requires-python: <3.14,>=3.9); versions ≤1.34.0 excluded it (<3.13).version = "v0.1.3"inpyproject.tomlhas a leadingvwhich is not strictly PEP 440 compliant. This was pre-existing and not changed in this PR;uv_buildappears to handle it, but worth noting.Release Notes
Justification, description
Replace
setuptoolsbuild backend withuv_buildto support Python 3.13. Pinsnowflake-snowpark-python>=1.35.0for Python 3.13 compatibility. Migrate fromrequirements.txttouv.lockfor reproducible dependency resolution.Plans for Customer Communication
N/A
Impact Analysis
Minimum Python version raised from 3.7 to 3.10. No functional code changes — only build tooling, dependency pins, and CI.
Deployment Plan
N/A
Rollback Plan
N/A
Post-Release Support Plan
N/A