Skip to content

Commit

Permalink
dependencies: Flask 2
Browse files Browse the repository at this point in the history
* Updates dependencies for Flask2.
* Corrects problems from newer modules.

Co-Authored-by: Peter Weber <peter.weber@rero.ch>
  • Loading branch information
rerowep committed Nov 21, 2023
1 parent 9154312 commit 0bf7d52
Show file tree
Hide file tree
Showing 56 changed files with 1,378 additions and 1,165 deletions.
2,078 changes: 1,133 additions & 945 deletions poetry.lock

Large diffs are not rendered by default.

86 changes: 50 additions & 36 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,22 +30,50 @@ uwsgitop = ">=0.11"

## Third party invenio modules used by RERO ILS
invenio-oaiharvester = { git = "https://github.com/inveniosoftware/invenio-oaiharvester.git", tag = "v1.0.0a4" }
invenio-circulation = { git = "https://github.com/inveniosoftware/invenio-circulation.git", tag = "v1.0.0a36" }

## Invenio 3.4 base modules used by RERO ILS
# same as invenio metadata extras without invenio-search-ui
invenio-indexer = ">=1.2.0,<1.3.0"
invenio-jsonschemas = ">=1.1.1,<1.2.0"
invenio-pidstore = ">=1.2.1,<1.3.0"
invenio-records-rest = ">=1.8.0,<1.9.0"
invenio-circulation = { git = "https://github.com/rerowep/invenio-circulation.git", branch = "wep-invenio-records-2" }
#invenio-circulation = { git = "https://github.com/inveniosoftware/invenio-circulation.git", tag = "v2.0.0.a1" }

invenio-search = {version = ">=2.1.0,<3.0.0", extras = ["elasticsearch7"]}
# Invenio core modules
invenio-app = ">=1.3.4,<1.4.0"
invenio-base = ">=1.2.11,<1.3.0"
invenio-cache = ">=1.1.1,<1.2.0"
invenio-celery = ">=1.2.4,<1.3.0"
invenio-config = ">=1.0.3,<1.1.0"
invenio-i18n = ">=2.0.0,<3.0.0"
invenio-db = {version = ">=1.1.0,<1.2.0", extras = ["postgresql"]}
# Invenio base bundle
invenio-admin = ">=1.4.0,<1.5.0"
invenio-assets = ">=3.0.0,<4.0.0"
invenio-formatter = ">=2.0.0,<3.0.0"
invenio-logging = {version = ">=2.0.0,<3.0.0"}
invenio-mail = ">=2.0.0,<3.0.0"
invenio-rest = ">=1.3.0,<1.4.0"
invenio-theme = ">=2.0.0,<3.0.0"
# Invenio auth bundle
invenio-access = ">=2.0.0,<3.0.0"
invenio-accounts = ">=3.0.0,<4.0.0"
invenio-oauth2server = ">=2.0.0,<3.0.0"
invenio-oauthclient = ">=3.0.0,<4.0.0"
invenio-userprofiles = ">=2.3.0,<3.0.0"
# Invenio metadata bundle
invenio-indexer = ">=2.2.0,<3.0.0"
invenio-jsonschemas = ">=1.1.4,<1.2.0"
invenio-oaiserver = ">=2.2.0,<2.3.0"
invenio-pidstore = ">=1.3.0,<1.4.0"
invenio-records-rest = ">=2.2.0,<2.3.0"
invenio-records-ui = ">=1.2.0,<1.3.0"
invenio-records = ">=1.4.0,<1.7.0"
invenio-records = "2.1.0,<2.2.0"
invenio-search-ui = ">=2.4.0,<3.0.0"

## Default from Invenio
invenio = {version = ">=3.4.0,<3.5.0", extras = ["base", "postgresql", "auth", "elasticsearch7", "docs", "tests" ]}
invenio-records-permissions = ">=0.13.0"

# TODO: jsonschema 4.0.0 is not working with invenio because there is a new parameter type!
jsonschema = "<4.0.0"
# Pinned due to before_first_request deprecation https://flask.palletsprojects.com/en/2.2.x/api/#flask.Flask.before_first_request
Flask = ">=2.2.0,<2.3.0"
sentry-sdk = ">=1.0.0" # normaly in invenio-logging = {version = ">=2.0.0,<3.0.0", extras = ["sentry_sdk"]}
dojson = ">=1.4.0"
# TODO: dojson problem = AttributeError: 'Group' object has no attribute 'resultcallback'
click = "<8.1.0"

