[UPD] poetry dependencies update

This commit is contained in:
Mathieu Benoit 2021-06-27 00:22:51 -04:00
parent 76a9a61b1e
commit ebbb2e8619
5 changed files with 949 additions and 508 deletions

View file

@ -6,6 +6,8 @@ Add your dependencies in file [requirements.txt](../requirements.txt) and run sc
``` ```
This will search all `requirements.txt` files and update `pyproject.toml` and it will update poetry This will search all `requirements.txt` files and update `pyproject.toml` and it will update poetry
Priority dependencies in ./requirements.txt, after it's ./odoo/requirements.txt, after it's highest version values.
TODO add option to only add missing dependencies and ignore update. TODO add option to only add missing dependencies and ignore update.
## Add manually dependencies ## Add manually dependencies

1338
poetry.lock generated

File diff suppressed because it is too large Load diff

View file

@ -13,7 +13,8 @@ authors = [ "Mathieu Benoit <mathben@technolibre.ca>",]
python = "^3.7.7" python = "^3.7.7"
Asterisk = "^0.0.8" Asterisk = "^0.0.8"
Babel = "2.3.4" Babel = "2.3.4"
GitPython = "^3.1.12" BeautifulSoup4 = "^4.9.3"
GitPython = "3.1.12"
Jinja2 = "2.10.1" Jinja2 = "2.10.1"
Mako = "1.0.4" Mako = "1.0.4"
MarkupSafe = "0.23" MarkupSafe = "0.23"
@ -28,37 +29,42 @@ Werkzeug = "0.11.15"
XlsxWriter = "0.9.3" XlsxWriter = "0.9.3"
agithub = "^2.2.2" agithub = "^2.2.2"
altair = "^4.1.0" altair = "^4.1.0"
argcomplete = "^1.12.2" argcomplete = "^1.12.3"
bokeh = "1.1.0" bokeh = "1.1.0"
boto = "^2.49.0"
boto3 = "1.9.102" boto3 = "1.9.102"
cachetools = ">=2.0.1" cachetools = ">=2.0.1"
cerberus = "^1.3.2" cerberus = "^1.3.4"
chardet = "3.0.4" chardet = "3.0.4"
click = "^8.0.1"
cloudflare = "^2.8.15"
code_writer = "^1.1.1" code_writer = "^1.1.1"
colorama = "^0.4.4" colorama = "^0.4.4"
cryptography = "2.6.1" cryptography = "2.6.1"
cython = "^0.29.21" css-html-prettify = "^2.5.5"
cython = "^0.29.23"
ddt = "1.2.0" ddt = "1.2.0"
decorator = "4.0.10" decorator = "4.0.10"
docutils = "0.12" docutils = "0.16"
ebaysdk = "2.1.5" ebaysdk = "2.1.5"
email_validator = "^1.1.2" email_validator = "^1.1.3"
escpos = "^1.8" emoji = "^1.2.0"
extract-msg = "^0.28.0" escpos = "^1.9"
extract_msg = "^0.28.0" extract-msg = "^0.28.7"
factur-x = "^1.12" extract_msg = "^0.28.7"
factur-x = "^2.3"
feedparser = "5.2.1" feedparser = "5.2.1"
flake8 = "^3.9.2"
freezegun = "0.3.11" freezegun = "0.3.11"
geojson = "2.4.1" geojson = "2.4.1"
gevent = "1.3.4" gevent = "1.3.4"
gitpython = "^3.1.12"
giturlparse = "^0.10.0" giturlparse = "^0.10.0"
greenlet = "0.4.13" greenlet = "0.4.13"
html2text = "2016.9.19" html2text = "2016.9.19"
invoice2data = "^0.3.5" html5print = "^0.1.2"
invoice2data = "^0.3.6"
iscompatible = "^0.1.1" iscompatible = "^0.1.1"
jira = "2.0.0" jira = "2.0.0"
js2py = "^0.71"
keystoneauth1 = "3.14.0" keystoneauth1 = "3.14.0"
lasso = "^0.0.5" lasso = "^0.0.5"
libsass = "0.12.3" libsass = "0.12.3"
@ -68,20 +74,21 @@ mock = "2.0.0"
mpld3 = "0.3" mpld3 = "0.3"
mysqlclient = "^2.0.3" mysqlclient = "^2.0.3"
num2words = "0.5.6" num2words = "0.5.6"
numpy = "^1.19.5" numpy = "^1.21.0"
oauthlib = "2.1.0" oauthlib = "2.1.0"
"oca.decorators" = "^0.0.1" "oca.decorators" = "^0.0.1"
ofxparse = "0.16" ofxparse = "0.16"
openpyxl = "^3.0.5" openpyxl = "^3.0.7"
openupgradelib = "^2.0.0" openupgradelib = "^2.0.0"
pandas = "1.2.0" pandas = "1.2.0"
paramiko = "^2.7.2" paramiko = "^2.7.2"
passlib = "1.6.5" passlib = "1.6.5"
pdf2image = "^1.14.0" pdf2image = "^1.16.0"
pdfminer = "^20191125"
pexpect = "^4.8.0" pexpect = "^4.8.0"
phonenumbers = "^8.12.15" phonenumbers = "^8.12.26"
plotly = "4.1.0" plotly = "4.1.0"
premailer = "^3.7.0" premailer = "^3.9.0"
psutil = "4.3.1" psutil = "4.3.1"
psycopg2 = "2.7.3.1" psycopg2 = "2.7.3.1"
py-Asterisk = "^0.5.18" py-Asterisk = "^0.5.18"
@ -91,11 +98,11 @@ pycountry = "^20.7.3"
pydot = "1.2.3" pydot = "1.2.3"
pygount = "<1.2.0" pygount = "<1.2.0"
pyldap = "2.4.28" pyldap = "2.4.28"
pymssql = "^2.1.5" pymssql = "^2.2.1"
pymysql = "^1.0.2" pymysql = "^1.0.2"
pyotp = "^2.4.1" pyotp = "^2.6.0"
pyparsing = "2.1.10" pyparsing = "2.1.10"
pyproj = "^3.0.0" pyproj = "^3.1.0"
pyserial = "3.1.1" pyserial = "3.1.1"
pysftp = "^0.2.9" pysftp = "^0.2.9"
python-chess = "<0.24" python-chess = "<0.24"
@ -105,7 +112,7 @@ python-git = "^2018.2.1"
python-json-logger = "0.1.5" python-json-logger = "0.1.5"
python-keystoneclient = "3.22.0" python-keystoneclient = "3.22.0"
python-slugify = ">=3.0.2" python-slugify = ">=3.0.2"
python-stdnum = "^1.15" python-stdnum = "^1.16"
python-swiftclient = "3.9.0" python-swiftclient = "3.9.0"
python-u2flib-server = "^5.0.1" python-u2flib-server = "^5.0.1"
python-u2flib_server = "^5.0.1" python-u2flib_server = "^5.0.1"
@ -117,11 +124,10 @@ raven = "^6.10.0"
redis = "2.10.5" redis = "2.10.5"
reportlab = "3.3.0" reportlab = "3.3.0"
requests = "2.20.0" requests = "2.20.0"
requests-mock = "^1.8.0" requests-mock = "^1.9.3"
requests-oauthlib = "1.1.0" requests-oauthlib = "1.1.0"
requests-toolbelt = "0.9.1" requests-toolbelt = "0.9.1"
retrying = "^1.3.3" retrying = "^1.3.3"
rotate_backups_s3 = "^0.3"
serial = "^0.0.97" serial = "^0.0.97"
shapely = "1.6.4.post2" shapely = "1.6.4.post2"
simplejson = "^3.17.2" simplejson = "^3.17.2"
@ -129,27 +135,37 @@ slugify = "^0.0.1"
sphinx = ">=1.6.7" sphinx = ">=1.6.7"
sphinx-intl = "^2.0.1" sphinx-intl = "^2.0.1"
sphinx-patchqueue = ">=1.0" sphinx-patchqueue = ">=1.0"
sphinx_rtd_theme = "^0.5.1" sphinx_rtd_theme = "^0.5.2"
sqlalchemy = "^1.3.22" sqlalchemy = "^1.4.19"
statsd = "3.2.1" statsd = "3.2.1"
suds-jurko = "0.6" suds-jurko = "0.6"
toml = "^0.10.2" toml = "^0.10.2"
twython = "^3.8.2" twython = "^3.8.2"
unidecode = "1.0.22" unidecode = "1.0.22"
unidiff = "^0.6.0"
vatnumber = "1.2" vatnumber = "1.2"
vcrpy = ">=2.1.1" vcrpy = ">=2.1.1"
vcrpy-unittest = "^0.1.7" vcrpy-unittest = "^0.1.7"
vobject = "0.9.3" vobject = "0.9.3"
voicent-python = "^1.0" voicent-python = "^1.0"
webcolors = "1.10" webcolors = "1.10"
websocket-client = "^0.57.0" websocket-client = "^1.1.0"
wechatpy = "^1.8.14" wechatpy = "^1.8.15"
wget = "^3.2"
wheel = "^0.36.2" wheel = "^0.36.2"
xlrd = "1.0.0" xlrd = "1.0.0"
xlwt = "1.3" xlwt = "1.3"
xmlformatter = "^0.2.2"
xmltodict = "^0.12.0" xmltodict = "^0.12.0"
zeep = "^4.0.0" zeep = "^4.0.0"
zxcvbn = "^4.4.28" zxcvbn = "^4.4.28"
[tool.poetry.dev-dependencies] [tool.poetry.dev-dependencies]
websocket_client = "^0.57.0" websocket_client = "^1.1.0"
[tool.poetry.dependencies.black]
git = "https://github.com/psf/black.git"
rev = "21.6b0"
[tool.poetry.dependencies.pylint-odoo]
git = "https://github.com/oca/pylint-odoo.git"

