Skip to content

Commit

Permalink
Merge pull request #689 from FreeTAKTeam/Flask_Werkzeug_Update
Browse files Browse the repository at this point in the history
Flask/Werkzeug Update
  • Loading branch information
naman108 authored Apr 14, 2024
2 parents 9747949 + c762d76 commit 789182e
Show file tree
Hide file tree
Showing 13 changed files with 64 additions and 43 deletions.
13 changes: 7 additions & 6 deletions .github/workflows/python-dev-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,20 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.8'
python-version: '3.11'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
pip install build setuptools poetry
- name: Build and publish
continue-on-error: true
env:
TWINE_USERNAME: ${{ secrets.DEV_PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.DEV_PYPI_PASSWORD }}
POETRY_REPOSITORIES_DEV_URL: http://${{ secrets.DEV_PYPI_ADDRESS }}:8080
POETRY_HTTP_BASIC_DEV_USERNAME: ${{ secrets.DEV_PYPI_USERNAME }}
POETRY_HTTP_BASIC_DEV_PASSWORD: ${{ secrets.DEV_PYPI_PASSWORD }}
run: |
python setup.py sdist bdist_wheel
twine upload --repository-url http://${{ secrets.DEV_PYPI_ADDRESS }}:8080 dist/*
poetry build
poetry publish --repository dev
- name: Clone GuillaumeFalourd/poc-github-actions PUBLIC repository
uses: GuillaumeFalourd/clone-github-repo-action@v2
with:
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -421,4 +421,3 @@ persistence/FTSConfig.yaml
persistence/installation.json
poetry.lock
persistence/FTSConfig.yaml
pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
from sqlalchemy.ext.declarative import declarative_base

ExcheckBase = declarative_base()
class ExcheckBase:
__allow_unmapped__ = True

ExcheckBase = declarative_base(cls=ExcheckBase)
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
from sqlalchemy.ext.declarative import declarative_base

MissionBase = declarative_base()
class MissionBase:
__allow_unmapped__ = True

MissionBase = declarative_base(cls=MissionBase)
5 changes: 4 additions & 1 deletion FreeTAKServer/core/cot_management/persistence/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
from sqlalchemy.ext.declarative import declarative_base

CoTManagementBase = declarative_base()
class COTManagementBase:
__allow_unmapped__ = True

CoTManagementBase = declarative_base(cls=COTManagementBase)
4 changes: 3 additions & 1 deletion FreeTAKServer/core/services/DataPackageServer.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,12 @@
from flask_cors import CORS, cross_origin

from flask_sqlalchemy import SQLAlchemy
from flask import Flask, request, send_file, escape, make_response
from flask import Flask, request, send_file, make_response
from flask.logging import default_handler
from werkzeug.utils import secure_filename

from markupsafe import escape

# Make a connection to the MainConfig object for all routines below
config = MainConfig.instance()

Expand Down
4 changes: 3 additions & 1 deletion FreeTAKServer/core/services/RestAPI.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from flask import Flask, request, jsonify, session, send_file, escape
from flask import Flask, request, jsonify, session, send_file
from flask_sqlalchemy import SQLAlchemy
from flask_socketio import SocketIO, emit
from flask_httpauth import HTTPTokenAuth
Expand All @@ -20,6 +20,8 @@
import zmq
import time

from markupsafe import escape

from digitalpy.core.service_management.digitalpy_service import DigitalPyService
from digitalpy.core.main.object_factory import ObjectFactory
from digitalpy.core.zmanager.response import Response
Expand Down
5 changes: 4 additions & 1 deletion FreeTAKServer/model/SQLAlchemy/Root.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy import create_engine, Column, String, Integer

Base = declarative_base()
class Base:
__allow_unmapped__ = True

Base = declarative_base(cls=Base)

class Root:
uid = Column(String(100))
Original file line number Diff line number Diff line change
Expand Up @@ -141,4 +141,4 @@ def getDataPackageTool(hash):
file = BytesIO()
file.write(data)
file.seek(0)
return send_file(file, as_attachment=True, mimetype=metadata.mime_type, attachment_filename=metadata.file_name)
return send_file(file, as_attachment=True, mimetype=metadata.mime_type, download_name=metadata.file_name)
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,12 @@
from flask_cors import CORS, cross_origin

from flask_sqlalchemy import SQLAlchemy
from flask import Flask, request, send_file, escape, make_response
from flask import Flask, request, send_file, make_response
from flask.logging import default_handler
from werkzeug.utils import secure_filename

from markupsafe import escape

# Make a connection to the MainConfig object for all routines below
config = MainConfig.instance()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,12 @@
from flask_cors import CORS, cross_origin