## RERO ILS specific python modules
PyYAML = ">=5.3.1"
Expand All @@ -58,62 +86,50 @@ redisbeat = ">1.2.5, <1.3.0"
jsonpickle = ">=1.4.1"
ciso8601 = "*"
# TODO: to be removed when the thumbnail will be refactored
invenio-userprofiles = {git = "https://github.com/rero/invenio-userprofiles.git", tag = "v1.2.1-rero2.0"}
# invenio-userprofiles = {git = "https://github.com/rero/invenio-userprofiles.git", tag = "v1.2.1-rero2.0"}


## Additionnal constraints on python modules
markdown-captions = "*"
zipp = "*"

## Deployment
# sentry
invenio-logging = { version = ">=1.3.0,<1.4.0", extras = ["sentry-sdk", "sentry"] }
python-dotenv = ">=0.13.0"
pydocstyle = ">=6.1.1"

## Third party optional modules used by RERO ILS
invenio-sip2 = ">=0.6.16"
flask-cors = ">3.0.8"
celery = ">=5.0.0"
cryptography = ">38.0.2,<40.0"
# invenio-sip2 = ">=0.6.21"
freezegun = "^1.1.0"
lazyreader = ">1.0.0"
jinja2 = ">2.11.2"
jsonmerge = "^1.8.0"
num2words = "^0.5.10"
Flask = "<2.0.0"
iso639 = "^0.1.4"
dcxml = "^0.1.2"
DeepDiff = "^5.5.0"
docutils = "<0.18.0"
wtforms = "<3.0.0"
flask-wtf = "<1.0.0"
# TODO: ImportError: cannot import name 'soft_unicode' from 'markupsafe'
markupsafe = "<2.1.0"
poethepoet = "^0.12.3"
flask-wiki = "^0.2.2"
pytest-invenio = ">=1.4.0,<1.4.12"
# to avoid conflict for urllib3
sentry-sdk = "<1.6.1"
dparse = ">=0.5.2"
Mako = ">=1.2.2"
rero-invenio-base = "^0.2.1"
rero-invenio-base = { git = "https://github.com/rerowep/rero-invenio-base.git", branch = "wep-fix-dependencies" }
# rero-invenio-base = "^0.2.1"
jsonref = "<1.0.0"
dojson = "^1.4.0"
jsonresolver = "<0.3.2"
pydocstyle = ">=6.1.1,<6.2"
# to solve: pytz
setuptools = "<67.0.0"
invenio-records-permissions = "^0.13.0"
# needed for elasticsearch 7.13.4
urllib3 = "<2.0.0"

[tool.poetry.dev-dependencies]
## Python packages development dependencies (order matters)
#----------------------------------------------------------
## Default from Invenio
pytest-invenio = ">=1.4.0,<1.5.0"
pytest-invenio = ">=1.4.0,<1.4.12"
# pytest-invenio = ">=2.1.0,<3.0.0"
# TODO: ther is a problem with sphinx 3.4.2
# RuntimeError: Working outside of application context.
Sphinx = ">=3,<3.4.2"
Sphinx = ">=4.5.0"
Flask-Debugtoolbar = ">=0.10.1"
## RERO ILS specific python packages
safety = ">=1.8"
Expand Down Expand Up @@ -176,7 +192,6 @@ notifications = "rero_ils.modules.notifications.views:blueprint"
patron_types = "rero_ils.modules.patron_types.views:blueprint"
patrons = "rero_ils.modules.patrons.views:api_blueprint"
permissions ="rero_ils.modules.views:api_blueprint"
rero_ils = "rero_ils.modules.views:api_blueprint"
users = "rero_ils.modules.users.api_views:api_blueprint"

[tool.poetry.plugins."invenio_base.apps"]
Expand All @@ -193,7 +208,6 @@ item_types = "rero_ils.modules.item_types.views:blueprint"
notifications = "rero_ils.modules.notifications.views:blueprint"
patron_types = "rero_ils.modules.patron_types.views:blueprint"
patrons = "rero_ils.modules.patrons.views:blueprint"
rero_ils = "rero_ils.theme.views:blueprint"
stats = "rero_ils.modules.stats.views:blueprint"
templates = "rero_ils.modules.templates.views:blueprint"
theme = "rero_ils.theme.views:blueprint"
Expand Down
2 changes: 1 addition & 1 deletion rero_ils/accounts_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
from flask import abort, after_this_request, current_app
from flask import request as flask_request
from flask.views import MethodView
from flask_babelex import gettext as _
from flask_babel import lazy_gettext as _
from flask_security.confirmable import requires_confirmation
from flask_security.utils import get_message, verify_and_update_password
from invenio_accounts.utils import change_user_password
Expand Down
Loading

0 comments on commit 0bf7d52

Please sign in to comment.