sarugaku / resolvelib

Resolve abstract dependencies into concrete ones
ISC License
138 stars 31 forks source link

find_matches() got an unexpected keyword argument 'identifier' #82

Closed ikwyl6 closed 3 years ago

ikwyl6 commented 3 years ago

When upgrading a package (plcoud) I am starting to get these errors, doesn't matter what pkg it is or if I am root or not. It looks like a TypeError. I did upgrade resolvelib a few months ago using pacman but I made the mistake of doing a pip install --upgrade resolvelib and I am currently running version 0.7.1 from pip.

Should I remove the pip 0.7.1 version and reinstall the pacman 0.5.5-1 version?

$ pip install --upgrade pcloud
Defaulting to user installation because normal site-packages is not writeable
ERROR: Exception:
Traceback (most recent call last):
  File "/usr/lib/python3.9/site-packages/pip/_internal/cli/base_command.py", line 223, in _main
    status = self.run(options, args)
  File "/usr/lib/python3.9/site-packages/pip/_internal/cli/req_command.py", line 180, in wrapper
    return func(self, options, args)
  File "/usr/lib/python3.9/site-packages/pip/_internal/commands/install.py", line 320, in run
    requirement_set = resolver.resolve(
  File "/usr/lib/python3.9/site-packages/pip/_internal/resolution/resolvelib/resolver.py", line 121, in resolve
    self._result = resolver.resolve(
  File "/usr/lib/python3.9/site-packages/resolvelib/resolvers.py", line 472, in resolve
    state = resolution.resolve(requirements, max_rounds=max_rounds)
  File "/usr/lib/python3.9/site-packages/resolvelib/resolvers.py", line 341, in resolve
    self._add_to_criteria(self.state.criteria, r, parent=None)
  File "/usr/lib/python3.9/site-packages/resolvelib/resolvers.py", line 147, in _add_to_criteria
    matches = self._p.find_matches(
TypeError: find_matches() got an unexpected keyword argument 'identifier'
$ sudo pip install --upgrade pcloud
[sudo] password for alarm: 
ERROR: Exception:
Traceback (most recent call last):
  File "/usr/lib/python3.9/site-packages/pip/_internal/cli/base_command.py", line 223, in _main
    status = self.run(options, args)
  File "/usr/lib/python3.9/site-packages/pip/_internal/cli/req_command.py", line 180, in wrapper
    return func(self, options, args)
  File "/usr/lib/python3.9/site-packages/pip/_internal/commands/install.py", line 320, in run
    requirement_set = resolver.resolve(
  File "/usr/lib/python3.9/site-packages/pip/_internal/resolution/resolvelib/resolver.py", line 121, in resolve
    self._result = resolver.resolve(
  File "/usr/lib/python3.9/site-packages/resolvelib/resolvers.py", line 472, in resolve
    state = resolution.resolve(requirements, max_rounds=max_rounds)
  File "/usr/lib/python3.9/site-packages/resolvelib/resolvers.py", line 341, in resolve
    self._add_to_criteria(self.state.criteria, r, parent=None)
  File "/usr/lib/python3.9/site-packages/resolvelib/resolvers.py", line 147, in _add_to_criteria
    matches = self._p.find_matches(
TypeError: find_matches() got an unexpected keyword argument 'identifier'
pradyunsg commented 3 years ago

How did you install pip? This looks like it has been modified by a redistributor (like a Linux distro). It would be more appropriate to go to their support channels to get support for the broken state of your installation.

ikwyl6 commented 3 years ago

I haven't had problems with pip in years.. this is the only time I've had issues..Even if I have resolvelib 0.7.1 installed, shouldn't it still work?

ikwyl6 commented 3 years ago

I removed the 0.7.1 pkg and reinstalled my distribution pkg (0.5.5-1).

claui commented 2 years ago

I still think this is a regression introduced in 0.6.0. These are supposed to be positional arguments, not keyword arguments, right?

pradyunsg commented 2 years ago

No, they're intentionally keyword arguments.

There's no compatibility promises across different minor versions while we're on 0.x.

claui commented 2 years ago

In that case, wouldn’t the AbstractProvider need keyword arguments in its declaration, too?

pradyunsg commented 2 years ago

Python 2 compatibility. :)

claui commented 2 years ago

Ohh I see. My mistake. TIL positional-and-keyword arguments are a thing in Python. Thanks @pradyunsg for clearing this up!