Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid false positive deprecation warning #1550

Closed
wants to merge 20 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.6, 3.7, 3.8, 3.9]
python-version: ['3.7', '3.8', '3.9', '3.10']
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
Expand Down
26 changes: 26 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
ci:
autoupdate_branch: "main"
autoupdate_schedule: monthly
repos:
- repo: https://github.com/PyCQA/flake8
rev: 4.0.1
hooks:
- id: flake8
files: "^connexion/"
additional_dependencies:
- flake8-rst-docstrings==0.2.3
- repo: https://github.com/PyCQA/isort
rev: 5.10.1
hooks:
- id: isort
name: isort
files: "^connexion/"
args: ["--project", "connexion", "--check-only", "--diff"]
- id: isort
name: isort examples
files: "^examples/"
args: ["--thirdparty", "connexion", "--check-only", "--diff"]
- id: isort
name: isort tests
files: "^tests/"
args: ["--project", "conftest", "--thirdparty", "connexion", "--check-only", "--diff"]
3 changes: 1 addition & 2 deletions ARCHITECTURE.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ This document describes the high-level architecture of Connexion.
Apps
----

A Connexion ``App`` or application wraps a specific framework application (currently Flask or
AioHttp) and exposes a standardized interface for users to create and configure their Connexion
A Connexion ``App`` or application wraps a specific framework application (currently Flask) and exposes a standardized interface for users to create and configure their Connexion
application.

While a Connexion app implements the WSGI interface, it only acts ass a pass-through and doesn't
Expand Down
1 change: 0 additions & 1 deletion MAINTAINERS
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
João Santos <joao.santos@zalando.de>
Henning Jacobs <henning.jacobs@zalando.de>
Rafael Caricio <rafael@caricio.com>
Daniel Grossmann-Kavanagh <me@danielgk.com>
Ruwan Lambrichts <ruwan.lambrichts@ml6.eu>
Robbe Sneyders <robbe.sneyders@ml6.eu>
8 changes: 8 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -583,6 +583,14 @@ Contributing to Connexion/TODOs
We welcome your ideas, issues, and pull requests. Just follow the
usual/standard GitHub practices.

For easy development, please install connexion in editable mode with the :code:`tests` extra, and
install the pre-commit hooks.

.. code-block:: bash

pip install -e .[tests]
pre-commit install

You can find out more about how Connexion works and where to apply your changes by having a look
at our `ARCHITECTURE.rst <ARCHITECTURE.rst>`_.

Expand Down
16 changes: 0 additions & 16 deletions connexion/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,16 @@
specified.
"""

import sys

import werkzeug.exceptions as exceptions # NOQA

from .apis import AbstractAPI # NOQA
from .apps import AbstractApp # NOQA
from .decorators.produces import NoContent # NOQA
from .exceptions import ProblemException # NOQA
# add operation for backwards compatibility
from .operations import compat
from .problem import problem # NOQA
from .resolver import Resolution, Resolver, RestyResolver # NOQA
from .utils import not_installed_error # NOQA

full_name = f'{__package__}.operation'
sys.modules[full_name] = sys.modules[compat.__name__]


try:
from flask import request # NOQA

Expand All @@ -38,13 +30,5 @@
App = FlaskApp
Api = FlaskApi

try:
from .apis.aiohttp_api import AioHttpApi
from .apps.aiohttp_app import AioHttpApp
except ImportError as e: # pragma: no cover
_aiohttp_not_installed_error = not_installed_error(e)
AioHttpApi = _aiohttp_not_installed_error
AioHttpApp = _aiohttp_not_installed_error

# This version is replaced during release process.
__version__ = '2020.0.dev1'
3 changes: 2 additions & 1 deletion connexion/apis/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,5 @@
"""


from .abstract import AbstractAPI # NOQA
from .abstract import (AbstractAPI, AbstractRoutingAPI, # NOQA
AbstractSwaggerUIAPI)
Loading