Use authenticated_url when accessing HTTP BASIC repository#10432
Open
AndyLem wants to merge 1 commit intopython-poetry:mainfrom
Open
Use authenticated_url when accessing HTTP BASIC repository#10432AndyLem wants to merge 1 commit intopython-poetry:mainfrom
AndyLem wants to merge 1 commit intopython-poetry:mainfrom
Conversation
Reviewer's GuideUpdated HTTP repository request URL construction to use the authenticated_url property for endpoints, ensuring HTTP Basic credentials are included when accessing the repository. Class diagram for updated HTTP repository URL usageclassDiagram
class HttpRepository {
- _url: str
- authenticated_url: str
- session: requests.Session
+ _get_response(endpoint: str): requests.Response | None
...
}
HttpRepository : _get_response now uses authenticated_url for requests
File-Level Changes
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
radoering
reviewed
Aug 13, 2025
|
|
||
| def _get_response(self, endpoint: str) -> requests.Response | None: | ||
| url = self._url + endpoint | ||
| url = self.authenticated_url + endpoint |
Member
There was a problem hiding this comment.
I wonder if this is always correct? There is also
poetry/src/poetry/utils/authenticator.py
Lines 196 to 198 in fee7d0d
which seems to handle HTTP basic auth by adding a header if I understand correctly.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request Check List
Resolves: Authorization error accessing when using http-basic repository and credentials configuration
Summary by Sourcery
Bug Fixes: