Add internally proxied poetry module to support runtime in non-Poetry envs

Add the _poetry submodule to support importing Poetry internals at runtime rather
than import time. This allows the plugin to be run, and either skipped or errored,
without crashing tox
This commit is contained in:
2020-12-04 19:25:40 -05:00
parent 604e60d567
commit 5a23c05f17
4 changed files with 88 additions and 33 deletions

View File

@@ -6,6 +6,7 @@ All exceptions should inherit from the common base exception :exc:`ToxPoetryInst
ToxPoetryInstallerException
+-- SkipEnvironment
| +-- PoetryNotInstalledError
+-- LockedDepVersionConflictError
+-- LockedDepNotFoundError
+-- ExtraNotFoundError
@@ -22,6 +23,10 @@ class SkipEnvironment(ToxPoetryInstallerException):
"""Current environment does not meet preconditions and should be skipped by the plugin"""
class PoetryNotInstalledError(SkipEnvironment):
"""No version of Poetry could be imported from the current Python environment"""
class LockedDepVersionConflictError(ToxPoetryInstallerException):
"""Locked dependencies cannot specify an alternate version for installation"""