Hack to make Bonobo work with py3.10

This commit is contained in:
2022-12-19 11:04:38 +01:00
parent feb7ec8505
commit 4cf69d362e
9 changed files with 27 additions and 25 deletions

View File

@ -43,7 +43,7 @@ else ifneq ($(QUICK),)
@printf "Skipping \033[36m%s\033[0m because \033[36m$$QUICK\033[0m is not empty.\n" $(target)
else
@printf "Applying \033[36m%s\033[0m target...\n" $(target)
$(PIP) install $(PIP_INSTALL_OPTIONS) -U "pip ~=19.0" wheel
$(PIP) install $(PIP_INSTALL_OPTIONS) -U "pip ~=22.0" wheel
$(PIP) install $(PIP_INSTALL_OPTIONS) -U $(PYTHON_REQUIREMENTS_INLINE) -r $(PYTHON_REQUIREMENTS_FILE)
@mkdir -p .medikit; touch $@
endif
@ -61,7 +61,7 @@ else ifneq ($(QUICK),)
@printf "Skipping \033[36m%s\033[0m because \033[36m$$QUICK\033[0m is not empty.\n" $(target)
else
@printf "Applying \033[36m%s\033[0m target...\n" $(target)
$(PIP) install $(PIP_INSTALL_OPTIONS) -U "pip ~=19.0" wheel
$(PIP) install $(PIP_INSTALL_OPTIONS) -U "pip ~=22.0" wheel
$(PIP) install $(PIP_INSTALL_OPTIONS) -U $(PYTHON_REQUIREMENTS_DEV_INLINE) -r $(PYTHON_REQUIREMENTS_DEV_FILE)
@mkdir -p .medikit; touch $@
endif
@ -78,7 +78,7 @@ else ifneq ($(QUICK),)
@printf "Skipping \033[36m%s\033[0m because \033[36m$$QUICK\033[0m is not empty.\n" $(target)
else
@printf "Applying \033[36m%s\033[0m target...\n" $(target)
$(PIP) install $(PIP_INSTALL_OPTIONS) -U "pip ~=19.0" wheel
$(PIP) install $(PIP_INSTALL_OPTIONS) -U "pip ~=22.0" wheel
$(PIP) install $(PIP_INSTALL_OPTIONS) -U $(PYTHON_REQUIREMENTS_DOCKER_INLINE) -r $(PYTHON_REQUIREMENTS_DOCKER_FILE)
@mkdir -p .medikit; touch $@
endif
@ -92,7 +92,7 @@ else ifneq ($(QUICK),)
@printf "Skipping \033[36m%s\033[0m because \033[36m$$QUICK\033[0m is not empty.\n" $(target)
else
@printf "Applying \033[36m%s\033[0m target...\n" $(target)
$(PIP) install $(PIP_INSTALL_OPTIONS) -U "pip ~=19.0" wheel
$(PIP) install $(PIP_INSTALL_OPTIONS) -U "pip ~=22.0" wheel
$(PIP) install $(PIP_INSTALL_OPTIONS) -U $(PYTHON_REQUIREMENTS_JUPYTER_INLINE) -r $(PYTHON_REQUIREMENTS_JUPYTER_FILE)
@mkdir -p .medikit; touch $@
endif
@ -106,7 +106,7 @@ else ifneq ($(QUICK),)
@printf "Skipping \033[36m%s\033[0m because \033[36m$$QUICK\033[0m is not empty.\n" $(target)
else
@printf "Applying \033[36m%s\033[0m target...\n" $(target)
$(PIP) install $(PIP_INSTALL_OPTIONS) -U "pip ~=19.0" wheel
$(PIP) install $(PIP_INSTALL_OPTIONS) -U "pip ~=22.0" wheel
$(PIP) install $(PIP_INSTALL_OPTIONS) -U $(PYTHON_REQUIREMENTS_SQLALCHEMY_INLINE) -r $(PYTHON_REQUIREMENTS_SQLALCHEMY_FILE)
@mkdir -p .medikit; touch $@
endif
@ -125,7 +125,7 @@ format: ## Reformats the whole codebase using our standards (requires black an
isort -rc -o mondrian -o whistle -y .
medikit: # Checks installed medikit version and updates it if it is outdated.
@$(PYTHON) -c 'import medikit, pip, sys; from packaging.version import Version; sys.exit(0 if (Version(medikit.__version__) >= Version("$(MEDIKIT_VERSION)")) and (Version(pip.__version__) < Version("10")) else 1)' || $(PYTHON) -m pip install -U "pip ~=19.0" "medikit>=$(MEDIKIT_VERSION)"
@$(PYTHON) -c 'import medikit, pip, sys; from packaging.version import Version; sys.exit(0 if (Version(medikit.__version__) >= Version("$(MEDIKIT_VERSION)")) and (Version(pip.__version__) < Version("10")) else 1)' || $(PYTHON) -m pip install -U "pip ~=22.0" "medikit>=$(MEDIKIT_VERSION)"
update: medikit ## Update project artifacts using medikit.
$(MEDIKIT) update $(MEDIKIT_UPDATE_OPTIONS)

