Skip to content

Commit

Permalink
Fixes #42: ImportError for safe_join (#41)
Browse files Browse the repository at this point in the history
  • Loading branch information
madhavajay authored Apr 29, 2022
1 parent 4cfcfb5 commit eeda891
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 21 deletions.
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ include README.md
include version.txt
include requirements.txt
include requirements.dev.txt
include docs/source/requirements.txt
include LICENSE
12 changes: 11 additions & 1 deletion docs/source/requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1,11 @@
# This requirements.txt is intentionally left blank for RTD build
sphinx==4.4.0
Pallets-Sphinx-Themes>=2.0.2
sphinxcontrib-applehelp==1.0.2
sphinxcontrib-devhelp==1.0.2
sphinxcontrib-htmlhelp>=2.0.0
sphinxcontrib-jsmath==1.0.1
sphinxcontrib-napoleon==0.7
sphinxcontrib-qthelp==1.0.3
sphinxcontrib-serializinghtml>=1.1.5
commonmark
recommonmark
8 changes: 6 additions & 2 deletions flask_shell2http/classes.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,13 @@
from typing import List, Dict, Tuple, Any, Optional

# web imports
from flask.helpers import safe_join
from werkzeug.utils import secure_filename
from flask_executor.futures import Future
from werkzeug.utils import secure_filename

try:
from flask.helpers import safe_join
except ImportError:
from werkzeug.utils import safe_join

# lib imports
from .helpers import list_replace, gen_key, get_logger, DEFAULT_TIMEOUT
Expand Down
14 changes: 1 addition & 13 deletions requirements.dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,4 @@ tox-gh-actions

black==22.3.0
flake8==3.8.4
pre-commit==2.9.2

Sphinx==3.1.1
Pallets-Sphinx-Themes==1.2.3
sphinxcontrib-applehelp==1.0.2
sphinxcontrib-devhelp==1.0.2
sphinxcontrib-htmlhelp==1.0.3
sphinxcontrib-jsmath==1.0.1
sphinxcontrib-napoleon==0.7
sphinxcontrib-qthelp==1.0.3
sphinxcontrib-serializinghtml==1.1.4
commonmark==0.9.1
recommonmark==0.6.0
pre-commit==2.9.2
12 changes: 7 additions & 5 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,11 @@ commands =
setenv =
PIP_INDEX_URL = https://pypi.python.org/simple/
deps =
-r requirements.dev.txt
flask1: flask>=1.1.0,<2.0.0
-r requirements.txt
flask_testing
codecov
flask1: flask>=1.1.3,<2.0.0
flask1: markupsafe==2.0.1
flask2: flask>=2.0.0,<3.0.0

[gh-actions]
Expand All @@ -24,12 +27,11 @@ python =

# Configuration for coverage and flake8 is being set in `./setup.cfg`
[testenv:codecov]
passenv = TOXENV CI TRAVIS TRAVIS_* CODECOV_*
passenv = TOXENV CI CODECOV_*
commands = codecov -e TOXENV
deps = codecov>=2.1.10


[testenv:docs-html]
deps =
-r requirements.dev.txt
-r docs/source/requirements.txt
commands = sphinx-build -b html -d docs/build/doctrees docs/source docs/build/html

0 comments on commit eeda891

Please sign in to comment.