From 04654f0b9b8bd41a7b5b7f70bd77badd9f542260 Mon Sep 17 00:00:00 2001 From: Marius Andra Date: Thu, 20 Jun 2024 16:20:12 +0200 Subject: [PATCH 1/6] bump --- hogql_parser/parser.cpp | 1 + hogql_parser/setup.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/hogql_parser/parser.cpp b/hogql_parser/parser.cpp index 20cda905e5ddb..c8cfa36bd2f05 100644 --- a/hogql_parser/parser.cpp +++ b/hogql_parser/parser.cpp @@ -672,6 +672,7 @@ class HogQLParseTreeConverter : public HogQLParserBaseVisitor { } catch (...) { throw; } + PyObject* ret = PyTuple_Pack(2, k, v); if (!ret) { Py_DECREF(k); diff --git a/hogql_parser/setup.py b/hogql_parser/setup.py index 23798607ee400..a13348dff3669 100644 --- a/hogql_parser/setup.py +++ b/hogql_parser/setup.py @@ -32,7 +32,7 @@ setup( name="hogql_parser", - version="1.0.17", + version="1.0.18", url="https://github.com/PostHog/posthog/tree/master/hogql_parser", author="PostHog Inc.", author_email="hey@posthog.com", From 0db08a1c89c41b632b05b5ec46a443d146bc8a78 Mon Sep 17 00:00:00 2001 From: Marius Andra Date: Thu, 20 Jun 2024 16:27:22 +0200 Subject: [PATCH 2/6] shouldn't arm work on github now? --- .github/workflows/build-hogql-parser.yml | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/.github/workflows/build-hogql-parser.yml b/.github/workflows/build-hogql-parser.yml index 73a22754f8994..447cd795d04c2 100644 --- a/.github/workflows/build-hogql-parser.yml +++ b/.github/workflows/build-hogql-parser.yml @@ -70,13 +70,7 @@ jobs: steps: - uses: actions/checkout@v4 - - if: ${{ !endsWith(matrix.os, '-arm') }} - uses: actions/setup-python@v4 - with: - python-version: '3.11' - - - if: ${{ endsWith(matrix.os, '-arm') }} - uses: deadsnakes/action@v3.1.0 # Unfortunately actions/setup-python@v4 just doesn't work on ARM! This does + - uses: actions/setup-python@v4 with: python-version: '3.11' From 26682f7b024584fdcd6d365c6cdbf0482338985f Mon Sep 17 00:00:00 2001 From: Marius Andra Date: Thu, 20 Jun 2024 16:29:35 +0200 Subject: [PATCH 3/6] change --- hogql_parser/parser.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/hogql_parser/parser.cpp b/hogql_parser/parser.cpp index c8cfa36bd2f05..7b9ee59cf94f4 100644 --- a/hogql_parser/parser.cpp +++ b/hogql_parser/parser.cpp @@ -621,7 +621,6 @@ class HogQLParseTreeConverter : public HogQLParserBaseVisitor { throw PyInternalError(); } } - PyObject* body; try { body = visitAsPyObject(ctx->block()); From a5b1bc938ea28265ca1a6321827a106a53463239 Mon Sep 17 00:00:00 2001 From: Marius Andra Date: Thu, 20 Jun 2024 16:34:19 +0200 Subject: [PATCH 4/6] blergh --- .github/workflows/build-hogql-parser.yml | 8 +++++++- hogql_parser/parser.cpp | 1 + 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-hogql-parser.yml b/.github/workflows/build-hogql-parser.yml index 447cd795d04c2..73a22754f8994 100644 --- a/.github/workflows/build-hogql-parser.yml +++ b/.github/workflows/build-hogql-parser.yml @@ -70,7 +70,13 @@ jobs: steps: - uses: actions/checkout@v4 - - uses: actions/setup-python@v4 + - if: ${{ !endsWith(matrix.os, '-arm') }} + uses: actions/setup-python@v4 + with: + python-version: '3.11' + + - if: ${{ endsWith(matrix.os, '-arm') }} + uses: deadsnakes/action@v3.1.0 # Unfortunately actions/setup-python@v4 just doesn't work on ARM! This does with: python-version: '3.11' diff --git a/hogql_parser/parser.cpp b/hogql_parser/parser.cpp index 7b9ee59cf94f4..c8cfa36bd2f05 100644 --- a/hogql_parser/parser.cpp +++ b/hogql_parser/parser.cpp @@ -621,6 +621,7 @@ class HogQLParseTreeConverter : public HogQLParserBaseVisitor { throw PyInternalError(); } } + PyObject* body; try { body = visitAsPyObject(ctx->block()); From 6379d8c623a52f99e37c861850050b3a39c8f618 Mon Sep 17 00:00:00 2001 From: Marius Andra Date: Thu, 20 Jun 2024 16:50:00 +0200 Subject: [PATCH 5/6] try more --- .github/workflows/build-hogql-parser.yml | 22 +++++++++++++++++++--- hogql_parser/parser.cpp | 1 - 2 files changed, 19 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-hogql-parser.yml b/.github/workflows/build-hogql-parser.yml index 73a22754f8994..50bba656efe3b 100644 --- a/.github/workflows/build-hogql-parser.yml +++ b/.github/workflows/build-hogql-parser.yml @@ -75,10 +75,26 @@ jobs: with: python-version: '3.11' + # NOTE: removed because launchpad.net is down + # - if: ${{ endsWith(matrix.os, '-arm') }} + # uses: deadsnakes/action@v3.1.0 # Unfortunately actions/setup-python@v4 just doesn't work on ARM! This does + # with: + # python-version: '3.11' + - if: ${{ endsWith(matrix.os, '-arm') }} - uses: deadsnakes/action@v3.1.0 # Unfortunately actions/setup-python@v4 just doesn't work on ARM! This does - with: - python-version: '3.11' + name: Install Python 3.11 on ARM + run: | + sudo apt-get update + sudo apt-get install -y build-essential libssl-dev zlib1g-dev \ + libncurses5-dev libncursesw5-dev libreadline-dev libsqlite3-dev \ + libgdbm-dev libdb5.3-dev libbz2-dev libexpat1-dev liblzma-dev tk-dev + + wget https://www.python.org/ftp/python/3.11.0/Python-3.11.0.tar.xz + tar -xf Python-3.11.0.tar.xz + cd Python-3.11.0 + ./configure --enable-optimizations + make -j 2 + sudo make altinstall - name: Build sdist if: matrix.os == 'ubuntu-22.04' # Only build the sdist once diff --git a/hogql_parser/parser.cpp b/hogql_parser/parser.cpp index c8cfa36bd2f05..20cda905e5ddb 100644 --- a/hogql_parser/parser.cpp +++ b/hogql_parser/parser.cpp @@ -672,7 +672,6 @@ class HogQLParseTreeConverter : public HogQLParserBaseVisitor { } catch (...) { throw; } - PyObject* ret = PyTuple_Pack(2, k, v); if (!ret) { Py_DECREF(k); From 46be06c2c4954d25371503a70fad0e0a4a465e29 Mon Sep 17 00:00:00 2001 From: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 20 Jun 2024 15:09:07 +0000 Subject: [PATCH 6/6] Use new hogql-parser version --- requirements.in | 2 +- requirements.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements.in b/requirements.in index 14d23d0a3463e..2b69b613263f9 100644 --- a/requirements.in +++ b/requirements.in @@ -93,6 +93,6 @@ phonenumberslite==8.13.6 openai==1.10.0 tiktoken==0.6.0 nh3==0.2.14 -hogql-parser==1.0.14 +hogql-parser==1.0.18 zxcvbn==4.4.28 zstd==1.5.5.1 diff --git a/requirements.txt b/requirements.txt index c31cd102213b6..beaf2e90ff896 100644 --- a/requirements.txt +++ b/requirements.txt @@ -276,7 +276,7 @@ h11==0.13.0 # wsproto hexbytes==1.0.0 # via dlt -hogql-parser==1.0.14 +hogql-parser==1.0.18 # via -r requirements.in httpcore==1.0.2 # via httpx