View File

@ -45,9 +45,9 @@ python.add_requirements(
'cached-property ~=1.4',
'fs ~=2.0',
'graphviz >=0.8,<0.9',
'jinja2 ~=2.9',
'jinja2',
'mondrian ~=0.8',
'packaging ~=19.0',
'packaging',
'psutil ~=5.4',
'python-slugify ~=1.2.0',
'requests ~=2.0',
@ -74,7 +74,7 @@ python.add_requirements(
@listen(make.on_generate)
def on_make_generate(event):
makefile = event.makefile
# Sphinx
makefile['SPHINX_AUTOBUILD'] = '$(PYTHON_DIRNAME)/sphinx-autobuild'
makefile.add_target(
@ -95,7 +95,4 @@ def on_make_generate(event):
)
# vim: ft=python:

View File

@ -1 +1 @@
__version__ = '0.7.0rc2'
__version__ = '0.7.0rc3'

View File

@ -1,6 +1,6 @@
import bisect
import functools
from collections import Sequence
from collections.abc import Sequence
class sortedlist(list):
@ -26,7 +26,8 @@ def _with_length_check(f):
if length is not None:
if length != len(result):
raise TypeError(
"Length check failed, expected {} fields but got {}: {!r}.".format(length, len(result), result)
"Length check failed, expected {} fields but got {}: {!r}.".format(
length, len(result), result)
)
return result

View File

@ -20,9 +20,9 @@ jinja2-time==0.2.0
jinja2==2.10.1
markupsafe==1.1.1
more-itertools==7.1.0
packaging==19.0
packaging
pathlib2==2.3.4
pluggy==0.12.0
pluggy==1.0.0
poyo==0.4.2
py==1.8.0
pygments==2.4.2

View File

@ -13,7 +13,7 @@ idna==2.8
jinja2==2.10.1
markupsafe==1.1.1
mondrian==0.8.0
packaging==19.0
packaging
pbr==5.4.1
psutil==5.6.3
pyparsing==2.4.0

View File

@ -11,7 +11,7 @@ idna==2.8
jinja2==2.10.1
markupsafe==1.1.1
mondrian==0.8.0
packaging==19.0
packaging
pbr==5.4.1
psutil==5.6.3
pyparsing==2.4.0

View File

@ -10,7 +10,7 @@ idna==2.8
jinja2==2.10.1
markupsafe==1.1.1
mondrian==0.8.0
packaging==19.0
packaging
pbr==5.4.1
psutil==5.6.3
pyparsing==2.4.0

View File

@ -26,7 +26,12 @@ except:
long_description = ''
# Get the classifiers from the classifiers file
tolines = lambda c: list(filter(None, map(lambda s: s.strip(), c.split('\n'))))
def tolines(c): return list(
filter(None, map(lambda s: s.strip(), c.split('\n'))))
try:
with open(path.join(here, 'classifiers.txt'), encoding='utf-8') as f:
classifiers = tolines(f.read())
@ -49,9 +54,8 @@ setup(
'bonobo/contrib/jupyter/static/index.js',
'bonobo/contrib/jupyter/static/index.js.map'
])],
description=
('Bonobo, a simple, modern and atomic extract-transform-load toolkit for '
'python 3.5+.'),
description=('Bonobo, a simple, modern and atomic extract-transform-load toolkit for '
'python 3.5+.'),
license='Apache License, Version 2.0',
name='bonobo',
python_requires='>=3.5',
@ -62,7 +66,7 @@ setup(
include_package_data=True,
install_requires=[
'cached-property ~= 1.4', 'fs ~= 2.0', 'graphviz >= 0.8, < 0.9',
'jinja2 ~= 2.9', 'mondrian ~= 0.8', 'packaging ~= 19.0',
'jinja2', 'mondrian ~= 0.8', 'packaging',
'psutil ~= 5.4', 'python-slugify ~= 1.2.0', 'requests ~= 2.0',
'stevedore ~= 1.27', 'whistle ~= 1.0'
],