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

Issue #988: new resolver for pip #2716

Closed
wants to merge 11 commits into from
Closed

Conversation

rbtcollins
Copy link

@rbtcollins rbtcollins commented Apr 22, 2015

This is the branch I'm working up on issue #988. Right now its a bunch of preparatory plumbing to make access to many and varied versions of a single requirement possible and cheap - since we're very likely to hit the same thing again and again and again as we try different paths.

Review on Reviewable

assert self._req_cache is None
self._req_cache = req_cache

@property
Copy link
Member

Choose a reason for hiding this comment

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

This seems to have nothing to do with this PR ?

Copy link
Author

Choose a reason for hiding this comment

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

Its adding the req_cache, a set-but-not-change attribute.

Copy link
Member

Choose a reason for hiding this comment

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

No, I was pointing the specifier switching to a property :)

Copy link
Author

Choose a reason for hiding this comment

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

it was already, its just the diff anchoring oddly.

@xavfernandez
Copy link
Member

I've an issue with the RequirementCache name as it does not look (yet ?) to me like a cache...

@rbtcollins rbtcollins force-pushed the issue-988 branch 7 times, most recently from 4638f88 to 28708d2 Compare April 29, 2015 10:00
@rbtcollins rbtcollins changed the title Move BuildDirectory to RequirementCache Issue #988: Resolve requirements from multiple sources Apr 29, 2015
class RequirementCache(object):
"""A cache of requirements.

:attr delete: May be set to False to disable deleting the cache.
Copy link
Contributor

Choose a reason for hiding this comment

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

The first time I read this I thought "deleting the cache" meant an in-memory object; reading the docstring for __init__ I realised that it actually refers to the on-disk cache artifacts

Maybe "deleting the cached artifacts" or "deleting the cached files" would be clearer here, but I think this is a minor issue.

@rbtcollins rbtcollins force-pushed the issue-988 branch 6 times, most recently from a4ba3fe to a834dcf Compare May 8, 2015 08:05
"""
# make the wheelhouse
if self.wheel_download_dir:
ensure_dir(self.wheel_download_dir)
# Allow for a decent # of reqs
# Each dep in the graph is a frame.
sys.setrecursionlimit(5000)
Copy link

Choose a reason for hiding this comment

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

Should this just be dynamically computed (since we should know the height of the tree)? Perhaps something for later as this gets optmized more...

Copy link

Choose a reason for hiding this comment

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

Actually nm, we don't know the tree height (if new dependencies keep on getting pulled in); so cancel that question (although we do know a starting/potential height and/or guess).

@rbtcollins rbtcollins force-pushed the issue-988 branch 4 times, most recently from 2c1e6e3 to 66be196 Compare May 8, 2015 22:05
Since the point of the Cache is to own the directories and all the
metadata about requirements, they need to own this stuff.
Currently we delete succesfully installed requirements and not ones
that failed. Then (most of the time) we delete the requirements cache
that contained them, deleting everything. This means that useful
debugging context is lost (when we don't delete the cache), and we've
got complexity serving no point. Instead, either keep everything or
delete it all.
Its useful to know whats happening, so push the existing logging down
to debug, and store the skip reason (which will be constant for a
given req) on the req itself.
Still a very large commit with lots of unresolved duplication.
:param version: The version that was selected.
:return: The InstallationCandidate.
"""
canonical_name = pkg_resources.safe_name(name).lower()
Copy link
Member

Choose a reason for hiding this comment

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

You could use pip.utils.canonicalize_name. And there are a bunch of other places also :)

@qwcode qwcode changed the title Issue #988: Resolve requirements from multiple sources Issue #988: new resolver for pip Nov 3, 2015
@dstufft dstufft closed this May 18, 2016
@dstufft
Copy link
Member

dstufft commented May 18, 2016

Accidentally closed this, reopening. Sorry!

@dstufft dstufft reopened this May 18, 2016
@BrownTruck
Copy link
Contributor

Hello!

As part of an effort to ease the contribution process and adopt a more standard workflow pip has switched to doing development on the master branch. However, this Pull Request was made against the develop branch so it will need to be resubmitted against master. Unfortunately, this pull request does not cleanly merge against the current master branch.

If you do nothing, this Pull Request will be automatically closed by @BrownTruck since it cannot be merged.

If this pull request is still valid, please rebase it against master (or merge master into it) and resubmit it against the master branch, closing and referencing the original Pull Request.

If you choose to rebase/merge and resubmit this Pull Request, here is an example message that you can copy and paste:

This is the branch I'm working up on issue #988. Right now its a bunch of preparatory plumbing to make access to many and varied versions of a single requirement possible and cheap - since we're very likely to hit the same thing again and again and again as we try different paths.

---

*This was migrated from pypa/pip#2716 to reparent it to the ``master`` branch. Please see original pull request for any previous discussion.*

@BrownTruck BrownTruck added asked to reparent auto-bitrotten PRs that died because they weren't updated labels May 19, 2016
@BrownTruck
Copy link
Contributor

This Pull Request was closed because it cannot be automatically reparented to the master branch and it appears to have bit rotted.

Please feel free to re-open it or re-submit it if it is still valid and you have rebased it onto master or merged master into it.

@pradyunsg
Copy link
Member

@rbtcollins Would you be fine if I reuse the work here? I'm pretty sure you would be... Just confirming.

@rbtcollins
Copy link
Author

rbtcollins commented Jan 15, 2017 via email

@lock lock bot added the auto-locked Outdated issues that have been locked by automation label Jun 3, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Jun 3, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
auto-bitrotten PRs that died because they weren't updated auto-locked Outdated issues that have been locked by automation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants