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

Fix handling errors 401, 403 when looking for repositories #3337

Merged
merged 2 commits into from
Mar 25, 2021

Conversation

cereblanco
Copy link
Contributor

@cereblanco cereblanco commented Nov 7, 2020

Pull Request Check List

fixes error handling related to: #3303

  • Added tests for changed code.
  • Updated documentation for changed code.

@MeanderingCode
Copy link

MeanderingCode commented Dec 11, 2020

My experience of our pypicloud returning an HTTP 401 is that requests raises an HTTPError, meaning that I believe your response status code should go in the except HTTPError block.

But that aside, this does not fix the authentication problems some (myself included) are finding with, for example, a pypicloud serving private packages directly with HTTP Basic auth or via authenticated AWS S3 URLs.

See #3041

Perhaps proper error handling, as this addresses, is separate, but I wanted to ensure you had more context.

EDIT: Read more code and realized authentication is not related to this.

@MeanderingCode
Copy link

Looks like the exception is raised manually, below your conditional, so I believe I spoke in error.

@jensgustafsson
Copy link

What's the status on this PR?

Copy link
Member

@abn abn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your contribution @cereblanco. This might require a rebase as well.

tests/repositories/test_legacy_repository.py Outdated Show resolved Hide resolved
tests/repositories/test_legacy_repository.py Outdated Show resolved Hide resolved
Co-authored-by: Arun Babu Neelicattu <arun.neelicattu@gmail.com>
@kasteph
Copy link
Member

kasteph commented Mar 25, 2021

Hi @cereblanco this PR still needs to be rebased because of the breaking CI build. Thank you in advance!

@abn abn merged commit 3c9ced2 into python-poetry:master Mar 25, 2021
@erdemuysal
Copy link

Hi 🤚

How can I get information about when the new version with this change will be released?
We need this in our scenario.

@cereblanco cereblanco deleted the issue-3303 branch May 18, 2021 07:52
@ogunoz
Copy link

ogunoz commented Sep 21, 2021

@erdemuysal I faced the same issue. They approved the MR for poetry 1.2.0 release

Currently it is available only as an alpha release. It solved my problem.
You can update your poetry with either:
poetry self update --preview
or:
pip install https://github.com/python-poetry/poetry/releases/download/1.2.0a2/poetry-1.2.0a2-py3-none-any.whl

@judahrand
Copy link

Is there a reason not to back port this to 1.11? @stephsamson

@1ace
Copy link
Contributor

1ace commented Feb 8, 2022

@abn @sdispater Could this simple and non-intrusive fix be backported to 1.1.x please? Thank you 🙂

Copy link

This pull request 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
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants