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

[v2] cannot import name 'DEFAULT_CIPHERS' from 'urllib3.util.ssl_ #8927

Closed
papoteur-mga opened this issue Sep 18, 2024 · 4 comments
Closed
Labels
source-distribution cli v2 source distritbution related issues

Comments

@papoteur-mga
Copy link

Describe the issue

With v2, botocore is bundled in a version 2.0.0 which can not use urllib3 v2.2.2.
This is a problem in Linux distribution which can not have easily more than one version of the same module.

Additional Information/Context

Processing /builddir/build/BUILD/aws-cli-2.17.53
  Preparing metadata (pyproject.toml): started
  Running command Preparing metadata (pyproject.toml)
  Preparing metadata (pyproject.toml): finished with status 'done'
Building wheels for collected packages: awscli
  Building wheel for awscli (pyproject.toml): started
  Running command Building wheel for awscli (pyproject.toml)
  Traceback (most recent call last):
    File "/usr/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
      main()
    File "/usr/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
      json_out['return_val'] = hook(**hook_input['kwargs'])
                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/usr/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 251, in build_wheel
      return _build_backend().build_wheel(wheel_directory, config_settings,
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/builddir/build/BUILD/aws-cli-2.17.53/backends/pep517.py", line 64, in build_wheel
      _inject_wheel_extras(os.path.join(wheel_directory, whl_filename))
    File "/builddir/build/BUILD/aws-cli-2.17.53/backends/pep517.py", line 189, in _inject_wheel_extras
      _build_and_inject_ac_index(BUILD_DIR, extracted_wheel_dir)
    File "/builddir/build/BUILD/aws-cli-2.17.53/backends/pep517.py", line 217, in _build_and_inject_ac_index
      ac_index_build_name = _build_ac_index(build_dir)
                            ^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/builddir/build/BUILD/aws-cli-2.17.53/backends/pep517.py", line 228, in _build_ac_index
      from awscli.autocomplete.generator import generate_index
    File "/builddir/build/BUILD/aws-cli-2.17.53/awscli/autocomplete/generator.py", line 17, in <module>
      from awscli.autocomplete.serverside.indexer import APICallIndexer
    File "/builddir/build/BUILD/aws-cli-2.17.53/awscli/autocomplete/serverside/indexer.py", line 18, in <module>
      import awscli.clidriver
    File "/builddir/build/BUILD/aws-cli-2.17.53/awscli/clidriver.py", line 22, in <module>
      import botocore.session
    File "/builddir/build/BUILD/aws-cli-2.17.53/awscli/botocore/session.py", line 27, in <module>
      import botocore.client
    File "/builddir/build/BUILD/aws-cli-2.17.53/awscli/botocore/client.py", line 16, in <module>
      from botocore import UNSIGNED, waiter, xform_name
    File "/builddir/build/BUILD/aws-cli-2.17.53/awscli/botocore/waiter.py", line 17, in <module>
      from botocore.docs.docstring import WaiterDocstring
    File "/builddir/build/BUILD/aws-cli-2.17.53/awscli/botocore/docs/__init__.py", line 15, in <module>
      from botocore.docs.service import ServiceDocumenter
    File "/builddir/build/BUILD/aws-cli-2.17.53/awscli/botocore/docs/service.py", line 14, in <module>
      from botocore.docs.client import ClientDocumenter, ClientExceptionsDocumenter
    File "/builddir/build/BUILD/aws-cli-2.17.53/awscli/botocore/docs/client.py", line 16, in <module>
      from botocore.docs.example import ResponseExampleDocumenter
    File "/builddir/build/BUILD/aws-cli-2.17.53/awscli/botocore/docs/example.py", line 13, in <module>
      from botocore.docs.shape import ShapeDocumenter
    File "/builddir/build/BUILD/aws-cli-2.17.53/awscli/botocore/docs/shape.py", line 19, in <module>
      from botocore.utils import is_json_value_header
    File "/builddir/build/BUILD/aws-cli-2.17.53/awscli/botocore/utils.py", line 36, in <module>
      import botocore.httpsession
    File "/builddir/build/BUILD/aws-cli-2.17.53/awscli/botocore/httpsession.py", line 21, in <module>
      from urllib3.util.ssl_ import (
  ImportError: cannot import name 'DEFAULT_CIPHERS' from 'urllib3.util.ssl_' (/usr/lib/python3.12/site-packages/urllib3/util/ssl_.py)
  error: subprocess-exited-with-error
  
  × Building wheel for awscli (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> See above for output.

CLI version used

2.17.53

Environment details (OS name and version, etc.)

Mageia cauldron

@papoteur-mga papoteur-mga added needs-triage This issue or PR still needs to be triaged. source-distribution cli v2 source distritbution related issues labels Sep 18, 2024
@nateprewitt
Copy link
Member

nateprewitt commented Sep 18, 2024

Hi @papoteur-mga,

Thanks for reaching out! I've opened #8930 to port the fixes from Botocore into the CLI v2 to ensure consistency.

As you're likely aware though, the CLI v2 does not officially support urllib3 2.x at this time. For your current use case, if there are still ongoing issues after that's merged, we'd recommend installing the CLI v2 in a virtualenv to isolate it from system dependencies. That should avoid a number of common issues between your Linux Package Manager and pip.

@nateprewitt nateprewitt added has-pr This issue has a PR associated with it. response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. pending-release This issue will be fixed by an approved PR that hasn't been released yet. and removed needs-triage This issue or PR still needs to be triaged. has-pr This issue has a PR associated with it. labels Sep 18, 2024
@nateprewitt
Copy link
Member

#8930 has been merged and should be available in the next release. I'll provide an update once that's finished and we'll plan to close this out if we don't hear back with any other concerns.

@github-actions github-actions bot removed the response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. label Sep 18, 2024
@nateprewitt nateprewitt added the response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. label Sep 18, 2024
@nateprewitt
Copy link
Member

The change should be available starting in 2.17.54 which was recently released. That should resolve the immediate issue noted in this ticket. I'll plan to resolve this at the end of today if we don't hear back anything further. Thanks!

@github-actions github-actions bot removed the response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. label Sep 19, 2024
Copy link

This issue is now closed. Comments on closed issues are hard for our team to see.
If you need more assistance, please open a new issue that references this one.

@nateprewitt nateprewitt removed the pending-release This issue will be fixed by an approved PR that hasn't been released yet. label Sep 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
source-distribution cli v2 source distritbution related issues
Projects
None yet
Development

No branches or pull requests

2 participants