Skip to content

Pull in typing information from ResolveLib #9699

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

Merged
merged 3 commits into from
Apr 3, 2021

Conversation

uranusjr
Copy link
Member

@uranusjr uranusjr commented Mar 8, 2021

ResolveLib now distributes .pyi type stubs and uses generics to enforce type safety on provider hooks. Pull in and use them.

This PR should not contain any run-time behavioural change.

@uranusjr uranusjr added the type: maintenance Related to Development and Maintenance Processes label Mar 8, 2021
error = self.factory.get_installation_error(
cast("ResolutionImpossible[Requirement, Candidate]", e),
constraints,
)
Copy link
Member Author

Choose a reason for hiding this comment

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

Is there a better way to handle the type of e? ResolutionImpossible is a generic exception, but I’m not sure how to specify the type variables here.

Copy link
Member

@pradyunsg pradyunsg Apr 3, 2021

Choose a reason for hiding this comment

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

Nah, this is fine.

@uranusjr uranusjr added the skip news Does not need a NEWS file entry (eg: trivial changes) label Mar 9, 2021
@uranusjr uranusjr force-pushed the resolvelib-types branch 2 times, most recently from e1019b9 to b0842fe Compare March 9, 2021 11:01
@uranusjr uranusjr added the state: blocked Can not be done until something else is done label Mar 10, 2021
@uranusjr
Copy link
Member Author

Waiting for #9700.

@uranusjr uranusjr added project: vendored dependency Related to a vendored dependency and removed state: blocked Can not be done until something else is done skip news Does not need a NEWS file entry (eg: trivial changes) labels Mar 22, 2021
@BrownTruck
Copy link
Contributor

Hello!

I am an automated bot and I have noticed that this pull request is not currently able to be merged. If you are able to either merge the master branch into this pull request or rebase this pull request against master then it will be eligible for code review and hopefully merging!

@BrownTruck BrownTruck added the needs rebase or merge PR has conflicts with current master label Apr 3, 2021
@uranusjr
Copy link
Member Author

uranusjr commented Apr 3, 2021

I’m going to merge this later today.

Copy link
Member

@pradyunsg pradyunsg left a comment

Choose a reason for hiding this comment

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

I know I'd thought about this case when writing vendoring, but it makes me happy that this just works! :)

error = self.factory.get_installation_error(
cast("ResolutionImpossible[Requirement, Candidate]", e),
constraints,
)
Copy link
Member

@pradyunsg pradyunsg Apr 3, 2021

Choose a reason for hiding this comment

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

Nah, this is fine.

@uranusjr
Copy link
Member Author

uranusjr commented Apr 3, 2021

Er, the news bot is stuck for some reason.

@uranusjr uranusjr added skip news Does not need a NEWS file entry (eg: trivial changes) and removed needs rebase or merge PR has conflicts with current master skip news Does not need a NEWS file entry (eg: trivial changes) labels Apr 3, 2021
@uranusjr
Copy link
Member Author

uranusjr commented Apr 3, 2021

That works.

@uranusjr uranusjr merged commit 831f32e into pypa:main Apr 3, 2021
@uranusjr uranusjr deleted the resolvelib-types branch April 3, 2021 09:11
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 30, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
project: vendored dependency Related to a vendored dependency type: maintenance Related to Development and Maintenance Processes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants