Skip to content

Commit eeda891

Browse files
authored
Fixes #42: ImportError for safe_join (#41)
1 parent 4cfcfb5 commit eeda891

File tree

5 files changed

+26
-21
lines changed

5 files changed

+26
-21
lines changed

MANIFEST.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@ include README.md
22
include version.txt
33
include requirements.txt
44
include requirements.dev.txt
5+
include docs/source/requirements.txt
56
include LICENSE

docs/source/requirements.txt

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,11 @@
1-
# This requirements.txt is intentionally left blank for RTD build
1+
sphinx==4.4.0
2+
Pallets-Sphinx-Themes>=2.0.2
3+
sphinxcontrib-applehelp==1.0.2
4+
sphinxcontrib-devhelp==1.0.2
5+
sphinxcontrib-htmlhelp>=2.0.0
6+
sphinxcontrib-jsmath==1.0.1
7+
sphinxcontrib-napoleon==0.7
8+
sphinxcontrib-qthelp==1.0.3
9+
sphinxcontrib-serializinghtml>=1.1.5
10+
commonmark
11+
recommonmark

flask_shell2http/classes.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,13 @@
77
from typing import List, Dict, Tuple, Any, Optional
88

99
# web imports
10-
from flask.helpers import safe_join
11-
from werkzeug.utils import secure_filename
1210
from flask_executor.futures import Future
11+
from werkzeug.utils import secure_filename
12+
13+
try:
14+
from flask.helpers import safe_join
15+
except ImportError:
16+
from werkzeug.utils import safe_join
1317

1418
# lib imports
1519
from .helpers import list_replace, gen_key, get_logger, DEFAULT_TIMEOUT

requirements.dev.txt

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,4 @@ tox-gh-actions
55

66
black==22.3.0
77
flake8==3.8.4
8-
pre-commit==2.9.2
9-
10-
Sphinx==3.1.1
11-
Pallets-Sphinx-Themes==1.2.3
12-
sphinxcontrib-applehelp==1.0.2
13-
sphinxcontrib-devhelp==1.0.2
14-
sphinxcontrib-htmlhelp==1.0.3
15-
sphinxcontrib-jsmath==1.0.1
16-
sphinxcontrib-napoleon==0.7
17-
sphinxcontrib-qthelp==1.0.3
18-
sphinxcontrib-serializinghtml==1.1.4
19-
commonmark==0.9.1
20-
recommonmark==0.6.0
8+
pre-commit==2.9.2

tox.ini

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,11 @@ commands =
1010
setenv =
1111
PIP_INDEX_URL = https://pypi.python.org/simple/
1212
deps =
13-
-r requirements.dev.txt
14-
flask1: flask>=1.1.0,<2.0.0
13+
-r requirements.txt
14+
flask_testing
15+
codecov
16+
flask1: flask>=1.1.3,<2.0.0
17+
flask1: markupsafe==2.0.1
1518
flask2: flask>=2.0.0,<3.0.0
1619

1720
[gh-actions]
@@ -24,12 +27,11 @@ python =
2427

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

31-
3234
[testenv:docs-html]
3335
deps =
34-
-r requirements.dev.txt
36+
-r docs/source/requirements.txt
3537
commands = sphinx-build -b html -d docs/build/doctrees docs/source docs/build/html

0 commit comments

Comments
 (0)