from flask_sqlalchemy import SQLAlchemy
from flask import Flask, request, send_file, escape, make_response
from flask import Flask, request, send_file, make_response
from flask.logging import default_handler
from werkzeug.utils import secure_filename

from markupsafe import escape

# Make a connection to the MainConfig object for all routines below
config = MainConfig.instance()

Expand Down
30 changes: 15 additions & 15 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "FreeTAKServer"
version = "2.1.3"
version = "2.1.4.4"
description = "An open source server for the TAK family of applications."
authors = ["FreeTAKTeam <FreeTakTeam@gmail.com>"]
readme = "README.md"
Expand All @@ -12,41 +12,41 @@ include = ["FreeTAKServer/**/*.json", "FreeTAKServer/**/*.py", "FreeTAKServer/**
[tool.poetry.dependencies]
python = "^3.11"
bitarray="*"
click="8.0.4"
click=">=8.1.3"
colorama="0.4.4"
cryptography="36.0.2"
bcrypt="3.1.7"
defusedxml="0.7.1"
dnspython="2.2.1"
eventlet="0.33.1"
Flask="1.1.2"
Flask-Cors="3.0.9"
Flask-HTTPAuth="4.2.0"
Flask-Login="0.5.0"
Flask-SocketIO="4.3.1"
Flask-SQLAlchemy="2.4.4"
Flask="3.0.2"
Flask-Cors="4.0.0"
Flask-HTTPAuth="4.8.0"
Flask-Login="0.6.3"
Flask-SocketIO="5.3.6"
Flask-SQLAlchemy="3.1.1"
geographiclib="1.52"
geopy="2.2.0"
greenlet="2.0.2"
itsdangerous="2.0.1"
itsdangerous=">=2.0.1"
testresources="2.0.1"
Jinja2="2.11.2"
Jinja2="3.1.3"
lxml="*"
MarkupSafe="2.0.1"
MarkupSafe="2.1.5"
monotonic="1.6"
pathlib2="2.3.7.post1"
protobuf="3.18.3"
psutil="5.9.4"
pykml="0.2.0"
python-engineio="3.13.2"
python-socketio="4.6.0"
python-engineio="4.9.0"
python-socketio="5.11.1"
PyYAML="6.0"
"ruamel.yaml"="0.17.21"
"ruamel.yaml.clib"="0.2.7"
six="1.16.0"
SQLAlchemy="1.3.20"
SQLAlchemy="2.0.28"
tabulate="0.8.7"
Werkzeug="2.0.3"
Werkzeug="3.0.1"
WTForms="2.3.3"
pyOpenSSL="22.0.0"
qrcode="7.3.1"
Expand Down
25 changes: 13 additions & 12 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,41 +23,42 @@
include_package_data=True,
install_requires=[
"bitarray",
"click==8.0.4",
"click==8.1.7",
"colorama==0.4.4",
"cryptography==36.0.2",
"bcrypt==3.1.7",
"defusedxml==0.7.1",
"dnspython==2.2.1",
"eventlet==0.33.1",
"Flask==1.1.2",
"Flask==3.0.2",
"Flask-Cors==3.0.9",
"Flask-HTTPAuth==4.2.0",
"Flask-Login==0.5.0",
"Flask-SocketIO==4.3.1",
"Flask-SQLAlchemy==2.4.4",
"Flask-HTTPAuth==4.8.0",
"Flask-Login==0.6.3",
"Flask-SocketIO==5.3.6",
"Flask-SQLAlchemy==3.1.1",
"Flask-Classy==0.6.10",
"geographiclib==1.52",
"geopy==2.2.0",
"greenlet==2.0.2",
"itsdangerous==2.0.1",
"itsdangerous==2.1.2",
"testresources==2.0.1",
"Jinja2==2.11.2",
"Jinja2==3.1.3",
"lxml",
"MarkupSafe==2.0.1",
"MarkupSafe==2.1.5",
"monotonic==1.6",
"pathlib2==2.3.7.post1",
"protobuf==3.18.3",
"psutil==5.9.4",
"pykml==0.2.0",
"python-engineio==3.13.2",
"python-engineio==4.9.0",
"python-socketio==4.6.0",
"PyYAML==6.0",
"ruamel.yaml==0.17.21",
"ruamel.yaml.clib==0.2.7",
"six==1.16.0",
"SQLAlchemy==1.3.20",
"SQLAlchemy==2.0.28",
"tabulate==0.8.7",
"Werkzeug==2.0.3",
"Werkzeug==3.0.1",
"WTForms==2.3.3",
"pyOpenSSL==22.0.0",
"qrcode==7.3.1",
Expand Down

0 comments on commit 789182e

Please sign in to comment.