diff --git a/backend/apis/__init__.py b/backend/apis/__init__.py index 2909db3..48e6726 100755 --- a/backend/apis/__init__.py +++ b/backend/apis/__init__.py @@ -1,10 +1,10 @@ from flask import Blueprint from flask_restplus import Api -from .ufl import api as ufl -from .private import api as private from .analyze import api as analyze from .downloadLineagesInfo import api as downloadLineagesInfo +from .private import api as private +from .ufl import api as ufl enable_doc = True diff --git a/backend/apis/analyze.py b/backend/apis/analyze.py index cf2092d..b981404 100644 --- a/backend/apis/analyze.py +++ b/backend/apis/analyze.py @@ -1,25 +1,22 @@ from __future__ import print_function +import copy import http import json -import pandas as pd -import copy - -import statsmodels.stats.multitest as sms -from scipy.stats import binom, chi2_contingency -from flask_restplus import Namespace, Resource - from datetime import datetime, timedelta from threading import Timer +import pandas as pd +import statsmodels.stats.multitest as sms +from flask_restplus import Namespace, Resource from pymongo import MongoClient +from scipy.stats import chi2_contingency from .downloadLineagesInfo import dict_lineage_mutation api = Namespace('analyze', description='analyze') uri = "mongodb://localhost:23456/gcm_gisaid" -# uri = "mongodb://localhost:23457/gcm_gisaid" client = MongoClient(uri) db = client.gcm_gisaid @@ -2584,15 +2581,17 @@ def post(self): if key == 'minDate': start_date = datetime.strptime(f"{query_background[key]}", '%Y-%m-%d') where_part_background_overlapping['collection_date']['$gte'] = start_date - if where_part_target_overlapping['collection_date']['$gte'] < start_date\ - < where_part_target_overlapping['collection_date']['$lte']: - where_part_target_overlapping['collection_date']['$gte'] = start_date + if "$lte" in where_part_target_overlapping['collection_date']: + if where_part_target_overlapping['collection_date']['$gte'] < start_date\ + < where_part_target_overlapping['collection_date']['$lte']: + where_part_target_overlapping['collection_date']['$gte'] = start_date elif key == 'maxDate': stop_date = datetime.strptime(f"{query_background[key]}", '%Y-%m-%d') where_part_background_overlapping['collection_date']['$lte'] = stop_date - if where_part_target_overlapping['collection_date']['$gte'] < stop_date \ - < where_part_target_overlapping['collection_date']['$lte']: - where_part_target_overlapping['collection_date']['$lte'] = stop_date + if "$lte" in where_part_target_overlapping['collection_date']: + if where_part_target_overlapping['collection_date']['$gte'] < stop_date \ + < where_part_target_overlapping['collection_date']['$lte']: + where_part_target_overlapping['collection_date']['$lte'] = stop_date elif key == 'toExclude': for fieldToExclude in query_background[key]: diff --git a/backend/apis/analyze_file.py b/backend/apis/analyze_file.py index 439343b..ad07616 100644 --- a/backend/apis/analyze_file.py +++ b/backend/apis/analyze_file.py @@ -1,35 +1,18 @@ from __future__ import print_function + +import collections # %config Completer.use_jedi = False import datetime -import os -import re - -import requests -import io import http.client +import io +import itertools import json - -import pandas as pd from collections import defaultdict -from Bio import SeqIO from io import StringIO -from Bio import Align, Seq, pairwise2 -from Bio.Data import CodonTable -import numpy as np -import itertools -import collections -import logomaker -import tqdm -import psycopg2 -import matplotlib.pyplot as plt - -from ipywidgets import interact, interactive, fixed, interact_manual -import ipywidgets as widgets -from IPython.core.display import HTML +import pandas as pd from flask_restplus import Namespace, Resource - api = Namespace('analyze_file', description='analyze_file') diff --git a/backend/apis/analyze_file_example.py b/backend/apis/analyze_file_example.py index 5f65a89..7d1c162 100644 --- a/backend/apis/analyze_file_example.py +++ b/backend/apis/analyze_file_example.py @@ -1,31 +1,12 @@ from __future__ import print_function -# %config Completer.use_jedi = False -import requests import io -import http.client -import json - -import pandas as pd from collections import defaultdict -from Bio import SeqIO -from io import StringIO -from Bio import Align, Seq, pairwise2 -from Bio.Data import CodonTable -import numpy as np -import itertools -import collections -import logomaker -import tqdm -import psycopg2 -import matplotlib.pyplot as plt - -from ipywidgets import interact, interactive, fixed, interact_manual -import ipywidgets as widgets -from IPython.core.display import HTML from flask_restplus import Namespace, Resource +# %config Completer.use_jedi = False + api = Namespace('analyze_file_example', description='analyze_file_example') diff --git a/backend/apis/downloadLineagesInfo.py b/backend/apis/downloadLineagesInfo.py index 74d6290..cf8bea3 100644 --- a/backend/apis/downloadLineagesInfo.py +++ b/backend/apis/downloadLineagesInfo.py @@ -1,12 +1,10 @@ import json - -import requests -import lxml.html -import pandas as pd - from datetime import datetime, timedelta from threading import Timer +import lxml.html +import pandas as pd +import requests from flask_restplus import Namespace api = Namespace('downloadLineagesInfo', description='downloadLineagesInfo') diff --git a/backend/apis/private.py b/backend/apis/private.py index 340e31c..e65546b 100644 --- a/backend/apis/private.py +++ b/backend/apis/private.py @@ -1,35 +1,23 @@ from __future__ import print_function + +import collections # %config Completer.use_jedi = False import datetime -import os -import re - -import requests -import io import http.client +import io +import itertools import json +import os +from collections import defaultdict +from io import StringIO import pandas as pd -from collections import defaultdict +import tqdm from Bio import SeqIO -from io import StringIO -from Bio import Align, Seq, pairwise2 +from Bio import pairwise2 from Bio.Data import CodonTable -import numpy as np -import itertools -import collections -import logomaker -import tqdm -import psycopg2 -import matplotlib.pyplot as plt - -from ipywidgets import interact, interactive, fixed, interact_manual -import ipywidgets as widgets -from IPython.core.display import HTML - from flask_restplus import Namespace, Resource - api = Namespace('private', description='private') diff --git a/backend/apis/ufl.py b/backend/apis/ufl.py index d94cc79..11f3be1 100644 --- a/backend/apis/ufl.py +++ b/backend/apis/ufl.py @@ -1,12 +1,9 @@ +import http.client import json -import urllib import requests -import http.client - from flask_restplus import Namespace, Resource - api = Namespace('ufl', description='ufl') http.client._MAXLINE = 655360 diff --git a/backend/venv/lib/python3.9/site-packages/pip/_vendor/certifi/__init__.py b/backend/venv/lib/python3.9/site-packages/pip/_vendor/certifi/__init__.py index 4e5133b..884ae37 100644 --- a/backend/venv/lib/python3.9/site-packages/pip/_vendor/certifi/__init__.py +++ b/backend/venv/lib/python3.9/site-packages/pip/_vendor/certifi/__init__.py @@ -1,3 +1 @@ -from .core import contents, where - __version__ = "2020.11.08" diff --git a/backend/venv/lib/python3.9/site-packages/pip/_vendor/chardet/__init__.py b/backend/venv/lib/python3.9/site-packages/pip/_vendor/chardet/__init__.py index 0f9f820..8437361 100644 --- a/backend/venv/lib/python3.9/site-packages/pip/_vendor/chardet/__init__.py +++ b/backend/venv/lib/python3.9/site-packages/pip/_vendor/chardet/__init__.py @@ -16,9 +16,7 @@ ######################### END LICENSE BLOCK ######################### -from .compat import PY2, PY3 from .universaldetector import UniversalDetector -from .version import __version__, VERSION def detect(byte_str): diff --git a/backend/venv/lib/python3.9/site-packages/pip/_vendor/chardet/big5prober.py b/backend/venv/lib/python3.9/site-packages/pip/_vendor/chardet/big5prober.py index 98f9970..f663243 100644 --- a/backend/venv/lib/python3.9/site-packages/pip/_vendor/chardet/big5prober.py +++ b/backend/venv/lib/python3.9/site-packages/pip/_vendor/chardet/big5prober.py @@ -25,9 +25,9 @@ # 02110-1301 USA ######################### END LICENSE BLOCK ######################### -from .mbcharsetprober import MultiByteCharSetProber -from .codingstatemachine import CodingStateMachine from .chardistribution import Big5DistributionAnalysis +from .codingstatemachine import CodingStateMachine +from .mbcharsetprober import MultiByteCharSetProber from .mbcssm import BIG5_SM_MODEL diff --git a/backend/venv/lib/python3.9/site-packages/pip/_vendor/chardet/chardistribution.py b/backend/venv/lib/python3.9/site-packages/pip/_vendor/chardet/chardistribution.py index c0395f4..ad2a6b7 100644 --- a/backend/venv/lib/python3.9/site-packages/pip/_vendor/chardet/chardistribution.py +++ b/backend/venv/lib/python3.9/site-packages/pip/_vendor/chardet/chardistribution.py @@ -25,14 +25,14 @@ # 02110-1301 USA ######################### END LICENSE BLOCK ######################### -from .euctwfreq import (EUCTW_CHAR_TO_FREQ_ORDER, EUCTW_TABLE_SIZE, - EUCTW_TYPICAL_DISTRIBUTION_RATIO) +from .big5freq import (BIG5_CHAR_TO_FREQ_ORDER, BIG5_TABLE_SIZE, + BIG5_TYPICAL_DISTRIBUTION_RATIO) from .euckrfreq import (EUCKR_CHAR_TO_FREQ_ORDER, EUCKR_TABLE_SIZE, EUCKR_TYPICAL_DISTRIBUTION_RATIO) +from .euctwfreq import (EUCTW_CHAR_TO_FREQ_ORDER, EUCTW_TABLE_SIZE, + EUCTW_TYPICAL_DISTRIBUTION_RATIO) from .gb2312freq import (GB2312_CHAR_TO_FREQ_ORDER, GB2312_TABLE_SIZE, GB2312_TYPICAL_DISTRIBUTION_RATIO) -from .big5freq import (BIG5_CHAR_TO_FREQ_ORDER, BIG5_TABLE_SIZE, - BIG5_TYPICAL_DISTRIBUTION_RATIO) from .jisfreq import (JIS_CHAR_TO_FREQ_ORDER, JIS_TABLE_SIZE, JIS_TYPICAL_DISTRIBUTION_RATIO) diff --git a/backend/venv/lib/python3.9/site-packages/pip/_vendor/chardet/charsetgroupprober.py b/backend/venv/lib/python3.9/site-packages/pip/_vendor/chardet/charsetgroupprober.py index 8b3738e..4f14398 100644 --- a/backend/venv/lib/python3.9/site-packages/pip/_vendor/chardet/charsetgroupprober.py +++ b/backend/venv/lib/python3.9/site-packages/pip/_vendor/chardet/charsetgroupprober.py @@ -25,8 +25,8 @@ # 02110-1301 USA ######################### END LICENSE BLOCK ######################### -from .enums import ProbingState from .charsetprober import CharSetProber +from .enums import ProbingState class CharSetGroupProber(CharSetProber): diff --git a/backend/venv/lib/python3.9/site-packages/pip/_vendor/chardet/eucjpprober.py b/backend/venv/lib/python3.9/site-packages/pip/_vendor/chardet/eucjpprober.py index 20ce8f7..9b6fe36 100644 --- a/backend/venv/lib/python3.9/site-packages/pip/_vendor/chardet/eucjpprober.py +++ b/backend/venv/lib/python3.9/site-packages/pip/_vendor/chardet/eucjpprober.py @@ -25,11 +25,11 @@ # 02110-1301 USA ######################### END LICENSE BLOCK ######################### -from .enums import ProbingState, MachineState -from .mbcharsetprober import MultiByteCharSetProber -from .codingstatemachine import CodingStateMachine from .chardistribution import EUCJPDistributionAnalysis +from .codingstatemachine import CodingStateMachine +from .enums import ProbingState, MachineState from .jpcntx import EUCJPContextAnalysis +from .mbcharsetprober import MultiByteCharSetProber from .mbcssm import EUCJP_SM_MODEL diff --git a/backend/venv/lib/python3.9/site-packages/pip/_vendor/chardet/euckrprober.py b/backend/venv/lib/python3.9/site-packages/pip/_vendor/chardet/euckrprober.py index 345a060..f650529 100644 --- a/backend/venv/lib/python3.9/site-packages/pip/_vendor/chardet/euckrprober.py +++ b/backend/venv/lib/python3.9/site-packages/pip/_vendor/chardet/euckrprober.py @@ -25,9 +25,9 @@ # 02110-1301 USA ######################### END LICENSE BLOCK ######################### -from .mbcharsetprober import MultiByteCharSetProber -from .codingstatemachine import CodingStateMachine from .chardistribution import EUCKRDistributionAnalysis +from .codingstatemachine import CodingStateMachine +from .mbcharsetprober import MultiByteCharSetProber from .mbcssm import EUCKR_SM_MODEL diff --git a/backend/venv/lib/python3.9/site-packages/pip/_vendor/chardet/euctwprober.py b/backend/venv/lib/python3.9/site-packages/pip/_vendor/chardet/euctwprober.py index 35669cc..d76076a 100644 --- a/backend/venv/lib/python3.9/site-packages/pip/_vendor/chardet/euctwprober.py +++ b/backend/venv/lib/python3.9/site-packages/pip/_vendor/chardet/euctwprober.py @@ -25,11 +25,12 @@ # 02110-1301 USA ######################### END LICENSE BLOCK ######################### -from .mbcharsetprober import MultiByteCharSetProber -from .codingstatemachine import CodingStateMachine from .chardistribution import EUCTWDistributionAnalysis +from .codingstatemachine import CodingStateMachine +from .mbcharsetprober import MultiByteCharSetProber from .mbcssm import EUCTW_SM_MODEL + class EUCTWProber(MultiByteCharSetProber): def __init__(self): super(EUCTWProber, self).__init__() diff --git a/backend/venv/lib/python3.9/site-packages/pip/_vendor/chardet/gb2312prober.py b/backend/venv/lib/python3.9/site-packages/pip/_vendor/chardet/gb2312prober.py index 8446d2d..502e4a8 100644 --- a/backend/venv/lib/python3.9/site-packages/pip/_vendor/chardet/gb2312prober.py +++ b/backend/venv/lib/python3.9/site-packages/pip/_vendor/chardet/gb2312prober.py @@ -25,11 +25,12 @@ # 02110-1301 USA ######################### END LICENSE BLOCK ######################### -from .mbcharsetprober import MultiByteCharSetProber -from .codingstatemachine import CodingStateMachine from .chardistribution import GB2312DistributionAnalysis +from .codingstatemachine import CodingStateMachine +from .mbcharsetprober import MultiByteCharSetProber from .mbcssm import GB2312_SM_MODEL + class GB2312Prober(MultiByteCharSetProber): def __init__(self): super(GB2312Prober, self).__init__() diff --git a/backend/venv/lib/python3.9/site-packages/pip/_vendor/chardet/mbcsgroupprober.py b/backend/venv/lib/python3.9/site-packages/pip/_vendor/chardet/mbcsgroupprober.py index 530abe7..c42d1cb 100644 --- a/backend/venv/lib/python3.9/site-packages/pip/_vendor/chardet/mbcsgroupprober.py +++ b/backend/venv/lib/python3.9/site-packages/pip/_vendor/chardet/mbcsgroupprober.py @@ -27,15 +27,15 @@ # 02110-1301 USA ######################### END LICENSE BLOCK ######################### +from .big5prober import Big5Prober from .charsetgroupprober import CharSetGroupProber -from .utf8prober import UTF8Prober -from .sjisprober import SJISProber +from .cp949prober import CP949Prober from .eucjpprober import EUCJPProber -from .gb2312prober import GB2312Prober from .euckrprober import EUCKRProber -from .cp949prober import CP949Prober -from .big5prober import Big5Prober from .euctwprober import EUCTWProber +from .gb2312prober import GB2312Prober +from .sjisprober import SJISProber +from .utf8prober import UTF8Prober class MBCSGroupProber(CharSetGroupProber): diff --git a/backend/venv/lib/python3.9/site-packages/pip/_vendor/chardet/sbcsgroupprober.py b/backend/venv/lib/python3.9/site-packages/pip/_vendor/chardet/sbcsgroupprober.py index 98e95dc..daa10d6 100644 --- a/backend/venv/lib/python3.9/site-packages/pip/_vendor/chardet/sbcsgroupprober.py +++ b/backend/venv/lib/python3.9/site-packages/pip/_vendor/chardet/sbcsgroupprober.py @@ -27,17 +27,17 @@ ######################### END LICENSE BLOCK ######################### from .charsetgroupprober import CharSetGroupProber -from .sbcharsetprober import SingleByteCharSetProber +from .hebrewprober import HebrewProber +from .langbulgarianmodel import Latin5BulgarianModel, Win1251BulgarianModel from .langcyrillicmodel import (Win1251CyrillicModel, Koi8rModel, Latin5CyrillicModel, MacCyrillicModel, Ibm866Model, Ibm855Model) from .langgreekmodel import Latin7GreekModel, Win1253GreekModel -from .langbulgarianmodel import Latin5BulgarianModel, Win1251BulgarianModel +from .langhebrewmodel import Win1255HebrewModel # from .langhungarianmodel import Latin2HungarianModel, Win1250HungarianModel from .langthaimodel import TIS620ThaiModel -from .langhebrewmodel import Win1255HebrewModel -from .hebrewprober import HebrewProber from .langturkishmodel import Latin5TurkishModel +from .sbcharsetprober import SingleByteCharSetProber class SBCSGroupProber(CharSetGroupProber): diff --git a/backend/venv/lib/python3.9/site-packages/pip/_vendor/chardet/sjisprober.py b/backend/venv/lib/python3.9/site-packages/pip/_vendor/chardet/sjisprober.py index 9e29623..1094a93 100644 --- a/backend/venv/lib/python3.9/site-packages/pip/_vendor/chardet/sjisprober.py +++ b/backend/venv/lib/python3.9/site-packages/pip/_vendor/chardet/sjisprober.py @@ -25,12 +25,12 @@ # 02110-1301 USA ######################### END LICENSE BLOCK ######################### -from .mbcharsetprober import MultiByteCharSetProber -from .codingstatemachine import CodingStateMachine from .chardistribution import SJISDistributionAnalysis +from .codingstatemachine import CodingStateMachine +from .enums import ProbingState, MachineState from .jpcntx import SJISContextAnalysis +from .mbcharsetprober import MultiByteCharSetProber from .mbcssm import SJIS_SM_MODEL -from .enums import ProbingState, MachineState class SJISProber(MultiByteCharSetProber): diff --git a/backend/venv/lib/python3.9/site-packages/pip/_vendor/chardet/utf8prober.py b/backend/venv/lib/python3.9/site-packages/pip/_vendor/chardet/utf8prober.py index 6c3196c..5018474 100644 --- a/backend/venv/lib/python3.9/site-packages/pip/_vendor/chardet/utf8prober.py +++ b/backend/venv/lib/python3.9/site-packages/pip/_vendor/chardet/utf8prober.py @@ -26,12 +26,11 @@ ######################### END LICENSE BLOCK ######################### from .charsetprober import CharSetProber -from .enums import ProbingState, MachineState from .codingstatemachine import CodingStateMachine +from .enums import ProbingState, MachineState from .mbcssm import UTF8_SM_MODEL - class UTF8Prober(CharSetProber): ONE_CHAR_PROB = 0.5 diff --git a/backend/venv/lib/python3.9/site-packages/pip/_vendor/distlib/_backport/shutil.py b/backend/venv/lib/python3.9/site-packages/pip/_vendor/distlib/_backport/shutil.py index 10ed362..01a7cd0 100644 --- a/backend/venv/lib/python3.9/site-packages/pip/_vendor/distlib/_backport/shutil.py +++ b/backend/venv/lib/python3.9/site-packages/pip/_vendor/distlib/_backport/shutil.py @@ -9,11 +9,12 @@ """ +import fnmatch import os -import sys import stat +import sys from os.path import abspath -import fnmatch + try: from collections.abc import Callable except ImportError: diff --git a/backend/venv/lib/python3.9/site-packages/pip/_vendor/distlib/compat.py b/backend/venv/lib/python3.9/site-packages/pip/_vendor/distlib/compat.py index c316fd9..c7df001 100644 --- a/backend/venv/lib/python3.9/site-packages/pip/_vendor/distlib/compat.py +++ b/backend/venv/lib/python3.9/site-packages/pip/_vendor/distlib/compat.py @@ -19,13 +19,9 @@ from StringIO import StringIO string_types = basestring, text_type = unicode - from types import FileType as file_type - import __builtin__ as builtins - import ConfigParser as configparser from ._backport import shutil - from urlparse import urlparse, urlunparse, urljoin, urlsplit, urlunsplit - from urllib import (urlretrieve, quote as _quote, unquote, url2pathname, - pathname2url, ContentTooShortError, splittype) + from urllib import (urlretrieve, quote as _quote, url2pathname, + splittype) def quote(s): if isinstance(s, unicode): @@ -33,20 +29,15 @@ def quote(s): return _quote(s) import urllib2 - from urllib2 import (Request, urlopen, URLError, HTTPError, - HTTPBasicAuthHandler, HTTPPasswordMgr, - HTTPHandler, HTTPRedirectHandler, - build_opener) + if ssl: from urllib2 import HTTPSHandler - import httplib import xmlrpclib import Queue as queue from HTMLParser import HTMLParser import htmlentitydefs raw_input = raw_input from itertools import ifilter as filter - from itertools import ifilterfalse as filterfalse _userprog = None def splituser(host): @@ -68,17 +59,10 @@ def splituser(host): import builtins import configparser import shutil - from urllib.parse import (urlparse, urlunparse, urljoin, splituser, quote, - unquote, urlsplit, urlunsplit, splittype) - from urllib.request import (urlopen, urlretrieve, Request, url2pathname, - pathname2url, - HTTPBasicAuthHandler, HTTPPasswordMgr, - HTTPHandler, HTTPRedirectHandler, - build_opener) + if ssl: from urllib.request import HTTPSHandler from urllib.error import HTTPError, URLError, ContentTooShortError - import http.client as httplib import urllib.request as urllib2 import xmlrpc.client as xmlrpclib import queue diff --git a/backend/venv/lib/python3.9/site-packages/pip/_vendor/distlib/database.py b/backend/venv/lib/python3.9/site-packages/pip/_vendor/distlib/database.py index 0a90c30..2d044cf 100644 --- a/backend/venv/lib/python3.9/site-packages/pip/_vendor/distlib/database.py +++ b/backend/venv/lib/python3.9/site-packages/pip/_vendor/distlib/database.py @@ -19,12 +19,11 @@ from . import DistlibException, resources from .compat import StringIO -from .version import get_scheme, UnsupportedVersionError from .metadata import (Metadata, METADATA_FILENAME, WHEEL_METADATA_FILENAME, LEGACY_METADATA_FILENAME) from .util import (parse_requirement, cached_property, parse_name_and_version, read_exports, write_exports, CSVReader, CSVWriter) - +from .version import get_scheme, UnsupportedVersionError __all__ = ['Distribution', 'BaseInstalledDistribution', 'InstalledDistribution', 'EggInfoDistribution', diff --git a/backend/venv/lib/python3.9/site-packages/pip/_vendor/distlib/index.py b/backend/venv/lib/python3.9/site-packages/pip/_vendor/distlib/index.py index 7a87cdc..5556d3e 100644 --- a/backend/venv/lib/python3.9/site-packages/pip/_vendor/distlib/index.py +++ b/backend/venv/lib/python3.9/site-packages/pip/_vendor/distlib/index.py @@ -18,7 +18,7 @@ from . import DistlibException from .compat import (HTTPBasicAuthHandler, Request, HTTPPasswordMgr, urlparse, build_opener, string_types) -from .util import cached_property, zip_dir, ServerProxy +from .util import zip_dir, ServerProxy logger = logging.getLogger(__name__) diff --git a/backend/venv/lib/python3.9/site-packages/pip/_vendor/distlib/locators.py b/backend/venv/lib/python3.9/site-packages/pip/_vendor/distlib/locators.py index 12a1d06..2078f0b 100644 --- a/backend/venv/lib/python3.9/site-packages/pip/_vendor/distlib/locators.py +++ b/backend/venv/lib/python3.9/site-packages/pip/_vendor/distlib/locators.py @@ -6,12 +6,13 @@ # import gzip -from io import BytesIO import json import logging import os import posixpath import re +from io import BytesIO + try: import threading except ImportError: # pragma: no cover @@ -20,12 +21,12 @@ from . import DistlibException from .compat import (urljoin, urlparse, urlunparse, url2pathname, pathname2url, - queue, quote, unescape, string_types, build_opener, + queue, quote, unescape, build_opener, HTTPRedirectHandler as BaseRedirectHandler, text_type, Request, HTTPError, URLError) from .database import Distribution, DistributionPath, make_dist from .metadata import Metadata, MetadataInvalidError -from .util import (cached_property, parse_credentials, ensure_slash, +from .util import (cached_property, ensure_slash, split_filename, get_project_data, parse_requirement, parse_name_and_version, ServerProxy, normalize_name) from .version import get_scheme, UnsupportedVersionError diff --git a/backend/venv/lib/python3.9/site-packages/pip/_vendor/distlib/manifest.py b/backend/venv/lib/python3.9/site-packages/pip/_vendor/distlib/manifest.py index ca0fe44..66f6597 100644 --- a/backend/venv/lib/python3.9/site-packages/pip/_vendor/distlib/manifest.py +++ b/backend/venv/lib/python3.9/site-packages/pip/_vendor/distlib/manifest.py @@ -18,7 +18,6 @@ from .compat import fsdecode from .util import convert_path - __all__ = ['Manifest'] logger = logging.getLogger(__name__) diff --git a/backend/venv/lib/python3.9/site-packages/pip/_vendor/distlib/markers.py b/backend/venv/lib/python3.9/site-packages/pip/_vendor/distlib/markers.py index ee1f3e2..18e2be7 100644 --- a/backend/venv/lib/python3.9/site-packages/pip/_vendor/distlib/markers.py +++ b/backend/venv/lib/python3.9/site-packages/pip/_vendor/distlib/markers.py @@ -13,11 +13,10 @@ # as ~= and === which aren't in Python, necessitating a different approach. import os -import sys import platform -import re +import sys -from .compat import python_implementation, urlparse, string_types +from .compat import string_types from .util import in_venv, parse_marker __all__ = ['interpret'] diff --git a/backend/venv/lib/python3.9/site-packages/pip/_vendor/distlib/metadata.py b/backend/venv/lib/python3.9/site-packages/pip/_vendor/distlib/metadata.py index 6d5e236..69e2948 100644 --- a/backend/venv/lib/python3.9/site-packages/pip/_vendor/distlib/metadata.py +++ b/backend/venv/lib/python3.9/site-packages/pip/_vendor/distlib/metadata.py @@ -10,11 +10,10 @@ from __future__ import unicode_literals import codecs -from email import message_from_file import json import logging import re - +from email import message_from_file from . import DistlibException, __version__ from .compat import StringIO, string_types, text_type diff --git a/backend/venv/lib/python3.9/site-packages/pip/_vendor/distlib/resources.py b/backend/venv/lib/python3.9/site-packages/pip/_vendor/distlib/resources.py index 1884016..983427b 100644 --- a/backend/venv/lib/python3.9/site-packages/pip/_vendor/distlib/resources.py +++ b/backend/venv/lib/python3.9/site-packages/pip/_vendor/distlib/resources.py @@ -11,13 +11,12 @@ import logging import os import pkgutil -import shutil import sys import types import zipimport from . import DistlibException -from .util import cached_property, get_cache_base, path_to_cache_dir, Cache +from .util import cached_property, get_cache_base, Cache logger = logging.getLogger(__name__) diff --git a/backend/venv/lib/python3.9/site-packages/pip/_vendor/distlib/scripts.py b/backend/venv/lib/python3.9/site-packages/pip/_vendor/distlib/scripts.py index 03f8f21..3e49634 100644 --- a/backend/venv/lib/python3.9/site-packages/pip/_vendor/distlib/scripts.py +++ b/backend/venv/lib/python3.9/site-packages/pip/_vendor/distlib/scripts.py @@ -4,12 +4,12 @@ # Licensed to the Python Software Foundation under a contributor agreement. # See LICENSE.txt and CONTRIBUTORS.txt. # -from io import BytesIO import logging import os import re import struct import sys +from io import BytesIO from .compat import sysconfig, detect_encoding, ZipFile from .resources import finder diff --git a/backend/venv/lib/python3.9/site-packages/pip/_vendor/distlib/util.py b/backend/venv/lib/python3.9/site-packages/pip/_vendor/distlib/util.py index 01324ea..a0ab73c 100644 --- a/backend/venv/lib/python3.9/site-packages/pip/_vendor/distlib/util.py +++ b/backend/venv/lib/python3.9/site-packages/pip/_vendor/distlib/util.py @@ -3,10 +3,8 @@ # See LICENSE.txt and CONTRIBUTORS.txt. # import codecs -from collections import deque import contextlib import csv -from glob import iglob as std_iglob import io import json import logging @@ -14,6 +12,9 @@ import py_compile import re import socket +from collections import deque +from glob import iglob as std_iglob + try: import ssl except ImportError: # pragma: no cover diff --git a/backend/venv/lib/python3.9/site-packages/pip/_vendor/distlib/wheel.py b/backend/venv/lib/python3.9/site-packages/pip/_vendor/distlib/wheel.py index 1e2c7a0..4a1613d 100644 --- a/backend/venv/lib/python3.9/site-packages/pip/_vendor/distlib/wheel.py +++ b/backend/venv/lib/python3.9/site-packages/pip/_vendor/distlib/wheel.py @@ -10,7 +10,6 @@ import codecs import datetime import distutils.util -from email import message_from_file import hashlib import imp import json @@ -22,11 +21,12 @@ import sys import tempfile import zipfile +from email import message_from_file from . import __version__, DistlibException from .compat import sysconfig, ZipFile, fsdecode, text_type, filter from .database import InstalledDistribution -from .metadata import (Metadata, METADATA_FILENAME, WHEEL_METADATA_FILENAME, +from .metadata import (Metadata, WHEEL_METADATA_FILENAME, LEGACY_METADATA_FILENAME) from .util import (FileOperator, convert_path, CSVReader, CSVWriter, Cache, cached_property, get_cache_base, read_exports, tempdir) diff --git a/backend/venv/lib/python3.9/site-packages/pip/_vendor/idna/__init__.py b/backend/venv/lib/python3.9/site-packages/pip/_vendor/idna/__init__.py index 847bf93..8b13789 100644 --- a/backend/venv/lib/python3.9/site-packages/pip/_vendor/idna/__init__.py +++ b/backend/venv/lib/python3.9/site-packages/pip/_vendor/idna/__init__.py @@ -1,2 +1 @@ -from .package_data import __version__ -from .core import * + diff --git a/backend/venv/lib/python3.9/site-packages/pip/_vendor/idna/codec.py b/backend/venv/lib/python3.9/site-packages/pip/_vendor/idna/codec.py index 98c65ea..2a0dfe8 100644 --- a/backend/venv/lib/python3.9/site-packages/pip/_vendor/idna/codec.py +++ b/backend/venv/lib/python3.9/site-packages/pip/_vendor/idna/codec.py @@ -1,7 +1,8 @@ -from .core import encode, decode, alabel, ulabel, IDNAError import codecs import re +from .core import encode, decode, alabel, ulabel, IDNAError + _unicode_dots_re = re.compile(u'[\u002e\u3002\uff0e\uff61]') class Codec(codecs.Codec): diff --git a/backend/venv/lib/python3.9/site-packages/pip/_vendor/idna/compat.py b/backend/venv/lib/python3.9/site-packages/pip/_vendor/idna/compat.py index 4d47f33..f8b91a8 100644 --- a/backend/venv/lib/python3.9/site-packages/pip/_vendor/idna/compat.py +++ b/backend/venv/lib/python3.9/site-packages/pip/_vendor/idna/compat.py @@ -1,4 +1,3 @@ -from .core import * from .codec import * def ToASCII(label): diff --git a/backend/venv/lib/python3.9/site-packages/pip/_vendor/idna/core.py b/backend/venv/lib/python3.9/site-packages/pip/_vendor/idna/core.py index 41ec5c7..5293a34 100644 --- a/backend/venv/lib/python3.9/site-packages/pip/_vendor/idna/core.py +++ b/backend/venv/lib/python3.9/site-packages/pip/_vendor/idna/core.py @@ -1,8 +1,9 @@ -from . import idnadata import bisect -import unicodedata import re import sys +import unicodedata + +from . import idnadata from .intranges import intranges_contain _virama_combining_class = 9 diff --git a/backend/venv/lib/python3.9/site-packages/pip/_vendor/msgpack/__init__.py b/backend/venv/lib/python3.9/site-packages/pip/_vendor/msgpack/__init__.py index d6705e2..5b19b1c 100644 --- a/backend/venv/lib/python3.9/site-packages/pip/_vendor/msgpack/__init__.py +++ b/backend/venv/lib/python3.9/site-packages/pip/_vendor/msgpack/__init__.py @@ -1,14 +1,11 @@ # coding: utf-8 -from ._version import version -from .exceptions import * -from .ext import ExtType, Timestamp import os import sys if os.environ.get("MSGPACK_PUREPYTHON") or sys.version_info[0] == 2: - from .fallback import Packer, unpackb, Unpacker + from .fallback import Packer, unpackb else: try: from ._cmsgpack import Packer, unpackb, Unpacker diff --git a/backend/venv/lib/python3.9/site-packages/pip/_vendor/msgpack/ext.py b/backend/venv/lib/python3.9/site-packages/pip/_vendor/msgpack/ext.py index 8341c68..7a041a9 100644 --- a/backend/venv/lib/python3.9/site-packages/pip/_vendor/msgpack/ext.py +++ b/backend/venv/lib/python3.9/site-packages/pip/_vendor/msgpack/ext.py @@ -1,9 +1,8 @@ # coding: utf-8 -from collections import namedtuple import datetime -import sys import struct - +import sys +from collections import namedtuple PY2 = sys.version_info[0] == 2 diff --git a/backend/venv/lib/python3.9/site-packages/pip/_vendor/msgpack/fallback.py b/backend/venv/lib/python3.9/site-packages/pip/_vendor/msgpack/fallback.py index 9f6665b..6a21437 100644 --- a/backend/venv/lib/python3.9/site-packages/pip/_vendor/msgpack/fallback.py +++ b/backend/venv/lib/python3.9/site-packages/pip/_vendor/msgpack/fallback.py @@ -1,9 +1,8 @@ """Fallback pure Python implementation of msgpack""" -from datetime import datetime as _DateTime -import sys import struct - +import sys +from datetime import datetime as _DateTime PY2 = sys.version_info[0] == 2 if PY2: diff --git a/backend/venv/lib/python3.9/site-packages/pip/_vendor/pep517/_in_process.py b/backend/venv/lib/python3.9/site-packages/pip/_vendor/pep517/_in_process.py index a536b03..f794910 100644 --- a/backend/venv/lib/python3.9/site-packages/pip/_vendor/pep517/_in_process.py +++ b/backend/venv/lib/python3.9/site-packages/pip/_vendor/pep517/_in_process.py @@ -12,16 +12,16 @@ - control_dir/output.json - {"return_val": ...} """ -from glob import glob -from importlib import import_module import json import os import os.path -from os.path import join as pjoin import re import shutil import sys import traceback +from glob import glob +from importlib import import_module +from os.path import join as pjoin # This file is run as a script, and `import compat` is not zip-safe, so we # include write_json() and read_json() from compat.py. diff --git a/backend/venv/lib/python3.9/site-packages/pip/_vendor/pep517/build.py b/backend/venv/lib/python3.9/site-packages/pip/_vendor/pep517/build.py index 2643014..9fecca2 100644 --- a/backend/venv/lib/python3.9/site-packages/pip/_vendor/pep517/build.py +++ b/backend/venv/lib/python3.9/site-packages/pip/_vendor/pep517/build.py @@ -3,13 +3,14 @@ import argparse import logging import os -from pip._vendor import toml import shutil +from pip._vendor import toml + +from .compat import FileNotFoundError +from .dirtools import tempdir, mkdir_p from .envbuild import BuildEnvironment from .wrappers import Pep517HookCaller -from .dirtools import tempdir, mkdir_p -from .compat import FileNotFoundError log = logging.getLogger(__name__) diff --git a/backend/venv/lib/python3.9/site-packages/pip/_vendor/pep517/check.py b/backend/venv/lib/python3.9/site-packages/pip/_vendor/pep517/check.py index 13e722a..2c81f89 100644 --- a/backend/venv/lib/python3.9/site-packages/pip/_vendor/pep517/check.py +++ b/backend/venv/lib/python3.9/site-packages/pip/_vendor/pep517/check.py @@ -3,14 +3,15 @@ import argparse import logging import os -from os.path import isfile, join as pjoin -from pip._vendor.toml import TomlDecodeError, load as toml_load import shutil -from subprocess import CalledProcessError import sys import tarfile -from tempfile import mkdtemp import zipfile +from os.path import isfile, join as pjoin +from subprocess import CalledProcessError +from tempfile import mkdtemp + +from pip._vendor.toml import TomlDecodeError, load as toml_load from .colorlog import enable_colourful_output from .envbuild import BuildEnvironment diff --git a/backend/venv/lib/python3.9/site-packages/pip/_vendor/pep517/dirtools.py b/backend/venv/lib/python3.9/site-packages/pip/_vendor/pep517/dirtools.py index 58c6ca0..5998643 100644 --- a/backend/venv/lib/python3.9/site-packages/pip/_vendor/pep517/dirtools.py +++ b/backend/venv/lib/python3.9/site-packages/pip/_vendor/pep517/dirtools.py @@ -1,9 +1,9 @@ -import os -import io import contextlib -import tempfile -import shutil import errno +import io +import os +import shutil +import tempfile import zipfile diff --git a/backend/venv/lib/python3.9/site-packages/pip/_vendor/pep517/envbuild.py b/backend/venv/lib/python3.9/site-packages/pip/_vendor/pep517/envbuild.py index 4088dcd..8a418ef 100644 --- a/backend/venv/lib/python3.9/site-packages/pip/_vendor/pep517/envbuild.py +++ b/backend/venv/lib/python3.9/site-packages/pip/_vendor/pep517/envbuild.py @@ -1,15 +1,16 @@ """Build wheels/sdists by installing build deps to a temporary environment. """ -import os import logging -from pip._vendor import toml +import os import shutil -from subprocess import check_call import sys +from subprocess import check_call from sysconfig import get_paths from tempfile import mkdtemp +from pip._vendor import toml + from .wrappers import Pep517HookCaller, LoggerWrapper log = logging.getLogger(__name__) diff --git a/backend/venv/lib/python3.9/site-packages/pip/_vendor/pep517/meta.py b/backend/venv/lib/python3.9/site-packages/pip/_vendor/pep517/meta.py index d525de5..5090d3e 100644 --- a/backend/venv/lib/python3.9/site-packages/pip/_vendor/pep517/meta.py +++ b/backend/venv/lib/python3.9/site-packages/pip/_vendor/pep517/meta.py @@ -1,10 +1,10 @@ """Build metadata for a project using PEP 517 hooks. """ import argparse +import functools import logging import os import shutil -import functools try: import importlib.metadata as imp_meta diff --git a/backend/venv/lib/python3.9/site-packages/pip/_vendor/pep517/wrappers.py b/backend/venv/lib/python3.9/site-packages/pip/_vendor/pep517/wrappers.py index d6338ea..3ac69d0 100644 --- a/backend/venv/lib/python3.9/site-packages/pip/_vendor/pep517/wrappers.py +++ b/backend/venv/lib/python3.9/site-packages/pip/_vendor/pep517/wrappers.py @@ -1,10 +1,10 @@ +import os +import shutil +import sys import threading from contextlib import contextmanager -import os from os.path import dirname, abspath, join as pjoin -import shutil from subprocess import check_call, check_output, STDOUT -import sys from tempfile import mkdtemp from . import compat diff --git a/backend/venv/lib/python3.9/site-packages/pip/_vendor/toml/__init__.py b/backend/venv/lib/python3.9/site-packages/pip/_vendor/toml/__init__.py index 34a5eab..0ab1fba 100644 --- a/backend/venv/lib/python3.9/site-packages/pip/_vendor/toml/__init__.py +++ b/backend/venv/lib/python3.9/site-packages/pip/_vendor/toml/__init__.py @@ -3,8 +3,8 @@ Released under the MIT license. """ -from pip._vendor.toml import encoder from pip._vendor.toml import decoder +from pip._vendor.toml import encoder __version__ = "0.10.2" _spec_ = "0.5.0" diff --git a/backend/venv/lib/python3.9/site-packages/pip/_vendor/toml/decoder.py b/backend/venv/lib/python3.9/site-packages/pip/_vendor/toml/decoder.py index e071100..1af1d2c 100644 --- a/backend/venv/lib/python3.9/site-packages/pip/_vendor/toml/decoder.py +++ b/backend/venv/lib/python3.9/site-packages/pip/_vendor/toml/decoder.py @@ -1,8 +1,8 @@ import datetime import io -from os import linesep import re import sys +from os import linesep from pip._vendor.toml.tz import TomlTz diff --git a/backend/venv/lib/python3.9/site-packages/pip/_vendor/toml/ordered.py b/backend/venv/lib/python3.9/site-packages/pip/_vendor/toml/ordered.py index 6052016..aaa4cc2 100644 --- a/backend/venv/lib/python3.9/site-packages/pip/_vendor/toml/ordered.py +++ b/backend/venv/lib/python3.9/site-packages/pip/_vendor/toml/ordered.py @@ -1,6 +1,7 @@ from collections import OrderedDict -from pip._vendor.toml import TomlEncoder + from pip._vendor.toml import TomlDecoder +from pip._vendor.toml import TomlEncoder class TomlOrderedDecoder(TomlDecoder): diff --git a/backend/venv/lib/python3.9/site-packages/pip/_vendor/urllib3/util/connection.py b/backend/venv/lib/python3.9/site-packages/pip/_vendor/urllib3/util/connection.py index f1e5d37..ad41bfc 100644 --- a/backend/venv/lib/python3.9/site-packages/pip/_vendor/urllib3/util/connection.py +++ b/backend/venv/lib/python3.9/site-packages/pip/_vendor/urllib3/util/connection.py @@ -4,9 +4,9 @@ from pip._vendor.urllib3.exceptions import LocationParseError +from .wait import NoWayToWaitForSocketError, wait_for_read from ..contrib import _appengine_environ from ..packages import six -from .wait import NoWayToWaitForSocketError, wait_for_read def is_connection_dropped(conn): # Platform-specific diff --git a/backend/venv/lib/python3.9/site-packages/pip/_vendor/urllib3/util/ssl_.py b/backend/venv/lib/python3.9/site-packages/pip/_vendor/urllib3/util/ssl_.py index 763da82..358578e 100644 --- a/backend/venv/lib/python3.9/site-packages/pip/_vendor/urllib3/util/ssl_.py +++ b/backend/venv/lib/python3.9/site-packages/pip/_vendor/urllib3/util/ssl_.py @@ -7,6 +7,7 @@ from binascii import hexlify, unhexlify from hashlib import md5, sha1, sha256 +from .url import BRACELESS_IPV6_ADDRZ_RE, IPV4_RE from ..exceptions import ( InsecurePlatformWarning, ProxySchemeUnsupported, @@ -14,7 +15,6 @@ SSLError, ) from ..packages import six -from .url import BRACELESS_IPV6_ADDRZ_RE, IPV4_RE SSLContext = None SSLTransport = None diff --git a/backend/venv/lib/python3.9/site-packages/pip/_vendor/urllib3/util/timeout.py b/backend/venv/lib/python3.9/site-packages/pip/_vendor/urllib3/util/timeout.py index ff69593..96729be 100644 --- a/backend/venv/lib/python3.9/site-packages/pip/_vendor/urllib3/util/timeout.py +++ b/backend/venv/lib/python3.9/site-packages/pip/_vendor/urllib3/util/timeout.py @@ -1,7 +1,6 @@ from __future__ import absolute_import import time - # The default socket timeout, used by httplib to indicate that no timeout was # specified by the user from socket import _GLOBAL_DEFAULT_TIMEOUT