Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] pip install fails on logbook dependency due to setuptools==72.0.0 update #1152

Closed
2 tasks done
gonzalorhervas opened this issue Jul 29, 2024 · 2 comments
Closed
2 tasks done
Labels
bug Something isn't working

Comments

@gonzalorhervas
Copy link

gonzalorhervas commented Jul 29, 2024

Is this a new bug in dbt-snowflake?

  • I believe this is a new bug in dbt-snowflake
  • I have searched the existing issues, and I could not find an existing issue for this bug

Current Behavior

When I try to install dbt-snowflake using pip, I get an error when trying to install logbook dependency (see log in "Relevant log output" section).

Package dependency is set with version constraints logbook<1.6,>=1.5, which returns a ModuleNotFoundError: No module named 'setuptools.command.test' as latest update to setuptools (72.0.0, implemented yesterday) has deprecated setuptools.command.test.

Note: With the latest version of logbook (1.7.0) the error doesn't happen.

Expected Behavior

The pip install dbt-snowflake command should install the package without any issues.

Steps To Reproduce

  1. Create a virtualenv (e.g. python -m venv .venv)
  2. Activate venv: source .venv/bin/activate
  3. Try to install dbt-snowflake package: pip install dbt-snowflake

Relevant log output

Collecting dbt-snowflake
  Using cached dbt_snowflake-1.8.3-py3-none-any.whl.metadata (3.2 kB)
Collecting dbt-common<2.0,>=1.0.4 (from dbt-snowflake)
  Using cached dbt_common-1.6.0-py3-none-any.whl.metadata (5.3 kB)
Collecting dbt-adapters<2.0,>=1.1.1 (from dbt-snowflake)
  Using cached dbt_adapters-1.3.2-py3-none-any.whl.metadata (2.5 kB)
Collecting snowflake-connector-python~=3.0 (from snowflake-connector-python[secure-local-storage]~=3.0->dbt-snowflake)
  Using cached snowflake_connector_python-3.12.0-cp39-cp39-macosx_11_0_arm64.whl.metadata (64 kB)
Collecting dbt-core>=1.8.0 (from dbt-snowflake)
  Using cached dbt_core-1.8.4-py3-none-any.whl.metadata (3.9 kB)
Collecting agate (from dbt-snowflake)
  Using cached agate-1.11.0-py2.py3-none-any.whl.metadata (3.2 kB)
Collecting mashumaro<4.0,>=3.0 (from mashumaro[msgpack]<4.0,>=3.0->dbt-adapters<2.0,>=1.1.1->dbt-snowflake)
  Using cached mashumaro-3.13.1-py3-none-any.whl.metadata (114 kB)
Collecting protobuf<5.0,>=3.0 (from dbt-adapters<2.0,>=1.1.1->dbt-snowflake)
  Using cached protobuf-4.25.4-cp37-abi3-macosx_10_9_universal2.whl.metadata (541 bytes)
Collecting pytz>=2015.7 (from dbt-adapters<2.0,>=1.1.1->dbt-snowflake)
  Using cached pytz-2024.1-py2.py3-none-any.whl.metadata (22 kB)
Collecting typing-extensions<5.0,>=4.0 (from dbt-adapters<2.0,>=1.1.1->dbt-snowflake)
  Using cached typing_extensions-4.12.2-py3-none-any.whl.metadata (3.0 kB)
Collecting Babel>=2.0 (from agate->dbt-snowflake)
  Using cached Babel-2.15.0-py3-none-any.whl.metadata (1.5 kB)
Collecting isodate>=0.5.4 (from agate->dbt-snowflake)
  Using cached isodate-0.6.1-py2.py3-none-any.whl.metadata (9.6 kB)
Collecting leather>=0.3.2 (from agate->dbt-snowflake)
  Using cached leather-0.4.0-py2.py3-none-any.whl.metadata (2.8 kB)
Collecting parsedatetime!=2.5,>=2.1 (from agate->dbt-snowflake)
  Using cached parsedatetime-2.6-py3-none-any.whl.metadata (4.7 kB)
Collecting python-slugify>=1.2.1 (from agate->dbt-snowflake)
  Using cached python_slugify-8.0.4-py2.py3-none-any.whl.metadata (8.5 kB)
Collecting pytimeparse>=1.1.5 (from agate->dbt-snowflake)
  Using cached pytimeparse-1.1.8-py2.py3-none-any.whl.metadata (3.4 kB)
