Skip to content

Commit

Permalink
Prepare the 1.4.0.dev0 release (#4579)
Browse files Browse the repository at this point in the history
  • Loading branch information
wisechengyi authored May 13, 2017
1 parent d523736 commit db9b1be
Show file tree
Hide file tree
Showing 11 changed files with 58 additions and 113 deletions.
1 change: 0 additions & 1 deletion src/python/pants/backend/jvm/targets/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ python_library(
'annotation_processor.py',
'java_agent.py',
'java_library.py',
'java_tests.py',
'javac_plugin.py',
],
dependencies = [
Expand Down
18 changes: 0 additions & 18 deletions src/python/pants/backend/jvm/targets/java_tests.py

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -159,11 +159,6 @@ def get_fatal_warnings_disabled_args_default(cls):
def register_options(cls, register):
super(BaseZincCompile, cls).register_options(register)
# TODO: Sort out JVM compile config model: https://github.com/pantsbuild/pants/issues/4483.
register('--name-hashing', advanced=True, type=bool, fingerprint=True,
removal_hint='Name hashing is required for operation in zinc 1.0.0-X: this '
'option no longer has any effect.',
removal_version='1.4.0.dev0',
help='Use zinc name hashing.')
register('--whitelisted-args', advanced=True, type=dict,
default={
'-S.*': False,
Expand Down
10 changes: 5 additions & 5 deletions src/python/pants/build_graph/address.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,11 +165,11 @@ def check_target_name(cls, spec_path, name):
.format(spec=spec_path, name=name))

banned_chars = BANNED_CHARS_IN_TARGET_NAME & set(name)
# raise InvalidateTargetName after deprecation
deprecated_conditional(lambda: len(banned_chars) > 0, '1.4.0dev0',
'banned chars found in target name',
'{banned_chars} not allowed in target name: {name}'
.format(banned_chars=banned_chars, name=name))

if banned_chars:
raise InvalidTargetName('banned chars found in target name',
'{banned_chars} not allowed in target name: {name}'
.format(banned_chars=banned_chars, name=name))

def __init__(self, spec_path, target_name):
"""
Expand Down
2 changes: 0 additions & 2 deletions src/python/pants/build_graph/target.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,6 @@ class UnknownArgumentError(TargetDefinitionException):
"""An unknown keyword argument was supplied to Target."""

options_scope = 'target-arguments'
deprecated_options_scope = 'unknown-arguments'
deprecated_options_scope_removal_version = '1.4.0.dev0'

@classmethod
def register_options(cls, register):
Expand Down
12 changes: 2 additions & 10 deletions src/python/pants/cache/cache_setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -250,16 +250,8 @@ def _do_create_artifact_cache(self, spec, action):
- A list or tuple of two specs, local, then remote, each as described above
"""
compression = self._options.compression_level
if compression not in range(10):
raise ValueError('compression_level must be an integer 0-9: {}'.format(compression))

deprecated_conditional(
lambda: compression == 0,
'1.4.0.dev0',
'compression==0',
'The artifact cache depends on gzip compression for checksumming: a compression level '
'==0 disables compression, and can prevent detection of corrupted artifacts.'
)
if compression not in range(1, 10):
raise ValueError('compression_level must be an integer 1-9: {}'.format(compression))

artifact_root = self._options.pants_workdir

Expand Down
46 changes: 46 additions & 0 deletions src/python/pants/notes/master.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,52 @@ Master Pre-Releases
This document describes ``dev`` releases which occur weekly from master, and which do
not undergo the vetting associated with ``stable`` releases.

1.4.0.dev0 (5/12/2017)
----------------------

API Changes
~~~~~~~~~~~

* Support "exports" for thrift targets (#4564)
`PR #4564 <https://github.com/pantsbuild/pants/pull/4564>`_

* Make setup_py tasks provide 'python_dists' product. (#4498)
`PR #4498 <https://github.com/pantsbuild/pants/pull/4498>`_

* Include API that will store target info in run_tracker (#4561)
`PR #4561 <https://github.com/pantsbuild/pants/pull/4561>`_

Bugfixes
~~~~~~~~

* Fix built-in macros for the mutable ParseContext (#4583)
`PR #4583 <https://github.com/pantsbuild/pants/pull/4583>`_

* Exclude only roots for exclude-target-regexp in v2 (#4578)
`PR #4578 <https://github.com/pantsbuild/pants/pull/4578>`_
`PR #451) <https://github.com/twitter/commons/pull/451)>`_

* Fix a pytest path mangling bug. (#4565)
`PR #4565 <https://github.com/pantsbuild/pants/pull/4565>`_

Refactoring, Improvements, and Tooling
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

* Specify a workunit for node.js test and run. (#4572)
`PR #4572 <https://github.com/pantsbuild/pants/pull/4572>`_

* Include transitive Resources targets in PrepareResources. (#4569)
`PR #4569 <https://github.com/pantsbuild/pants/pull/4569>`_

* [engine] Don't recreate a graph just for validation (#4566)
`PR #4566 <https://github.com/pantsbuild/pants/pull/4566>`_

Documentation Updates
~~~~~~~~~~~~~~~~~~~~~

* Update release docs to use a label instead of a spreadsheet for backports. (#4574)
`PR #4574 <https://github.com/pantsbuild/pants/pull/4574>`_


1.3.0rc0 (05/08/2017)
---------------------
Expand Down
4 changes: 0 additions & 4 deletions src/python/pants/option/global_options.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,10 +167,6 @@ def register_options(cls, register):
# Relative pants_distdir to buildroot. Requires --pants-distdir to be bootstrapped above first.
# e.g. '/dist/'
rel_distdir = '/{}/'.format(os.path.relpath(register.bootstrap.pants_distdir, get_buildroot()))
register('--ignore-patterns', advanced=True, type=list, fromfile=True,
default=['.*/', rel_distdir, 'bower_components/', 'node_modules/', '*.egg-info/'],
removal_version='1.3.0.dev0', removal_hint='Use --build-ignore instead.',
mutually_exclusive_group='build_ignore', help='See help for --build-ignore.')
register('--build-ignore', advanced=True, type=list, fromfile=True,
default=['.*/', rel_distdir, 'bower_components/', 'node_modules/', '*.egg-info/'],
help='Paths to ignore when identifying BUILD files. '
Expand Down
2 changes: 1 addition & 1 deletion src/python/pants/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@
from packaging.version import Version


VERSION = '1.3.0rc0'
VERSION = '1.4.0.dev0'

PANTS_SEMVER = Version(VERSION)
4 changes: 2 additions & 2 deletions tests/python/pants_test/build_graph/test_address.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,8 @@ def test_parse_bad_spec_build_trailing_path_component(self):
self.do_test_bad_spec_path('//a/BUILD.suffix:b')

def test_banned_chars_in_target_name(self):
# move to do_test_bad_spec_path after deprecation
self.assertEquals('c@d', Address(*parse_spec('a/b:c@d')).target_name)
with self.assertRaises(InvalidTargetName):
Address(*parse_spec('a/b:c@d'))

def do_test_bad_spec_path(self, spec):
with self.assertRaises(InvalidSpecPath):
Expand Down
67 changes: 2 additions & 65 deletions tests/python/pants_test/subsystem/subsystem_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,71 +5,8 @@
from __future__ import (absolute_import, division, generators, nested_scopes, print_function,
unicode_literals, with_statement)

from contextlib import contextmanager

from pants.base.deprecated import deprecated
from pants.option.optionable import Optionable
from pants.option.scope import ScopeInfo
from pants.subsystem.subsystem import Subsystem
from pants_test.option.util.fakes import (create_option_values_for_optionable,
create_options_for_optionables)


_deprecation_msg = ("Use the for_subsystems and options arguments to BaseTest.context(), or use "
"the methods init_subsystem(), global_subsystem_instance() in this module.")


@deprecated('1.4.0.dev0', _deprecation_msg)
def create_subsystem(subsystem_type, scope='test-scope', **options):
"""Creates a Subsystem for test.
:API: public
:param type subsystem_type: The subclass of :class:`pants.subsystem.subsystem.Subsystem`
to create.
:param string scope: The scope to create the subsystem in.
:param **options: Keyword args representing option values explicitly set via the command line.
"""
if not issubclass(subsystem_type, Subsystem):
raise TypeError('The given `subsystem_type` was not a subclass of `Subsystem`: {}'
.format(subsystem_type))

option_values = create_option_values_for_optionable(subsystem_type, **options)
return subsystem_type(scope, option_values)


@contextmanager
@deprecated('1.4.0.dev0', _deprecation_msg)
def subsystem_instance(subsystem_type, scope=None, **options):
"""Creates a Subsystem instance for test.
:API: public
:param type subsystem_type: The subclass of :class:`pants.subsystem.subsystem.Subsystem`
to create.
:param string scope: An optional scope to create the subsystem in; defaults to global.
:param **options: Keyword args representing option values explicitly set via the command line.
"""
if not issubclass(subsystem_type, Subsystem):
raise TypeError('The given `subsystem_type` was not a subclass of `Subsystem`: {}'
.format(subsystem_type))

optionables = Subsystem.closure([subsystem_type])
updated_options = dict(Subsystem._options.items()) if Subsystem._options else {}
if options:
updated_options.update(options)

Subsystem._options = create_options_for_optionables(optionables, options=updated_options)
try:
if scope is None:
yield subsystem_type.global_instance()
else:
class ScopedOptionable(Optionable):
options_scope = scope
options_scope_category = ScopeInfo.SUBSYSTEM
yield subsystem_type.scoped_instance(ScopedOptionable)
finally:
Subsystem.reset()
from pants_test.option.util.fakes import create_options_for_optionables


def global_subsystem_instance(subsystem_type, options=None):
Expand Down Expand Up @@ -115,7 +52,7 @@ def init_subsystems(subsystem_types, options=None):
for scope in options.keys():
if scope not in allowed_scopes:
raise ValueError('`{}` is not the scope of any of these subsystems: {}'.format(
scope, optionables))
scope, optionables))
# Don't trample existing subsystem options, in case a test has set up some
# other subsystems in some other way.
updated_options = dict(Subsystem._options.items()) if Subsystem._options else {}
Expand Down

0 comments on commit db9b1be

Please sign in to comment.