Skip to content

Commit

Permalink
Merge branch 'limit-flask-version'
Browse files Browse the repository at this point in the history
  • Loading branch information
amercader committed Oct 16, 2023
2 parents 6ad77b7 + 1f7ebda commit 3f7fc99
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 27 deletions.
8 changes: 2 additions & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ jobs:
test:
strategy:
matrix:
python-version: [2.7, 3.7, 3.8, 3.9, "3.10"]
python-version: [3.7, 3.8, 3.9, "3.10", "3.11"]
fail-fast: false
name: Python ${{ matrix.python-version }}
runs-on: ubuntu-latest
Expand All @@ -13,15 +13,11 @@ jobs:
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install requirements (Python 2)
if: ${{ matrix.python-version == '2.7' }}
run: pip install -r requirements-dev-py2.txt && pip install .
- name: Install requirements (Python 3)
if: ${{ matrix.python-version != '2.7' }}
run: pip install -r requirements-dev.txt && pip install .
- name: Run tests
run: pytest --cov=ckanserviceprovider --cov-append --cov-report=xml --disable-warnings tests
- name: Upload coverage report to codecov
uses: codecov/codecov-action@v1
uses: codecov/codecov-action@v3
with:
file: ./coverage.xml
4 changes: 0 additions & 4 deletions requirements-dev-py2.txt

This file was deleted.

24 changes: 7 additions & 17 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,34 +12,25 @@

install_requires = [
"APScheduler>=2.1.2,<3.10.0",
"Flask>=1.1.1",
"Flask>=1.1.1,<3.0.0",
"Werkzeug>=1.0.0,<3.0.0",
"SQLAlchemy>=1.3.15,<1.4.0",
"requests>=2.23.0",
"future",
]

if sys.version_info[0] < 3:
install_requires.extend(
[
"Werkzeug>=0.16.1,<1.0.0",
"Jinja2<3.0.0",
"flask-login==0.5.0",
]
)
if sys.version_info[1] <= 6:
install_requires.append("flask-login==0.5.0")
else:
if sys.version_info[1] <= 6:
install_requires.append("flask-login==0.5.0")
else:
install_requires.append("flask-login==0.6.0")
install_requires.append("flask-login==0.6.2")

install_requires.append("Werkzeug>=1.0.0")

setup(
name="ckanserviceprovider",
# Versions should comply with PEP440. For a discussion on single-sourcing
# the version across setup.py and the project code, see
# http://packaging.python.org/en/latest/tutorial.html#version
version="1.1.0",
version="1.2.0",
description="A library for making web services that make functions available as synchronous or asynchronous jobs",
long_description=long_description,
long_description_content_type="text/markdown",
Expand All @@ -58,12 +49,11 @@
"License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)",
# Specify the Python versions you support here. In particular, ensure
# that you indicate whether you support Python 2, Python 3 or both.
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
],
# What does your project relate to?
keywords="ckan",
Expand Down
2 changes: 2 additions & 0 deletions tests/test_web.py
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,8 @@ def test_bad_post(self):
}
except AssertionError:
assert json.loads(response.data) == {"error": "Malformed json"}
except json.JSONDecodeError:
assert response.status_code == 415

response = client.post(
"/job", data='{"ffsfsafsa":moo}', content_type="application/json"
Expand Down

0 comments on commit 3f7fc99

Please sign in to comment.