Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
python-poetry
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
open
python-poetry
Commits
7c53db96
Commit
7c53db96
authored
Nov 16, 2021
by
Branch Vincent
Committed by
Bjorn Neergaard
Nov 16, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore: ban relative imports
parent
d7c3e215
Hide whitespace changes
Inline
Side-by-side
Showing
89 changed files
with
186 additions
and
205 deletions
+186
-205
.flake8
+1
-0
src/poetry/__main__.py
+1
-1
src/poetry/config/config.py
+2
-3
src/poetry/config/dict_config_source.py
+1
-1
src/poetry/config/file_config_source.py
+1
-1
src/poetry/console/application.py
+7
-8
src/poetry/console/commands/about.py
+1
-1
src/poetry/console/commands/add.py
+2
-2
src/poetry/console/commands/build.py
+1
-1
src/poetry/console/commands/cache/clear.py
+1
-1
src/poetry/console/commands/cache/list.py
+1
-1
src/poetry/console/commands/check.py
+1
-1
src/poetry/console/commands/config.py
+1
-1
src/poetry/console/commands/debug/info.py
+1
-1
src/poetry/console/commands/debug/resolve.py
+1
-1
src/poetry/console/commands/env/info.py
+1
-1
src/poetry/console/commands/env/list.py
+1
-1
src/poetry/console/commands/env/remove.py
+1
-1
src/poetry/console/commands/env/use.py
+1
-1
src/poetry/console/commands/env_command.py
+1
-2
src/poetry/console/commands/export.py
+1
-2
src/poetry/console/commands/init.py
+2
-2
src/poetry/console/commands/install.py
+1
-1
src/poetry/console/commands/installer_command.py
+1
-1
src/poetry/console/commands/lock.py
+1
-1
src/poetry/console/commands/new.py
+1
-1
src/poetry/console/commands/plugin/add.py
+1
-1
src/poetry/console/commands/publish.py
+1
-1
src/poetry/console/commands/run.py
+1
-1
src/poetry/console/commands/search.py
+1
-1
src/poetry/console/commands/self/update.py
+1
-1
src/poetry/console/commands/shell.py
+1
-1
src/poetry/console/commands/show.py
+1
-1
src/poetry/console/commands/update.py
+1
-1
src/poetry/console/commands/version.py
+1
-1
src/poetry/console/logging/formatters/__init__.py
+1
-1
src/poetry/console/logging/formatters/builder_formatter.py
+1
-1
src/poetry/console/logging/io_formatter.py
+1
-1
src/poetry/factory.py
+4
-4
src/poetry/installation/__init__.py
+1
-1
src/poetry/installation/chef.py
+2
-3
src/poetry/installation/executor.py
+9
-11
src/poetry/installation/installer.py
+8
-10
src/poetry/installation/noop_installer.py
+1
-1
src/poetry/installation/operations/__init__.py
+3
-3
src/poetry/installation/operations/install.py
+1
-1
src/poetry/installation/operations/uninstall.py
+1
-1
src/poetry/installation/operations/update.py
+1
-1
src/poetry/layouts/__init__.py
+2
-2
src/poetry/layouts/src.py
+1
-1
src/poetry/locations.py
+3
-3
src/poetry/masonry/builders/__init__.py
+1
-1
src/poetry/mixology/__init__.py
+2
-3
src/poetry/mixology/assignment.py
+2
-3
src/poetry/mixology/failure.py
+3
-4
src/poetry/mixology/incompatibility.py
+9
-9
src/poetry/mixology/partial_solution.py
+4
-4
src/poetry/mixology/solutions/providers/__init__.py
+3
-1
src/poetry/mixology/solutions/providers/python_requirement_solution_provider.py
+3
-1
src/poetry/mixology/solutions/solutions/__init__.py
+3
-1
src/poetry/mixology/term.py
+1
-2
src/poetry/mixology/version_solver.py
+10
-11
src/poetry/packages/__init__.py
+3
-3
src/poetry/packages/package_collection.py
+1
-1
src/poetry/plugins/__init__.py
+2
-2
src/poetry/plugins/application_plugin.py
+1
-1
src/poetry/plugins/plugin.py
+1
-1
src/poetry/plugins/plugin_manager.py
+2
-2
src/poetry/poetry.py
+5
-6
src/poetry/publishing/__init__.py
+1
-1
src/poetry/publishing/publisher.py
+5
-5
src/poetry/puzzle/__init__.py
+1
-1
src/poetry/puzzle/solver.py
+5
-7
src/poetry/repositories/__init__.py
+2
-2
src/poetry/repositories/installed_repository.py
+1
-2
src/poetry/repositories/legacy_repository.py
+6
-7
src/poetry/repositories/pool.py
+4
-4
src/poetry/repositories/pypi_repository.py
+2
-3
src/poetry/repositories/remote_repository.py
+1
-1
src/poetry/repositories/repository.py
+1
-1
src/poetry/utils/shell.py
+2
-2
tests/fixtures/excluded_subpackage/example/test/excluded.py
+1
-1
tests/masonry/builders/fixtures/excluded_subpackage/example/test/excluded.py
+1
-1
tests/mixology/version_solver/test_backtracking.py
+2
-3
tests/mixology/version_solver/test_basic_graph.py
+2
-3
tests/mixology/version_solver/test_python_constraint.py
+2
-3
tests/mixology/version_solver/test_unsolvable.py
+2
-3
tests/mixology/version_solver/test_with_lock.py
+3
-4
tests/packages/test_locker.py
+2
-3
No files found.
.flake8
View file @
7c53db96
[flake8]
[flake8]
min_python_version = 3.6.0
min_python_version = 3.6.0
max-line-length = 88
max-line-length = 88
ban-relative-imports = true
inline-quotes = double
inline-quotes = double
extend-ignore =
extend-ignore =
# E501: Line too long (FIXME: long string constants)
# E501: Line too long (FIXME: long string constants)
...
...
src/poetry/__main__.py
View file @
7c53db96
...
@@ -2,6 +2,6 @@ import sys
...
@@ -2,6 +2,6 @@ import sys
if
__name__
==
"__main__"
:
if
__name__
==
"__main__"
:
from
.console.application
import
main
from
poetry
.console.application
import
main
sys
.
exit
(
main
())
sys
.
exit
(
main
())
src/poetry/config/config.py
View file @
7c53db96
...
@@ -8,11 +8,10 @@ from typing import Callable
...
@@ -8,11 +8,10 @@ from typing import Callable
from
typing
import
Dict
from
typing
import
Dict
from
typing
import
Optional
from
typing
import
Optional
from
poetry.config.config_source
import
ConfigSource
from
poetry.config.dict_config_source
import
DictConfigSource
from
poetry.locations
import
CACHE_DIR
from
poetry.locations
import
CACHE_DIR
from
.config_source
import
ConfigSource
from
.dict_config_source
import
DictConfigSource
def
boolean_validator
(
val
:
str
)
->
bool
:
def
boolean_validator
(
val
:
str
)
->
bool
:
return
val
in
{
"true"
,
"false"
,
"1"
,
"0"
}
return
val
in
{
"true"
,
"false"
,
"1"
,
"0"
}
...
...
src/poetry/config/dict_config_source.py
View file @
7c53db96
from
typing
import
Any
from
typing
import
Any
from
typing
import
Dict
from
typing
import
Dict
from
.config_source
import
ConfigSource
from
poetry.config
.config_source
import
ConfigSource
class
DictConfigSource
(
ConfigSource
):
class
DictConfigSource
(
ConfigSource
):
...
...
src/poetry/config/file_config_source.py
View file @
7c53db96
...
@@ -6,7 +6,7 @@ from typing import Iterator
...
@@ -6,7 +6,7 @@ from typing import Iterator
from
tomlkit
import
document
from
tomlkit
import
document
from
tomlkit
import
table
from
tomlkit
import
table
from
.config_source
import
ConfigSource
from
poetry.config
.config_source
import
ConfigSource
if
TYPE_CHECKING
:
if
TYPE_CHECKING
:
...
...
src/poetry/console/application.py
View file @
7c53db96
...
@@ -21,11 +21,10 @@ from cleo.io.io import IO
...
@@ -21,11 +21,10 @@ from cleo.io.io import IO
from
cleo.io.outputs.output
import
Output
from
cleo.io.outputs.output
import
Output
from
poetry.__version__
import
__version__
from
poetry.__version__
import
__version__
from
poetry.console.command_loader
import
CommandLoader
from
poetry.console.commands.command
import
Command
from
poetry.core.utils._compat
import
PY37
from
poetry.core.utils._compat
import
PY37
from
.command_loader
import
CommandLoader
from
.commands.command
import
Command
if
TYPE_CHECKING
:
if
TYPE_CHECKING
:
from
crashtest.solution_providers.solution_provider_repository
import
(
from
crashtest.solution_providers.solution_provider_repository
import
(
...
@@ -205,7 +204,7 @@ class Application(BaseApplication):
...
@@ -205,7 +204,7 @@ class Application(BaseApplication):
name
=
io
.
input
.
first_argument
name
=
io
.
input
.
first_argument
if
name
==
"run"
:
if
name
==
"run"
:
from
.io.inputs.run_argv_input
import
RunArgvInput
from
poetry.console
.io.inputs.run_argv_input
import
RunArgvInput
input
=
cast
(
ArgvInput
,
io
.
input
)
input
=
cast
(
ArgvInput
,
io
.
input
)
run_input
=
RunArgvInput
([
self
.
_name
or
""
]
+
input
.
_tokens
)
run_input
=
RunArgvInput
([
self
.
_name
or
""
]
+
input
.
_tokens
)
...
@@ -237,8 +236,8 @@ class Application(BaseApplication):
...
@@ -237,8 +236,8 @@ class Application(BaseApplication):
def
register_command_loggers
(
def
register_command_loggers
(
self
,
event
:
ConsoleCommandEvent
,
event_name
:
str
,
_
:
Any
self
,
event
:
ConsoleCommandEvent
,
event_name
:
str
,
_
:
Any
)
->
None
:
)
->
None
:
from
.logging.io_formatter
import
IOFormatter
from
poetry.console
.logging.io_formatter
import
IOFormatter
from
.logging.io_handler
import
IOHandler
from
poetry.console
.logging.io_handler
import
IOHandler
command
=
event
.
command
command
=
event
.
command
if
not
isinstance
(
command
,
Command
):
if
not
isinstance
(
command
,
Command
):
...
@@ -278,7 +277,7 @@ class Application(BaseApplication):
...
@@ -278,7 +277,7 @@ class Application(BaseApplication):
def
configure_env
(
def
configure_env
(
self
,
event
:
ConsoleCommandEvent
,
event_name
:
str
,
_
:
Any
self
,
event
:
ConsoleCommandEvent
,
event_name
:
str
,
_
:
Any
)
->
None
:
)
->
None
:
from
.commands.env_command
import
EnvCommand
from
poetry.console
.commands.env_command
import
EnvCommand
command
:
EnvCommand
=
cast
(
EnvCommand
,
event
.
command
)
command
:
EnvCommand
=
cast
(
EnvCommand
,
event
.
command
)
if
not
isinstance
(
command
,
EnvCommand
):
if
not
isinstance
(
command
,
EnvCommand
):
...
@@ -303,7 +302,7 @@ class Application(BaseApplication):
...
@@ -303,7 +302,7 @@ class Application(BaseApplication):
def
configure_installer
(
def
configure_installer
(
self
,
event
:
ConsoleCommandEvent
,
event_name
:
str
,
_
:
Any
self
,
event
:
ConsoleCommandEvent
,
event_name
:
str
,
_
:
Any
)
->
None
:
)
->
None
:
from
.commands.installer_command
import
InstallerCommand
from
poetry.console
.commands.installer_command
import
InstallerCommand
command
:
InstallerCommand
=
cast
(
InstallerCommand
,
event
.
command
)
command
:
InstallerCommand
=
cast
(
InstallerCommand
,
event
.
command
)
if
not
isinstance
(
command
,
InstallerCommand
):
if
not
isinstance
(
command
,
InstallerCommand
):
...
...
src/poetry/console/commands/about.py
View file @
7c53db96
from
.command
import
Command
from
poetry.console.commands
.command
import
Command
class
AboutCommand
(
Command
):
class
AboutCommand
(
Command
):
...
...
src/poetry/console/commands/add.py
View file @
7c53db96
...
@@ -4,8 +4,8 @@ from typing import List
...
@@ -4,8 +4,8 @@ from typing import List
from
cleo.helpers
import
argument
from
cleo.helpers
import
argument
from
cleo.helpers
import
option
from
cleo.helpers
import
option
from
.init
import
InitCommand
from
poetry.console.commands
.init
import
InitCommand
from
.installer_command
import
InstallerCommand
from
poetry.console.commands
.installer_command
import
InstallerCommand
class
AddCommand
(
InstallerCommand
,
InitCommand
):
class
AddCommand
(
InstallerCommand
,
InitCommand
):
...
...
src/poetry/console/commands/build.py
View file @
7c53db96
from
cleo.helpers
import
option
from
cleo.helpers
import
option
from
.env_command
import
EnvCommand
from
poetry.console.commands
.env_command
import
EnvCommand
class
BuildCommand
(
EnvCommand
):
class
BuildCommand
(
EnvCommand
):
...
...
src/poetry/console/commands/cache/clear.py
View file @
7c53db96
...
@@ -3,7 +3,7 @@ import os
...
@@ -3,7 +3,7 @@ import os
from
cleo.helpers
import
argument
from
cleo.helpers
import
argument
from
cleo.helpers
import
option
from
cleo.helpers
import
option
from
.
.command
import
Command
from
poetry.console.commands
.command
import
Command
class
CacheClearCommand
(
Command
):
class
CacheClearCommand
(
Command
):
...
...
src/poetry/console/commands/cache/list.py
View file @
7c53db96
...
@@ -2,7 +2,7 @@ import os
...
@@ -2,7 +2,7 @@ import os
from
typing
import
Optional
from
typing
import
Optional
from
.
.command
import
Command
from
poetry.console.commands
.command
import
Command
class
CacheListCommand
(
Command
):
class
CacheListCommand
(
Command
):
...
...
src/poetry/console/commands/check.py
View file @
7c53db96
from
pathlib
import
Path
from
pathlib
import
Path
from
.command
import
Command
from
poetry.console.commands
.command
import
Command
class
CheckCommand
(
Command
):
class
CheckCommand
(
Command
):
...
...
src/poetry/console/commands/config.py
View file @
7c53db96
...
@@ -11,7 +11,7 @@ from typing import Tuple
...
@@ -11,7 +11,7 @@ from typing import Tuple
from
cleo.helpers
import
argument
from
cleo.helpers
import
argument
from
cleo.helpers
import
option
from
cleo.helpers
import
option
from
.command
import
Command
from
poetry.console.commands
.command
import
Command
if
TYPE_CHECKING
:
if
TYPE_CHECKING
:
...
...
src/poetry/console/commands/debug/info.py
View file @
7c53db96
import
sys
import
sys
from
.
.command
import
Command
from
poetry.console.commands
.command
import
Command
class
DebugInfoCommand
(
Command
):
class
DebugInfoCommand
(
Command
):
...
...
src/poetry/console/commands/debug/resolve.py
View file @
7c53db96
...
@@ -5,7 +5,7 @@ from cleo.helpers import argument
...
@@ -5,7 +5,7 @@ from cleo.helpers import argument
from
cleo.helpers
import
option
from
cleo.helpers
import
option
from
cleo.io.outputs.output
import
Verbosity
from
cleo.io.outputs.output
import
Verbosity
from
.
.init
import
InitCommand
from
poetry.console.commands
.init
import
InitCommand
if
TYPE_CHECKING
:
if
TYPE_CHECKING
:
...
...
src/poetry/console/commands/env/info.py
View file @
7c53db96
...
@@ -3,7 +3,7 @@ from typing import Optional
...
@@ -3,7 +3,7 @@ from typing import Optional
from
cleo.helpers
import
option
from
cleo.helpers
import
option
from
.
.command
import
Command
from
poetry.console.commands
.command
import
Command
if
TYPE_CHECKING
:
if
TYPE_CHECKING
:
...
...
src/poetry/console/commands/env/list.py
View file @
7c53db96
from
cleo.helpers
import
option
from
cleo.helpers
import
option
from
.
.command
import
Command
from
poetry.console.commands
.command
import
Command
class
EnvListCommand
(
Command
):
class
EnvListCommand
(
Command
):
...
...
src/poetry/console/commands/env/remove.py
View file @
7c53db96
from
cleo.helpers
import
argument
from
cleo.helpers
import
argument
from
cleo.helpers
import
option
from
cleo.helpers
import
option
from
.
.command
import
Command
from
poetry.console.commands
.command
import
Command
class
EnvRemoveCommand
(
Command
):
class
EnvRemoveCommand
(
Command
):
...
...
src/poetry/console/commands/env/use.py
View file @
7c53db96
from
cleo.helpers
import
argument
from
cleo.helpers
import
argument
from
.
.command
import
Command
from
poetry.console.commands
.command
import
Command
class
EnvUseCommand
(
Command
):
class
EnvUseCommand
(
Command
):
...
...
src/poetry/console/commands/env_command.py
View file @
7c53db96
from
typing
import
Optional
from
typing
import
Optional
from
poetry.console.commands.command
import
Command
from
poetry.utils.env
import
Env
from
poetry.utils.env
import
Env
from
.command
import
Command
class
EnvCommand
(
Command
):
class
EnvCommand
(
Command
):
def
__init__
(
self
)
->
None
:
def
__init__
(
self
)
->
None
:
...
...
src/poetry/console/commands/export.py
View file @
7c53db96
from
cleo.helpers
import
option
from
cleo.helpers
import
option
from
poetry.console.commands.command
import
Command
from
poetry.utils.exporter
import
Exporter
from
poetry.utils.exporter
import
Exporter
from
.command
import
Command
class
ExportCommand
(
Command
):
class
ExportCommand
(
Command
):
...
...
src/poetry/console/commands/init.py
View file @
7c53db96
...
@@ -15,8 +15,8 @@ from typing import Union
...
@@ -15,8 +15,8 @@ from typing import Union
from
cleo.helpers
import
option
from
cleo.helpers
import
option
from
tomlkit
import
inline_table
from
tomlkit
import
inline_table
from
.command
import
Command
from
poetry.console.commands
.command
import
Command
from
.env_command
import
EnvCommand
from
poetry.console.commands
.env_command
import
EnvCommand
if
TYPE_CHECKING
:
if
TYPE_CHECKING
:
...
...
src/poetry/console/commands/install.py
View file @
7c53db96
from
cleo.helpers
import
option
from
cleo.helpers
import
option
from
.installer_command
import
InstallerCommand
from
poetry.console.commands
.installer_command
import
InstallerCommand
class
InstallCommand
(
InstallerCommand
):
class
InstallCommand
(
InstallerCommand
):
...
...
src/poetry/console/commands/installer_command.py
View file @
7c53db96
from
typing
import
TYPE_CHECKING
from
typing
import
TYPE_CHECKING
from
.env_command
import
EnvCommand
from
poetry.console.commands
.env_command
import
EnvCommand
if
TYPE_CHECKING
:
if
TYPE_CHECKING
:
...
...
src/poetry/console/commands/lock.py
View file @
7c53db96
from
cleo.helpers
import
option
from
cleo.helpers
import
option
from
.installer_command
import
InstallerCommand
from
poetry.console.commands
.installer_command
import
InstallerCommand
class
LockCommand
(
InstallerCommand
):
class
LockCommand
(
InstallerCommand
):
...
...
src/poetry/console/commands/new.py
View file @
7c53db96
...
@@ -3,7 +3,7 @@ import sys
...
@@ -3,7 +3,7 @@ import sys
from
cleo.helpers
import
argument
from
cleo.helpers
import
argument
from
cleo.helpers
import
option
from
cleo.helpers
import
option
from
.command
import
Command
from
poetry.console.commands
.command
import
Command
class
NewCommand
(
Command
):
class
NewCommand
(
Command
):
...
...
src/poetry/console/commands/plugin/add.py
View file @
7c53db96
...
@@ -8,7 +8,7 @@ from typing import cast
...
@@ -8,7 +8,7 @@ from typing import cast
from
cleo.helpers
import
argument
from
cleo.helpers
import
argument
from
cleo.helpers
import
option
from
cleo.helpers
import
option
from
.
.init
import
InitCommand
from
poetry.console.commands
.init
import
InitCommand
if
TYPE_CHECKING
:
if
TYPE_CHECKING
:
...
...
src/poetry/console/commands/publish.py
View file @
7c53db96
...
@@ -3,7 +3,7 @@ from typing import Optional
...
@@ -3,7 +3,7 @@ from typing import Optional
from
cleo.helpers
import
option
from
cleo.helpers
import
option
from
.command
import
Command
from
poetry.console.commands
.command
import
Command
class
PublishCommand
(
Command
):
class
PublishCommand
(
Command
):
...
...
src/poetry/console/commands/run.py
View file @
7c53db96
...
@@ -4,7 +4,7 @@ from typing import Union
...
@@ -4,7 +4,7 @@ from typing import Union
from
cleo.helpers
import
argument
from
cleo.helpers
import
argument
from
.env_command
import
EnvCommand
from
poetry.console.commands
.env_command
import
EnvCommand
if
TYPE_CHECKING
:
if
TYPE_CHECKING
:
...
...
src/poetry/console/commands/search.py
View file @
7c53db96
from
cleo.helpers
import
argument
from
cleo.helpers
import
argument
from
.command
import
Command
from
poetry.console.commands
.command
import
Command
class
SearchCommand
(
Command
):
class
SearchCommand
(
Command
):
...
...
src/poetry/console/commands/self/update.py
View file @
7c53db96
...
@@ -9,7 +9,7 @@ from typing import TYPE_CHECKING
...
@@ -9,7 +9,7 @@ from typing import TYPE_CHECKING
from
cleo.helpers
import
argument
from
cleo.helpers
import
argument
from
cleo.helpers
import
option
from
cleo.helpers
import
option
from
.
.command
import
Command
from
poetry.console.commands
.command
import
Command
if
TYPE_CHECKING
:
if
TYPE_CHECKING
:
...
...
src/poetry/console/commands/shell.py
View file @
7c53db96
...
@@ -3,7 +3,7 @@ import sys
...
@@ -3,7 +3,7 @@ import sys
from
distutils.util
import
strtobool
from
distutils.util
import
strtobool
from
os
import
environ
from
os
import
environ
from
.env_command
import
EnvCommand
from
poetry.console.commands
.env_command
import
EnvCommand
class
ShellCommand
(
EnvCommand
):
class
ShellCommand
(
EnvCommand
):
...
...
src/poetry/console/commands/show.py
View file @
7c53db96
...
@@ -6,7 +6,7 @@ from typing import Union
...
@@ -6,7 +6,7 @@ from typing import Union
from
cleo.helpers
import
argument
from
cleo.helpers
import
argument
from
cleo.helpers
import
option
from
cleo.helpers
import
option
from
.env_command
import
EnvCommand
from
poetry.console.commands
.env_command
import
EnvCommand
if
TYPE_CHECKING
:
if
TYPE_CHECKING
:
...
...
src/poetry/console/commands/update.py
View file @
7c53db96
from
cleo.helpers
import
argument
from
cleo.helpers
import
argument
from
cleo.helpers
import
option
from
cleo.helpers
import
option
from
.installer_command
import
InstallerCommand
from
poetry.console.commands
.installer_command
import
InstallerCommand
class
UpdateCommand
(
InstallerCommand
):
class
UpdateCommand
(
InstallerCommand
):
...
...
src/poetry/console/commands/version.py
View file @
7c53db96
...
@@ -3,7 +3,7 @@ from typing import TYPE_CHECKING
...
@@ -3,7 +3,7 @@ from typing import TYPE_CHECKING
from
cleo.helpers
import
argument
from
cleo.helpers
import
argument
from
cleo.helpers
import
option
from
cleo.helpers
import
option
from
.command
import
Command
from
poetry.console.commands
.command
import
Command
if
TYPE_CHECKING
:
if
TYPE_CHECKING
:
...
...
src/poetry/console/logging/formatters/__init__.py
View file @
7c53db96
from
.builder_formatter
import
BuilderLogFormatter
from
poetry.console.logging.formatters
.builder_formatter
import
BuilderLogFormatter
FORMATTERS
=
{
FORMATTERS
=
{
...
...
src/poetry/console/logging/formatters/builder_formatter.py
View file @
7c53db96
import
re
import
re
from
.formatter
import
Formatter
from
poetry.console.logging.formatters
.formatter
import
Formatter
class
BuilderLogFormatter
(
Formatter
):
class
BuilderLogFormatter
(
Formatter
):
...
...
src/poetry/console/logging/io_formatter.py
View file @
7c53db96
...
@@ -2,7 +2,7 @@ import logging
...
@@ -2,7 +2,7 @@ import logging
from
typing
import
TYPE_CHECKING
from
typing
import
TYPE_CHECKING
from
.formatters
import
FORMATTERS
from
poetry.console.logging
.formatters
import
FORMATTERS
if
TYPE_CHECKING
:
if
TYPE_CHECKING
:
...
...
src/poetry/factory.py
View file @
7c53db96
...
@@ -19,7 +19,7 @@ from poetry.poetry import Poetry
...
@@ -19,7 +19,7 @@ from poetry.poetry import Poetry
if
TYPE_CHECKING
:
if
TYPE_CHECKING
:
from
.repositories.legacy_repository
import
LegacyRepository
from
poetry
.repositories.legacy_repository
import
LegacyRepository
class
Factory
(
BaseFactory
):
class
Factory
(
BaseFactory
):
...
@@ -164,9 +164,9 @@ class Factory(BaseFactory):
...
@@ -164,9 +164,9 @@ class Factory(BaseFactory):
def
create_legacy_repository
(
def
create_legacy_repository
(
cls
,
source
:
Dict
[
str
,
str
],
auth_config
:
Config
cls
,
source
:
Dict
[
str
,
str
],
auth_config
:
Config
)
->
"LegacyRepository"
:
)
->
"LegacyRepository"
:
from
.repositories.legacy_repository
import
LegacyRepository
from
poetry
.repositories.legacy_repository
import
LegacyRepository
from
.utils.helpers
import
get_cert
from
poetry
.utils.helpers
import
get_cert
from
.utils.helpers
import
get_client_cert
from
poetry
.utils.helpers
import
get_client_cert
if
"url"
in
source
:
if
"url"
in
source
:
# PyPI-like repository
# PyPI-like repository
...
...
src/poetry/installation/__init__.py
View file @
7c53db96
from
.installer
import
Installer
from
poetry.installation
.installer
import
Installer
src/poetry/installation/chef.py
View file @
7c53db96
...
@@ -7,9 +7,8 @@ from typing import List
...
@@ -7,9 +7,8 @@ from typing import List
from
typing
import
Optional
from
typing
import
Optional
from
poetry.core.packages.utils.link
import
Link
from
poetry.core.packages.utils.link
import
Link
from
poetry.installation.chooser
import
InvalidWheelName
from
.chooser
import
InvalidWheelName
from
poetry.installation.chooser
import
Wheel
from
.chooser
import
Wheel
if
TYPE_CHECKING
:
if
TYPE_CHECKING
:
...
...
src/poetry/installation/executor.py
View file @
7c53db96
...
@@ -21,30 +21,28 @@ from poetry.core.packages.package import Package
...
@@ -21,30 +21,28 @@ from poetry.core.packages.package import Package
from
poetry.core.packages.utils.link
import
Link
from
poetry.core.packages.utils.link
import
Link
from
poetry.core.packages.utils.utils
import
url_to_path
from
poetry.core.packages.utils.utils
import
url_to_path
from
poetry.core.pyproject.toml
import
PyProjectTOML
from
poetry.core.pyproject.toml
import
PyProjectTOML
from
poetry.installation.chef
import
Chef
from
poetry.installation.chooser
import
Chooser
from
poetry.installation.operations.install
import
Install
from
poetry.installation.operations.operation
import
Operation
from
poetry.installation.operations.uninstall
import
Uninstall
from
poetry.installation.operations.update
import
Update
from
poetry.utils._compat
import
decode
from
poetry.utils._compat
import
decode
from
poetry.utils.authenticator
import
Authenticator
from
poetry.utils.env
import
EnvCommandError
from
poetry.utils.env
import
EnvCommandError
from
poetry.utils.helpers
import
safe_rmtree
from
poetry.utils.helpers
import
safe_rmtree
from
poetry.utils.pip
import
pip_editable_install
from
poetry.utils.pip
import
pip_editable_install
from
poetry.utils.pip
import
pip_install
from
..utils.authenticator
import
Authenticator
from
..utils.pip
import
pip_install
from
.chef
import
Chef
from
.chooser
import
Chooser
from
.operations.install
import
Install
from
.operations.operation
import
Operation
from
.operations.uninstall
import
Uninstall
from
.operations.update
import
Update
if
TYPE_CHECKING
:
if
TYPE_CHECKING
:
from
cleo.io.io
import
IO
from
cleo.io.io
import
IO
from
poetry.config.config
import
Config
from
poetry.config.config
import
Config
from
poetry.installation.operations
import
OperationTypes
from
poetry.repositories
import
Pool
from
poetry.repositories
import
Pool
from
poetry.utils.env
import
Env
from
poetry.utils.env
import
Env
from
.operations
import
OperationTypes
class
Executor
:
class
Executor
:
def
__init__
(
def
__init__
(
...
...
src/poetry/installation/installer.py
View file @
7c53db96
...
@@ -10,6 +10,13 @@ from cleo.io.null_io import NullIO
...
@@ -10,6 +10,13 @@ from cleo.io.null_io import NullIO
from
poetry.config.config
import
Config
from
poetry.config.config
import
Config
from
poetry.core.packages.project_package
import
ProjectPackage
from
poetry.core.packages.project_package
import
ProjectPackage
from
poetry.installation.base_installer
import
BaseInstaller
from
poetry.installation.executor
import
Executor
from
poetry.installation.operations
import
Install
from
poetry.installation.operations
import
Uninstall
from
poetry.installation.operations
import
Update
from
poetry.installation.operations.operation
import
Operation
from
poetry.installation.pip_installer
import
PipInstaller
from
poetry.packages
import
Locker
from
poetry.packages
import
Locker
from
poetry.repositories
import
Pool
from
poetry.repositories
import
Pool
from
poetry.repositories
import
Repository
from
poetry.repositories
import
Repository
...
@@ -17,20 +24,11 @@ from poetry.repositories.installed_repository import InstalledRepository
...
@@ -17,20 +24,11 @@ from poetry.repositories.installed_repository import InstalledRepository
from
poetry.utils.extras
import
get_extra_package_names
from
poetry.utils.extras
import
get_extra_package_names
from
poetry.utils.helpers
import
canonicalize_name
from
poetry.utils.helpers
import
canonicalize_name
from
.base_installer
import
BaseInstaller
from
.executor
import
Executor
from
.operations
import
Install
from
.operations
import
Uninstall
from
.operations
import
Update
from
.operations.operation
import
Operation
from
.pip_installer
import
PipInstaller
if
TYPE_CHECKING
:
if
TYPE_CHECKING
:
from
poetry.installation.operations
import
OperationTypes
from
poetry.utils.env
import
Env
from
poetry.utils.env
import
Env
from
.operations
import
OperationTypes
class
Installer
:
class
Installer
:
def
__init__
(
def
__init__
(
...
...
src/poetry/installation/noop_installer.py
View file @
7c53db96
from
typing
import
TYPE_CHECKING
from
typing
import
TYPE_CHECKING
from
typing
import
List
from
typing
import
List
from
.base_installer
import
BaseInstaller
from
poetry.installation
.base_installer
import
BaseInstaller
if
TYPE_CHECKING
:
if
TYPE_CHECKING
:
...
...
src/poetry/installation/operations/__init__.py
View file @
7c53db96
from
typing
import
Union
from
typing
import
Union
from
.install
import
Install
from
poetry.installation.operations
.install
import
Install
from
.uninstall
import
Uninstall
from
poetry.installation.operations
.uninstall
import
Uninstall
from
.update
import
Update
from
poetry.installation.operations
.update
import
Update
OperationTypes
=
Union
[
Install
,
Uninstall
,
Update
]
OperationTypes
=
Union
[
Install
,
Uninstall
,
Update
]
src/poetry/installation/operations/install.py
View file @
7c53db96
from
typing
import
TYPE_CHECKING
from
typing
import
TYPE_CHECKING
from
typing
import
Optional
from
typing
import
Optional
from
.operation
import
Operation
from
poetry.installation.operations
.operation
import
Operation
if
TYPE_CHECKING
:
if
TYPE_CHECKING
:
...
...
src/poetry/installation/operations/uninstall.py
View file @
7c53db96
from
typing
import
TYPE_CHECKING
from
typing
import
TYPE_CHECKING
from
typing
import
Optional
from
typing
import
Optional
from
.operation
import
Operation
from
poetry.installation.operations
.operation
import
Operation
if
TYPE_CHECKING
:
if
TYPE_CHECKING
:
...
...
src/poetry/installation/operations/update.py
View file @
7c53db96
from
typing
import
TYPE_CHECKING
from
typing
import
TYPE_CHECKING
from
typing
import
Optional
from
typing
import
Optional
from
.operation
import
Operation
from
poetry.installation.operations
.operation
import
Operation
if
TYPE_CHECKING
:
if
TYPE_CHECKING
:
...
...
src/poetry/layouts/__init__.py
View file @
7c53db96
from
typing
import
Type
from
typing
import
Type
from
.layout
import
Layout
from
poetry.layouts
.layout
import
Layout
from
.src
import
SrcLayout
from
poetry.layouts
.src
import
SrcLayout
_LAYOUTS
=
{
"src"
:
SrcLayout
,
"standard"
:
Layout
}
_LAYOUTS
=
{
"src"
:
SrcLayout
,
"standard"
:
Layout
}
...
...
src/poetry/layouts/src.py
View file @
7c53db96
from
pathlib
import
Path
from
pathlib
import
Path
from
.layout
import
Layout
from
poetry.layouts
.layout
import
Layout
class
SrcLayout
(
Layout
):
class
SrcLayout
(
Layout
):
...
...
src/poetry/locations.py
View file @
7c53db96
...
@@ -2,9 +2,9 @@ import os
...
@@ -2,9 +2,9 @@ import os
from
pathlib
import
Path
from
pathlib
import
Path
from
.utils.appdirs
import
user_cache_dir
from
poetry
.utils.appdirs
import
user_cache_dir
from
.utils.appdirs
import
user_config_dir
from
poetry
.utils.appdirs
import
user_config_dir
from
.utils.appdirs
import
user_data_dir
from
poetry
.utils.appdirs
import
user_data_dir
CACHE_DIR
=
user_cache_dir
(
"pypoetry"
)
CACHE_DIR
=
user_cache_dir
(
"pypoetry"
)
...
...
src/poetry/masonry/builders/__init__.py
View file @
7c53db96
from
.editable
import
EditableBuilder
from
poetry.masonry.builders
.editable
import
EditableBuilder
src/poetry/mixology/__init__.py
View file @
7c53db96
...
@@ -2,16 +2,15 @@ from typing import TYPE_CHECKING
...
@@ -2,16 +2,15 @@ from typing import TYPE_CHECKING
from
typing
import
Dict
from
typing
import
Dict
from
typing
import
List
from
typing
import
List
from
.version_solver
import
VersionSolver
from
poetry.mixology
.version_solver
import
VersionSolver
if
TYPE_CHECKING
:
if
TYPE_CHECKING
:
from
poetry.core.packages.project_package
import
ProjectPackage
from
poetry.core.packages.project_package
import
ProjectPackage
from
poetry.mixology.result
import
SolverResult
from
poetry.packages
import
DependencyPackage
from
poetry.packages
import
DependencyPackage
from
poetry.puzzle.provider
import
Provider
from
poetry.puzzle.provider
import
Provider
from
.result
import
SolverResult
def
resolve_version
(
def
resolve_version
(
root
:
"ProjectPackage"
,
root
:
"ProjectPackage"
,
...
...
src/poetry/mixology/assignment.py
View file @
7c53db96
...
@@ -2,14 +2,13 @@ from typing import TYPE_CHECKING
...
@@ -2,14 +2,13 @@ from typing import TYPE_CHECKING
from
typing
import
Any
from
typing
import
Any
from
typing
import
Optional
from
typing
import
Optional
from
.term
import
Term
from
poetry.mixology
.term
import
Term
if
TYPE_CHECKING
:
if
TYPE_CHECKING
:
from
poetry.core.packages.dependency
import
Dependency
from
poetry.core.packages.dependency
import
Dependency
from
poetry.core.packages.package
import
Package
from
poetry.core.packages.package
import
Package
from
poetry.mixology.incompatibility
import
Incompatibility
from
.incompatibility
import
Incompatibility
class
Assignment
(
Term
):
class
Assignment
(
Term
):
...
...
src/poetry/mixology/failure.py
View file @
7c53db96
...
@@ -4,10 +4,9 @@ from typing import Optional
...
@@ -4,10 +4,9 @@ from typing import Optional
from
typing
import
Tuple
from
typing
import
Tuple
from
poetry.core.semver.helpers
import
parse_constraint
from
poetry.core.semver.helpers
import
parse_constraint
from
poetry.mixology.incompatibility
import
Incompatibility
from
.incompatibility
import
Incompatibility
from
poetry.mixology.incompatibility_cause
import
ConflictCause
from
.incompatibility_cause
import
ConflictCause
from
poetry.mixology.incompatibility_cause
import
PythonCause
from
.incompatibility_cause
import
PythonCause
class
SolveFailure
(
Exception
):
class
SolveFailure
(
Exception
):
...
...
src/poetry/mixology/incompatibility.py
View file @
7c53db96
...
@@ -5,15 +5,15 @@ from typing import List
...
@@ -5,15 +5,15 @@ from typing import List
from
typing
import
Optional
from
typing
import
Optional
from
typing
import
Union
from
typing
import
Union
from
.incompatibility_cause
import
ConflictCause
from
poetry.mixology
.incompatibility_cause
import
ConflictCause
from
.incompatibility_cause
import
DependencyCause
from
poetry.mixology
.incompatibility_cause
import
DependencyCause
from
.incompatibility_cause
import
IncompatibilityCause
from
poetry.mixology
.incompatibility_cause
import
IncompatibilityCause
from
.incompatibility_cause
import
NoVersionsCause
from
poetry.mixology
.incompatibility_cause
import
NoVersionsCause
from
.incompatibility_cause
import
PackageNotFoundCause
from
poetry.mixology
.incompatibility_cause
import
PackageNotFoundCause
from
.incompatibility_cause
import
PlatformCause
from
poetry.mixology
.incompatibility_cause
import
PlatformCause
from
.incompatibility_cause
import
PythonCause
from
poetry.mixology
.incompatibility_cause
import
PythonCause
from
.incompatibility_cause
import
RootCause
from
poetry.mixology
.incompatibility_cause
import
RootCause
from
.term
import
Term
from
poetry.mixology
.term
import
Term
class
Incompatibility
:
class
Incompatibility
:
...
...
src/poetry/mixology/partial_solution.py
View file @
7c53db96
...
@@ -2,10 +2,10 @@ from typing import TYPE_CHECKING
...
@@ -2,10 +2,10 @@ from typing import TYPE_CHECKING
from
typing
import
Dict
from
typing
import
Dict
from
typing
import
List
from
typing
import
List
from
.assignment
import
Assignment
from
poetry.mixology
.assignment
import
Assignment
from
.incompatibility
import
Incompatibility
from
poetry.mixology
.incompatibility
import
Incompatibility
from
.set_relation
import
SetRelation
from
poetry.mixology
.set_relation
import
SetRelation
from
.term
import
Term
from
poetry.mixology
.term
import
Term
if
TYPE_CHECKING
:
if
TYPE_CHECKING
:
...
...
src/poetry/mixology/solutions/providers/__init__.py
View file @
7c53db96
from
.python_requirement_solution_provider
import
PythonRequirementSolutionProvider
from
poetry.mixology.solutions.providers.python_requirement_solution_provider
import
(
PythonRequirementSolutionProvider
,
)
src/poetry/mixology/solutions/providers/python_requirement_solution_provider.py
View file @
7c53db96
...
@@ -25,6 +25,8 @@ class PythonRequirementSolutionProvider(HasSolutionsForException):
...
@@ -25,6 +25,8 @@ class PythonRequirementSolutionProvider(HasSolutionsForException):
return
True
return
True
def
get_solutions
(
self
,
exception
:
Exception
)
->
List
[
Solution
]:
def
get_solutions
(
self
,
exception
:
Exception
)
->
List
[
Solution
]:
from
..solutions.python_requirement_solution
import
PythonRequirementSolution
from
poetry.mixology.solutions.solutions.python_requirement_solution
import
(
PythonRequirementSolution
,
)
return
[
PythonRequirementSolution
(
exception
)]
return
[
PythonRequirementSolution
(
exception
)]
src/poetry/mixology/solutions/solutions/__init__.py
View file @
7c53db96
from
.python_requirement_solution
import
PythonRequirementSolution
from
poetry.mixology.solutions.solutions.python_requirement_solution
import
(
PythonRequirementSolution
,
)
src/poetry/mixology/term.py
View file @
7c53db96
...
@@ -2,8 +2,7 @@ from typing import TYPE_CHECKING
...
@@ -2,8 +2,7 @@ from typing import TYPE_CHECKING
from
typing
import
Optional
from
typing
import
Optional
from
poetry.core.packages.dependency
import
Dependency
from
poetry.core.packages.dependency
import
Dependency
from
poetry.mixology.set_relation
import
SetRelation
from
.set_relation
import
SetRelation
if
TYPE_CHECKING
:
if
TYPE_CHECKING
:
...
...
src/poetry/mixology/version_solver.py
View file @
7c53db96
...
@@ -10,17 +10,16 @@ from typing import Union
...
@@ -10,17 +10,16 @@ from typing import Union
from
poetry.core.packages.dependency
import
Dependency
from
poetry.core.packages.dependency
import
Dependency
from
poetry.core.packages.package
import
Package
from
poetry.core.packages.package
import
Package
from
poetry.core.packages.project_package
import
ProjectPackage
from
poetry.core.packages.project_package
import
ProjectPackage
from
poetry.mixology.failure
import
SolveFailure
from
.failure
import
SolveFailure
from
poetry.mixology.incompatibility
import
Incompatibility
from
.incompatibility
import
Incompatibility
from
poetry.mixology.incompatibility_cause
import
ConflictCause
from
.incompatibility_cause
import
ConflictCause
from
poetry.mixology.incompatibility_cause
import
NoVersionsCause
from
.incompatibility_cause
import
NoVersionsCause
from
poetry.mixology.incompatibility_cause
import
PackageNotFoundCause
from
.incompatibility_cause
import
PackageNotFoundCause
from
poetry.mixology.incompatibility_cause
import
RootCause
from
.incompatibility_cause
import
RootCause
from
poetry.mixology.partial_solution
import
PartialSolution
from
.partial_solution
import
PartialSolution
from
poetry.mixology.result
import
SolverResult
from
.result
import
SolverResult
from
poetry.mixology.set_relation
import
SetRelation
from
.set_relation
import
SetRelation
from
poetry.mixology.term
import
Term
from
.term
import
Term
if
TYPE_CHECKING
:
if
TYPE_CHECKING
:
...
...
src/poetry/packages/__init__.py
View file @
7c53db96
from
.dependency_package
import
DependencyPackage
from
poetry.packages
.dependency_package
import
DependencyPackage
from
.locker
import
Locker
from
poetry.packages
.locker
import
Locker
from
.package_collection
import
PackageCollection
from
poetry.packages
.package_collection
import
PackageCollection
src/poetry/packages/package_collection.py
View file @
7c53db96
...
@@ -2,7 +2,7 @@ from typing import TYPE_CHECKING
...
@@ -2,7 +2,7 @@ from typing import TYPE_CHECKING
from
typing
import
List
from
typing
import
List
from
typing
import
Union
from
typing
import
Union
from
.dependency_package
import
DependencyPackage
from
poetry.packages
.dependency_package
import
DependencyPackage
if
TYPE_CHECKING
:
if
TYPE_CHECKING
:
...
...
src/poetry/plugins/__init__.py
View file @
7c53db96
from
.application_plugin
import
ApplicationPlugin
from
poetry.plugins
.application_plugin
import
ApplicationPlugin
from
.plugin
import
Plugin
from
poetry.plugins
.plugin
import
Plugin
__all__
=
[
"ApplicationPlugin"
,
"Plugin"
]
__all__
=
[
"ApplicationPlugin"
,
"Plugin"
]
src/poetry/plugins/application_plugin.py
View file @
7c53db96
from
.base_plugin
import
BasePlugin
from
poetry.plugins
.base_plugin
import
BasePlugin
class
ApplicationPlugin
(
BasePlugin
):
class
ApplicationPlugin
(
BasePlugin
):
...
...
src/poetry/plugins/plugin.py
View file @
7c53db96
from
.base_plugin
import
BasePlugin
from
poetry.plugins
.base_plugin
import
BasePlugin
class
Plugin
(
BasePlugin
):
class
Plugin
(
BasePlugin
):
...
...
src/poetry/plugins/plugin_manager.py
View file @
7c53db96
...
@@ -4,8 +4,8 @@ from typing import List
...
@@ -4,8 +4,8 @@ from typing import List
import
entrypoints
import
entrypoints
from
.application_plugin
import
ApplicationPlugin
from
poetry.plugins
.application_plugin
import
ApplicationPlugin
from
.plugin
import
Plugin
from
poetry.plugins
.plugin
import
Plugin
logger
=
logging
.
getLogger
(
__name__
)
logger
=
logging
.
getLogger
(
__name__
)
...
...
src/poetry/poetry.py
View file @
7c53db96
...
@@ -9,12 +9,11 @@ from poetry.core.poetry import Poetry as BasePoetry
...
@@ -9,12 +9,11 @@ from poetry.core.poetry import Poetry as BasePoetry
if
TYPE_CHECKING
:
if
TYPE_CHECKING
:
from
poetry.config.config
import
Config
from
poetry.core.packages.project_package
import
ProjectPackage
from
poetry.core.packages.project_package
import
ProjectPackage
from
poetry.packages.locker
import
Locker
from
.config.config
import
Config
from
poetry.plugins.plugin_manager
import
PluginManager
from
.packages.locker
import
Locker
from
poetry.repositories.pool
import
Pool
from
.plugins.plugin_manager
import
PluginManager
from
.repositories.pool
import
Pool
class
Poetry
(
BasePoetry
):
class
Poetry
(
BasePoetry
):
...
@@ -29,7 +28,7 @@ class Poetry(BasePoetry):
...
@@ -29,7 +28,7 @@ class Poetry(BasePoetry):
locker
:
"Locker"
,
locker
:
"Locker"
,
config
:
"Config"
,
config
:
"Config"
,
):
):
from
.repositories.pool
import
Pool
from
poetry
.repositories.pool
import
Pool
super
(
Poetry
,
self
)
.
__init__
(
file
,
local_config
,
package
)
super
(
Poetry
,
self
)
.
__init__
(
file
,
local_config
,
package
)
...
...
src/poetry/publishing/__init__.py
View file @
7c53db96
from
.publisher
import
Publisher
from
poetry.publishing
.publisher
import
Publisher
src/poetry/publishing/publisher.py
View file @
7c53db96
...
@@ -6,17 +6,17 @@ from typing import List
...
@@ -6,17 +6,17 @@ from typing import List
from
typing
import
Optional
from
typing
import
Optional
from
typing
import
Union
from
typing
import
Union
from
..utils.authenticator
import
Authenticato
r
from
poetry.publishing.uploader
import
Uploade
r
from
..utils.helpers
import
get_cert
from
poetry.utils.authenticator
import
Authenticator
from
..utils.helpers
import
get_clien
t_cert
from
poetry.utils.helpers
import
ge
t_cert
from
.uploader
import
Uploader
from
poetry.utils.helpers
import
get_client_cert
if
TYPE_CHECKING
:
if
TYPE_CHECKING
:
from
cleo.io
import
BufferedIO
from
cleo.io
import
BufferedIO
from
cleo.io
import
ConsoleIO
from
cleo.io
import
ConsoleIO
from
.
.poetry
import
Poetry
from
poetry
.poetry
import
Poetry
logger
=
logging
.
getLogger
(
__name__
)
logger
=
logging
.
getLogger
(
__name__
)
...
...
src/poetry/puzzle/__init__.py
View file @
7c53db96
from
.solver
import
Solver
from
poetry.puzzle
.solver
import
Solver
src/poetry/puzzle/solver.py
View file @
7c53db96
...
@@ -20,14 +20,13 @@ from poetry.core.packages.project_package import ProjectPackage
...
@@ -20,14 +20,13 @@ from poetry.core.packages.project_package import ProjectPackage
from
poetry.mixology
import
resolve_version
from
poetry.mixology
import
resolve_version
from
poetry.mixology.failure
import
SolveFailure
from
poetry.mixology.failure
import
SolveFailure
from
poetry.packages
import
DependencyPackage
from
poetry.packages
import
DependencyPackage
from
poetry.puzzle.exceptions
import
OverrideNeeded
from
poetry.puzzle.exceptions
import
SolverProblemError
from
poetry.puzzle.provider
import
Provider
from
poetry.repositories
import
Pool
from
poetry.repositories
import
Pool
from
poetry.repositories
import
Repository
from
poetry.repositories
import
Repository
from
poetry.utils.env
import
Env
from
poetry.utils.env
import
Env
from
.exceptions
import
OverrideNeeded
from
.exceptions
import
SolverProblemError
from
.provider
import
Provider
if
TYPE_CHECKING
:
if
TYPE_CHECKING
:
from
poetry.core.packages.dependency
import
Dependency
from
poetry.core.packages.dependency
import
Dependency
...
@@ -35,8 +34,7 @@ if TYPE_CHECKING:
...
@@ -35,8 +34,7 @@ if TYPE_CHECKING:
from
poetry.core.packages.file_dependency
import
FileDependency
from
poetry.core.packages.file_dependency
import
FileDependency
from
poetry.core.packages.url_dependency
import
URLDependency
from
poetry.core.packages.url_dependency
import
URLDependency
from
poetry.core.packages.vcs_dependency
import
VCSDependency
from
poetry.core.packages.vcs_dependency
import
VCSDependency
from
poetry.puzzle.transaction
import
Transaction
from
.transaction
import
Transaction
class
Solver
:
class
Solver
:
...
@@ -71,7 +69,7 @@ class Solver:
...
@@ -71,7 +69,7 @@ class Solver:
yield
yield
def
solve
(
self
,
use_latest
:
List
[
str
]
=
None
)
->
"Transaction"
:
def
solve
(
self
,
use_latest
:
List
[
str
]
=
None
)
->
"Transaction"
:
from
.transaction
import
Transaction
from
poetry.puzzle
.transaction
import
Transaction
with
self
.
_provider
.
progress
():
with
self
.
_provider
.
progress
():
start
=
time
.
time
()
start
=
time
.
time
()
...
...
src/poetry/repositories/__init__.py
View file @
7c53db96
from
.pool
import
Pool
from
poetry.repositories
.pool
import
Pool
from
.repository
import
Repository
from
poetry.repositories
.repository
import
Repository
src/poetry/repositories/installed_repository.py
View file @
7c53db96
...
@@ -10,11 +10,10 @@ from poetry.core.packages.package import Package
...
@@ -10,11 +10,10 @@ from poetry.core.packages.package import Package
from
poetry.core.packages.utils.utils
import
url_to_path
from
poetry.core.packages.utils.utils
import
url_to_path
from
poetry.core.utils.helpers
import
canonicalize_name
from
poetry.core.utils.helpers
import
canonicalize_name
from
poetry.core.utils.helpers
import
module_name
from
poetry.core.utils.helpers
import
module_name
from
poetry.repositories.repository
import
Repository
from
poetry.utils._compat
import
metadata
from
poetry.utils._compat
import
metadata
from
poetry.utils.env
import
Env
from
poetry.utils.env
import
Env
from
.repository
import
Repository
_VENDORS
=
Path
(
__file__
)
.
parent
.
parent
.
joinpath
(
"_vendor"
)
_VENDORS
=
Path
(
__file__
)
.
parent
.
parent
.
joinpath
(
"_vendor"
)
...
...
src/poetry/repositories/legacy_repository.py
View file @
7c53db96
...
@@ -22,25 +22,24 @@ from cachecontrol import CacheControl
...
@@ -22,25 +22,24 @@ from cachecontrol import CacheControl
from
cachecontrol.caches.file_cache
import
FileCache
from
cachecontrol.caches.file_cache
import
FileCache
from
cachy
import
CacheManager
from
cachy
import
CacheManager
from
poetry.config.config
import
Config
from
poetry.core.packages.package
import
Package
from
poetry.core.packages.package
import
Package
from
poetry.core.packages.utils.link
import
Link
from
poetry.core.packages.utils.link
import
Link
from
poetry.core.semver.helpers
import
parse_constraint
from
poetry.core.semver.helpers
import
parse_constraint
from
poetry.core.semver.version
import
Version
from
poetry.core.semver.version
import
Version
from
poetry.core.semver.version_constraint
import
VersionConstraint
from
poetry.core.semver.version_constraint
import
VersionConstraint
from
poetry.core.semver.version_range
import
VersionRange
from
poetry.core.semver.version_range
import
VersionRange
from
poetry.inspection.info
import
PackageInfo
from
poetry.locations
import
REPOSITORY_CACHE_DIR
from
poetry.locations
import
REPOSITORY_CACHE_DIR
from
poetry.repositories.exceptions
import
PackageNotFound
from
poetry.repositories.exceptions
import
RepositoryError
from
poetry.repositories.pypi_repository
import
PyPiRepository
from
poetry.utils.authenticator
import
Authenticator
from
poetry.utils.helpers
import
canonicalize_name
from
poetry.utils.helpers
import
canonicalize_name
from
poetry.utils.helpers
import
download_file
from
poetry.utils.helpers
import
download_file
from
poetry.utils.helpers
import
temporary_directory
from
poetry.utils.helpers
import
temporary_directory
from
poetry.utils.patterns
import
wheel_file_re
from
poetry.utils.patterns
import
wheel_file_re
from
..config.config
import
Config
from
..inspection.info
import
PackageInfo
from
..utils.authenticator
import
Authenticator
from
.exceptions
import
PackageNotFound
from
.exceptions
import
RepositoryError
from
.pypi_repository
import
PyPiRepository
if
TYPE_CHECKING
:
if
TYPE_CHECKING
:
from
poetry.core.packages.dependency
import
Dependency
from
poetry.core.packages.dependency
import
Dependency
...
...
src/poetry/repositories/pool.py
View file @
7c53db96
...
@@ -3,9 +3,9 @@ from typing import Dict
...
@@ -3,9 +3,9 @@ from typing import Dict
from
typing
import
List
from
typing
import
List
from
typing
import
Optional
from
typing
import
Optional
from
.base_repository
import
BaseRepository
from
poetry.repositories
.base_repository
import
BaseRepository
from
.exceptions
import
PackageNotFound
from
poetry.repositories
.exceptions
import
PackageNotFound
from
.repository
import
Repository
from
poetry.repositories
.repository
import
Repository
if
TYPE_CHECKING
:
if
TYPE_CHECKING
:
...
@@ -175,7 +175,7 @@ class Pool(BaseRepository):
...
@@ -175,7 +175,7 @@ class Pool(BaseRepository):
return
packages
return
packages
def
search
(
self
,
query
:
str
)
->
List
[
"Package"
]:
def
search
(
self
,
query
:
str
)
->
List
[
"Package"
]:
from
.legacy_repository
import
LegacyRepository
from
poetry.repositories
.legacy_repository
import
LegacyRepository
results
=
[]
results
=
[]
for
repository
in
self
.
_repositories
:
for
repository
in
self
.
_repositories
:
...
...
src/poetry/repositories/pypi_repository.py
View file @
7c53db96
...
@@ -26,14 +26,13 @@ from poetry.core.semver.version_range import VersionRange
...
@@ -26,14 +26,13 @@ from poetry.core.semver.version_range import VersionRange
from
poetry.core.version.exceptions
import
InvalidVersion
from
poetry.core.version.exceptions
import
InvalidVersion
from
poetry.core.version.markers
import
parse_marker
from
poetry.core.version.markers
import
parse_marker
from
poetry.locations
import
REPOSITORY_CACHE_DIR
from
poetry.locations
import
REPOSITORY_CACHE_DIR
from
poetry.repositories.exceptions
import
PackageNotFound
from
poetry.repositories.remote_repository
import
RemoteRepository
from
poetry.utils._compat
import
to_str
from
poetry.utils._compat
import
to_str
from
poetry.utils.helpers
import
download_file
from
poetry.utils.helpers
import
download_file
from
poetry.utils.helpers
import
temporary_directory
from
poetry.utils.helpers
import
temporary_directory
from
poetry.utils.patterns
import
wheel_file_re
from
poetry.utils.patterns
import
wheel_file_re
from
.exceptions
import
PackageNotFound
from
.remote_repository
import
RemoteRepository
cache_control_logger
.
setLevel
(
logging
.
ERROR
)
cache_control_logger
.
setLevel
(
logging
.
ERROR
)
...
...
src/poetry/repositories/remote_repository.py
View file @
7c53db96
from
.repository
import
Repository
from
poetry.repositories
.repository
import
Repository
class
RemoteRepository
(
Repository
):
class
RemoteRepository
(
Repository
):
...
...
src/poetry/repositories/repository.py
View file @
7c53db96
...
@@ -2,7 +2,7 @@ from typing import TYPE_CHECKING
...
@@ -2,7 +2,7 @@ from typing import TYPE_CHECKING
from
typing
import
List
from
typing
import
List
from
typing
import
Optional
from
typing
import
Optional
from
.base_repository
import
BaseRepository
from
poetry.repositories
.base_repository
import
BaseRepository
if
TYPE_CHECKING
:
if
TYPE_CHECKING
:
...
...
src/poetry/utils/shell.py
View file @
7c53db96
...
@@ -12,8 +12,8 @@ from cleo.terminal import Terminal
...
@@ -12,8 +12,8 @@ from cleo.terminal import Terminal
from
shellingham
import
ShellDetectionFailure
from
shellingham
import
ShellDetectionFailure
from
shellingham
import
detect_shell
from
shellingham
import
detect_shell
from
._compat
import
WINDOWS
from
poetry.utils
._compat
import
WINDOWS
from
.env
import
VirtualEnv
from
poetry.utils
.env
import
VirtualEnv
class
Shell
:
class
Shell
:
...
...
tests/fixtures/excluded_subpackage/example/test/excluded.py
View file @
7c53db96
from
..
import
__version__
from
tests.fixtures.excluded_subpackage.example
import
__version__
def
test_version
():
def
test_version
():
...
...
tests/masonry/builders/fixtures/excluded_subpackage/example/test/excluded.py
View file @
7c53db96
from
..
import
__version__
from
tests.masonry.builders.fixtures.excluded_subpackage.example
import
__version__
def
test_version
():
def
test_version
():
...
...
tests/mixology/version_solver/test_backtracking.py
View file @
7c53db96
from
poetry.factory
import
Factory
from
poetry.factory
import
Factory
from
tests.mixology.helpers
import
add_to_repo
from
..helpers
import
add_to_repo
from
tests.mixology.helpers
import
check_solver_result
from
..helpers
import
check_solver_result
def
test_circular_dependency_on_older_version
(
root
,
provider
,
repo
):
def
test_circular_dependency_on_older_version
(
root
,
provider
,
repo
):
...
...
tests/mixology/version_solver/test_basic_graph.py
View file @
7c53db96
from
poetry.factory
import
Factory
from
poetry.factory
import
Factory
from
tests.mixology.helpers
import
add_to_repo
from
..helpers
import
add_to_repo
from
tests.mixology.helpers
import
check_solver_result
from
..helpers
import
check_solver_result
def
test_simple_dependencies
(
root
,
provider
,
repo
):
def
test_simple_dependencies
(
root
,
provider
,
repo
):
...
...
tests/mixology/version_solver/test_python_constraint.py
View file @
7c53db96
from
poetry.factory
import
Factory
from
poetry.factory
import
Factory
from
tests.mixology.helpers
import
add_to_repo
from
..helpers
import
add_to_repo
from
tests.mixology.helpers
import
check_solver_result
from
..helpers
import
check_solver_result
def
test_dependency_does_not_match_root_python_constraint
(
root
,
provider
,
repo
):
def
test_dependency_does_not_match_root_python_constraint
(
root
,
provider
,
repo
):
...
...
tests/mixology/version_solver/test_unsolvable.py
View file @
7c53db96
from
poetry.factory
import
Factory
from
poetry.factory
import
Factory
from
tests.mixology.helpers
import
add_to_repo
from
..helpers
import
add_to_repo
from
tests.mixology.helpers
import
check_solver_result
from
..helpers
import
check_solver_result
def
test_no_version_matching_constraint
(
root
,
provider
,
repo
):
def
test_no_version_matching_constraint
(
root
,
provider
,
repo
):
...
...
tests/mixology/version_solver/test_with_lock.py
View file @
7c53db96
from
poetry.factory
import
Factory
from
poetry.factory
import
Factory
from
tests.helpers
import
get_package
from
...helpers
import
get_package
from
tests.mixology.helpers
import
add_to_repo
from
..helpers
import
add_to_repo
from
tests.mixology.helpers
import
check_solver_result
from
..helpers
import
check_solver_result
def
test_with_compatible_locked_dependencies
(
root
,
provider
,
repo
):
def
test_with_compatible_locked_dependencies
(
root
,
provider
,
repo
):
...
...
tests/packages/test_locker.py
View file @
7c53db96
...
@@ -11,9 +11,8 @@ from poetry.core.packages.project_package import ProjectPackage
...
@@ -11,9 +11,8 @@ from poetry.core.packages.project_package import ProjectPackage
from
poetry.core.semver.version
import
Version
from
poetry.core.semver.version
import
Version
from
poetry.factory
import
Factory
from
poetry.factory
import
Factory
from
poetry.packages.locker
import
Locker
from
poetry.packages.locker
import
Locker
from
tests.helpers
import
get_dependency
from
..helpers
import
get_dependency
from
tests.helpers
import
get_package
from
..helpers
import
get_package
@pytest.fixture
@pytest.fixture
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment