Skip to content

Commit

Permalink
Merge pull request #39 from maximlt/support_python_39
Browse files Browse the repository at this point in the history
  • Loading branch information
AlbertDeFusco authored Dec 11, 2021
2 parents 9b4a738 + eb488ea commit 9b39c4f
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
fail-fast: false
matrix:
os: ["ubuntu-latest", "macos-latest", "windows-latest"]
python-version: ["3.5", "3.6", "3.7", "3.8"]
python-version: ["3.5", "3.6", "3.7", "3.8", "3.9"]
steps:
- uses: actions/checkout@v2
- uses: conda-incubator/setup-miniconda@v2
Expand All @@ -55,4 +55,4 @@ jobs:
uses: codecov/codecov-action@v1
with:
file: ./cov.xml
env_vars: OS,PYTHON
env_vars: OS,PYTHON
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ The package is available for all Mac, Linux, and Windows on my conda channel. Py

Tranquilizer can be used with either Jupyter Notebooks (`.ipynb`) or Python script files (`.py`).

The decorated function below will be served as an end point called `cheese` with the GET method. The
The decorated function below will be served as an end point called `order` with the GET method. The
function must return a JSON serializable object.

See the [complete description of `@tranquilize()`](#tranquilize-decorator) below.
Expand All @@ -28,7 +28,7 @@ def order(cheese):
return "I'm afraid we're fresh out of {}, Sir.".format(cheese)
```

The REST API is served by [Flask](http://flask.pocoo.org/) and [Flask-RESTX](https://flask-restx.readthedocs.io/en/latest/)
The REST API is served by [Flask](https://flask.palletsprojects.com) and [Flask-RESTX](https://flask-restx.readthedocs.io/en/latest/)
using the `tranquilizer` command.


Expand Down Expand Up @@ -64,7 +64,7 @@ Out[3]: '"I\'m afraid we\'re fresh out of cheddar, Sir."\n'
The *tranquilized* API is documented with [Swagger](https://swagger.io/tools/open-source/) and is accessible
in your web browser at [http://localhost:8086](http://localhost:8086).

![](img/swagger.png)
![](https://raw.githubusercontent.com/ContinuumIO/tranquilizer/9b4a738d1f24af7f4c2397d43454e0fe2ee5e86b/img/swagger.png)

## Tranquilize Decorator

Expand Down
4 changes: 2 additions & 2 deletions conda.recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ build:

requirements:
run:
- python >=3.5, <3.9
- python >=3.5, <3.10
- flask
- werkzeug >=0.15, <2.0
- python-dateutil
- flask-restx
- flask-cors
build:
- python >=3.5, <3.9
- python >=3.5, <3.10
- setuptools

test:
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ addopts =
--cov-report=term-missing
--cov-report=xml:cov.xml
--tb native
--strict
--strict-markers
--durations=20
env =
PYTHONHASHSEED=0
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
"Intended Audience :: Developers",
"Environment :: Web Environment"
],
python_requires=">=3.5, <3.9",
python_requires=">=3.5, <3.10",
install_requires=install_requires,
extras_require=extras_require,
include_package_data=True,
Expand Down
8 changes: 4 additions & 4 deletions tranquilizer/decorator.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
from inspect import signature
import re

PARAM_REGEX = re.compile(":param (?P<name>[\*\w]+): (?P<doc>.*?)"
"(?:(?=:param)|(?=:return)|(?=:raises)|\Z)", re.S)
RAISE_REGEX = re.compile(":raise[s]? (?P<name>[\*\w]+): (?P<doc>.*?)"
"(?:(?=:param)|(?=:return)|(?=:raise[s]?)|\Z)", re.S)
PARAM_REGEX = re.compile(r":param (?P<name>[\*\w]+): (?P<doc>.*?)"
r"(?:(?=:param)|(?=:return)|(?=:raises)|\Z)", re.S)
RAISE_REGEX = re.compile(r":raise[s]? (?P<name>[\*\w]+): (?P<doc>.*?)"
r"(?:(?=:param)|(?=:return)|(?=:raise[s]?)|\Z)", re.S)

def _prepare_arg(arg):
'''Return a keyword arg spec (dict)'''
Expand Down

0 comments on commit 9b39c4f

Please sign in to comment.