sarugaku / resolvelib

Resolve abstract dependencies into concrete ones

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

find_matches() got an unexpected keyword argument 'identifier'

ikwyl6 opened this issue · comments

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'

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.

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?

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

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

No, they're intentionally keyword arguments.

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

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

Python 2 compatibility. :)

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