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) @printf "Skipping \033[36m%s\033[0m because \033[36m$$QUICK\033[0m is not empty.\n" $(target)
else else
@printf "Applying \033[36m%s\033[0m target...\n" $(target) @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) $(PIP) install $(PIP_INSTALL_OPTIONS) -U $(PYTHON_REQUIREMENTS_INLINE) -r $(PYTHON_REQUIREMENTS_FILE)
@mkdir -p .medikit; touch $@ @mkdir -p .medikit; touch $@
endif 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) @printf "Skipping \033[36m%s\033[0m because \033[36m$$QUICK\033[0m is not empty.\n" $(target)
else else
@printf "Applying \033[36m%s\033[0m target...\n" $(target) @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) $(PIP) install $(PIP_INSTALL_OPTIONS) -U $(PYTHON_REQUIREMENTS_DEV_INLINE) -r $(PYTHON_REQUIREMENTS_DEV_FILE)
@mkdir -p .medikit; touch $@ @mkdir -p .medikit; touch $@
endif 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) @printf "Skipping \033[36m%s\033[0m because \033[36m$$QUICK\033[0m is not empty.\n" $(target)
else else
@printf "Applying \033[36m%s\033[0m target...\n" $(target) @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) $(PIP) install $(PIP_INSTALL_OPTIONS) -U $(PYTHON_REQUIREMENTS_DOCKER_INLINE) -r $(PYTHON_REQUIREMENTS_DOCKER_FILE)
@mkdir -p .medikit; touch $@ @mkdir -p .medikit; touch $@
endif 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) @printf "Skipping \033[36m%s\033[0m because \033[36m$$QUICK\033[0m is not empty.\n" $(target)
else else
@printf "Applying \033[36m%s\033[0m target...\n" $(target) @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) $(PIP) install $(PIP_INSTALL_OPTIONS) -U $(PYTHON_REQUIREMENTS_JUPYTER_INLINE) -r $(PYTHON_REQUIREMENTS_JUPYTER_FILE)
@mkdir -p .medikit; touch $@ @mkdir -p .medikit; touch $@
endif 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) @printf "Skipping \033[36m%s\033[0m because \033[36m$$QUICK\033[0m is not empty.\n" $(target)
else else
@printf "Applying \033[36m%s\033[0m target...\n" $(target) @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) $(PIP) install $(PIP_INSTALL_OPTIONS) -U $(PYTHON_REQUIREMENTS_SQLALCHEMY_INLINE) -r $(PYTHON_REQUIREMENTS_SQLALCHEMY_FILE)
@mkdir -p .medikit; touch $@ @mkdir -p .medikit; touch $@
endif endif
@ -125,7 +125,7 @@ format: ## Reformats the whole codebase using our standards (requires black an
isort -rc -o mondrian -o whistle -y . isort -rc -o mondrian -o whistle -y .
medikit: # Checks installed medikit version and updates it if it is outdated. 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. update: medikit ## Update project artifacts using medikit.
$(MEDIKIT) update $(MEDIKIT_UPDATE_OPTIONS) $(MEDIKIT) update $(MEDIKIT_UPDATE_OPTIONS)

View File

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

View File

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

View File

@ -1,6 +1,6 @@
import bisect import bisect
import functools import functools
from collections import Sequence from collections.abc import Sequence
class sortedlist(list): class sortedlist(list):
@ -26,7 +26,8 @@ def _with_length_check(f):
if length is not None: if length is not None:
if length != len(result): if length != len(result):
raise TypeError( 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 return result

View File

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

View File

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

View File

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

View File

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

View File

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