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

requests dep not updated on latest release - ImportError: cannot import name 'atomic_open' from 'requests.utils' #8338

Closed
4 tasks done
gsingh1 opened this issue Aug 21, 2023 · 1 comment · Fixed by #8336
Closed
4 tasks done
Labels
area/project/deps Related to Poetry's own dependencies kind/bug Something isn't working as expected

Comments

@gsingh1
Copy link

gsingh1 commented Aug 21, 2023

  • Poetry version: Poetry (version 1.6.0)
  • Python version: 3.10.5
  • OS version and name: Ubuntu 22.04
  • pyproject.toml: n/a
  • I am on the latest stable Poetry version, installed using a recommended method.
  • I have searched the issues of this repo and believe that this is not a duplicate.
  • I have consulted the FAQ and blog for any relevant entries or release notes.
  • If an exception occurs when executing a command, I executed it again in debug mode (-vvv option) and have included the output below.

Issue

The latest https://github.com/python-poetry/poetry/releases/tag/1.6.0 uses a new version of requests that has the atomic_open function defined. However, this is not being pulled in when installing poetry using pip.

It seems that the requests package version has not been bumped ^2.26 where the function exists. The fix probably relates around bumping this dep's version so that folks will install the correct required dependencies.

I have also tried recreating this by installing poetry using the official installer script, however things work as expected so it must be pulling in the latest version of the dep somewhere.

/home/runner/.local/bin/poetry config --list
Traceback (most recent call last):
  File "/home/runner/.local/lib/python3.8/site-packages/cleo/application.py", line 327, in run
    exit_code = self._run(io)
  File "/home/runner/.local/lib/python3.8/site-packages/poetry/console/application.py", line 188, in _run
    self._load_plugins(io)
  File "/home/runner/.local/lib/python3.8/site-packages/poetry/console/application.py", line 354, in _load_plugins
    manager.load_plugins()
  File "/home/runner/.local/lib/python3.8/site-packages/poetry/plugins/plugin_manager.py", line 38, in load_plugins
    self._load_plugin_entry_point(ep)
  File "/home/runner/.local/lib/python3.8/site-packages/poetry/plugins/plugin_manager.py", line 76, in _load_plugin_entry_point
    plugin = ep.load()  # type: ignore[no-untyped-call]
  File "/home/runner/.local/lib/python3.8/site-packages/importlib_metadata/__init__.py", line 209, in load
    module = import_module(match.group('module'))
  File "/usr/lib/python3.8/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 848, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/home/runner/.local/lib/python3.8/site-packages/poetry_plugin_export/plugins.py", line 7, in <module>
    from poetry_plugin_export.command import ExportCommand
  File "/home/runner/.local/lib/python3.8/site-packages/poetry_plugin_export/command.py", line 10, in <module>
    from poetry_plugin_export.exporter import Exporter
  File "/home/runner/.local/lib/python3.8/site-packages/poetry_plugin_export/exporter.py", line 11, in <module>
    from poetry.repositories.http_repository import HTTPRepository
  File "/home/runner/.local/lib/python3.8/site-packages/poetry/repositories/http_repository.py", line 27, in <module>
    from poetry.utils.helpers import download_file
  File "/home/runner/.local/lib/python3.8/site-packages/poetry/utils/helpers.py", line 17, in <module>
    from requests.utils import atomic_open
ImportError: cannot import name 'atomic_open' from 'requests.utils' (/usr/lib/python3/dist-packages/requests/utils.py)
@gsingh1 gsingh1 added kind/bug Something isn't working as expected status/triage This issue needs to be triaged labels Aug 21, 2023
@gsingh1 gsingh1 mentioned this issue Aug 21, 2023
2 tasks
@radoering radoering added area/project/deps Related to Poetry's own dependencies and removed status/triage This issue needs to be triaged labels Aug 21, 2023
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 29, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area/project/deps Related to Poetry's own dependencies kind/bug Something isn't working as expected
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants
@gsingh1 @radoering and others