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

Compatibility with pip-system-certs #915

Closed
defransen opened this issue Jul 27, 2022 · 1 comment
Closed

Compatibility with pip-system-certs #915

defransen opened this issue Jul 27, 2022 · 1 comment

Comments

@defransen
Copy link

defransen commented Jul 27, 2022

Environment

  1. OS: Windows 10
  2. Python: 3.10.2
  3. Twine Installation: in Virtualenv with pip
  4. Twine Version: 4.0.1
  5. Target package repository: private Gitlab repository with enterprise certificates

The Issue

Twine replaces the HTTPAdapters in

for scheme in ("http://", "https://"):
self.session.mount(scheme, self._make_adapter_with_retries())

This reverts the patching done by pip-system-certs

The (most simple) Solution

A better alternative would be to just assign the Retrys to the existing adapters:

retry = urllib3.Retry(
   ...
)
for scheme in ("http://", "https://"):
    self.session.adapters[scheme].max_retries = retry
@sigmavirus24
Copy link
Member

That library isn't supported by us

@sigmavirus24 sigmavirus24 closed this as not planned Won't fix, can't repro, duplicate, stale Jul 27, 2022
James-E-A added a commit to James-E-A/pypa-twine that referenced this issue Feb 1, 2024
The lack of this has been a *perennial* thorn for people behind
corporate TLS MITM ALG proxies; when it's soluble, it's still
annoying, and sometimes the proxy applications don't use a stable
root bundle, rendering the situation kinda insoluble.

- pypa#328
- pypa#387
- pypa#536
- pypa#740
- pypa#741
- pypa#835
- pypa#915
- pypa#1025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants