Skip to content

Commit

Permalink
Fix incorrect import of tomli (#1500)
Browse files Browse the repository at this point in the history
  • Loading branch information
J535D165 committed Jul 27, 2023
1 parent 68926fb commit 6934f0a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 2 additions & 3 deletions asreview/webapp/start_flask.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,13 @@
import logging
import os
import socket
import sys
import webbrowser
from pathlib import Path
from threading import Timer

if sys.version_info >= (3, 11):
try:
import tomllib
else:
except ImportError:
import tomli as tomllib

from flask import Flask
Expand Down
5 changes: 4 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,12 @@ def get_long_description():
"tqdm",
"gevent>=20",
"datahugger>=0.2",
"tomli", # included in Python 3.11 as tomllib
]

if sys.version_info < (3, 11):
REQUIRES += ["tomli"]


if sys.version_info < (3, 10):
REQUIRES += ["importlib_metadata>=3.6"]

Expand Down

0 comments on commit 6934f0a

Please sign in to comment.