Skip to content

Commit fc78740

Browse files
authored
Upgrade dependencies on v2 banch (#1992)
Fixes #1969 The main goal was upgrading werkzeug for CVE-2024-34069. After switching to python 3.12, it proved more difficult with changes to setuptools, etc. I decided to pull the pyproject from the main, and utilize that, alone with updated dependencies. Small changes were needed in various api changes, notably: - flask change of request_ctx - swagger_ui_bundle version change, default_template_dir change - aiohttp middleware api slightly changed - flask json change, using flask.json.provider I believe these changes will have minimal impact to users, but the changes are likely breaking for some, specifically, the move to latest flask. --------- Signed-off-by: Mike Marchetti <[email protected]>
1 parent 6a859b3 commit fc78740

File tree

116 files changed

+9039
-4850
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

116 files changed

+9039
-4850
lines changed

.github/workflows/pipeline.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
runs-on: ubuntu-latest
1010
strategy:
1111
matrix:
12-
python-version: [3.7, 3.8, 3.9]
12+
python-version: ['3.9', '3.10', '3.11', '3.12']
1313
steps:
1414
- uses: actions/checkout@v2
1515
- name: Set up Python ${{ matrix.python-version }}

.github/workflows/release.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,12 @@ jobs:
1919
python-version: 3.9
2020

2121
- name: Update version
22-
run: sed -i "s/__version__ = .*/__version__ = '${{github.ref_name}}'/" */__init__.py
22+
run: sed -i "s/^version = .*/version = '${{github.ref_name}}'/" pyproject.toml
2323

2424
- name: Build a binary wheel and a source tarball
2525
run: |
26-
pip install --upgrade pip
27-
pip install wheel
28-
python setup.py sdist bdist_wheel
26+
pip install poetry
27+
poetry build
2928
3029
- name: Publish distribution 📦 to Test PyPI
3130
if: github.event_name == 'push'

.pre-commit-config.yaml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
ci:
2+
autoupdate_branch: "main"
3+
autoupdate_schedule: monthly
4+
repos:
5+
- repo: https://github.com/psf/black
6+
rev: 22.3.0
7+
hooks:
8+
- id: black
9+
name: black
10+
files: "^connexion/"
11+
args: ["connexion"]
12+
- id: black
13+
name: black examples
14+
files: "^examples/"
15+
args: ["examples"]
16+
- id: black
17+
name: black tests
18+
files: "^tests/"
19+
args: ["tests"]

.readthedocs.yaml

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,16 @@ version: 2
33
sphinx:
44
configuration: docs/conf.py
55

6-
python:
7-
version: 3.7
8-
install:
9-
- method: pip
10-
path: .
11-
extra_requirements:
12-
- docs
6+
build:
7+
os: "ubuntu-22.04"
8+
tools:
9+
python: "3.9"
10+
jobs:
11+
post_create_environment:
12+
# Install poetry
13+
- python -m pip install poetry
14+
# Tell poetry to not use a virtual environment
15+
- poetry config virtualenvs.create false
16+
post_install:
17+
# Install dependencies with 'docs' dependency group
18+
- VIRTUAL_ENV=$READTHEDOCS_VIRTUALENV_PATH python -m poetry install --with docs --all-extras

connexion/__init__.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,14 @@
1515
from .apps import AbstractApp # NOQA
1616
from .decorators.produces import NoContent # NOQA
1717
from .exceptions import ProblemException # NOQA
18+
1819
# add operation for backwards compatibility
1920
from .operations import compat
2021
from .problem import problem # NOQA
2122
from .resolver import Resolution, Resolver, RestyResolver # NOQA
2223
from .utils import not_installed_error # NOQA
2324

24-
full_name = f'{__package__}.operation'
25+
full_name = f"{__package__}.operation"
2526
sys.modules[full_name] = sys.modules[compat.__name__]
2627

2728

@@ -47,4 +48,4 @@
4748
AioHttpApp = _aiohttp_not_installed_error
4849

4950
# This version is replaced during release process.
50-
__version__ = '2020.0.dev1'
51+
__version__ = "2020.0.dev1"

0 commit comments

Comments
 (0)