Skip to content

Set flask version requirement to 2.2.4 #384

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 134 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
134 commits
Select commit Hold shift + click to select a range
5b47fc8
Create new process worker script and run it on context creation
bitterpanda63 Mar 20, 2025
6aa778b
Remove INITIALIZE_ROUTE command
bitterpanda63 Mar 21, 2025
ead26f8
Cleanup of process_worker logic
bitterpanda63 Mar 21, 2025
932d840
Create a process_worker and process_worker_loader in thread
bitterpanda63 Mar 21, 2025
c10d834
make thread_cache process-llocal
bitterpanda63 Mar 21, 2025
312c115
Improve route increment stuff
bitterpanda63 Mar 21, 2025
a1f9a25
fix thread_cache_test test cases
bitterpanda63 Mar 21, 2025
a74b346
Fix all test cases that relied on internal thread cache logic
bitterpanda63 Mar 21, 2025
2f08b88
Cleanup thread_cache.py
bitterpanda63 Mar 21, 2025
950849c
make log message make some sense
bitterpanda63 Mar 21, 2025
436f630
fix thread_cache res check and only start process_worker with context
bitterpanda63 Mar 21, 2025
f6d6cfc
Fix broken routes test
bitterpanda63 Mar 21, 2025
3f570f3
Fix django mysql e2e test
bitterpanda63 Mar 25, 2025
f41512e
Also add apispec to e2e test
bitterpanda63 Mar 25, 2025
19c7b62
Total is 3 requests for django_mysql e2e
bitterpanda63 Mar 26, 2025
5b83da4
Fix request_handler
bitterpanda63 Mar 26, 2025
0c929cc
Fix test cases of request_handler
bitterpanda63 Mar 26, 2025
05a87f5
Fix request_handler and it's test cases
bitterpanda63 Mar 26, 2025
4ddd294
Fix broken test case for vulnerability scanner
bitterpanda63 Mar 26, 2025
c43ab2f
validate the firewall lists API response correctly
bitterpanda63 Mar 26, 2025
645e303
Merge remote-tracking branch 'origin/fix/validate-firewall-lists-corr…
bitterpanda63 Mar 26, 2025
61c9ae9
Merge branch 'main' into improve-thread-caching-separated
bitterpanda63 Mar 26, 2025
3d228bb
Merge branch 'main' into improve-thread-caching-separated
bitterpanda63 Apr 1, 2025
960212f
Merge remote-tracking branch 'origin/main' into improve-thread-cachin…
bitterpanda63 Apr 1, 2025
5782587
Improves heartbeat event validation
bitterpanda63 Apr 1, 2025
d3225ba
Merge remote-tracking branch 'origin/main' into improve-thread-cachin…
bitterpanda63 Apr 10, 2025
b08726d
Merge branch 'main' into improve-thread-caching-separated
bitterpanda63 Apr 10, 2025
116d7b2
Test 3.13 as well for unit tests and e2e tests
bitterpanda63 Apr 14, 2025
9d9ad25
Benchmarks for all supported python versions
bitterpanda63 Apr 14, 2025
72cd57d
init tests as a module
bitterpanda63 Apr 14, 2025
8336b97
Refactor pymysql to use wrapt
bitterpanda63 Apr 14, 2025
dde3ba9
(poetry) install wrapt
bitterpanda63 Apr 14, 2025
47058fd
Update subprocess patching
bitterpanda63 Apr 14, 2025
32034d4
pymysql patches change order
bitterpanda63 Apr 14, 2025
7dc0a6f
move back to bottom, python order for pymysql, subprocess
bitterpanda63 Apr 14, 2025
e16b8ed
convert os_system patch
bitterpanda63 Apr 14, 2025
15a28eb
pymongo convert code to wrapt code
bitterpanda63 Apr 14, 2025
23e5fcf
convert mysqlclient
bitterpanda63 Apr 14, 2025
76894de
convert io module
bitterpanda63 Apr 14, 2025
afe9b77
Convert shutil module
bitterpanda63 Apr 14, 2025
142770d
Convert asyncpg module
bitterpanda63 Apr 14, 2025
fb309e7
Convert builtins.py
bitterpanda63 Apr 14, 2025
91ca20d
define new standards for the wrapping
bitterpanda63 Apr 14, 2025
dd9b4b0
update existing modules
bitterpanda63 Apr 14, 2025
9d37dc9
Update io module to use new system
bitterpanda63 Apr 14, 2025
1dab0f2
Update both builtins.py and asyncpg.py to use the new patching system
bitterpanda63 Apr 14, 2025
cffd729
Cleanup checks for builtins and shutil
bitterpanda63 Apr 14, 2025
0196b11
linting for asyncpg.py
bitterpanda63 Apr 14, 2025
6a9711d
Cleanup the patching module
bitterpanda63 Apr 14, 2025
57faa80
Convert os.py
bitterpanda63 Apr 14, 2025
e8c50d3
Update http_client.py sink, adding the @after
bitterpanda63 Apr 14, 2025
87892fd
Update psycopg sink
bitterpanda63 Apr 14, 2025
fa9f54f
convert socket.py to new format
bitterpanda63 Apr 14, 2025
cb37a0c
Fix shutil and shutil test cases
bitterpanda63 Apr 14, 2025
06e7abd
Convert psycopg2 module
bitterpanda63 Apr 14, 2025
6af31a4
update sample app lockfiles
bitterpanda63 Apr 14, 2025
7834861
Update actions/setup-python v2 -> v5
bitterpanda63 Apr 15, 2025
70305bf
Fix @after by removing finally: which was swallowing the error
bitterpanda63 Apr 15, 2025
35c4c82
Fix broken subprocess test cases
bitterpanda63 Apr 15, 2025
3618197
Remove ms checks for starlette benchmark in favour of percentages
bitterpanda63 Apr 15, 2025
31705c1
Exclude psycopg2 testing for python 3.13
bitterpanda63 Apr 15, 2025
3aa49cc
Make sure psycopg2.py implementation is the same as prev one
bitterpanda63 Apr 15, 2025
807b981
Add extra tests for psycopg2 and fix issue for immutables
bitterpanda63 Apr 15, 2025
b8eec8f
use assert_any_call for python 3.13
bitterpanda63 Apr 15, 2025
0aabc2c
Patch os.path.realpath for python 3.13
bitterpanda63 Apr 16, 2025
b29cc3e
Patch os.path.realpath for python 3.13
bitterpanda63 Apr 16, 2025
5a2037c
Merge remote-tracking branch 'origin/python-3.13-support' into python…
bitterpanda63 Apr 16, 2025
f77ec4a
Merge branch 'main' into python-3.13-support
bitterpanda63 May 7, 2025
3408256
Install wrapt
bitterpanda63 May 8, 2025
d3412b1
Create new helpers for wrapping in __init__.py of sinks
bitterpanda63 May 8, 2025
6eccd2a
update sample app lockfiles
bitterpanda63 Apr 14, 2025
ced22e0
Test 3.13 as well for unit tests and e2e tests
bitterpanda63 Apr 14, 2025
57a9933
Benchmarks for all supported python versions
bitterpanda63 Apr 14, 2025
58ae355
init tests as a module
bitterpanda63 Apr 14, 2025
7bdbd7f
Update actions/setup-python v2 -> v5
bitterpanda63 Apr 15, 2025
85f6375
Remove ms checks for starlette benchmark in favour of percentages
bitterpanda63 Apr 15, 2025
8815799
Merge branch 'python-3.13-support' into update-wrapping-to-wrapt-for-…
bitterpanda63 May 8, 2025
bca7615
Remove package tracking for gunicorn and uwsgi (should be standard)
bitterpanda63 May 9, 2025
9753e66
Update django wrapper to use wrapt
bitterpanda63 May 9, 2025
71b7837
Django cleanup and expand comments
bitterpanda63 May 12, 2025
c2aaf1b
Create a before_async decorator for patching
bitterpanda63 May 12, 2025
0592bc9
Add "django" as a module name
bitterpanda63 May 12, 2025
b819164
Cleanup starlette's __init__.py code
bitterpanda63 May 12, 2025
f34a8ca
Refactor starlette.applications wrapping
bitterpanda63 May 12, 2025
2f714f9
Fix previous mistakes with module not being ref'd in starlette_app's.py
bitterpanda63 May 12, 2025
87f02e9
Port the starlette_routing wrapper
bitterpanda63 May 12, 2025
6f192f6
Also mention starlette package in starlette_routing
bitterpanda63 May 12, 2025
3694a47
Create new @before_modifies_return
bitterpanda63 May 12, 2025
bb64651
Port flask.py to the new wrapt way
bitterpanda63 May 12, 2025
ab6820d
Cleanup flask.py imports
bitterpanda63 May 12, 2025
abb76e6
linting
bitterpanda63 May 12, 2025
599193c
Fix packages log message coming up for packages that were not imported
bitterpanda63 May 12, 2025
4a650f1
Merge branch 'update-wrapping-to-wrapt-for-sinks' into update-wrappin…
bitterpanda63 May 12, 2025
6ce82ad
remove try-finally for return, which was swallowing error
bitterpanda63 May 12, 2025
72ca824
Flask patch, get correct "environ" variable
bitterpanda63 May 12, 2025
4b7d16e
Fix starlette bugs encountered after testing
bitterpanda63 May 12, 2025
fd61d00
Update quart patches to use new system
bitterpanda63 May 12, 2025
d27c4cb
Remove checks for who wrote response (not necessary)
bitterpanda63 May 12, 2025
0f3776b
Merge remote-tracking branch 'origin/main' into improved-wrapping-main
bitterpanda63 May 13, 2025
d0207d8
Merge branch 'improved-wrapping-main' into create-new-wrapt-wrapping-…
bitterpanda63 May 13, 2025
239154c
Merge branch 'create-new-wrapt-wrapping-system' into update-sample-ap…
bitterpanda63 May 13, 2025
d4c223a
Merge branch 'update-sample-apps-lockfiles' into update-workflows-and…
bitterpanda63 May 13, 2025
7f8ede1
Merge branch 'update-workflows-and-benchmarks' into update-wrapping-t…
bitterpanda63 May 13, 2025
fdaa366
Merge branch 'update-wrapping-to-wrapt-for-sinks' into update-wrappin…
bitterpanda63 May 13, 2025
0f114f0
lxml.py use new wrapping system
bitterpanda63 May 13, 2025
08890d0
Update xml.py to use new wrapping system
bitterpanda63 May 13, 2025
86e4e4a
Fix import mismatches for `@on_import`
bitterpanda63 May 13, 2025
f628de7
Merge branch 'update-wrapping-to-wrapt-for-sinks' into update-wrappin…
bitterpanda63 May 13, 2025
2f1d282
delete importhook/
bitterpanda63 May 13, 2025
44ad5ad
Only try to create 4 threads for wrk
bitterpanda63 May 13, 2025
f139c6c
Use constans from ruby for wrk benchmark
bitterpanda63 May 13, 2025
7151257
Merge pull request #363 from AikidoSec/create-new-wrapt-wrapping-system
willem-delbare May 14, 2025
91f87c2
Merge pull request #364 from AikidoSec/update-sample-apps-lockfiles
willem-delbare May 14, 2025
9c93a37
Merge pull request #365 from AikidoSec/update-workflows-and-benchmarks
willem-delbare May 14, 2025
a762233
Merge branch 'main' into improved-wrapping-main
bitterpanda63 May 14, 2025
64db050
Merge branch 'improved-wrapping-main' into update-wrapping-to-wrapt-f…
bitterpanda63 May 14, 2025
faa4fe7
Merge branch 'update-wrapping-to-wrapt-for-sinks' into update-wrappin…
bitterpanda63 May 14, 2025
0975306
Merge branch 'update-wrapping-to-wrapt-for-sources' into remove-impor…
bitterpanda63 May 14, 2025
3ed0ab7
Merge branch 'main' into improved-wrapping-main
bitterpanda63 May 14, 2025
20f3b8e
Merge branch 'improved-wrapping-main' into update-wrapping-to-wrapt-f…
bitterpanda63 May 14, 2025
225663d
Merge branch 'update-wrapping-to-wrapt-for-sinks' into update-wrappin…
bitterpanda63 May 14, 2025
82e115c
Merge branch 'update-wrapping-to-wrapt-for-sources' into remove-impor…
bitterpanda63 May 14, 2025
6224a8f
Merge remote-tracking branch 'origin/main' into improved-wrapping-main
bitterpanda63 May 15, 2025
b102ba4
poetry lock
bitterpanda63 May 15, 2025
4cdad74
Merge branch 'improved-wrapping-main' into update-wrapping-to-wrapt-f…
bitterpanda63 May 15, 2025
18be2a0
Merge branch 'update-wrapping-to-wrapt-for-sinks' into update-wrappin…
bitterpanda63 May 15, 2025
63f8e56
Merge branch 'update-wrapping-to-wrapt-for-sources' into remove-impor…
bitterpanda63 May 15, 2025
edda5ff
Zen update xml.py to also patch fromstring/fromstringlist
bitterpanda63 May 16, 2025
3bd02a3
Merge branch 'main' into improved-wrapping-main
bitterpanda63 May 16, 2025
1eb2141
Merge branch 'improved-wrapping-main' into update-wrapping-to-wrapt-f…
bitterpanda63 May 16, 2025
44fafb1
Merge branch 'update-wrapping-to-wrapt-for-sinks' into update-wrappin…
bitterpanda63 May 16, 2025
63a1106
Merge branch 'update-wrapping-to-wrapt-for-sources' into remove-impor…
bitterpanda63 May 16, 2025
e6f699f
Flask version requirement from 2.2.4 -> 2.3.0
bitterpanda63 May 19, 2025
d94be18
Set flask to version 2.2.4 in flask-postgres
bitterpanda63 May 19, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 21 additions & 6 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
name: Benchmark
name: 📊 Benchmarks
on:
push: {}
workflow_call: {}