View file

@ -1,7 +1,7 @@
# For script # For script
giturlparse giturlparse
agithub agithub
gitpython GitPython==3.1.12
PyYAML PyYAML
retrying retrying
xmltodict xmltodict
@ -14,6 +14,7 @@ cython
# For Odoo # For Odoo
wheel wheel
phonenumbers phonenumbers
pytz==2017.3
# For OCA # For OCA
factur-x factur-x
@ -33,16 +34,14 @@ python-keystoneclient
# For logical test # For logical test
docutils==0.16 docutils==0.16
flake8 flake8
pylint-odoo git+https://github.com/oca/pylint-odoo.git
git+https://github.com/oca/pylint-odoo.git#egg=pylint-odoo
# oca-maintainers-tools # oca-maintainers-tools
# git+https://github.com/OCA/maintainer-tools.git#egg=oca-maintainers-tools # git+https://github.com/OCA/maintainer-tools.git#egg=oca-maintainers-tools
xmlformatter xmlformatter
html5print html5print
css-html-prettify css-html-prettify
BeautifulSoup4 BeautifulSoup4
black git+https://github.com/psf/black.git@21.6b0
git+https://github.com/psf/black.git#egg=black
# For updating poetry # For updating poetry
toml toml
@ -51,3 +50,7 @@ pandas==1.2.0
# For deployment # For deployment
cloudflare cloudflare
# For multilang_md.py
click
emoji

