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

UnsupportedLockDependency Exception with 0.0.6 #54

Closed
bparzella opened this issue Nov 9, 2020 · 6 comments · Fixed by #55
Closed

UnsupportedLockDependency Exception with 0.0.6 #54

bparzella opened this issue Nov 9, 2020 · 6 comments · Fixed by #55

Comments

@bparzella
Copy link

I get the following exception when running tox-poetry-dev-dependencies 0.0.6:

Traceback (most recent call last):
  File "c:\users\user\.pyenv\pyenv-win\versions\3.6.8\lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "c:\users\user\.pyenv\pyenv-win\versions\3.6.8\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "D:\Data\package\.tox\.tox\lib\site-packages\tox\__main__.py", line 4, in <module>
    tox.cmdline()
  File "D:\Data\package\.tox\.tox\lib\site-packages\tox\session\__init__.py", line 44, in cmdline
    main(args)
  File "D:\Data\package\.tox\.tox\lib\site-packages\tox\session\__init__.py", line 65, in main
    config = load_config(args)
  File "D:\Data\package\.tox\.tox\lib\site-packages\tox\session\__init__.py", line 81, in load_config
    config = parseconfig(args)
  File "D:\Data\package\.tox\.tox\lib\site-packages\tox\config\__init__.py", line 281, in parseconfig
    pm.hook.tox_configure(config=config)  # post process config object
  File "D:\Data\package\.tox\.tox\lib\site-packages\pluggy\hooks.py", line 286, in __call__
    return self._hookexec(self, self.get_hookimpls(), kwargs)
  File "D:\Data\package\.tox\.tox\lib\site-packages\pluggy\manager.py", line 93, in _hookexec
    return self._inner_hookexec(hook, methods, kwargs)
  File "D:\Data\package\.tox\.tox\lib\site-packages\pluggy\manager.py", line 87, in <lambda>
    firstresult=hook.spec.opts.get("firstresult") if hook.spec else False,
  File "D:\Data\package\.tox\.tox\lib\site-packages\pluggy\callers.py", line 208, in _multicall
    return outcome.get_result()
  File "D:\Data\package\.tox\.tox\lib\site-packages\pluggy\callers.py", line 80, in get_result
    raise ex[1].with_traceback(ex[2])
  File "D:\Data\package\.tox\.tox\lib\site-packages\pluggy\callers.py", line 187, in _multicall
    res = hook_impl.function(*args)
  File "D:\Data\package\.tox\.tox\lib\site-packages\tox_poetry_dev_dependencies\_hooks.py", line 126, in tox_configure
    locked_deps = _get_locked_deps(project_dir_path)
  File "D:\Data\package\.tox\.tox\lib\site-packages\tox_poetry_dev_dependencies\_hooks.py", line 328, in _get_locked_deps
    raise UnsupportedLockedDependency(dependency)
tox_poetry_dev_dependencies._hooks.UnsupportedLockedDependency: {'name': 'appdirs', 'version': '1.4.4', 'description': 'A small Python module for determining appropriate platform-specific dirs, e.g. a "user data dir".', 'category': 'main', 'optional': False, 'python-versions': '*', 'source': {'type': 'legacy', 'url': 'https://devpi/index/prod/+simple', 'reference': 'devpi'}}

Running the same environment with 0.0.4 works without any issue.

@sinoroc
Copy link
Owner

sinoroc commented Nov 9, 2020

Thanks for the report.

You are using poetry_experimental_add_locked_dependencies, right? As the name says, it is experimental, indeed it is largely uncomplete at the moment. It is waiting for progress on:

But I am willing to add the necessary code on a case by case basis...

So for this particular occurrence, the source type legacy (for the appdirs dependency) is not implemented yet. Could you show how the pyproject.toml looks like (at least for this particular dependency)? And I will see how much code is needed, if it is not too much, I will add it for the next release.


On the other hand, you mention it used to work with plugin version 0.0.4, I am a bit surprised it did... Are you sure it was fetching from the right URL?

@sinoroc
Copy link
Owner

sinoroc commented Nov 9, 2020

Or maybe if possible, show the full pyproject.toml and I will investigate if there are other features that you might need, and possibly try to add them all at once. Instead of the back and forth, where I fix one, make a release, then you stumble onto the next blocker...

@bparzella
Copy link
Author

Actually I am not using the poetry_experimental_add_locked_dependencies flag. The only flag activated is poetry_add_dev_dependencies.

@sinoroc
Copy link
Owner

sinoroc commented Nov 9, 2020

Oh... Then yes, that is definitely not how it should behave... I will get right to it.

@sinoroc
Copy link
Owner

sinoroc commented Nov 9, 2020

Released version 0.0.7. Would you mind giving it a try? Let me know how it goes...

@bparzella
Copy link
Author

This looks good, it's working.

Thank you!

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 a pull request may close this issue.

2 participants