Skip to content

Commit

Permalink
chore: Python 3.9 (#14336)
Browse files Browse the repository at this point in the history
* Update to python 3.9

* Update pytest

6.2.2 doesn't support python 3.9+

* Add missing saml dependencies

* Update snapshots

* Update snapshots

* Update snapshots

---------

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
  • Loading branch information
frankh and github-actions[bot] authored Feb 22, 2023
1 parent a69ff2a commit 1d7afd3
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 17 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.8.14
python-version: 3.9.16
token: ${{ secrets.POSTHOG_BOT_GITHUB_TOKEN }}

- uses: syphar/restore-virtualenv@v1
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/ci-backend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.8.14
python-version: 3.9.16
token: ${{ secrets.POSTHOG_BOT_GITHUB_TOKEN }}

- uses: syphar/restore-virtualenv@v1
Expand Down Expand Up @@ -145,10 +145,10 @@ jobs:
- name: Check if antlr definitions are up to date
run: |
# Installing a version of ant compatible with what we use in development from homebrew (4.11)
# "apt-get install antlr" would install 4.7 which is incompatible with our grammar.
# "apt-get install antlr" would install 4.7 which is incompatible with our grammar.
export ANTLR_VERSION=4.11.1
# java version doesn't matter
sudo apt-get install default-jre
sudo apt-get install default-jre
mkdir antlr
cd antlr
curl -o antlr.jar https://www.antlr.org/download/antlr-$ANTLR_VERSION-complete.jar
Expand Down Expand Up @@ -183,7 +183,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.8.14
python-version: 3.9.16
token: ${{ secrets.POSTHOG_BOT_GITHUB_TOKEN }}

- uses: syphar/restore-virtualenv@v1
Expand Down Expand Up @@ -235,7 +235,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ['3.8.14']
python-version: ['3.9.16']
clickhouse-server-image: ['clickhouse/clickhouse-server:22.8']
segment: ['FOSS', 'EE']
person-on-events: [false, true]
Expand Down Expand Up @@ -329,7 +329,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.8.14
python-version: 3.9.16
token: ${{ secrets.POSTHOG_BOT_GITHUB_TOKEN }}

- uses: syphar/restore-virtualenv@v1
Expand Down Expand Up @@ -419,7 +419,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.8.14
python-version: 3.9.16
token: ${{ secrets.POSTHOG_BOT_GITHUB_TOKEN }}

- name: Install SAML (python3-saml) dependencies
Expand Down
9 changes: 7 additions & 2 deletions .github/workflows/ci-plugin-server.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.8.14
python-version: 3.9.16
token: ${{ secrets.POSTHOG_BOT_GITHUB_TOKEN }}

- uses: syphar/restore-virtualenv@v1
Expand All @@ -110,6 +110,11 @@ jobs:
- uses: syphar/restore-pip-download-cache@v1
if: steps.cache-backend-tests.outputs.cache-hit != 'true'

- name: Install SAML (python3-saml) dependencies
run: |
sudo apt-get update
sudo apt-get install libxml2-dev libxmlsec1-dev libxmlsec1-openssl
- name: Install python dependencies
if: steps.cache-backend-tests.outputs.cache-hit != 'true'
run: |
Expand Down Expand Up @@ -181,7 +186,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.8.14
python-version: 3.9.16
token: ${{ secrets.POSTHOG_BOT_GITHUB_TOKEN }}

- uses: syphar/restore-virtualenv@v1
Expand Down
4 changes: 2 additions & 2 deletions production.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ RUN corepack enable && \
#
# ---------------------------------------------------------
#
FROM python:3.8.14-slim-bullseye AS posthog-build
FROM python:3.9.16-slim-bullseye AS posthog-build
WORKDIR /code
SHELL ["/bin/bash", "-o", "pipefail", "-c"]

Expand Down Expand Up @@ -129,7 +129,7 @@ RUN apt-get update && \
#
# ---------------------------------------------------------
#
FROM python:3.8.14-slim-bullseye
FROM python:3.9.16-slim-bullseye
WORKDIR /code
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
ENV PYTHONUNBUFFERED 1
Expand Down
2 changes: 1 addition & 1 deletion requirements-dev.in
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ types-pytz==2021.3.2
types-redis==4.3.20
types-requests==2.26.1
isort==5.2.2
pytest==6.2.2
pytest==6.2.5
pytest-django==4.1.0
pytest-env==0.6.2
pytest-icdiff==0.5
Expand Down
5 changes: 2 additions & 3 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# This file is autogenerated by pip-compile with python 3.8
# This file is autogenerated by pip-compile with python 3.9
# To update, run:
#
# pip-compile requirements-dev.in
Expand Down Expand Up @@ -125,7 +125,6 @@ idna==2.8
importlib-resources==5.10.2
# via
# -c requirements.txt
# jsonschema
# openapi-spec-validator
inflect==5.6.2
# via datamodel-code-generator
Expand Down Expand Up @@ -229,7 +228,7 @@ pysocks==1.7.1
# via
# -c requirements.txt
# urllib3
pytest==6.2.2
pytest==6.2.5
# via
# -r requirements-dev.in
# pytest-cov
Expand Down
2 changes: 1 addition & 1 deletion runtime.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
python-3.8.14
python-3.9.16

0 comments on commit 1d7afd3

Please sign in to comment.