From 8967ec65303ccfb2282c5be44b51fb7001097eed Mon Sep 17 00:00:00 2001 From: Michele Dolfi Date: Thu, 18 Jul 2024 17:06:51 +0200 Subject: [PATCH] pin docling-ibm-models 1.1.0 with python 3.10 support Signed-off-by: Michele Dolfi --- .github/workflows/checks.yml | 2 +- README.md | 4 +-- poetry.lock | 67 +++++++++++++++++++++++++++++++----- pyproject.toml | 8 ++--- 4 files changed, 65 insertions(+), 16 deletions(-) diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index 69a41782..03fa81a0 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -6,7 +6,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ['3.11', '3.12'] + python-version: ['3.10', '3.11', '3.12'] steps: - uses: actions/checkout@v3 - uses: ./.github/actions/setup-poetry diff --git a/README.md b/README.md index 0e80b3b2..5689e038 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ # Docling [![PyPI version](https://img.shields.io/pypi/v/docling)](https://pypi.org/project/docling/) -![Python](https://img.shields.io/badge/python-3.11%20%7C%203.12-blue) +![Python](https://img.shields.io/badge/python-3.10%20%7C%203.11%20%7C%203.12-blue) [![Poetry](https://img.shields.io/endpoint?url=https://python-poetry.org/badge/v0.json)](https://python-poetry.org/) [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black) [![Imports: isort](https://img.shields.io/badge/%20imports-isort-%231674b1?style=flat&labelColor=ef8336)](https://pycqa.github.io/isort/) @@ -35,7 +35,7 @@ pip install docling ### Development setup -To develop for Docling, you need Python 3.11 / 3.12 and Poetry. You can then install from your local clone's root dir: +To develop for Docling, you need Python 3.10 / 3.11 / 3.12 and Poetry. You can then install from your local clone's root dir: ```bash poetry install ``` diff --git a/poetry.lock b/poetry.lock index 7656e943..9873ebd5 100644 --- a/poetry.lock +++ b/poetry.lock @@ -35,7 +35,11 @@ files = [ [package.dependencies] lazy-object-proxy = ">=1.4.0" -wrapt = {version = ">=1.14,<2", markers = "python_version >= \"3.11\""} +typing-extensions = {version = ">=4.0.0", markers = "python_version < \"3.11\""} +wrapt = [ + {version = ">=1.11,<2", markers = "python_version < \"3.11\""}, + {version = ">=1.14,<2", markers = "python_version >= \"3.11\""}, +] [[package]] name = "asttokens" @@ -113,6 +117,8 @@ packaging = ">=22.0" pathspec = ">=0.9.0" platformdirs = ">=2" tokenize-rt = {version = ">=3.2.0", optional = true, markers = "extra == \"jupyter\""} +tomli = {version = ">=1.1.0", markers = "python_version < \"3.11\""} +typing-extensions = {version = ">=4.0.1", markers = "python_version < \"3.11\""} [package.extras] colorama = ["colorama (>=0.4.3)"] @@ -133,8 +139,10 @@ files = [ [package.dependencies] colorama = {version = "*", markers = "os_name == \"nt\""} +importlib-metadata = {version = ">=4.6", markers = "python_full_version < \"3.10.2\""} packaging = ">=19.1" pyproject_hooks = "*" +tomli = {version = ">=1.1.0", markers = "python_version < \"3.11\""} [package.extras] docs = ["furo (>=2023.08.17)", "sphinx (>=7.0,<8.0)", "sphinx-argparse-cli (>=1.5)", "sphinx-autodoc-typehints (>=1.10)", "sphinx-issues (>=3.0.0)"] @@ -727,13 +735,13 @@ tabulate = ">=0.9.0,<0.10.0" [[package]] name = "docling-ibm-models" -version = "0.2.0" +version = "1.1.0" description = "This package contains the AI models used by the Docling PDF conversion package" optional = false -python-versions = "<4.0,>=3.11" +python-versions = "<4.0,>=3.10" files = [ - {file = "docling_ibm_models-0.2.0-py3-none-any.whl", hash = "sha256:85c1308b1fb862a3e871f29917d298e1f079f9e00c882fa610422a6743811a49"}, - {file = "docling_ibm_models-0.2.0.tar.gz", hash = "sha256:0626086b5919c4e4977e9c8d28d07d0b1e37b06ea26e70a193fab0e3c8a2de49"}, + {file = "docling_ibm_models-1.1.0-py3-none-any.whl", hash = "sha256:c06fc0a2c3a520e566aade5bf7f719d4b26a75261f56f3e76c1c8fb5db370285"}, + {file = "docling_ibm_models-1.1.0.tar.gz", hash = "sha256:e0e409c9b4bed5b83560bba8a2dc7b48583c250b0ab78169b6eaa03f7bd68de6"}, ] [package.dependencies] @@ -884,6 +892,20 @@ Shapely = "*" torch = "*" torchvision = ">=0.5" +[[package]] +name = "exceptiongroup" +version = "1.2.2" +description = "Backport of PEP 654 (exception groups)" +optional = false +python-versions = ">=3.7" +files = [ + {file = "exceptiongroup-1.2.2-py3-none-any.whl", hash = "sha256:3111b9d131c238bec2f8f516e123e14ba243563fb135d3fe885990585aa7795b"}, + {file = "exceptiongroup-1.2.2.tar.gz", hash = "sha256:47c2edf7c6738fafb49fd34290706d1a1a2f4d1c6df275526b62cbb4aa5393cc"}, +] + +[package.extras] +test = ["pytest (>=6)"] + [[package]] name = "execnet" version = "2.1.1" @@ -981,6 +1003,7 @@ files = [ [package.dependencies] Flake8 = ">=5" +TOMLi = {version = "*", markers = "python_version < \"3.11\""} [package.extras] dev = ["pyTest", "pyTest-cov"] @@ -1313,6 +1336,7 @@ files = [ [package.dependencies] colorama = {version = "*", markers = "sys_platform == \"win32\""} decorator = "*" +exceptiongroup = {version = "*", markers = "python_version < \"3.11\""} jedi = ">=0.16" matplotlib-inline = "*" pexpect = {version = ">4.3", markers = "sys_platform != \"win32\" and sys_platform != \"emscripten\""} @@ -2188,6 +2212,7 @@ files = [ [package.dependencies] mypy-extensions = ">=1.0.0" +tomli = {version = ">=1.1.0", markers = "python_version < \"3.11\""} typing-extensions = ">=4.1.0" [package.extras] @@ -2560,6 +2585,8 @@ files = [ [package.dependencies] numpy = [ + {version = ">=1.21.4", markers = "python_version >= \"3.10\" and platform_system == \"Darwin\" and python_version < \"3.11\""}, + {version = ">=1.21.2", markers = "platform_system != \"Darwin\" and python_version >= \"3.10\" and python_version < \"3.11\""}, {version = ">=1.26.0", markers = "python_version >= \"3.12\""}, {version = ">=1.23.5", markers = "python_version >= \"3.11\" and python_version < \"3.12\""}, ] @@ -2582,6 +2609,8 @@ files = [ [package.dependencies] numpy = [ + {version = ">=1.21.4", markers = "python_version >= \"3.10\" and platform_system == \"Darwin\" and python_version < \"3.11\""}, + {version = ">=1.21.2", markers = "platform_system != \"Darwin\" and python_version >= \"3.10\" and python_version < \"3.11\""}, {version = ">=1.26.0", markers = "python_version >= \"3.12\""}, {version = ">=1.23.5", markers = "python_version >= \"3.11\" and python_version < \"3.12\""}, ] @@ -2637,6 +2666,7 @@ files = [ [package.dependencies] numpy = [ + {version = ">=1.22.4", markers = "python_version < \"3.11\""}, {version = ">=1.26.0", markers = "python_version >= \"3.12\""}, {version = ">=1.23.2", markers = "python_version == \"3.11\""}, ] @@ -2880,6 +2910,7 @@ pyproject-hooks = ">=1.0.0,<2.0.0" requests = ">=2.26,<3.0" requests-toolbelt = ">=1.0.0,<2.0.0" shellingham = ">=1.5,<2.0" +tomli = {version = ">=2.0.1,<3.0.0", markers = "python_version < \"3.11\""} tomlkit = ">=0.11.4,<1.0.0" trove-classifiers = ">=2022.5.19" virtualenv = ">=20.23.0,<21.0.0" @@ -3092,8 +3123,8 @@ files = [ annotated-types = ">=0.4.0" pydantic-core = "2.20.1" typing-extensions = [ - {version = ">=4.12.2", markers = "python_version >= \"3.13\""}, {version = ">=4.6.1", markers = "python_version < \"3.13\""}, + {version = ">=4.12.2", markers = "python_version >= \"3.13\""}, ] [package.extras] @@ -3258,10 +3289,14 @@ files = [ [package.dependencies] astroid = ">=2.15.8,<=2.17.0-dev0" colorama = {version = ">=0.4.5", markers = "sys_platform == \"win32\""} -dill = {version = ">=0.3.6", markers = "python_version >= \"3.11\""} +dill = [ + {version = ">=0.2", markers = "python_version < \"3.11\""}, + {version = ">=0.3.6", markers = "python_version >= \"3.11\""}, +] isort = ">=4.2.5,<6" mccabe = ">=0.6,<0.8" platformdirs = ">=2.2.0" +tomli = {version = ">=1.1.0", markers = "python_version < \"3.11\""} tomlkit = ">=0.10.1" [package.extras] @@ -3317,6 +3352,7 @@ files = [ [package.dependencies] flake8 = "6.1.0" +tomli = {version = "*", markers = "python_version < \"3.11\""} [[package]] name = "pyproject-hooks" @@ -3370,9 +3406,11 @@ files = [ [package.dependencies] colorama = {version = "*", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} iniconfig = "*" packaging = "*" pluggy = ">=0.12,<2.0" +tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} [package.extras] testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] @@ -4308,6 +4346,17 @@ files = [ {file = "toml-0.10.2.tar.gz", hash = "sha256:b3bda1d108d5dd99f4a20d24d9c348e91c4db7ab1b749200bded2f839ccbe68f"}, ] +[[package]] +name = "tomli" +version = "2.0.1" +description = "A lil' TOML parser" +optional = false +python-versions = ">=3.7" +files = [ + {file = "tomli-2.0.1-py3-none-any.whl", hash = "sha256:939de3e7a6161af0c887ef91b7d41a53e7c5a1ca976325f429cb46ea9bc30ecc"}, + {file = "tomli-2.0.1.tar.gz", hash = "sha256:de526c12914f0c550d15924c62d72abc48d6fe7364aa87328337a31007fe8a4f"}, +] + [[package]] name = "tomlkit" version = "0.13.0" @@ -4827,5 +4876,5 @@ test = ["big-O", "importlib-resources", "jaraco.functools", "jaraco.itertools", [metadata] lock-version = "2.0" -python-versions = "^3.11" -content-hash = "a2de0e26ae072cae8ca01360b4242695427ae2493e860a0bc9e8c11d2d4cf58e" +python-versions = "^3.10" +content-hash = "2e6880e3db1832a307518044dec3256d3abb8244217d5287ccc764088f2962be" diff --git a/pyproject.toml b/pyproject.toml index cb30c70f..55b23c89 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -21,10 +21,10 @@ keywords= ["docling", "convert", "document", "pdf", "layout model", "segmentatio packages = [{include = "docling"}] [tool.poetry.dependencies] -python = "^3.11" +python = "^3.10" pydantic = "^2.0.0" docling-core = "^1.1.0" -docling-ibm-models = "^0.2.0" +docling-ibm-models = "^1.1.0" deepsearch-glm = ">=0.19.0,<1" filetype = "^1.2.0" pypdfium2 = "^4.30.0" @@ -54,7 +54,7 @@ build-backend = "poetry.core.masonry.api" [tool.black] line-length = 88 -target-version = ["py311"] +target-version = ["py310"] include = '\.pyi?$' [tool.isort] @@ -66,7 +66,7 @@ py_version=311 pretty = true # strict = true no_implicit_optional = true -python_version = "3.11" +python_version = "3.10" [tool.flake8] max-line-length = 88