Skip to content

Commit

Permalink
bump starlette to 0.27.0 and minimal python version to 3.7
Browse files Browse the repository at this point in the history
Since python 3.6 reached EOL [1] and starlette having several vulnerabities [2][3][4]
that are fixed in version, where python 3.6 is not supported, we bump to minimal python to 3.7.

[1] https://devguide.python.org/versions/
[2] GHSA-v5gw-mw7f-84px
[3] GHSA-3qj8-93xh-pwh2
[4] GHSA-74m5-2c7w-9w3x
  • Loading branch information
em92 committed Dec 16, 2023
1 parent 4846572 commit 2cf06ca
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 9 deletions.
3 changes: 0 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@ jobs:
matrix:
python-version: ["3.12", "3.11", "3.10", "3.9", "3.8", "3.7"]
os: ["ubuntu-22.04"]
include:
- python-version: "3.6"
os: "ubuntu-20.04"

runs-on: ${{ matrix.os }}
steps:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Usually it is used with [feeder](https://github.com/em92/qlstats-feeder-mini) ba

For qllr itself:

* Python 3.6 with pip
* Python 3.7 with pip
* PostgreSQL 9.5

For feeder:
Expand Down
5 changes: 1 addition & 4 deletions qllr/templating.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,7 @@ def url_for(context: dict, name: str, **path_params: typing.Any) -> str:
for k, v in path_params.items()
if not isinstance(v, Undefined) and v is not None
}
# NOTE: take this stupid hack away, when url_for returns relative path
absolute_url = request.url_for(name, **path_params)
parsed_absolute_url = urlparse(absolute_url)
return ParseResult("", "", *parsed_absolute_url[2:]).geturl()
return str(request.app.url_path_for(name, **path_params))

super().__init__(directory)
self.env.filters["ql_nickname"] = render_ql_nickname
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ psycopg2==2.9.1; python_version < '3.11'
psycopg2==2.9.9; python_version >= '3.11'
trueskill==0.4.4

starlette==0.16.0
starlette==0.27.0;
asyncpg==0.24.0; python_version < '3.11'
asyncpg==0.29.0; python_version >= '3.11'
uvicorn==0.14.0
Expand Down
1 change: 1 addition & 0 deletions requirements_dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@ pytest-cov
git+https://github.com/BrandonNav/testing.postgresql@f849c786eaa9d2c0ff8b2a5f3fb21e96742ec8b6
pylint
flake8
httpx
isort==5.*
black==22.3.0

0 comments on commit 2cf06ca

Please sign in to comment.