Collecting agate (from dbt-snowflake)
  Using cached agate-1.9.1-py2.py3-none-any.whl.metadata (3.2 kB)
Collecting colorama<0.5,>=0.3.9 (from dbt-common<2.0,>=1.0.4->dbt-snowflake)
  Using cached colorama-0.4.6-py2.py3-none-any.whl.metadata (17 kB)
Collecting deepdiff<8.0,>=7.0 (from dbt-common<2.0,>=1.0.4->dbt-snowflake)
  Using cached deepdiff-7.0.1-py3-none-any.whl.metadata (6.8 kB)
Collecting jinja2<4,>=3.1.3 (from dbt-common<2.0,>=1.0.4->dbt-snowflake)
  Using cached jinja2-3.1.4-py3-none-any.whl.metadata (2.6 kB)
Collecting jsonschema<5.0,>=4.0 (from dbt-common<2.0,>=1.0.4->dbt-snowflake)
  Using cached jsonschema-4.23.0-py3-none-any.whl.metadata (7.9 kB)
Collecting pathspec<0.13,>=0.9 (from dbt-common<2.0,>=1.0.4->dbt-snowflake)
  Using cached pathspec-0.12.1-py3-none-any.whl.metadata (21 kB)
Collecting python-dateutil<3.0,>=2.0 (from dbt-common<2.0,>=1.0.4->dbt-snowflake)
  Using cached python_dateutil-2.9.0.post0-py2.py3-none-any.whl.metadata (8.4 kB)
Collecting requests<3.0.0 (from dbt-common<2.0,>=1.0.4->dbt-snowflake)
  Using cached requests-2.32.3-py3-none-any.whl.metadata (4.6 kB)
Collecting logbook<1.6,>=1.5 (from dbt-core>=1.8.0->dbt-snowflake)
  Using cached Logbook-1.5.3.tar.gz (85 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  error: subprocess-exited-with-error
  
  × Getting requirements to build wheel did not run successfully.
  │ exit code: 1
  ╰─> [17 lines of output]
      Traceback (most recent call last):
        File "/Users/gonzalo.rodriguez/Projects/ah-data-team-dbt/venv/lib/python3.9/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
          main()
        File "/Users/gonzalo.rodriguez/Projects/ah-data-team-dbt/venv/lib/python3.9/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
        File "/Users/gonzalo.rodriguez/Projects/ah-data-team-dbt/venv/lib/python3.9/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel
          return hook(config_settings)
        File "/private/var/folders/p3/y0vscqt564q00vmh9v57c7500000gq/T/pip-build-env-x4033_hn/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 327, in get_requires_for_build_wheel
          return self._get_build_requires(config_settings, requirements=[])
        File "/private/var/folders/p3/y0vscqt564q00vmh9v57c7500000gq/T/pip-build-env-x4033_hn/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 297, in _get_build_requires
          self.run_setup()
        File "/private/var/folders/p3/y0vscqt564q00vmh9v57c7500000gq/T/pip-build-env-x4033_hn/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 497, in run_setup
          super().run_setup(setup_script=setup_script)
        File "/private/var/folders/p3/y0vscqt564q00vmh9v57c7500000gq/T/pip-build-env-x4033_hn/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 313, in run_setup
          exec(code, locals())
        File "<string>", line 64, in <module>
      ModuleNotFoundError: No module named 'setuptools.command.test'
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.

Environment

- OS: macOS Sonoma 14.5
- Python: 3.9.19 (through `pyenv`)
- dbt-snowflake: tested with 1.7.1 and 1.8.3

Additional Context

No response

@gonzalorhervas gonzalorhervas added bug Something isn't working triage labels Jul 29, 2024
@mateuszkr-ap
Copy link

mateuszkr-ap commented Jul 29, 2024

Hi, been fighting with this today as well, setuptools 72.0.0 was yanked - pypa/setuptools#4518 and pypa/setuptools#4519.

@amychen1776 amychen1776 removed the triage label Aug 2, 2024
@colin-rogers-dbt
Copy link
Contributor

Closing this as this is an issue with setuptools, also as this dependency is defined in dbt-core I would recommend opening this issue there.
https://github.com/dbt-labs/dbt-core/blob/1.8.latest/core/setup.py

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants