From 6517dd169a03c7e1532386be0d3d02f9d00aebe4 Mon Sep 17 00:00:00 2001 From: Stu Hood Date: Thu, 25 Jun 2020 15:12:29 -0700 Subject: [PATCH] Prepare 2.0.0.dev0 (#10169) --- pants.toml | 1 + src/python/pants/VERSION | 2 +- .../pants/backend/python/tasks/python_run.py | 16 +- src/python/pants/goal/context.py | 16 -- src/python/pants/notes/2.0.x.rst | 175 ++++++++++++++++++ src/python/pants/option/options.py | 17 +- src/python/pants/util/filtering.py | 14 -- 7 files changed, 180 insertions(+), 61 deletions(-) create mode 100644 src/python/pants/notes/2.0.x.rst diff --git a/pants.toml b/pants.toml index 882c14b0f1d..95670b8e799 100644 --- a/pants.toml +++ b/pants.toml @@ -146,6 +146,7 @@ branch_notes = """ '1.28.x': 'src/python/pants/notes/1.28.x.rst', '1.29.x': 'src/python/pants/notes/1.29.x.rst', '1.30.x': 'src/python/pants/notes/1.30.x.rst', + '2.0.x': 'src/python/pants/notes/2.0.x.rst', } """ diff --git a/src/python/pants/VERSION b/src/python/pants/VERSION index e6e8047f71b..bf1ec7852be 100644 --- a/src/python/pants/VERSION +++ b/src/python/pants/VERSION @@ -1 +1 @@ -1.30.0rc0 +2.0.0.dev0 diff --git a/src/python/pants/backend/python/tasks/python_run.py b/src/python/pants/backend/python/tasks/python_run.py index 82519d4642a..25e1690436e 100644 --- a/src/python/pants/backend/python/tasks/python_run.py +++ b/src/python/pants/backend/python/tasks/python_run.py @@ -13,20 +13,6 @@ class PythonRun(PythonExecutionTaskBase): """Run a Python executable.""" - @classmethod - def supports_passthru_args(cls): - return True - - @classmethod - def passthru_args_kwargs(cls): - return dict( - passthrough=False, - removal_version="1.31.0.dev0", - removal_hint=( - "This task now receives passthrough arguments via the `--run-args` option." - ), - ) - def execute(self): binary = self.require_single_root_target() if isinstance(binary, PythonBinary): @@ -35,7 +21,7 @@ def execute(self): # TODO(benjy): Use MutexTask to coordinate this. pex = self.create_pex(binary.pexinfo) - args = [*self.get_passthru_args(), *self.get_options().args] + args = list(self.get_options().args) env = self.prepare_pex_env() diff --git a/src/python/pants/goal/context.py b/src/python/pants/goal/context.py index 3cd1dd2b4a8..a565df6c091 100644 --- a/src/python/pants/goal/context.py +++ b/src/python/pants/goal/context.py @@ -8,7 +8,6 @@ from typing import Dict from pants.base.build_environment import get_buildroot, get_scm -from pants.base.deprecated import deprecated_conditional from pants.base.worker_pool import SubprocPool from pants.base.workunit import WorkUnit, WorkUnitLabel from pants.build_graph.target import Target @@ -107,21 +106,6 @@ def products(self): """ return self._products - @property - def source_roots(self): - """Returns the :class:`pants.source.source_root.SourceRoots` instance for the current run. - - :API: public - """ - deprecated_conditional( - lambda: True, - removal_version="1.31.0.dev0", - entity_description="the source_roots property", - hint_message="Contact us (https://pants.readme.io/docs/community) if you need this " - "functionality.", - ) - return self._source_roots - @property def target_roots(self): """Returns the targets specified on the command line. diff --git a/src/python/pants/notes/2.0.x.rst b/src/python/pants/notes/2.0.x.rst new file mode 100644 index 00000000000..75f9262ebc6 --- /dev/null +++ b/src/python/pants/notes/2.0.x.rst @@ -0,0 +1,175 @@ +2.0.x Stable Releases +===================== + +This document describes releases leading up to the ``2.0.x`` ``stable`` series. + +See https://pants.readme.io/v2.0/docs/release-notes-2-0 for an overview of the changes in this release. + +2.0.0.dev0 (6/25/2020) +---------------------- + +API Changes +~~~~~~~~~~~ + +* Remove v1 JVM backend Tasks. (#10142) + `PR #10142 `_ + +* Remove `targets` goal in favor of `target-types` goal (#10145) + `PR #10145 `_ + +* Remove deprecated `Get[P](S)` syntax in favor of `Get(P, S)` (#10148) + `Issue #9899 `_ + `PR #10148 `_ + +* Remove v1 `login`, `server`, and `killserver` goals (#10144) + `PR #10144 `_ + +* Remove v1 `minimize`, `filemap`, `paths`, `sort`, and `depmap` goals (#10135) + `PR #10135 `_ + +* Replace v1 `dependees`, `dependencies`, `filedeps`, and `filter` with v2 (#10117) + `PR #10117 `_ + +* Remove the v1 scrooge contrib plugin. (#10127) + `PR #10127 `_ + +* Remove support for `pants.ini` (#10123) + `PR #10123 `_ + +* Remove the v1 `export` goal (#10122) + `PR #10122 `_ + +* Remove `pants.backend.docgen` (#10121) + `PR #10121 `_ + +* Remove v1 `idea-plugin` goal (#10115) + `PR #10115 `_ + +* Remove v1 Java Protobuf implementation (#10111) + `PR #10111 `_ + +* Remove `pants.contrib.node` plugin (#10113) + `PR #10113 `_ + +* Remove v1 `bash-completion` goal (#10112) + `PR #10112 `_ + +* Remove watchman. (#10114) + `PR #10114 `_ + +* Upgrade default mypy version from 0.780 to 0.781 (#10109) + `PR #10109 `_ + +* Remove `pants.contrib.go` plugin (#10107) + `PR #10107 `_ + +* Remove v1 Python Grpcio codegen backend (#10108) + `PR #10108 `_ + +* Remove deprecated `--v2-ui` in favor of `--dynamic-ui` (#10105) + `PR #10105 `_ + +* Remove deprecated `--enable-pantsd` in favor of `--pantsd` (#10104) + `PR #10104 `_ + +* Remove deprecated `pytest-coverage` scope in favor of `coverage-py` (#10103) + `PR #10103 `_ + +* Remove `pants.contrib.confluence` (#10106) + `PR #10106 `_ + +New Features +~~~~~~~~~~~~ + +* Add support for MyPy to Pants v2 (#10132) + `Issue #10131 `_ + `PR #10132 `_ + +* Changes to support Django. (#10088) + `PR #10088 `_ + +* Add support for enum list options. (#10083) + `Issue #9968 `_ + `PR #10083 `_ + +Bugfixes +~~~~~~~~ + +* Do not render pytest at info by default, but give it a description. (#10164) + `PR #10164 `_ + +* Preserve source roots in MyPy and Pylint output (#10159) + `PR #10159 `_ + +* Do not include resource targets in v2 MyPy chroot (#10154) + `PR #10154 `_ + +* Set dynamic-ui default based on CI (#10140) + `PR #10140 `_ + +* Fix Pytest XML reports and Coverage breaking with remote execution (#10136) + `PR #10136 `_ + +* Retry for filesystem changes more quickly, indefinitely, and with logging (#10139) + `PR #10139 `_ + +* Normalize paths before determining whether we can watch them. (#10130) + `PR #10130 `_ + +Refactoring, Improvements, and Tooling +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +* Remove use of importlib for native_engine loading (#10161) + `PR #10161 `_ + +* Update sha2 crate dependency (#10163) + `PR #10163 `_ + +* Remove unused rust deps. (#10162) + `PR #10162 `_ + +* Add message field on workunits and use it to replace some explicit logging (#10158) + `PR #10158 `_ + +* Expose the types consumed to produce a type in a RuleGraph. (#10153) + `PR #10153 `_ + +* Upgrade setuptools from 44.0.0 to 47.3.1 (#10149) + `PR #10149 `_ + +* Support for using unstripped python sources (#10138) + `PR #10138 `_ + +* fix snapshot subset testing and unrevert #9779 (#10146) + `PR #10146 `_ + +* Revert "Make SnapshotSubset() faster (#9779)" (#10143) + `PR #9779 `_ + `PR #10143 `_ + +* Make SnapshotSubset() faster (#9779) + `PR #9779 `_ + +* upgrade to rust v1.44.1 (#10125) + `PR #10125 `_ + +* Remove `BuildFile` (#10102) + `PR #10102 `_ + +Testing +~~~~~~~ + +* Enable test timeouts for python in v2. (#10147) + `PR #10147 `_ + +* Delete many v1 tests. (#10116) + `PR #10116 `_ + +* enable REv2 streaming client in CI (#9989) + `PR #9989 `_ + +Documentation +~~~~~~~~~~~~~ + +* Remove the v1 docsite (#10120) + `PR #10120 `_ diff --git a/src/python/pants/option/options.py b/src/python/pants/option/options.py index 4a2a5813b6d..8f9a4ee5ef1 100644 --- a/src/python/pants/option/options.py +++ b/src/python/pants/option/options.py @@ -8,7 +8,7 @@ from dataclasses import dataclass from typing import Dict, Iterable, List, Mapping, Optional, Sequence, Tuple -from pants.base.deprecated import deprecated_conditional, warn_or_error +from pants.base.deprecated import warn_or_error from pants.option.arg_splitter import ArgSplitter, HelpRequest from pants.option.config import Config from pants.option.option_tracker import OptionTracker @@ -534,11 +534,7 @@ def for_scope( return values def get_fingerprintable_for_scope( - self, - bottom_scope: str, - include_passthru: Optional[bool] = None, - fingerprint_key: str = "fingerprint", - invert: bool = False, + self, bottom_scope: str, fingerprint_key: str = "fingerprint", invert: bool = False, ): """Returns a list of fingerprintable (option type, option value) pairs for the given scope. @@ -557,15 +553,6 @@ def get_fingerprintable_for_scope( :API: public """ - deprecated_conditional( - predicate=lambda: include_passthru is not None, - removal_version="1.31.0.dev0", - entity_description="get_fingerprintable_for_scope `include_passthru` arg", - hint_message=( - "passthru arguments are fingerprinted if their associated option value is." - ), - ) - fingerprint_default = bool(invert) pairs = [] diff --git a/src/python/pants/util/filtering.py b/src/python/pants/util/filtering.py index 1dfe0e41831..9fada4ecf73 100644 --- a/src/python/pants/util/filtering.py +++ b/src/python/pants/util/filtering.py @@ -4,8 +4,6 @@ import operator from typing import Callable, Iterable, Sequence, Tuple, TypeVar -from pants.base.deprecated import deprecated - _T = TypeVar("_T") Filter = Callable[[_T], bool] @@ -58,18 +56,6 @@ def create_filters( return filters -@deprecated( - removal_version="1.31.0.dev0", - hint_message="Use `pants.util.filtering.and_filters`, which behaves identically.", -) -def wrap_filters(filters: Iterable[Filter]) -> Filter: - """Returns a single filter that short-circuit ANDs the specified filters. - - :API: public - """ - return and_filters(filters) - - def and_filters(filters: Iterable[Filter]) -> Filter: """Returns a single filter that short-circuit ANDs the specified filters.