Skip to content

Commit

Permalink
chore: LEAP-1275: Bump sentry-sdk to fix vulnerability, py3.13 compat…
Browse files Browse the repository at this point in the history
…ibility, remove py3.8 support (#6534)
  • Loading branch information
jombooth authored Oct 17, 2024
1 parent 9627702 commit 73a2aaa
Show file tree
Hide file tree
Showing 6 changed files with 691 additions and 758 deletions.
21 changes: 6 additions & 15 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,16 @@ env:
jobs:
run_pytest_sqlite:
name: LS SQLite Ubuntu
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
python-version:
- '3.8'
- '3.9'
- '3.10'
- '3.11'
- '3.12'
- '3.13'

env:
DJANGO_SETTINGS_MODULE: core.settings.label_studio
Expand Down Expand Up @@ -54,7 +55,7 @@ jobs:
- name: Install OS dependencies
run: |
sudo apt-get update
sudo apt-get install libffi7 libldap2-dev libsasl2-dev libssl-dev libxml2-dev libxslt-dev python3-dev
sudo apt-get install libffi8 libldap2-dev libsasl2-dev libssl-dev libxml2-dev libxslt-dev python3-dev
- name: Set up Poetry
uses: snok/install-poetry@v1
Expand All @@ -76,7 +77,7 @@ jobs:

run_pytest_postgresql:
name: LS PostgreSQL Ubuntu
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -138,7 +139,7 @@ jobs:
- name: Install OS dependencies
run: |
sudo apt-get update
sudo apt-get install libffi7 libldap2-dev libsasl2-dev libssl-dev libxml2-dev libxslt-dev python3-dev
sudo apt-get install libffi8 libldap2-dev libsasl2-dev libssl-dev libxml2-dev libxslt-dev python3-dev
- name: Set up Poetry
uses: snok/install-poetry@v1
Expand Down Expand Up @@ -176,7 +177,6 @@ jobs:
fail-fast: false
matrix:
python-version:
- '3.8'
- '3.9'

# required for poetry action
Expand Down Expand Up @@ -218,15 +218,6 @@ jobs:
- name: Install Python dependencies
run: poetry install --with test

- name: Fix sqlite.dll for python < 3.9
if: ${{ contains(matrix.python-version, '3.8') }}
run: |
set PYTHONIOENCODING=utf-8
set PYTHONLEGACYWINDOWSSTDIO=utf-8
bash -c "poetry run label-studio init my_project --agree-fix-sqlite --force-fix-sqlite"
cp sqlite3.dll %pythonLocation%/DLLs/sqlite3.dll
shell: cmd

- name: Init project
run: |
set PYTHONIOENCODING=utf-8
Expand Down
108 changes: 0 additions & 108 deletions label_studio/core/utils/windows_sqlite_fix/__init__.py

This file was deleted.

4 changes: 2 additions & 2 deletions label_studio/data_import/uploader.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,9 @@ def create_file_upload(user, project, file):
if settings.SVG_SECURITY_CLEANUP:
content_type, encoding = mimetypes.guess_type(str(instance.file.name))
if content_type in ['image/svg+xml']:
clean_xml = allowlist_svg(instance.file.read())
clean_xml = allowlist_svg(instance.file.read().decode())
instance.file.seek(0)
instance.file.write(clean_xml)
instance.file.write(clean_xml.encode())
instance.file.truncate()
instance.save()
return instance
Expand Down
5 changes: 0 additions & 5 deletions label_studio/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,6 @@
if sys.platform == 'win32':
init(convert=True)

# on windows there will be problems with sqlite and json1 support, so fix it
from label_studio.core.utils.windows_sqlite_fix import windows_dll_fix

windows_dll_fix()

from django.core.management import call_command
from django.core.wsgi import get_wsgi_application
from django.db import DEFAULT_DB_ALIAS, IntegrityError, connections
Expand Down
Loading

0 comments on commit 73a2aaa

Please sign in to comment.