diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile
index cea55fdf04693..c9eaa41e55139 100644
--- a/.devcontainer/Dockerfile
+++ b/.devcontainer/Dockerfile
@@ -7,7 +7,7 @@
# experience as rich as possible. Perhaps later down the line it might be worth
# rolling our own
#
-FROM mcr.microsoft.com/vscode/devcontainers/python:3.10-bullseye
+FROM mcr.microsoft.com/vscode/devcontainers/python:3.11-bullseye
# Make sure all exit codes on pipes cause failures
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
@@ -32,6 +32,7 @@ RUN apt-get update \
netcat brotli curl \
&& rm -rf /var/lib/apt/lists/*
+# hadolint ignore=DL3004
RUN curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg \
&& sudo chmod go+r /usr/share/keyrings/githubcli-archive-keyring.gpg \
&& echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null \
diff --git a/.github/actions/run-backend-tests/action.yml b/.github/actions/run-backend-tests/action.yml
index edd36992a6614..c742d87dde90d 100644
--- a/.github/actions/run-backend-tests/action.yml
+++ b/.github/actions/run-backend-tests/action.yml
@@ -6,7 +6,7 @@ name: Run Django tests
inputs:
python-version:
required: true
- description: Python version, e.g. 3.10.10
+ description: Python version, e.g. 3.11.4
clickhouse-server-image:
required: true
description: ClickHouse server image tag, e.g. clickhouse/clickhouse-server:latest
diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml
index 191b481a045d2..1541c9515d4a2 100644
--- a/.github/workflows/benchmark.yml
+++ b/.github/workflows/benchmark.yml
@@ -54,7 +54,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
- python-version: 3.10.10
+ python-version: 3.11.6
token: ${{ secrets.POSTHOG_BOT_GITHUB_TOKEN }}
- uses: syphar/restore-virtualenv@v1
diff --git a/.github/workflows/ci-backend.yml b/.github/workflows/ci-backend.yml
index f80300fca0a56..3f58a57a03bbd 100644
--- a/.github/workflows/ci-backend.yml
+++ b/.github/workflows/ci-backend.yml
@@ -103,13 +103,13 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
- python-version: 3.10.10
+ python-version: 3.11.6
token: ${{ secrets.POSTHOG_BOT_GITHUB_TOKEN }}
- uses: syphar/restore-virtualenv@v1
id: cache-backend-tests
with:
- custom_cache_key_element: v1-
+ custom_cache_key_element: v1
- uses: syphar/restore-pip-download-cache@v1
if: steps.cache-backend-tests.outputs.cache-hit != 'true'
@@ -181,13 +181,13 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
- python-version: 3.10.10
+ python-version: 3.11.6
token: ${{ secrets.POSTHOG_BOT_GITHUB_TOKEN }}
- uses: syphar/restore-virtualenv@v1
id: cache-backend-tests
with:
- custom_cache_key_element: v1-
+ custom_cache_key_element: v1
- uses: syphar/restore-pip-download-cache@v1
if: steps.cache-backend-tests.outputs.cache-hit != 'true'
@@ -237,7 +237,7 @@ jobs:
strategy:
fail-fast: false
matrix:
- python-version: ['3.10.10']
+ python-version: ['3.11.6']
clickhouse-server-image: ['clickhouse/clickhouse-server:23.6.1.1524']
segment: ['FOSS', 'EE']
person-on-events: [false, true]
@@ -325,13 +325,13 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
- python-version: 3.10.10
+ python-version: 3.11.6
token: ${{ secrets.POSTHOG_BOT_GITHUB_TOKEN }}
- uses: syphar/restore-virtualenv@v1
id: cache-backend-tests
with:
- custom_cache_key_element: v1-
+ custom_cache_key_element: v1
- uses: syphar/restore-pip-download-cache@v1
if: steps.cache-backend-tests.outputs.cache-hit != 'true'
diff --git a/.github/workflows/ci-hobby.yml b/.github/workflows/ci-hobby.yml
index 9985a4402118b..3aae42d144c6a 100644
--- a/.github/workflows/ci-hobby.yml
+++ b/.github/workflows/ci-hobby.yml
@@ -29,7 +29,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
- python-version: '3.8'
+ python-version: '3.11.6'
cache: 'pip' # caching pip dependencies
token: ${{ secrets.POSTHOG_BOT_GITHUB_TOKEN }}
- name: Get python deps
diff --git a/.github/workflows/ci-plugin-server.yml b/.github/workflows/ci-plugin-server.yml
index 81aa5cf4cd81f..fb47b5bc241e6 100644
--- a/.github/workflows/ci-plugin-server.yml
+++ b/.github/workflows/ci-plugin-server.yml
@@ -117,14 +117,14 @@ jobs:
if: needs.changes.outputs.plugin-server == 'true'
uses: actions/setup-python@v4
with:
- python-version: 3.10.10
+ python-version: 3.11.6
token: ${{ secrets.POSTHOG_BOT_GITHUB_TOKEN }}
- uses: syphar/restore-virtualenv@v1
if: needs.changes.outputs.plugin-server == 'true'
id: cache-backend-tests
with:
- custom_cache_key_element: v1-
+ custom_cache_key_element: v1
- uses: syphar/restore-pip-download-cache@v1
if: needs.changes.outputs.plugin-server == 'true' && steps.cache-backend-tests.outputs.cache-hit != 'true'
@@ -215,13 +215,13 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
- python-version: 3.10.10
+ python-version: 3.11.6
token: ${{ secrets.POSTHOG_BOT_GITHUB_TOKEN }}
- uses: syphar/restore-virtualenv@v1
id: cache-backend-tests
with:
- custom_cache_key_element: v1-
+ custom_cache_key_element: v1
- uses: syphar/restore-pip-download-cache@v1
if: steps.cache-backend-tests.outputs.cache-hit != 'true'
diff --git a/.github/workflows/pr-deploy.yml b/.github/workflows/pr-deploy.yml
index 5bcdc2ca1e49f..81638f4d29967 100644
--- a/.github/workflows/pr-deploy.yml
+++ b/.github/workflows/pr-deploy.yml
@@ -62,7 +62,10 @@ jobs:
export PR_NUM=${{ github.event.number }}
export BRANCH_NAME=${{ github.head_ref }}
export RELEASE_NAME=posthog
+ # branch name but with no forward slashes
export NAMESPACE=pr-$PR_NUM-${BRANCH_NAME//\//-}
+ # and no full stops
+ export NAMESPACE=${NAMESPACE//./-}
export NAMESPACE=${NAMESPACE:0:38}
export NAMESPACE=${NAMESPACE%%-}
export HOSTNAME=$NAMESPACE
diff --git a/.run/Celery.run.xml b/.run/Celery.run.xml
index 82f170a5fa381..fc1702472e518 100644
--- a/.run/Celery.run.xml
+++ b/.run/Celery.run.xml
@@ -12,6 +12,7 @@
+
diff --git a/.run/PostHog.run.xml b/.run/PostHog.run.xml
index df41d468add82..4f8d64fe01ff4 100644
--- a/.run/PostHog.run.xml
+++ b/.run/PostHog.run.xml
@@ -4,6 +4,7 @@
+
@@ -14,7 +15,6 @@
-
@@ -22,7 +22,7 @@
-
+
diff --git a/posthog/clickhouse/client/escape.py b/posthog/clickhouse/client/escape.py
index 49e7b1047f372..4f3c6b11af4ba 100644
--- a/posthog/clickhouse/client/escape.py
+++ b/posthog/clickhouse/client/escape.py
@@ -90,5 +90,6 @@ def escape_param_for_clickhouse(param: Any) -> str:
revision="placeholder server_info value",
display_name="placeholder server_info value",
timezone="UTC",
+ used_revision="placeholder server_info value",
)
return escape_param(param, context=context)
diff --git a/production-unit.Dockerfile b/production-unit.Dockerfile
index fb79f50912fb0..2ebece50ffc66 100644
--- a/production-unit.Dockerfile
+++ b/production-unit.Dockerfile
@@ -81,7 +81,7 @@ RUN corepack enable && \
#
# ---------------------------------------------------------
#
-FROM python:3.10.10-slim-bullseye AS posthog-build
+FROM python:3.11.6-slim-bullseye AS posthog-build
WORKDIR /code
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
diff --git a/production.Dockerfile b/production.Dockerfile
index d147edb7da7b2..36896cfa226bb 100644
--- a/production.Dockerfile
+++ b/production.Dockerfile
@@ -97,7 +97,7 @@ RUN corepack enable && \
#
# ---------------------------------------------------------
#
-FROM python:3.10.10-slim-bullseye AS posthog-build
+FROM python:3.11.6-slim-bullseye AS posthog-build
WORKDIR /code
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
@@ -152,7 +152,7 @@ RUN apt-get update && \
#
# ---------------------------------------------------------
#
-FROM python:3.10.10-slim-bullseye
+FROM python:3.11.6-slim-bullseye
WORKDIR /code
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
ENV PYTHONUNBUFFERED 1
diff --git a/pyproject.toml b/pyproject.toml
index 689a4c32bf2a2..a0363f6278e98 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,6 +1,6 @@
[tool.black]
line-length = 120
-target-version = ['py310']
+target-version = ['py311']
[tool.isort]
profile = "black"
diff --git a/requirements-dev.txt b/requirements-dev.txt
index 4ed1eb4080e41..99c76c196dd4c 100644
--- a/requirements-dev.txt
+++ b/requirements-dev.txt
@@ -1,5 +1,5 @@
#
-# This file is autogenerated by pip-compile with Python 3.10
+# This file is autogenerated by pip-compile with Python 3.11
# by the following command:
#
# pip-compile requirements-dev.in
@@ -90,8 +90,6 @@ docopt==0.6.2
# via pytest-watch
email-validator==2.0.0.post2
# via pydantic
-exceptiongroup==1.1.2
- # via pytest
faker==17.5.0
# via -r requirements-dev.in
fakeredis[lua]==2.11.0
@@ -293,13 +291,6 @@ toml==0.10.1
# via
# coverage
# datamodel-code-generator
-tomli==1.2.3
- # via
- # black
- # build
- # mypy
- # pyproject-hooks
- # pytest
types-freezegun==1.1.10
# via -r requirements-dev.in
types-markdown==3.3.9
diff --git a/requirements.in b/requirements.in
index d5c9e9449a32b..c78415d6b9da3 100644
--- a/requirements.in
+++ b/requirements.in
@@ -4,6 +4,9 @@
# - `pip-compile --rebuild requirements.in`
# - `pip-compile --rebuild requirements-dev.in`
#
+yarl>=1.8.1
+frozenlist>=1.3.1
+lxml>=4.9.0
aiohttp>=3.8.4
aioboto3==11.1
antlr4-python3-runtime==4.13.1
@@ -13,7 +16,7 @@ boto3-stubs[s3]
brotli==1.1.0
celery==5.3.4
celery-redbeat==2.1.1
-clickhouse-driver==0.2.4
+clickhouse-driver==0.2.6
clickhouse-pool==0.5.3
cryptography==37.0.2
defusedxml==0.6.0
@@ -57,7 +60,7 @@ pickleshare==0.7.5
Pillow==9.2.0
posthoganalytics==3.0.1
prance==0.22.2.22.0
-psycopg2-binary==2.9.7
+psycopg2-binary==2.9.9
pyarrow==12.0.1
pydantic==2.3.0
pyjwt==2.4.0
diff --git a/requirements.txt b/requirements.txt
index 44eef0d14f9b6..148f811ea2556 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -1,5 +1,5 @@
#
-# This file is autogenerated by pip-compile with Python 3.10
+# This file is autogenerated by pip-compile with Python 3.11
# by the following command:
#
# pip-compile requirements.in
@@ -102,7 +102,7 @@ click-plugins==1.1.1
# via celery
click-repl==0.3.0
# via celery
-clickhouse-driver==0.2.4
+clickhouse-driver==0.2.6
# via
# -r requirements.in
# clickhouse-pool
@@ -210,8 +210,9 @@ drf-spectacular==0.24.2
# via -r requirements.in
filelock==3.12.0
# via snowflake-connector-python
-frozenlist==1.3.0
+frozenlist==1.4.0
# via
+ # -r requirements.in
# aiohttp
# aiosignal
future==0.18.3
@@ -285,8 +286,9 @@ kombu==5.3.2
# via
# -r requirements.in
# celery
-lxml==4.6.5
+lxml==4.9.3
# via
+ # -r requirements.in
# python3-saml
# toronado
# xmlsec
@@ -356,7 +358,7 @@ protobuf==4.22.1
# grpcio-status
# proto-plus
# temporalio
-psycopg2-binary==2.9.7
+psycopg2-binary==2.9.9
# via -r requirements.in
ptyprocess==0.6.0
# via pexpect
@@ -401,7 +403,6 @@ python-dateutil==2.8.2
# celery-redbeat
# google-cloud-bigquery
# posthoganalytics
- # temporalio
python-dotenv==0.21.0
# via webdriver-manager
python-statsd==2.1.0
@@ -452,8 +453,6 @@ rsa==4.9
# via google-auth
ruamel-yaml==0.17.21
# via prance
-ruamel-yaml-clib==0.2.7
- # via ruamel-yaml
s3transfer==0.6.0
# via boto3
selenium==4.1.5
@@ -563,9 +562,12 @@ wsproto==1.1.0
# via trio-websocket
xmlsec==1.3.13
# via python3-saml
-yarl==1.7.2
+yarl==1.9.2
# via aiohttp
zipp==3.17.0
+ # via
+ # -r requirements.in
+ # aiohttp
# via importlib-metadata
# The following packages are considered to be unsafe in a requirements file: