Skip to content

Commit c984bd2

Browse files
committed
Merge branch 'master' into fix/missing-async
2 parents 89a07d8 + 465baea commit c984bd2

File tree

9 files changed

+4799
-7
lines changed

9 files changed

+4799
-7
lines changed

.github/dependabot.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "pip"
4+
directory: "/"
5+
schedule:
6+
interval: "daily"
7+
time: "10:00"
8+
timezone: "UTC"
9+
groups:
10+
ai-providers:
11+
patterns:
12+
- "openai"
13+
- "anthropic"
14+
- "google-genai"
15+
- "langchain-core"
16+
- "langchain-community"
17+
- "langchain-openai"
18+
- "langchain-anthropic"
19+
- "langgraph"
20+
allow:
21+
- dependency-name: "openai"
22+
- dependency-name: "anthropic"
23+
- dependency-name: "google-genai"
24+
- dependency-name: "langchain-core"
25+
- dependency-name: "langchain-community"
26+
- dependency-name: "langchain-openai"
27+
- dependency-name: "langchain-anthropic"
28+
- dependency-name: "langgraph"
29+
open-pull-requests-limit: 1
30+
reviewers:
31+
- "PostHog/team-llm-analytics"
32+
# Uncomment below to enable auto-merge for minor updates when CI passes
33+
# pull-request-branch-name:
34+
# separator: "/"
35+
# assignees:
36+
# - "PostHog/ai-team"
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: "Generate References"
2+
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
docs-generation:
8+
name: Generate references
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout the repository
12+
uses: actions/checkout@85e6279cec87321a52edac9c87bce653a07cf6c2
13+
with:
14+
fetch-depth: 0
15+
token: ${{ secrets.POSTHOG_BOT_PAT }}
16+
17+
- name: Set up Python
18+
uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55
19+
with:
20+
python-version: 3.11.11
21+
22+
- name: Install uv
23+
uses: astral-sh/setup-uv@0c5e2b8115b80b4c7c5ddf6ffdd634974642d182 # v5.4.1
24+
with:
25+
enable-cache: true
26+
pyproject-file: 'pyproject.toml'
27+
28+
- name: Generate references
29+
run: |
30+
uv run bin/docs generate-references
31+
32+
- name: Check for changes in references
33+
id: changes
34+
run: |
35+
if [ -n "$(git status --porcelain references/)" ]; then
36+
echo "changed=true" >> $GITHUB_OUTPUT
37+
echo "New references generated in references directory:"
38+
git status --porcelain references/
39+
else
40+
echo "changed=false" >> $GITHUB_OUTPUT
41+
echo "No new references generated in references directory"
42+
fi
43+
44+
- uses: stefanzweifel/git-auto-commit-action@778341af668090896ca464160c2def5d1d1a3eb0
45+
if: steps.changes.outputs.changed == 'true'
46+
with:
47+
commit_message: "Update generated references"
48+
file_pattern: references/

.github/workflows/release.yaml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
uses: actions/checkout@85e6279cec87321a52edac9c87bce653a07cf6c2
2121
with:
2222
fetch-depth: 0
23-
token: ${{ secrets.POSTHOG_BOT_GITHUB_TOKEN }}
23+
token: ${{ secrets.POSTHOG_BOT_PAT }}
2424

2525
- name: Set up Python
2626
uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55
@@ -45,7 +45,13 @@ jobs:
4545
- name: Create GitHub release
4646
uses: actions/create-release@0cb9c9b65d5d1901c1f53e5e66eaf4afd303e70e # v1
4747
env:
48-
GITHUB_TOKEN: ${{ secrets.POSTHOG_BOT_GITHUB_TOKEN }}
48+
GITHUB_TOKEN: ${{ secrets.POSTHOG_BOT_PAT }}
4949
with:
5050
tag_name: v${{ env.REPO_VERSION }}
5151
release_name: ${{ env.REPO_VERSION }}
52+
53+
- name: Dispatch generate-references for posthog-python
54+
env:
55+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
56+
run: |
57+
gh workflow run generate-references.yml --ref master

CHANGELOG.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
1-
# 6.7.7 - 2025-09-16
1+
# 6.7.8 - 2025-10-16
22

33
- fix(llma): missing async for OpenAI's streaming implementation
44

5+
# 6.7.7 - 2025-10-14
6+
7+
- fix: remove deprecated attribute $exception_personURL from exception events
8+
59
# 6.7.6 - 2025-09-16
610

711
- fix: don't sort condition sets with variant overrides to the top

bin/docs_scripts/doc_constant.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"""
44

55
from typing import Dict, Union
6+
from posthog.version import VERSION
67

78
# Documentation generation metadata
89
DOCUMENTATION_METADATA = {
@@ -27,8 +28,9 @@
2728

2829
# Output file configuration
2930
OUTPUT_CONFIG: Dict[str, Union[str, int]] = {
30-
"output_dir": ".",
31-
"filename": "posthog-python-references.json",
31+
"output_dir": "./references",
32+
"filename": f"posthog-python-references-{VERSION}.json",
33+
"filename_latest": "posthog-python-references-latest.json",
3234
"indent": 2,
3335
}
3436

bin/docs_scripts/generate_json_schemas.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -460,12 +460,23 @@ def generate_sdk_documentation():
460460
try:
461461
documentation = generate_sdk_documentation()
462462

463-
# Write to file
463+
# Ensure output directory exists
464+
output_dir = str(OUTPUT_CONFIG["output_dir"])
465+
os.makedirs(output_dir, exist_ok=True)
466+
464467
output_file = os.path.join(
465468
str(OUTPUT_CONFIG["output_dir"]), str(OUTPUT_CONFIG["filename"])
466469
)
470+
output_file_latest = os.path.join(
471+
str(OUTPUT_CONFIG["output_dir"]), str(OUTPUT_CONFIG["filename_latest"])
472+
)
473+
474+
# Write to current version
467475
with open(output_file, "w") as f:
468476
json.dump(documentation, f, indent=int(OUTPUT_CONFIG["indent"]))
477+
# Write to latest
478+
with open(output_file_latest, "w") as f:
479+
json.dump(documentation, f, indent=int(OUTPUT_CONFIG["indent"]))
469480

470481
print(f"✓ Generated {output_file}")
471482

posthog/client.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -973,7 +973,6 @@ def capture_exception(
973973
"value"
974974
),
975975
"$exception_list": all_exceptions_with_trace_and_in_app,
976-
"$exception_personURL": f"{remove_trailing_slash(self.raw_host)}/project/{self.api_key}/person/{distinct_id}",
977976
**properties,
978977
}
979978

0 commit comments

Comments
 (0)