jobs:
benchmark_sql_algorithm:
runs-on: ubuntu-latest
Expand All @@ -13,7 +14,7 @@ jobs:
working-directory: ./sample-apps/databases
run: docker compose up --build -d
- name: Set up Python 3.9
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: 3.9

Expand All @@ -30,15 +31,24 @@ jobs:
run: |
poetry run python ./benchmarks/sql_benchmark/sql_benchmark_fw.py
poetry run python ./benchmarks/sql_benchmark/sql_benchmark_no_fw.py

benchmark_with_flask_mysql:
runs-on: ubuntu-latest
timeout-minutes: 10
strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Start databases
working-directory: ./sample-apps/databases
run: docker compose up --build -d
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies & build
run: |
python -m pip install --upgrade pip
Expand All @@ -51,15 +61,24 @@ jobs:
- name: Run flask-mysql k6 Benchmark
run: |
k6 run -q ./benchmarks/flask-mysql-benchmarks.js

benchmark_with_starlette_app:
runs-on: ubuntu-latest
timeout-minutes: 10
strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Start databases
working-directory: ./sample-apps/databases
run: docker compose up --build -d
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies & build
run: |
python -m pip install --upgrade pip
Expand All @@ -71,9 +90,5 @@ jobs:
run: |
sudo apt-get update
sudo apt-get install -y wrk
- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Run benchmark
run: python ./benchmarks/starlette_benchmark.py
4 changes: 2 additions & 2 deletions .github/workflows/end2end.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
- { name: flask-postgres-xml, testfile: end2end/flask_postgres_xml_lxml_test.py }
- { name: quart-postgres-uvicorn, testfile: end2end/quart_postgres_uvicorn_test.py }
- { name: starlette-postgres-uvicorn, testfile: end2end/starlette_postgres_uvicorn_test.py }
python-version: ["3.10", "3.11", "3.12"]
python-version: ["3.10", "3.11", "3.12", "3.13"]
steps:
- name: Install packages
run: sudo apt update && sudo apt install python3-dev libmysqlclient-dev
Expand All @@ -53,7 +53,7 @@ jobs:
docker run --name mock_core -d -p 5000:5000 mock_core

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: '3.x'

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/smoke-test-ffi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: 3.12

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/unit-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
# Don't cancel jobs if one fails
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
steps:
- name: Checkout code
uses: actions/checkout@v4
Expand All @@ -22,7 +22,7 @@ jobs:
run: |
sudo echo "127.0.0.1 local.aikido.io" | sudo tee -a /etc/hosts
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

Expand Down
3 changes: 0 additions & 3 deletions aikido_zen/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,6 @@ def protect(mode="daemon"):
import aikido_zen.sources.xml_sources.xml
import aikido_zen.sources.xml_sources.lxml

import aikido_zen.sources.gunicorn
import aikido_zen.sources.uwsgi

# Import DB Sinks
import aikido_zen.sinks.pymysql
import aikido_zen.sinks.mysqlclient
Expand Down
2 changes: 1 addition & 1 deletion aikido_zen/background_process/packages.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def is_package_compatible(package=None, required_version=ANY_VERSION, packages=N
return True

# No match found
logger.info("Zen does not support %s", packages)
logger.info("Zen does not support current version of %s", "/".join(packages))
return False
except Exception as e:
logger.debug("Exception occurred in is_package_compatible: %s", e)
Expand Down
166 changes: 0 additions & 166 deletions aikido_zen/importhook/__init__.py

This file was deleted.

55 changes: 0 additions & 55 deletions aikido_zen/importhook/finder.py

This file was deleted.

Loading
Loading