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

Enhance check_version #183

Merged
merged 4 commits into from Nov 14, 2020
Merged

Conversation

layday
Copy link
Member

@layday layday commented Nov 8, 2020

No description provided.

@layday layday changed the title Enhance check version Enhance check_version Nov 8, 2020
@layday
Copy link
Member Author

layday commented Nov 8, 2020

I've made a few changes to return the dependency chain similar to how pip check does it.

src/build/__init__.py Outdated Show resolved Hide resolved
src/build/__main__.py Outdated Show resolved Hide resolved
@@ -49,49 +49,47 @@ class TypoWarning(Warning):
"""


class IncompleteCheckWarning(Warning):
def check_dependency(req_string, ancestral_req_strings=(), parent_extras=frozenset()):
Copy link
Member

Choose a reason for hiding this comment

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

I think it would be better to put effort in upstreaming this into pypa/packaging first, as proposed in pypa/packaging#317.

Copy link
Member Author

Choose a reason for hiding this comment

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

The impression I got was that they were reluctant to add anything which manipulates distributions. distlib would probably be a good fit but everybody seems to be moving away from it.

Copy link
Contributor

Choose a reason for hiding this comment

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

In my experience there's a long cycle with adding stuff to distlib... so if we want it soon we better add it here. We can always remove it if we do manage to upstream it.

Copy link
Member

Choose a reason for hiding this comment

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

I am in no hurry to merge this as it only affects people using --no-isolation when trying to verify recursive extras (extras that depend on extras), which is mostly distro packagers, for whom this is only a nice to have. I would rather put the effort into merging somewhere this could live long term rather than here. Before merging it here, we should figure out what would it take to put it somewhere else and then make the call.

Copy link
Contributor

Choose a reason for hiding this comment

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

I am in no hurry to merge this as it only affects people using --no-isolation

As a (new) contributor to this project, this sentence on its own would be enough for me to abandon spending any more effort (on this PR).

Copy link
Member Author

Choose a reason for hiding this comment

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

as it only affects people ... trying to verify recursive extras

check_version would not verify transitive dependencies at all, whether or not they came from extras.

Copy link
Member

Choose a reason for hiding this comment

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

Yes sorry, my bad.

tests/test_projectbuilder.py Outdated Show resolved Hide resolved
tests/test_projectbuilder.py Outdated Show resolved Hide resolved
@layday layday force-pushed the enhance-check-version branch 5 times, most recently from b679c24 to f084246 Compare November 10, 2020 17:06
With this change, `Builder.check_dependencies` will verify that
transitive dependencies are met, including those from extras,
and will return a set of variable-length ancestral and unmet dependency
tuples.

Closes pypa#25.
Copy link
Member

@FFY00 FFY00 left a comment

Choose a reason for hiding this comment

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

LGTM, let's wait a few days to see if we can hear something from pypa/packaging#317.

@layday
Copy link
Member Author

layday commented Nov 12, 2020

While we are waiting, would anybody know why the pypy3 tests are failing?

@gaborbernat
Copy link
Contributor

While we are waiting, would anybody know why the pypy3 tests are failing?

No, cold you investigate?

@layday
Copy link
Member Author

layday commented Nov 13, 2020

It looks like it's flaky - it passed on Ubuntu this time. Appears to be coverage-related, possibly nedbat/coveragepy#1010, judging from this line:

E                   _sqlite3.InterfaceError: Error binding parameter 0 - probably unsupported type.

I don't know why it'd appear now, there might be some interaction with the monkeypatch fixture which I replaced the global overwrite of importlib_metadata.Distribution with?

@layday
Copy link
Member Author

layday commented Nov 13, 2020

I dropped the commit which enabled branch coverage and that seems to have fixed it (or perhaps not). We can add branch cov in a separate PR.

@layday
Copy link
Member Author

layday commented Nov 14, 2020

Should we merge this now?

@gaborbernat gaborbernat merged commit c09403f into pypa:master Nov 14, 2020
@FFY00
Copy link
Member

FFY00 commented Nov 14, 2020

I specifically asked to wait, please do not merge things like this without getting the ack from everybody that raised concerns.

@layday
Copy link
Member Author

layday commented Nov 14, 2020

Well, I merely asked if we should merge it - that is, if it would've been time to merge it. It wasn't an invitation to merge it - sorry if I'd not made myself understood.

@FFY00
Copy link
Member

FFY00 commented Nov 14, 2020

The message was directed to Bernát, not you.

@gaborbernat
Copy link
Contributor

Sorry, thought we moved past that.

@layday layday deleted the enhance-check-version branch March 1, 2024 18:42
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

Successfully merging this pull request may close these issues.

None yet

3 participants