Modernize Python CI and packaging#7
Conversation
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
|
Warning Review the following alerts detected in dependencies. According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.
|
| clean: | ||
| rm -rf MANIFEST build dist customerio.egg-info | ||
|
|
||
| realclean: |
There was a problem hiding this comment.
feel like deps or install-deps might be more clear name than realclean
There was a problem hiding this comment.
I'll rename it to clean-venv, since that's what it does. Thanks!
| @@ -13,7 +23,11 @@ jobs: | |||
| with: | |||
| python-version: "3.10" | |||
There was a problem hiding this comment.
build.yml used 3.14 any reason for them to be different? if so might be worth a comment
There was a problem hiding this comment.
No, I'll make lint use the same version. Thanks!
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit c555131. Configure here.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
flake8 3.7.9's pyflakes dependency uses ast.Str, which was removed in Python 3.14, causing "module 'ast' has no attribute 'Str'" in CI. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

Similar to customerio/customerio-python#116 , modernise the build and packaging for
cdp-analytics-python.This is the first in a series of changes to allow us to publish new versions of this package using trusted publishing from GitHub Actions.
Changes:
mockpackage to the core packageunittest.mock.I've verified that a package built with
make buildis installable in a venv using e.g.:pip install /path/to/cdp-analytics-python/dist/customerio_cdp_analytics-1.0.1.dev8-py2.py3-none-any.whl, and that it can send traffic through CDP EU.Note
Medium Risk
Dropping Python 3.8 and changing how versions are produced affects install compatibility and release artifacts, though application runtime code is largely unchanged.
Overview
Modernizes build and release plumbing ahead of trusted PyPI publishing from GitHub Actions: metadata and dependencies move into
pyproject.toml, versions come from git tags via setuptools-scm, andsetup.pyis reduced to package discovery only.Python 3.8 is dropped (
requires-python >=3.9); CI tests 3.9–3.14. Tests switch from themockdependency tounittest.mock.CI gains a Build workflow (
python -m build+twine check), Dependabot for Actions and pip, and lint/test workflows now trigger on PRs/main, usepyproject.tomlfor pip cache, and install viapip install -e ".[dev]"/pip install -e .. The Makefile addsbuild/cleantargets and routes commands through$(PYTHON) -m.README only updates the data-center docs URL.
Reviewed by Cursor Bugbot for commit c555131. Bugbot is set up for automated code reviews on this repo. Configure here.