Skip to content

Commit

Permalink
Merge branch 'python13'
Browse files Browse the repository at this point in the history
  • Loading branch information
aszs committed Nov 12, 2024
2 parents c194425 + 7528aee commit 3ee0b68
Show file tree
Hide file tree
Showing 19 changed files with 964 additions and 2,210 deletions.
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ typing_extensions>=4.7
flask==2.3.3 # BSD 3-clause
flask-caching<=2.0.1 # BSD 3-clause
flask_cors==5.0.0
waitress>=3.0.0 # Zope ZPL 2.1
waitress # Zope ZPL 2.1
python-gitlab==3.13.0
tosca>=0.0.8
tenacity>=6.1.0 # Apache-2.0
2 changes: 1 addition & 1 deletion server-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
gunicorn==22.0.0
redis==4.3.5
redis==4.4.4
10 changes: 5 additions & 5 deletions unfurl/server/gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
from ..util import UnfurlError, unique_name
from .gui_variables import set_variables, yield_variables

from flask import request, Response, jsonify, send_file, make_response
from flask import request, Response, jsonify, send_from_directory, make_response
from jinja2 import Environment, FileSystemLoader
import requests
import re
Expand Down Expand Up @@ -116,7 +116,7 @@ def serve_document(
repo = _get_repo(projectPath, localenv)

if not repo:
return send_file(os.path.join(public_files_dir, "404.html"))
return send_from_directory(public_files_dir, "404.html")
format = "environments"
# assume serving dashboard unless an /-/overview url
if (
Expand Down Expand Up @@ -328,7 +328,7 @@ def get_repo(project_path: str, branch=None):

def notfound_response(projectPath):
# 404 page is not currently a template, but could become one
return send_file(os.path.join(public_files_dir, "404.html"))
return send_from_directory(public_files_dir, "404.html")

@app.route("/<path:project_path>/-/variables", methods=["GET"])
def get_variables(project_path):
Expand Down Expand Up @@ -370,7 +370,7 @@ def local_file(project_path, branch, file):
if repo:
full_path = os.path.join(repo.working_dir, file)
if os.path.exists(full_path):
return send_file(full_path)
return send_from_directory(repo.working_dir, file)
return notfound_response(project_path)

@app.route("/", defaults={"path": ""})
Expand All @@ -392,7 +392,7 @@ def serve_path(path):
assert path and path[0] != "/"
local_path = os.path.join(dist_dir, path)
if os.path.isfile(local_path):
response = make_response(send_file(local_path))
response = make_response(send_from_directory(dist_dir, path))
if not development_mode:
response.headers["Cache-Control"] = (
"public, max-age=31536000" # 1 year
Expand Down
2 changes: 1 addition & 1 deletion unfurl/server/templates/skeleton.j2.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<!DOCTYPE html>
<html lang="en">

<title>Unfurl {{name}}</title>
{{head}}

<body class="ui-indigo tab-width-8 gl-browser-chrome gl-platform-mac gl-dark">
Expand Down
4 changes: 2 additions & 2 deletions unfurl/templates/python3.10/Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ typing-extensions = ">=4.7"
flask = "==2.3.3"
flask-caching = "<=2.0.1"
flask-cors = "==5.0.0"
waitress = ">=3.0.0"
waitress = ">=3.0.1"
python-gitlab = "==3.13.0"
tosca = ">=0.0.8"
tenacity = ">=6.1.0"
Expand All @@ -38,7 +38,7 @@ supervisor = "*"
google-cloud-compute = "==1.3.2"
google-cloud-dns = "==0.34.0"
google-auth = "*"
gunicorn = "==20.1.0"
gunicorn = "==22.0.0"
redis = "==4.4.4"

[dev-packages]
Expand Down
335 changes: 179 additions & 156 deletions unfurl/templates/python3.10/Pipfile.lock

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions unfurl/templates/python3.11/Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ typing-extensions = ">=4.7"
flask = "==2.3.3"
flask-caching = "<=2.0.1"
flask-cors = "==5.0.0"
waitress = ">=3.0.0"
waitress = ">=3.0.1"
python-gitlab = "==3.13.0"
tosca = ">=0.0.8"
tenacity = ">=6.1.0"
Expand All @@ -38,7 +38,7 @@ supervisor = "*"
google-cloud-compute = "==1.3.2"
google-cloud-dns = "==0.34.0"
google-auth = "*"
gunicorn = "==20.1.0"
gunicorn = "==22.0.0"
redis = "==4.4.4"

[dev-packages]
Expand Down
323 changes: 173 additions & 150 deletions unfurl/templates/python3.11/Pipfile.lock

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions unfurl/templates/python3.12/Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ typing-extensions = ">=4.7"
flask = "==2.3.3"
flask-caching = "<=2.0.1"
flask-cors = "==5.0.0"
waitress = ">=3.0.0"
waitress = ">=3.0.1"
python-gitlab = "==3.13.0"
tosca = ">=0.0.8"
tenacity = ">=6.1.0"
Expand All @@ -38,7 +38,7 @@ supervisor = "*"
google-cloud-compute = "==1.3.2"
google-cloud-dns = "==0.34.0"
google-auth = "*"
gunicorn = "==20.1.0"
gunicorn = "==22.0.0"
redis = "==4.4.4"

[dev-packages]
Expand Down
323 changes: 173 additions & 150 deletions unfurl/templates/python3.12/Pipfile.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion unfurl/templates/python3.13/Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ typing-extensions = ">=4.7"
flask = "==2.3.3"
flask-caching = "<=2.0.1"
flask-cors = "==5.0.0"
waitress = ">=3.0.0"
waitress = ">=3.0.1"
python-gitlab = "==3.13.0"
tosca = ">=0.0.8"
tenacity = ">=6.1.0"
Expand Down
317 changes: 170 additions & 147 deletions unfurl/templates/python3.13/Pipfile.lock

Large diffs are not rendered by default.

49 changes: 0 additions & 49 deletions unfurl/templates/python3.7/Pipfile

This file was deleted.

Loading

0 comments on commit 3ee0b68

Please sign in to comment.