Skip to content

bug: implicit dependency on packaging library -- not declared in pyproject.toml #11597

@cpeel

Description

@cpeel

What happened?

ibis 10.7.0 and later depend on the packaging library, but does not specify it in pyproject.toml.

As an example:

┏╸~/git/trashme
┗╸❯❯❯ python3 -m venv venv
┏╸~/git/trashme
┗╸❯❯❯ source venv/bin/activate
(venv) ┏╸~/git/trashme
┗╸❯❯❯ pip install ibis-framework==10.8.0
Collecting ibis-framework==10.8.0
  Downloading ibis_framework-10.8.0-py3-none-any.whl.metadata (20 kB)
Collecting atpublic>=2.3 (from ibis-framework==10.8.0)
  Downloading atpublic-6.0.1-py3-none-any.whl.metadata (2.0 kB)
Collecting parsy>=2 (from ibis-framework==10.8.0)
  Using cached parsy-2.1-py3-none-any.whl.metadata (3.3 kB)
Collecting python-dateutil>=2.8.2 (from ibis-framework==10.8.0)
  Using cached python_dateutil-2.9.0.post0-py2.py3-none-any.whl.metadata (8.4 kB)
Collecting sqlglot!=26.32.0,>=23.4 (from ibis-framework==10.8.0)
  Downloading sqlglot-27.10.0-py3-none-any.whl.metadata (20 kB)
Collecting toolz>=0.11 (from ibis-framework==10.8.0)
  Downloading toolz-1.0.0-py3-none-any.whl.metadata (5.1 kB)
Collecting typing-extensions>=4.3.0 (from ibis-framework==10.8.0)
  Downloading typing_extensions-4.15.0-py3-none-any.whl.metadata (3.3 kB)
Collecting tzdata>=2022.7 (from ibis-framework==10.8.0)
  Using cached tzdata-2025.2-py2.py3-none-any.whl.metadata (1.4 kB)
Collecting six>=1.5 (from python-dateutil>=2.8.2->ibis-framework==10.8.0)
  Using cached six-1.17.0-py2.py3-none-any.whl.metadata (1.7 kB)
Downloading ibis_framework-10.8.0-py3-none-any.whl (1.9 MB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.9/1.9 MB 20.1 MB/s eta 0:00:00
Downloading atpublic-6.0.1-py3-none-any.whl (6.4 kB)
Using cached parsy-2.1-py3-none-any.whl (9.1 kB)
Using cached python_dateutil-2.9.0.post0-py2.py3-none-any.whl (229 kB)
Downloading sqlglot-27.10.0-py3-none-any.whl (506 kB)
Downloading toolz-1.0.0-py3-none-any.whl (56 kB)
Downloading typing_extensions-4.15.0-py3-none-any.whl (44 kB)
Using cached tzdata-2025.2-py2.py3-none-any.whl (347 kB)
Using cached six-1.17.0-py2.py3-none-any.whl (11 kB)
Installing collected packages: tzdata, typing-extensions, toolz, sqlglot, six, parsy, atpublic, python-dateutil, ibis-framework
Successfully installed atpublic-6.0.1 ibis-framework-10.8.0 parsy-2.1 python-dateutil-2.9.0.post0 six-1.17.0 sqlglot-27.10.0 toolz-1.0.0 typing-extensions-4.15.0 tzdata-2025.2

[notice] A new release of pip is available: 25.0.1 -> 25.2
[notice] To update, run: pip install --upgrade pip
(venv) ┏╸~/git/trashme
┗╸❯❯❯ python3
Python 3.13.3 (main, Apr  8 2025, 13:54:08) [Clang 16.0.0 (clang-1600.0.26.6)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import ibis
Traceback (most recent call last):
  File "<python-input-0>", line 1, in <module>
    import ibis
  File "/Users/casey.peel/git/trashme/venv/lib/python3.13/site-packages/ibis/__init__.py", line 10, in <module>
    from ibis import examples, util
  File "/Users/casey.peel/git/trashme/venv/lib/python3.13/site-packages/ibis/examples/__init__.py", line 8, in <module>
    from ibis.common.grounds import Concrete
  File "/Users/casey.peel/git/trashme/venv/lib/python3.13/site-packages/ibis/common/grounds.py", line 14, in <module>
    from ibis.common.annotations import (
    ...<4 lines>...
    )
  File "/Users/casey.peel/git/trashme/venv/lib/python3.13/site-packages/ibis/common/annotations.py", line 12, in <module>
    from ibis.common.patterns import (
    ...<6 lines>...
    )
  File "/Users/casey.peel/git/trashme/venv/lib/python3.13/site-packages/ibis/common/patterns.py", line 26, in <module>
    from ibis.common.deferred import (
    ...<6 lines>...
    )
  File "/Users/casey.peel/git/trashme/venv/lib/python3.13/site-packages/ibis/common/deferred.py", line 13, in <module>
    from ibis.util import PseudoHashable
  File "/Users/casey.peel/git/trashme/venv/lib/python3.13/site-packages/ibis/util.py", line 26, in <module>
    from packaging.version import parse as vparse
ModuleNotFoundError: No module named 'packaging'

This was introduced in 27a1e86acd:

diff --git a/ibis/util.py b/ibis/util.py
index ce41c4a6e..be8f2e939 100644
--- a/ibis/util.py
+++ b/ibis/util.py
@@ -23,6 +23,7 @@ from typing import TYPE_CHECKING, Any, Callable, Generic, TypeVar
 from uuid import uuid4

 import toolz
+from packaging.version import parse as vparse

 from ibis.common.typing import Coercible

What version of ibis are you using?

10.8.0, but that commit is also in the 10.7.0 tag.

What backend(s) are you using, if any?

No response

Relevant log output

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIncorrect behavior inside of ibis

    Type

    No type

    Projects

    Status

    backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions