Unverified Commit 80d39938 authored by Sébastien Eustace's avatar Sébastien Eustace
Browse files

Fix skipped packages appearing as being installed

parent 7ae7e2b7
Loading
Loading
Loading
Loading
+1 −0
Changes for CHANGELOG.md: 1 added line, 0 removed lines.
Original line number Diff line number Diff line
@@ -16,6 +16,7 @@
- Fixed handling of post releases.
- Fixed python restricted dependencies not being checked agaisnt virtualenv version.
- Fixed python/platform constraint not being picked up for subdependencies.
- Fixed skipped packages appearing as installing.


## [0.4.2] - 2018-03-10
+1 −0
Changes for poetry/console/commands/install.py: 1 added line, 0 removed lines.
Original line number Diff line number Diff line
@@ -35,5 +35,6 @@ exist it will look for <comment>poetry.toml</> and do the same.
        installer.extras(self.option('extras'))
        installer.dev_mode(not self.option('no-dev'))
        installer.dry_run(self.option('dry-run'))
        installer.verbose(self.option('verbose'))

        return installer.run()
+8 −3
Changes for poetry/installation/installer.py: 8 added lines, 3 removed lines.
Original line number Diff line number Diff line
@@ -201,7 +201,12 @@ class Installer:
            installs = []
            updates = []
            uninstalls = []
            skipped = []
            for op in ops:
                if op.skipped:
                    skipped.append(op)
                    continue

                if op.job_type == 'install':
                    installs.append(
                        f'{op.package.pretty_name}'
@@ -223,7 +228,7 @@ class Installer:
                f'<info>{len(installs)}</> install{"" if len(installs) == 1 else "s"}, '
                f'<info>{len(updates)}</> update{"" if len(updates) == 1 else "s"}, '
                f'<info>{len(uninstalls)}</> removal{"" if len(uninstalls) == 1 else "s"}'
                f''
                f'{", <info>{}</> skipped".format(len(skipped)) if skipped and self.is_verbose() else ""}'
            )
            self._io.new_line()

@@ -251,7 +256,7 @@ class Installer:

    def _execute_install(self, operation: Install) -> None:
        if operation.skipped:
            if self._io.is_verbose() and (self._execute_operations or self.is_dry_run()):
            if self.is_verbose() and (self._execute_operations or self.is_dry_run()):
                self._io.writeln(
                    f'  - Skipping <info>{operation.package.pretty_name}</> '
                    f'(<comment>{operation.package.full_pretty_version}</>) '
@@ -275,7 +280,7 @@ class Installer:
        target = operation.target_package

        if operation.skipped:
            if self._io.is_verbose() and (self._execute_operations or self.is_dry_run()):
            if self.is_verbose() and (self._execute_operations or self.is_dry_run()):
                self._io.writeln(
                    f'  - Skipping <info>{target.pretty_name}</> '
                    f'(<comment>{target.full_pretty_version}</>) '