View file

@ -46,7 +46,11 @@ def get_config():
def get_lst_requirements_txt(): def get_lst_requirements_txt():
return list(Path(".").rglob("requirements.[tT][xX][tT]")) # Ignore some item in list
lst = [a for a in Path(".").rglob("requirements.[tT][xX][tT]")
if not os.path.dirname(a).startswith('.repo/') and not os.path.dirname(a).startswith('.venv/')
]
return lst
def get_lst_manifest_py(): def get_lst_manifest_py():
@ -61,7 +65,8 @@ def combine_requirements(config):
:param config: :param config:
:return: :return:
""" """
priority_filename_requirement = "odoo/requirements.txt" priority_filename_requirement = "requirements.txt"
second_priority_filename_requirement = "odoo/requirements.txt"
lst_sign = ("==", "!=", ">=", "<=", "<", ">", ";") lst_sign = ("==", "!=", ">=", "<=", "<", ">", ";")
lst_requirements = [] lst_requirements = []
ignore_requirements = ["sys_platform == 'win32'", "python_version < '3.7'"] ignore_requirements = ["sys_platform == 'win32'", "python_version < '3.7'"]
@ -158,14 +163,19 @@ def combine_requirements(config):
# Find the requirements file and print the conflict # Find the requirements file and print the conflict
# Take the version from Odoo by default, else take the more recent # Take the version from Odoo by default, else take the more recent
odoo_value = None odoo_value = None
erplibre_value = None
for version_requirement in lst_version_requirement: for version_requirement in lst_version_requirement:
filename_1 = dct_requirements_module_filename.get( filename_1 = dct_requirements_module_filename.get(
version_requirement[0]) version_requirement[0])
if priority_filename_requirement in filename_1: if priority_filename_requirement in filename_1:
erplibre_value = version_requirement[0]
elif second_priority_filename_requirement in filename_1:
odoo_value = version_requirement[0] odoo_value = version_requirement[0]
break
if odoo_value: if erplibre_value:
str_result_choose = f"Select {erplibre_value} because from ERPLibre"
result = erplibre_value
elif odoo_value:
str_result_choose = f"Select {odoo_value} because from Odoo" str_result_choose = f"Select {odoo_value} because from Odoo"
result = odoo_value result = odoo_value
else: else:
@ -270,7 +280,12 @@ def get_manifest_external_dependencies(dct_requirements):
def call_poetry_add_build_dependency(): def call_poetry_add_build_dependency():
os.system("./script/poetry_add_build_dependency.sh") """
:return: True if success
"""
status = os.system("./script/poetry_add_build_dependency.sh")
return status == 0
def get_list_ignored(): def get_list_ignored():
@ -289,8 +304,9 @@ def main():
combine_requirements(config) combine_requirements(config)
if config.force and os.path.isfile("./poetry.lock"): if config.force and os.path.isfile("./poetry.lock"):
os.remove("./poetry.lock") os.remove("./poetry.lock")
call_poetry_add_build_dependency() status = call_poetry_add_build_dependency()
sorted_dependency_poetry(pyproject_toml_filename) if status:
sorted_dependency_poetry(pyproject_toml_filename)
if __name__ == '__main__': if __name__ == '__main__':