You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Open a draft PR that intentionally adds a new public API without updating references/public_api_snapshot.txt, so we can verify the new public API snapshot CI check fails as expected.
💚 How did you test it?
uv run --extra dev ruff format --check posthog/__init__.py
uv run --extra dev ruff check posthog/__init__.py
uv run --extra dev mypy --no-site-packages --config-file mypy.ini posthog/__init__.py | uv run --extra dev mypy-baseline filter
uv run --extra dev python .github/scripts/check_public_api.py (expected failure: snapshot is out of date and shows posthog.public_api_snapshot_probe in the generated API)
📝 Checklist
I reviewed the submitted code.
I added tests to verify the changes.
I updated the docs if needed.
No breaking change or entry added to the changelog.
Run make public_api_check
python .github/scripts/check_public_api.py
Public API snapshot is out of date. Run make public_api_snapshot.
--- references/public_api_snapshot.txt
+++ generated public API
@@ -940,6 +940,7 @@
function posthog.join() -> None
function posthog.load_feature_flags()
function posthog.new_context(fresh: bool = False, capture_exceptions: bool = True, client: Optional[Client] = None)
+function posthog.public_api_snapshot_probe() -> str
function posthog.request.batch_post(api_key: str, host: Optional[str] = None, gzip: bool = False, timeout: int = 15, path: str = EVENTS_ENDPOINT, **kwargs) -> requests.Response
function posthog.request.determine_server_host(host: Optional[str]) -> str
function posthog.request.disable_connection_reuse() -> None
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
💡 Motivation and Context
Open a draft PR that intentionally adds a new public API without updating
references/public_api_snapshot.txt, so we can verify the new public API snapshot CI check fails as expected.💚 How did you test it?
uv run --extra dev ruff format --check posthog/__init__.pyuv run --extra dev ruff check posthog/__init__.pyuv run --extra dev mypy --no-site-packages --config-file mypy.ini posthog/__init__.py | uv run --extra dev mypy-baseline filteruv run --extra dev python .github/scripts/check_public_api.py(expected failure: snapshot is out of date and showsposthog.public_api_snapshot_probein the generated API)📝 Checklist
If releasing new changes
sampo addto generate a changeset file