def exclude_package(self, package_version: PackageVersion) -> None:
if not package_version.is_locked():<EOL><INDENT>raise InternalError("<STR_LIT>", package_version)<EOL><DEDENT>section = self.pipfile.dev_packages if package_version.develop else self.pipfile.packages<EOL>to_exclude_package = section.get(package_version.name)<EOL>if to_exclude_package:<EOL><INDENT>package_version.negate_version()<EOL>_LOGGER.debug(f"<STR_LIT>", to_exclude_package, package_version)<EOL>if package_version.index != to_exclude_package.index:<EOL><INDENT>_LOGGER.warning(<EOL>f"<STR_LIT>"<EOL>f"<STR_LIT>"<EOL>)<EOL><DEDENT>if package_version.markers != to_exclude_package:<EOL><INDENT>_LOGGER.warning(<EOL>f"<STR_LIT>"<EOL>f"<STR_LIT>"<EOL>)<EOL><DEDENT>if to_exclude_package.version != "<STR_LIT:*>":<EOL><INDENT>package_version.version = f"<STR_LIT>"<EOL><DEDENT>_LOGGER.debug("<STR_LIT>", package_version)<EOL>section[package_version.name] = package_version<EOL><DEDENT>else:<EOL><INDENT>package_version.negate_version()<EOL>section[package_version.name] = package_version<EOL>_LOGGER.debug("<STR_LIT>", package_version)<EOL><DEDENT>self.pipenv_lock()<EOL>
Exclude the given package from application stack.