diff
stringlengths
65
26.7k
message
stringlengths
7
9.92k
diff --git a/openupgradelib/openupgrade.py b/openupgradelib/openupgrade.py index <HASH>..<HASH> 100644 --- a/openupgradelib/openupgrade.py +++ b/openupgradelib/openupgrade.py @@ -22,6 +22,7 @@ import sys import os import inspect +import uuid import logging from contextlib import contextmanager from . import openupgrade_tools @@ -992,8 +993,18 @@ def migrate(no_version=False): (module, stage, version)) try: # The actual function is called here - with cr.savepoint(): - func(cr, version) + if hasattr(cr, 'savepoint'): + with cr.savepoint(): + func(cr, version) + else: + name = uuid.uuid1().hex + cr.execute('SAVEPOINT "%s"' % name) + try: + func(cr, version) + cr.execute('RELEASE SAVEPOINT "%s"' % name) + except: + cr.execute('ROLLBACK TO SAVEPOINT "%s"' % name) + raise except Exception as e: logger.error( "%s: error in migration script %s: %s" %
[FIX] support OpenERP version that don't have cr.savepoint
diff --git a/bcbio/utils.py b/bcbio/utils.py index <HASH>..<HASH> 100644 --- a/bcbio/utils.py +++ b/bcbio/utils.py @@ -113,7 +113,14 @@ def s3_handle(fname): bucket, key = s3_bucket_key(fname) s3 = boto.connect_s3() - s3b = s3.get_bucket(bucket) + try: + s3b = s3.get_bucket(bucket) + except boto.exception.S3ResponseError, e: + # if we don't have bucket permissions but folder permissions, try without validation + if e.status == 403: + s3b = s3.get_bucket(bucket, validate=False) + else: + raise s3key = s3b.get_key(key) return S3Handle(s3key)
Enable streaming of files from buckets without access permissions. Fix for getting HiSeq X Ten data
diff --git a/Kernel.php b/Kernel.php index <HASH>..<HASH> 100644 --- a/Kernel.php +++ b/Kernel.php @@ -63,9 +63,15 @@ class Kernel extends Component $this->container->set($id, $definition); } - foreach ($this->config->get('bootstrappers') as $item) { + foreach ($this->config->get('bootstrappers') as $key => $value) { /** @var \ManaPHP\BootstrapperInterface $bootstrapper */ - $bootstrapper = $this->container->get($item); + if (is_int($key)) { + $bootstrapper = $this->container->get($value); + } else { + $this->container->set($key, $value); + $bootstrapper = $this->container->get($key); + } + $bootstrapper->bootstrap(); }
refactor ManaPHP\Kernel
diff --git a/lib/lyricfy.rb b/lib/lyricfy.rb index <HASH>..<HASH> 100644 --- a/lib/lyricfy.rb +++ b/lib/lyricfy.rb @@ -36,6 +36,9 @@ module Lyricfy fetcher = klass.new(artist_name: artist, song_name: song) if lyric_body = fetcher.search + #def lyric_body.to_s + #self.join("\n") + #end result = OpenStruct.new(artist: artist, song: song, body: lyric_body) break end diff --git a/test/lyricfy_test.rb b/test/lyricfy_test.rb index <HASH>..<HASH> 100644 --- a/test/lyricfy_test.rb +++ b/test/lyricfy_test.rb @@ -42,6 +42,17 @@ describe Lyricfy::Fetcher do end end end + + describe "lyric found" do + it "should return lyrics" do + fetcher = Lyricfy::Fetcher.new :metro_lyrics + VCR.use_cassette('metro_lyrics_200') do + result = fetcher.search('2pac', 'Life Goes On') + result.body.must_be_instance_of Array + result.body.to_s.must_include 'Life as a baller' + end + end + end end end end
Made song.body respond to to_s so that you can easily print lyrics without using an each iterator
diff --git a/lib/Doctrine/ODM/PHPCR/UnitOfWork.php b/lib/Doctrine/ODM/PHPCR/UnitOfWork.php index <HASH>..<HASH> 100644 --- a/lib/Doctrine/ODM/PHPCR/UnitOfWork.php +++ b/lib/Doctrine/ODM/PHPCR/UnitOfWork.php @@ -814,7 +814,8 @@ class UnitOfWork $path = $this->getDocumentId($document); $session = $this->dm->getPhpcrSession(); $vm = $session->getWorkspace()->getVersionManager(); - return $vm->getBaseVersion($path)->getPredecessors(); + $vh = $vm->getVersionHistory($path); + return (array)$vh->getAllVersions(); } /**
use versionhistory to get all predecessors
diff --git a/moco-core/src/main/java/com/github/dreamhead/moco/websocket/ActualWebSocketServer.java b/moco-core/src/main/java/com/github/dreamhead/moco/websocket/ActualWebSocketServer.java index <HASH>..<HASH> 100644 --- a/moco-core/src/main/java/com/github/dreamhead/moco/websocket/ActualWebSocketServer.java +++ b/moco-core/src/main/java/com/github/dreamhead/moco/websocket/ActualWebSocketServer.java @@ -39,7 +39,7 @@ public class ActualWebSocketServer implements WebSocketServer { return uri; } - public void sendOpen(final Channel channel) { + private void sendConnected(final Channel channel) { if (connected != null) { MessageContent messageContent = this.connected.readFor(null); channel.writeAndFlush(new TextWebSocketFrame(messageContent.toString())); @@ -56,7 +56,7 @@ public class ActualWebSocketServer implements WebSocketServer { } else { handshaker.handshake(channel, request); addChannel(channel); - sendOpen(channel); + sendConnected(channel); } } }
made send connected in websocket server private
diff --git a/environments/dev/common/config/main-local.php b/environments/dev/common/config/main-local.php index <HASH>..<HASH> 100644 --- a/environments/dev/common/config/main-local.php +++ b/environments/dev/common/config/main-local.php @@ -11,6 +11,9 @@ return [ 'mail' => [ 'class' => 'yii\swiftmailer\Mailer', 'viewPath' => '@common/mail', + // send all mails to a file by default. You have to set + // 'useFileTransport' to false and configure a transport + // for the mailer to send real emails. 'useFileTransport' => true, ], ],
added explicit comment about file transport to mail config fixes #<I>
diff --git a/lib/apple_tv_converter.rb b/lib/apple_tv_converter.rb index <HASH>..<HASH> 100644 --- a/lib/apple_tv_converter.rb +++ b/lib/apple_tv_converter.rb @@ -114,6 +114,7 @@ module AppleTvConverter # ice - Icelandic -> isl # ita - Italian # jpn - Japanese + # jap - Japanese -> jpn # kor - Korean # lav - Latvian # lit - Lithuanian @@ -140,6 +141,7 @@ module AppleTvConverter 'gre' => 'ell', 'ice' => 'isl', 'rum' => 'ron', + 'jap' => 'jpn', 'may' => nil }
Convert 'jap' language to 'jpn'
diff --git a/collector/meminfo_linux.go b/collector/meminfo_linux.go index <HASH>..<HASH> 100644 --- a/collector/meminfo_linux.go +++ b/collector/meminfo_linux.go @@ -45,6 +45,10 @@ func parseMemInfo(r io.Reader) (map[string]float64, error) { for scanner.Scan() { line := scanner.Text() parts := strings.Fields(line) + // Workaround for empty lines occasionally occur in CentOS 6.2 kernel 3.10.90. + if len(parts) == 0 { + continue + } fv, err := strconv.ParseFloat(parts[1], 64) if err != nil { return nil, fmt.Errorf("invalid value in meminfo: %s", err)
Fix accidently empty lines in meminfo_linux (#<I>) * Fix accidently empty lines in meminfo_linux
diff --git a/core-bundle/tests/Monolog/ContaoTableProcessorTest.php b/core-bundle/tests/Monolog/ContaoTableProcessorTest.php index <HASH>..<HASH> 100644 --- a/core-bundle/tests/Monolog/ContaoTableProcessorTest.php +++ b/core-bundle/tests/Monolog/ContaoTableProcessorTest.php @@ -108,7 +108,12 @@ class ContaoTableProcessorTest extends TestCase ['::1', '::1'], ['192.168.1.111', '192.168.1.0'], ['10.10.10.10', '10.10.10.0'], - // TODO test with IPv6 + ['FE80:0000:0000:0000:0202:B3FF:FE1E:8329', 'FE80:0000:0000:0000:0202:B3FF:FE1E:0000'], + ['FE80::0202:B3FF:FE1E:8329', 'FE80::0202:B3FF:FE1E:0000'], + ['2001:DB8:0:1', '2001:DB8:0:0000'], + ['3ffe:1900:4545:3:200:f8ff:fe21:67cf', '3ffe:1900:4545:3:200:f8ff:fe21:0000'], + ['fe80:0:0:0:200:f8ff:fe21:67cf', 'fe80:0:0:0:200:f8ff:fe21:0000'], + ['fe80::200:f8ff:fe21:67cf', 'fe80::200:f8ff:fe21:0000'], ]; } }
[Core] Added IPv6 anonymization tests
diff --git a/activemodel/lib/active_model/secure_password.rb b/activemodel/lib/active_model/secure_password.rb index <HASH>..<HASH> 100644 --- a/activemodel/lib/active_model/secure_password.rb +++ b/activemodel/lib/active_model/secure_password.rb @@ -3,6 +3,7 @@ module ActiveModel extend ActiveSupport::Concern class << self; attr_accessor :min_cost; end + self.min_cost = false module ClassMethods # Adds methods to set and authenticate against a BCrypt password. @@ -13,8 +14,8 @@ module ActiveModel # you wish to turn off validations, pass <tt>validations: false</tt> as an # argument. You can add more validations by hand if need be. # - # If you don't need the confirmation validation, just don't set any - # value to the password_confirmation attribute and the the validation + # If you don't need the confirmation validation, just don't set any + # value to the password_confirmation attribute and the the validation # will not be triggered. # # You need to add bcrypt-ruby (~> 3.0.0) to Gemfile to use #has_secure_password:
Initialize #min_cost to avoid warning in Ruby <I>
diff --git a/lmdb/txn_test.go b/lmdb/txn_test.go index <HASH>..<HASH> 100644 --- a/lmdb/txn_test.go +++ b/lmdb/txn_test.go @@ -6,7 +6,7 @@ import ( "testing" ) -func TestTxnUpdate(t *testing.T) { +func TestTxn_Update(t *testing.T) { env := setup(t) defer clean(env, t) @@ -43,7 +43,7 @@ func TestTxnUpdate(t *testing.T) { } } -func TestTxnViewSub(t *testing.T) { +func TestTxn_View_noSubTxn(t *testing.T) { env := setup(t) defer clean(env, t) @@ -64,7 +64,7 @@ func TestTxnViewSub(t *testing.T) { } } -func TestTxnUpdateSub(t *testing.T) { +func TestTxn_Sub(t *testing.T) { env := setup(t) defer clean(env, t) @@ -125,7 +125,7 @@ func TestTxnUpdateSub(t *testing.T) { } } -func TestTxnFlags(t *testing.T) { +func TestTxn_Flags(t *testing.T) { env := setup(t) path, err := env.Path() if err != nil {
rename txn tests to be consistent with cursor_test.go
diff --git a/azurerm/resource_arm_virtual_network_gateway.go b/azurerm/resource_arm_virtual_network_gateway.go index <HASH>..<HASH> 100644 --- a/azurerm/resource_arm_virtual_network_gateway.go +++ b/azurerm/resource_arm_virtual_network_gateway.go @@ -349,19 +349,10 @@ func resourceArmVirtualNetworkGatewayDelete(d *schema.ResourceData, meta interfa return fmt.Errorf("Error waiting for AzureRM Virtual Network Gateway %s to be removed: %+v", name, err) } - // Gateways are not fully cleaned up when the API indicates the delete operation - // has finished, this workaround was suggested by Azure support to avoid conflicts - // when modifying/deleting the related subnet or network. Although the API indicated - // that the Virtual Network Gateway does not exist anymore, there is still a link - // to the Gateway Subnet it has been associated with. This causes an error when - // trying to delete the Gateway Subnet immediately after the Virtual Network Gateway - // has been deleted. - d.SetId("") return nil } -// TODO check if this is necessary? func virtualNetworkGatewayStateRefreshFunc(client *ArmClient, resourceGroupName string, virtualNetworkGateway string, withNotFound bool) resource.StateRefreshFunc { return func() (interface{}, string, error) { resp, err := client.vnetGatewayClient.Get(resourceGroupName, virtualNetworkGateway)
virtual_network_gateway: Removed comments on subnet deletion workaround
diff --git a/datatableview/columns.py b/datatableview/columns.py index <HASH>..<HASH> 100644 --- a/datatableview/columns.py +++ b/datatableview/columns.py @@ -338,13 +338,16 @@ if get_version().split('.') >= ['1', '6']: class BooleanColumn(Column): model_field_class = models.BooleanField handles_field_classes = [models.BooleanField, models.NullBooleanField] + lookup_types = ('exact', 'in') class IntegerColumn(Column): model_field_class = models.IntegerField handles_field_classes = [models.IntegerField, models.AutoField] + lookup_types = ('exact', 'in') class FloatColumn(Column): model_field_class = models.FloatField handles_field_classes = [models.FloatField, models.DecimalField] + lookup_types = ('exact', 'in')
Fix lookup types for boolean/number fields Relying on the generic Column base class for these is too implicit.
diff --git a/pages/Category/components/Products/connector.js b/pages/Category/components/Products/connector.js index <HASH>..<HASH> 100644 --- a/pages/Category/components/Products/connector.js +++ b/pages/Category/components/Products/connector.js @@ -18,7 +18,7 @@ const mapStateToProps = (state, props) => ({ * @return {Object} The extended component props. */ const mapDispatchToProps = dispatch => ({ - getProducts: categoryId => dispatch(fetchCategoryProducts(categoryId)), + getProducts: (categoryId, offset) => dispatch(fetchCategoryProducts(categoryId, offset)), }); /**
PWA-<I> Send offset to action.
diff --git a/cheroot/test/test_conn.py b/cheroot/test/test_conn.py index <HASH>..<HASH> 100644 --- a/cheroot/test/test_conn.py +++ b/cheroot/test/test_conn.py @@ -804,23 +804,18 @@ def test_Content_Length_Non_Int(test_client): """ Try a request where Content-Length header is non-compatible """ - conn = test_client.get_connection() - - conn.putrequest('POST', '/upload', skip_host=True) - conn.putheader('Host', conn.host) - conn.putheader('Content-Type', 'text/plain') - conn.putheader('Content-Length', 'not-an-integer') - conn.endheaders() - - response = conn.getresponse() - status_line, actual_headers, actual_resp_body = webtest.shb(response) + status_line, actual_headers, actual_resp_body = test_client.post( + '/upload', + headers=[ + ('Content-Type', 'text/plain'), + ('Content-Length', 'not-an-integer'), + ], + ) actual_status = int(status_line[:3]) assert actual_status == 400 assert actual_resp_body == b'Malformed Content-Length Header.' - conn.close() - @pytest.mark.parametrize( 'uri,expected_resp_status,expected_resp_body',
Rewrite non-int content-length test to use client Make it a higher-level test
diff --git a/api/python/setup.py b/api/python/setup.py index <HASH>..<HASH> 100644 --- a/api/python/setup.py +++ b/api/python/setup.py @@ -57,7 +57,7 @@ setup( 'numpy>=1.14.0', # required by pandas, but missing from its dependencies. 'packaging>=16.8', 'pandas>=0.19.2', - 'pyarrow>=0.9.0,<0.14', # as of 7/5/19: linux/circleci bugs on 0.14 + 'pyarrow>=0.14.1', # as of 7/5/19: linux/circleci bugs on 0.14.0 'requests>=2.12.4', 'ruamel.yaml<=0.15.70', 'tqdm>=4.26.0',
see if pyarrow <I> works in CI (#<I>)
diff --git a/test/sass/engine_test.rb b/test/sass/engine_test.rb index <HASH>..<HASH> 100755 --- a/test/sass/engine_test.rb +++ b/test/sass/engine_test.rb @@ -115,14 +115,16 @@ class SassEngineTest < Test::Unit::TestCase def test_exceptions EXCEPTION_MAP.each do |key, value| + line = 10 begin - Sass::Engine.new(key).render + Sass::Engine.new(key, :filename => __FILE__, :line => line).render rescue Sass::SyntaxError => err value = [value] unless value.is_a?(Array) assert_equal(value.first, err.message, "Line: #{key}") - assert_equal(value[1] || key.split("\n").length, err.sass_line, "Line: #{key}") - assert_match(/\(sass\):[0-9]+/, err.backtrace[0], "Line: #{key}") + assert_equal(__FILE__, err.sass_filename) + assert_equal((value[1] || key.split("\n").length) + line - 1, err.sass_line, "Line: #{key}") + assert_match(/#{Regexp.escape(__FILE__)}:[0-9]+/, err.backtrace[0], "Line: #{key}") else assert(false, "Exception not raised for\n#{key}") end
[Sass] Test for :line-setting.
diff --git a/src/index.js b/src/index.js index <HASH>..<HASH> 100644 --- a/src/index.js +++ b/src/index.js @@ -53,9 +53,7 @@ module.exports = class WebappWebpackPlugin { if (this.options.inject) { // Hook into the html-webpack-plugin processing and add the html tap(compilation, 'html-webpack-plugin-before-html-processing', 'WebappWebpackPlugin', (htmlPluginData, callback) => { - if (htmlPluginData.plugin.options.favicons !== false) { - htmlPluginData.html = htmlPluginData.html.replace(/(<\/head>)/i, result + '$&'); - } + htmlPluginData.html = htmlPluginData.html.replace(/(<\/head>)/i, result + '$&'); return callback(null, htmlPluginData); }); }
fix: do not rely on html-webpack-plugin's internals
diff --git a/src/model/Stats/StatsRepository.php b/src/model/Stats/StatsRepository.php index <HASH>..<HASH> 100644 --- a/src/model/Stats/StatsRepository.php +++ b/src/model/Stats/StatsRepository.php @@ -41,9 +41,9 @@ class StatsRepository extends Repository public function updateKey($key, $value) { - $this->getTable() - ->where(['key' => $key]) - ->update(['value' => $value]); + $this->getDatabase()->query( + 'INSERT INTO stats (`key`, `value`) VALUES (?, ?) ON DUPLICATE KEY UPDATE value=VALUES(value)', $key, $value + ); } public static function insertOrUpdateQuery($key, $valueQuery)
Loading stats value from cache if not too old
diff --git a/devices.js b/devices.js index <HASH>..<HASH> 100755 --- a/devices.js +++ b/devices.js @@ -1837,6 +1837,14 @@ const devices = [ ota: ota.zigbeeOTA, }, { + zigbeeModel: ['LCF005'], + model: '8718696170557', + vendor: 'Philips', + description: 'Hue Calla outdoor', + extend: hue.light_onoff_brightness_colortemp_colorxy, + ota: ota.zigbeeOTA, + }, + { zigbeeModel: ['1744130P7'], model: '1744130P7', vendor: 'Philips',
Support Hue Calla Large (#<I>) Add support of "Hue Calla Large" - my first pull request ever
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index <HASH>..<HASH> 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -53,12 +53,24 @@ module Poise def patch_module(mod, name, obj, &block) class_name = Chef::Mixin::ConvertToClassName.convert_to_class_name(name.to_s) - raise "#{mod.name}::#{class_name} is already defined" if mod.const_defined?(class_name, false) + if mod.const_defined?(class_name, false) + old_class = mod.const_get(class_name, false) + # We are only allowed to patch over things installed by patch_module + raise "#{mod.name}::#{class_name} is already defined" if !old_class.instance_variable_get(:@poise_spec_helper) + # Remove it before setting to avoid the redefinition warning + mod.send(:remove_const, class_name) + end + # Tag our objects so we know we are allows to overwrite those, but not other stuff. + obj.instance_variable_set(:@poise_spec_helper, true) mod.const_set(class_name, obj) begin block.call ensure - mod.send(:remove_const, class_name) + if old_class + mod.const_set(class_name, old_class) + else + mod.send(:remove_const, class_name) + end end end
Allow redefining stuff if it was us that set it in the first place. This means you can redefine resources/providers in a nested fashion.
diff --git a/src/Pho/Kernel/Kernel.php b/src/Pho/Kernel/Kernel.php index <HASH>..<HASH> 100644 --- a/src/Pho/Kernel/Kernel.php +++ b/src/Pho/Kernel/Kernel.php @@ -176,6 +176,8 @@ class Kernel extends Init /** * Imports from a given Pho backup file + * + * @see Kernel::export() * * @param string $blob * @@ -186,7 +188,7 @@ class Kernel extends Init if(!$this->is_running) { throw new Exceptions\KernelNotRunningException(); } - $import = json_decode($blob, true); + $import = unserialize($blob); foreach($import as $key=>$value) { $this->database()->restore($key, 0, $value); } @@ -227,6 +229,11 @@ class Kernel extends Init /** * Exports in Pho backup file format + * + * There was a problem with json_encode in large files + * hence switched to php serialize format instead. + * + * @see Kernel::import * * @return string */ @@ -241,7 +248,7 @@ class Kernel extends Init // if($key!="index") // skip list $return[$key] = $this->database()->dump($key); } - return json_encode($return); + return serialize($return); } -} \ No newline at end of file +}
switched to php serialize for import/export otherwise it fails with large files
diff --git a/index.test.js b/index.test.js index <HASH>..<HASH> 100644 --- a/index.test.js +++ b/index.test.js @@ -3,7 +3,7 @@ Licensed under the MIT license. See LICENSE file in the repository root for full import { copy, emptyDir, readFile } from "fs-extra"; import path from "path"; -import runTestsFromFileSystem from "./index"; +import runTestsFromFileSystem from "."; const expectedFileName = "expected.txt";
removed index file name from import path in tests using Node module resolution
diff --git a/marrow/mongo/query/__init__.py b/marrow/mongo/query/__init__.py index <HASH>..<HASH> 100644 --- a/marrow/mongo/query/__init__.py +++ b/marrow/mongo/query/__init__.py @@ -78,7 +78,7 @@ class Ops(Container): del self.operations[name] def __iter__(self): - return iter(self.operations.items()) + return iter(self.operations.keys()) def __len__(self): return len(self.operations)
Make compatible with direct pymongo usage.
diff --git a/packages/razzle/config/runPlugin.js b/packages/razzle/config/runPlugin.js index <HASH>..<HASH> 100644 --- a/packages/razzle/config/runPlugin.js +++ b/packages/razzle/config/runPlugin.js @@ -6,6 +6,10 @@ function runPlugin(plugin, config, { target, dev }, webpack) { return runPlugin({ name: plugin }, config, { target, dev }, webpack); } + if (typeof plugin === 'function') { + return plugin(config, { target, dev }, webpack); + } + if (typeof plugin.func === 'function') { // Used for writing plugin tests return plugin.func(config, { target, dev }, webpack, plugin.options);
add support for function as plugin (#<I>)
diff --git a/test/test_prototype_transforms_functional.py b/test/test_prototype_transforms_functional.py index <HASH>..<HASH> 100644 --- a/test/test_prototype_transforms_functional.py +++ b/test/test_prototype_transforms_functional.py @@ -488,6 +488,15 @@ def perspective_segmentation_mask(): @register_kernel_info_from_sample_inputs_fn +def center_crop_image_tensor(): + for image, output_size in itertools.product( + make_images(sizes=((16, 16), (7, 33), (31, 9))), + [[4, 3], [42, 70], [4]], # crop sizes < image sizes, crop_sizes > image sizes, single crop size + ): + yield SampleInput(image, output_size) + + +@register_kernel_info_from_sample_inputs_fn def center_crop_bounding_box(): for bounding_box, output_size in itertools.product(make_bounding_boxes(), [(24, 12), [16, 18], [46, 48], [12]]): yield SampleInput( @@ -495,6 +504,7 @@ def center_crop_bounding_box(): ) +@register_kernel_info_from_sample_inputs_fn def center_crop_segmentation_mask(): for mask, output_size in itertools.product( make_segmentation_masks(image_sizes=((16, 16), (7, 33), (31, 9))),
[proto] Updated center_crop tests (#<I>) * [proto] Added missing decorator for center_crop_segmentation_mask tests * Added center_crop_image_tensor
diff --git a/src/directives/objectBuilder.js b/src/directives/objectBuilder.js index <HASH>..<HASH> 100644 --- a/src/directives/objectBuilder.js +++ b/src/directives/objectBuilder.js @@ -31,14 +31,7 @@ module.exports = function() { '</div>', replace: true, link: function($scope) { - $scope.data = $scope.data || {}; - $scope.dataArray = []; - for (var key in $scope.data) { - $scope.dataArray.push({ - key: key, - value: $scope.data[key] - }); - } + init(); $scope.addValue = function() { $scope.dataArray.push({key: '', value: ''}); @@ -52,6 +45,8 @@ module.exports = function() { $scope.addValue(); } + $scope.$watch('data', init); + $scope.$watch('dataArray', function(newValue) { $scope.data = {}; for (var i in newValue) { @@ -59,6 +54,17 @@ module.exports = function() { $scope.data[item.key] = item.value; } }, true); + + function init() { + $scope.data = $scope.data || {}; + $scope.dataArray = []; + for (var key in $scope.data) { + $scope.dataArray.push({ + key: key, + value: $scope.data[key] + }); + } + } } }; };
FOR-<I>: Improved 'objectBuilder' directive.
diff --git a/insteonplm/tools.py b/insteonplm/tools.py index <HASH>..<HASH> 100644 --- a/insteonplm/tools.py +++ b/insteonplm/tools.py @@ -62,7 +62,7 @@ def console(loop, log, devicelist): if 1 == 1: device = conn.protocol.devices.get_device('14627a') - device.lightOnLevel.connect(self.async_light_on_level_callback) + device.lightOnLevel.connect(async_light_on_level_callback) device.light_on() log.debug('Sent light on request')
Updated tools.py for testing
diff --git a/docs/pages/upgradeGuide/index.js b/docs/pages/upgradeGuide/index.js index <HASH>..<HASH> 100644 --- a/docs/pages/upgradeGuide/index.js +++ b/docs/pages/upgradeGuide/index.js @@ -264,6 +264,32 @@ const customFilter = createFilter({ See the [Advanced Guide](/advanced) for more details and examples. +## Storing strings with non multi select + +React-select v1 allowed to use strings for the \`value\` prop, but with v2 it +uses arrays or objects in all the cases. If you still want to use strings you +can easily do so by filtering the value out off all your options: + +~~~js +const options = [ + {name: 'John', id: 1}, + {name: 'Doe', id: 2}, +] +return ( + <ReactSelect + options={options} + value={options.filter(({id}) => id === this.state.id)} + getOptionLabel={({name}) => name} + getOptionValue={({id}) => id} + onChange={({value}) => this.setState({id: value})} + /> +) +~~~ + +Note that if you use the default react-select options schema (an array with +objects having \`label\` and \`value\` keys) you don't need to define +\`getOptionValue\` nor \`getOptionLabel\`. + ## Prop Update Guide `} <PropChanges />
Update docs to add the single-value stored as string use case closes #<I>
diff --git a/lib/songbirdsh/player.rb b/lib/songbirdsh/player.rb index <HASH>..<HASH> 100644 --- a/lib/songbirdsh/player.rb +++ b/lib/songbirdsh/player.rb @@ -39,7 +39,7 @@ module Songbirdsh puts "track with id #{id} did not refer to a file" next end - puts "playing #{id.to_s(32)}: \"#{path}\"" + puts "playing #{id.to_s(36)}: \"#{path}\"" player_pid = path.to_player Process.wait player_pid end
fixed minor issue with reporting base <I> numbers (instead of <I>)
diff --git a/packages/tabs/src/Tab.js b/packages/tabs/src/Tab.js index <HASH>..<HASH> 100644 --- a/packages/tabs/src/Tab.js +++ b/packages/tabs/src/Tab.js @@ -98,7 +98,7 @@ Tab.propTypes = { /** * Sets the label of a tab */ - label: PropTypes.string, + label: PropTypes.node, /** * Function to modify the component's styles */ diff --git a/packages/tabs/src/presenters/TabPresenter.js b/packages/tabs/src/presenters/TabPresenter.js index <HASH>..<HASH> 100644 --- a/packages/tabs/src/presenters/TabPresenter.js +++ b/packages/tabs/src/presenters/TabPresenter.js @@ -142,7 +142,7 @@ export default function TabPresenter({ TabPresenter.propTypes = { active: PropTypes.bool, - label: PropTypes.string, + label: PropTypes.node, icon: PropTypes.node, disabled: PropTypes.bool, closable: PropTypes.bool,
feat: Tab label to accept a node
diff --git a/src/GameQ/Filters/Normalize.php b/src/GameQ/Filters/Normalize.php index <HASH>..<HASH> 100644 --- a/src/GameQ/Filters/Normalize.php +++ b/src/GameQ/Filters/Normalize.php @@ -81,7 +81,6 @@ class Normalize extends Base } $data['filtered'][$server->id()] = $result; - file_put_contents('/home/gameqv3/css_1.json', json_encode($data)); // Return the normalized result return $result;
Removed debug that was missed.
diff --git a/src/main/java/com/tomgibara/bits/BitStore.java b/src/main/java/com/tomgibara/bits/BitStore.java index <HASH>..<HASH> 100644 --- a/src/main/java/com/tomgibara/bits/BitStore.java +++ b/src/main/java/com/tomgibara/bits/BitStore.java @@ -547,6 +547,7 @@ public interface BitStore extends Mutability<BitStore>, Comparable<BitStore> { default int compareNumericallyTo(BitStore that) { if (this == that) return 0; // cheap check + if (that == null) throw new IllegalArgumentException("that"); return Bits.compareNumeric(this, that); }
Guards against null comparator.
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -12,7 +12,7 @@ setup( packages=find_packages(), include_package_data=True, install_requires=[ - 'vr.runners>=2.8', + 'vr.runners>=2.10,<3', 'path.py>=7.1', 'yg.lockfile', 'jaraco.itertools',
Bumping vr.runners
diff --git a/provision/docker/containers_test.go b/provision/docker/containers_test.go index <HASH>..<HASH> 100644 --- a/provision/docker/containers_test.go +++ b/provision/docker/containers_test.go @@ -7,6 +7,7 @@ package docker import ( "io/ioutil" "net/http" + "regexp" "strings" dtesting "github.com/fsouza/go-dockerclient/testing" @@ -99,8 +100,14 @@ func (s *S) TestMoveContainersUnknownDest(c *check.C) { parts := strings.Split(buf.String(), "\n") c.Assert(parts, check.HasLen, 6) c.Assert(parts[0], check.Matches, ".*Moving 2 units.*") - c.Assert(parts[3], check.Matches, "(?s).*Error moving unit.*Caused by:.*unknown.*not found") - c.Assert(parts[4], check.Matches, "(?s).*Error moving unit.*Caused by:.*unknown.*not found") + var matches int + errorRegexp := regexp.MustCompile(`(?s).*Error moving unit.*Caused by:.*unknown.*not found`) + for _, line := range parts[2:] { + if errorRegexp.MatchString(line) { + matches++ + } + } + c.Assert(matches, check.Equals, 2) } func (s *S) TestMoveContainer(c *check.C) {
provision/docker: make test more reliable The containers are moved in parallel, so we cannot guarantee the order of the messages, here's what happens: - the first message is always "Moving 2 units" - the second message is always "Moving unit 1... from localhost -> unknown" - the third message might be "Moving unit 2... from localhost -> unknown" or "Error moving unit 1..." That's why I'm checking whether the error message happens twice, starting in the third log line.
diff --git a/lib/models.js b/lib/models.js index <HASH>..<HASH> 100644 --- a/lib/models.js +++ b/lib/models.js @@ -717,6 +717,7 @@ class ContentProfileRule { constructor(path = []) { this._path = path; // Identifier[] this._mustSupport = false; // boolean + this._noProfile = false; // boolean } // path is the array of Identifiers (namespace+name) corresponding to the field/path this rule applies to get path() { return this._path; } @@ -732,16 +733,23 @@ class ContentProfileRule { return this; } + get noProfile() { return this._noProfile; } + set noProfile(noProfile) { + this._noProfile = noProfile; + } + clone() { const clone = new ContentProfileRule(this._path.map(id => id.clone())); clone.mustSupport = this._mustSupport; + clone.noProfile = this._noProfile; return clone; } toJSON() { var output = { 'path': this.path.map(id => id.name).join('.'), - 'mustSupport': this.mustSupport + 'mustSupport': this.mustSupport, + 'noProfile': this.noProfile }; clearEmptyFields(output, true);
Added no profile to ContentProfileRule class
diff --git a/dvc/fs/base.py b/dvc/fs/base.py index <HASH>..<HASH> 100644 --- a/dvc/fs/base.py +++ b/dvc/fs/base.py @@ -273,7 +273,7 @@ class FileSystem: callback: FsspecCallback = DEFAULT_CALLBACK, **kwargs, ) -> None: - size = kwargs.get("size") + size = kwargs.pop("size") if size: callback.set_size(size) if hasattr(from_file, "read"):
fs: do not pass size to underlying fs.put_file
diff --git a/h2o-py/tests/testdir_jira/pyunit_pubdev_5352.py b/h2o-py/tests/testdir_jira/pyunit_pubdev_5352.py index <HASH>..<HASH> 100644 --- a/h2o-py/tests/testdir_jira/pyunit_pubdev_5352.py +++ b/h2o-py/tests/testdir_jira/pyunit_pubdev_5352.py @@ -13,6 +13,10 @@ def pubdev_5352(): drf_checkpoint = H2ORandomForestEstimator(model_id='drf_checkpoint',checkpoint=drf, ntrees=4, seed=1234) drf_checkpoint.train(x=predictors, y=target, training_frame=new_data) + assert drf_checkpoint.ntrees == 4 + + + if __name__ == "__main__": pyunit_utils.standalone_test(pubdev_5352)
Final checkpointed model number of trees assertion added
diff --git a/src/sentry_plugins/__init__.py b/src/sentry_plugins/__init__.py index <HASH>..<HASH> 100644 --- a/src/sentry_plugins/__init__.py +++ b/src/sentry_plugins/__init__.py @@ -3,5 +3,23 @@ from __future__ import absolute_import try: VERSION = __import__('pkg_resources') \ .get_distribution('sentry-plugins').version -except Exception, e: +except Exception as e: VERSION = 'unknown' + +# Try to hook our webhook watcher into the rest of the watchers +# iff this module is installed in editable mode. +if 'site-packages' not in __file__: + import os + + root = os.path.normpath(os.path.join(os.path.dirname(__file__), os.pardir, os.pardir)) + node_modules = os.path.join(root, 'node_modules') + + if os.path.isdir(node_modules): + from django.conf import settings + settings.SENTRY_WATCHERS += ( + ('webpack.plugins', [ + os.path.join(node_modules, '.bin', 'webpack'), + '--output-pathinfo', '--watch', + '--config={}'.format(os.path.join(root, 'webpack.config.js')), + ]), + )
Auto hook up webpack watcher process for `devserver`
diff --git a/hazelcast/src/main/java/com/hazelcast/config/MapStoreConfig.java b/hazelcast/src/main/java/com/hazelcast/config/MapStoreConfig.java index <HASH>..<HASH> 100644 --- a/hazelcast/src/main/java/com/hazelcast/config/MapStoreConfig.java +++ b/hazelcast/src/main/java/com/hazelcast/config/MapStoreConfig.java @@ -305,7 +305,7 @@ public class MapStoreConfig { * Default value is {@value #DEFAULT_WRITE_COALESCING}. * * @param writeCoalescing {@code true} to enable write-coalescing, {@code false} otherwise. - * @see com.hazelcast.instance.GroupProperties.GroupProperty#MAP_WRITE_BEHIND_QUEUE_CAPACITY + * @see com.hazelcast.instance.GroupProperty#MAP_WRITE_BEHIND_QUEUE_CAPACITY */ public void setWriteCoalescing(boolean writeCoalescing) { this.writeCoalescing = writeCoalescing;
Fixed wrong package name in JavaDoc of MapStoreConfig.
diff --git a/lib/puppet/parser/resource.rb b/lib/puppet/parser/resource.rb index <HASH>..<HASH> 100644 --- a/lib/puppet/parser/resource.rb +++ b/lib/puppet/parser/resource.rb @@ -66,6 +66,8 @@ class Puppet::Parser::Resource < Puppet::Resource # is drawn from the class to the stage. The stage for containment # defaults to main, if none is specified. def add_edge_to_stage + return unless self.type.to_s.downcase == "class" + unless stage = catalog.resource(:stage, self[:stage] || (scope && scope.resource && scope.resource[:stage]) || :main) raise ArgumentError, "Could not find stage #{self[:stage] || :main} specified by #{self}" end
Maint: Fix a #<I> introduced log inconsistency When we moved code from the compiler to parser/resource, we lost a conditional that prevented defined resources from gaining containment edges to stages. Adding a stage to a defined resource was usually harmless, but it violated the invariant of "resources should only have exactly one container as their direct parent", producing a <I>% chance of a malformed containment path in log messages.
diff --git a/raven/transport.py b/raven/transport.py index <HASH>..<HASH> 100644 --- a/raven/transport.py +++ b/raven/transport.py @@ -80,9 +80,6 @@ class UDPTransport(Transport): udp_socket = None def compute_scope(self, url, scope): - netloc = url.hostname - netloc += ':%s' % url.port - path_bits = url.path.rsplit('/', 1) if len(path_bits) > 1: path = path_bits[0] @@ -90,9 +87,12 @@ class UDPTransport(Transport): path = '' project = path_bits[-1] - if not all([netloc, project, url.username, url.password]): + if not all([url.port, project, url.username, url.password]): raise ValueError('Invalid Sentry DSN: %r' % url.geturl()) + netloc = url.hostname + netloc += ':%s' % url.port + server = '%s://%s%s/api/store/' % (url.scheme, netloc, path) scope.update({ 'SENTRY_SERVERS': [server],
Throw an error if a port is not specified in the UDP transport
diff --git a/geist/backends/_x11_common.py b/geist/backends/_x11_common.py index <HASH>..<HASH> 100644 --- a/geist/backends/_x11_common.py +++ b/geist/backends/_x11_common.py @@ -51,11 +51,12 @@ class GeistXBase(object): def display(self): return self._display - def create_process(self, command, shell=True, stdout=None, stderr=None): + def create_process(self, command, shell=True, stdout=None, stderr=None, + env=None): """ Execute a process using subprocess.Popen, setting the backend's DISPLAY """ - env = kwargs.pop('env', dict(os.environ)) + env = env if env is not None else dict(os.environ) env['DISPLAY'] = self.display return subprocess.Popen(command, shell=shell, stdout=stdout, stderr=stderr,
Take env as a specific kwarg
diff --git a/Tests/LocaleTest.php b/Tests/LocaleTest.php index <HASH>..<HASH> 100644 --- a/Tests/LocaleTest.php +++ b/Tests/LocaleTest.php @@ -11,7 +11,6 @@ namespace Symfony\Component\Locale\Tests; -use Symfony\Component\Intl\Intl; use Symfony\Component\Intl\Util\IntlTestHelper; use Symfony\Component\Locale\Locale;
Fix phpdoc and coding standards This removes the unused use statements which were not catched by PHP-CS-Fixer because of string occurences. It also fixes some invalid phpdoc (scalar is not recognized as a valid type for instance).
diff --git a/moto/organizations/models.py b/moto/organizations/models.py index <HASH>..<HASH> 100644 --- a/moto/organizations/models.py +++ b/moto/organizations/models.py @@ -157,6 +157,11 @@ class OrganizationsBackend(BaseBackend): return self.org.describe() def describe_organization(self): + if not self.org: + raise RESTError( + 'AWSOrganizationsNotInUseException', + "Your account is not a member of an organization." + ) return self.org.describe() def list_roots(self):
organizations support: add exception handling for describe_organizations
diff --git a/src/Environment.php b/src/Environment.php index <HASH>..<HASH> 100644 --- a/src/Environment.php +++ b/src/Environment.php @@ -48,7 +48,7 @@ class Environment $this->identifyHostname(); // Identifies the current hostname, sets the binding using the native resolving strategy. $this->app->make(CurrentHostname::class); - } elseif($this->installed() && !$this->app->bound(CurrentHostname::class)) { + } elseif ($this->installed() && !$this->app->bound(CurrentHostname::class)) { $this->app->singleton(CurrentHostname::class, null); } }
Apply fixes from StyleCI (#<I>)
diff --git a/src/ListensForStorageOpportunities.php b/src/ListensForStorageOpportunities.php index <HASH>..<HASH> 100644 --- a/src/ListensForStorageOpportunities.php +++ b/src/ListensForStorageOpportunities.php @@ -85,7 +85,9 @@ trait ListensForStorageOpportunities if (empty(static::$processingJobs)) { static::store($app[EntriesRepository::class]); - static::stopRecording(); + if (! $app->make('queue.connection') instanceof SyncQueue) { + static::stopRecording(); + } } } }
Avoid jobs recording stop if queue driver is sync
diff --git a/client.go b/client.go index <HASH>..<HASH> 100644 --- a/client.go +++ b/client.go @@ -856,13 +856,6 @@ func (me *Client) downloadedChunk(t *torrent, c *connection, msg *pp.Message) er } me.dataReady(dataSpec{t.InfoHash, req}) - // Cancel pending requests for this chunk. - for _, c := range t.Conns { - if me.connCancel(t, c, req) { - me.replenishConnRequests(t, c) - } - } - // Record that we have the chunk. delete(t.Pieces[req.Index].PendingChunkSpecs, req.chunkSpec) if len(t.Pieces[req.Index].PendingChunkSpecs) == 0 { @@ -878,6 +871,14 @@ func (me *Client) downloadedChunk(t *torrent, c *connection, msg *pp.Message) er } } + // Cancel pending requests for this chunk. + for _, c := range t.Conns { + if me.connCancel(t, c, req) { + log.Print("cancelled concurrent request for %s", req) + me.replenishConnRequests(t, c) + } + } + return nil }
Reorder actions after a chunk is received
diff --git a/src/greplin/scales/graphite.py b/src/greplin/scales/graphite.py index <HASH>..<HASH> 100644 --- a/src/greplin/scales/graphite.py +++ b/src/greplin/scales/graphite.py @@ -84,7 +84,7 @@ class GraphitePusher(object): value = None logging.exception('Error when calling stat function for graphite push') if self._forbidden(subpath, value): - break + continue else: if type(value) in [int, long, float] and len(name) < 500: self.graphite.log(prefix + self._sanitize(name), value)
Graphite pusher bugfix Previously the first forbidden key would disqualify all other keys in that stat.
diff --git a/proton-c/bindings/python/proton/utils.py b/proton-c/bindings/python/proton/utils.py index <HASH>..<HASH> 100644 --- a/proton-c/bindings/python/proton/utils.py +++ b/proton-c/bindings/python/proton/utils.py @@ -109,12 +109,12 @@ class BlockingReceiver(BlockingLink): if credit: receiver.flow(credit) self.fetcher = fetcher - def fetch(self, timeout=False): + def receive(self, timeout=False): if not self.fetcher: - raise Exception("Can't call fetch on this receiver as a handler was provided") + raise Exception("Can't call receive on this receiver as a handler was provided") if not self.link.credit: self.link.flow(1) - self.connection.wait(lambda: self.fetcher.has_message, msg="Fetching on receiver %s" % self.link.name, timeout=timeout) + self.connection.wait(lambda: self.fetcher.has_message, msg="Receiving on receiver %s" % self.link.name, timeout=timeout) return self.fetcher.pop() def accept(self):
Changed name of method from fetch to receive
diff --git a/template/config.js b/template/config.js index <HASH>..<HASH> 100644 --- a/template/config.js +++ b/template/config.js @@ -1,16 +1,16 @@ var config = { - param1: '', // example - param2: process.env.NODE_ENV === 'production' ? 'foo' : 'bar', // example - git: { - remoteList: ['origin', 'heroku'] // add any other remotes here - }, - app_name: 'reactatouille Boilerplate', // your app name here - build_name: 'Reactatouille Boilerplate' + ' | ' + (process.env.NODE_ENV || 'development') + ' | ' + '201702062335' + param1: '', // example + param2: process.env.NODE_ENV === 'production' ? 'foo' : 'bar', // example + git: { + remoteList: ['origin', 'heroku'] // add any other remotes here + }, + app_name: 'reactatouille Boilerplate', // your app name here + build_name: 'Reactatouille Boilerplate' + ' | ' + (process.env.NODE_ENV || 'development') + ' | ' + '201702062335' } // Modified production configuration parameters if (process.env.NODE_ENV === 'production') { - config.param1 = 'valueProduction'; + config.param1 = 'valueProduction' } -module.exports = config; +module.exports = config
modified the config js according to standardjs
diff --git a/src/layouts/ltrTreeLayout/ranker.js b/src/layouts/ltrTreeLayout/ranker.js index <HASH>..<HASH> 100644 --- a/src/layouts/ltrTreeLayout/ranker.js +++ b/src/layouts/ltrTreeLayout/ranker.js @@ -54,7 +54,7 @@ function normalizeRanks (graph) { } } -function forcePrimaryRankPromotions (graph, entryNodeName) { +function forcePrimaryRankPromotions (graph, entryNodeName = 'INTERNET') { let entryNodes = graph.entryNodes(); if (entryNodeName) { if (entryNodes.includes(entryNodeName)) { @@ -67,7 +67,7 @@ function forcePrimaryRankPromotions (graph, entryNodeName) { } } -function forceSecondaryRankPromotions (graph, entryNodeName) { +function forceSecondaryRankPromotions (graph, entryNodeName = 'INTERNET') { let entryNodes = graph.entryNodes(); if (entryNodeName) { if (entryNodes.includes(entryNodeName)) {
Use 'INTERNET' as default entryNodeName for backward compatibility
diff --git a/src/test/java/water/JUnitRunner.java b/src/test/java/water/JUnitRunner.java index <HASH>..<HASH> 100644 --- a/src/test/java/water/JUnitRunner.java +++ b/src/test/java/water/JUnitRunner.java @@ -1,6 +1,6 @@ package water; -import hex.NeuralNetSpiralsTest; +import hex.*; import org.apache.commons.lang.ArrayUtils; import org.junit.Ignore; import org.junit.Test; @@ -36,6 +36,7 @@ public class JUnitRunner { tests.remove(ConcurrentKeyTest.class); tests.remove(ValueArrayToFrameTestAll.class); tests.remove(NeuralNetSpiralsTest.class); + tests.remove(NeuralNetIrisTest.class); // Pure JUnit test // tests.remove(CBSChunkTest.class); //tests.remove(GBMDomainTest.class);
Disable NeuralNet Iris comparison against reference. Already done indirectly by comparing against NN, which is compared against the reference.
diff --git a/modules/aggregation-layers/src/screen-grid-layer/screen-grid-layer.js b/modules/aggregation-layers/src/screen-grid-layer/screen-grid-layer.js index <HASH>..<HASH> 100644 --- a/modules/aggregation-layers/src/screen-grid-layer/screen-grid-layer.js +++ b/modules/aggregation-layers/src/screen-grid-layer/screen-grid-layer.js @@ -134,9 +134,11 @@ export default class ScreenGridLayer extends GridAggregationLayer { getPickingInfo({info, mode}) { const {index} = info; if (index >= 0) { - const {gpuGridAggregator} = this.state; + const {gpuGridAggregator, gpuAggregation, weights} = this.state; // Get count aggregation results - const aggregationResults = gpuGridAggregator.getData('count'); + const aggregationResults = gpuAggregation + ? gpuGridAggregator.getData('count') + : weights.count; // Each instance (one cell) is aggregated into single pixel, // Get current instance's aggregation details.
Fix ScreenGridLayer picking error w/ cpu aggregation (#<I>)
diff --git a/pandas/tseries/tests/test_timeseries.py b/pandas/tseries/tests/test_timeseries.py index <HASH>..<HASH> 100644 --- a/pandas/tseries/tests/test_timeseries.py +++ b/pandas/tseries/tests/test_timeseries.py @@ -2507,7 +2507,7 @@ class TestTimestamp(tm.TestCase): import pytz def compare(x,y): - self.assert_(int(Timestamp(x).value/1e9) == int(Timestamp(y).value/1e9)) + self.assertEqual(int(Timestamp(x).value/1e9), int(Timestamp(y).value/1e9)) compare(Timestamp.now(),datetime.now()) compare(Timestamp.now('UTC'),datetime.now(pytz.timezone('UTC')))
CLN: use assertEqual over assert_ for better exception messages
diff --git a/gandi/cli/commands/vm.py b/gandi/cli/commands/vm.py index <HASH>..<HASH> 100644 --- a/gandi/cli/commands/vm.py +++ b/gandi/cli/commands/vm.py @@ -203,7 +203,7 @@ def delete(gandi, background, force, resource): 'and the created login.') @click.option('--hostname', default=None, help='Hostname of the VM, will be generated if not provided.') -@option('--image', type=DISK_IMAGE, default='Debian 7 64 bits', +@option('--image', type=DISK_IMAGE, default='Debian 7 64 bits (HVM)', help='Disk image used to boot the VM.') @click.option('--run', default=None, help='Shell command that will run at the first startup of a VM.'
vm: choose HVM image as the default one
diff --git a/integration_tests/web/test_async_web_client.py b/integration_tests/web/test_async_web_client.py index <HASH>..<HASH> 100644 --- a/integration_tests/web/test_async_web_client.py +++ b/integration_tests/web/test_async_web_client.py @@ -123,7 +123,7 @@ class TestAsyncWebClient(unittest.TestCase): channels=self.channel_id, title="Good Old Slack Logo", filename="slack_logo.png", file=file) self.assertIsNotNone(upload) - deletion = client.files_delete(file=upload["file"]["id"]) + deletion = await client.files_delete(file=upload["file"]["id"]) self.assertIsNotNone(deletion) @async_test @@ -140,7 +140,7 @@ class TestAsyncWebClient(unittest.TestCase): ) self.assertIsNotNone(upload) - deletion = client.files_delete( + deletion = await client.files_delete( token=self.bot_token, file=upload["file"]["id"], )
Fix never-awaited coro in integration tests
diff --git a/lib/nydp/pair.rb b/lib/nydp/pair.rb index <HASH>..<HASH> 100644 --- a/lib/nydp/pair.rb +++ b/lib/nydp/pair.rb @@ -74,12 +74,12 @@ class Nydp::Pair def compile_to_ruby a,x = [], self - while x + while x.is_a?(Nydp::Pair) a << x.car.compile_to_ruby x = x.cdr end - "Nydp::Pair.from_list([" + a.join(", ") + "])" + "Nydp::Pair.from_list([" + a.join(", ") + "], #{x.compile_to_ruby})" end def nth n @@ -113,12 +113,16 @@ class Nydp::Pair # returns Array of elements as they are def to_a list=[] - list << car - cdr.is_a?(Nydp::Pair) ? cdr.to_a(list) : list + x = self + while x.is_a?(Nydp::Pair) + list << x.car + x = x.cdr + end + list end def self.parse_list list - if sym? list.slice(-2), "." + if list.slice(-2) == :"." from_list(list[0...-2], list.slice(-1)) else from_list list
pair: nonrecursive implementation of #to_a, and other small fixes
diff --git a/src/TokenRemover.php b/src/TokenRemover.php index <HASH>..<HASH> 100644 --- a/src/TokenRemover.php +++ b/src/TokenRemover.php @@ -17,7 +17,10 @@ final class TokenRemover { self::removeTrailingHorizontalWhitespaces($tokens, $tokens->getNonEmptySibling($index, -1)); - self::removeLeadingNewline($tokens, $tokens->getNonEmptySibling($index, 1)); + $nextIndex = $tokens->getNonEmptySibling($index, 1); + if ($nextIndex !== null) { + self::removeLeadingNewline($tokens, $tokens->getNonEmptySibling($index, 1)); + } $tokens->clearTokenAndMergeSurroundingWhitespace($index); } diff --git a/tests/TokenRemoverTest.php b/tests/TokenRemoverTest.php index <HASH>..<HASH> 100644 --- a/tests/TokenRemoverTest.php +++ b/tests/TokenRemoverTest.php @@ -145,5 +145,12 @@ namespace Foo; /** Some comment */ namespace Foo; ', ]; + + yield [ + '<?php +', + '<?php +// comment as last element', + ]; } }
TokenRemover - fix for comment as last element
diff --git a/src/Plugin.php b/src/Plugin.php index <HASH>..<HASH> 100644 --- a/src/Plugin.php +++ b/src/Plugin.php @@ -99,6 +99,7 @@ class Plugin implements } $runtimeUtils = new \Vaimo\ComposerPatches\Utils\RuntimeUtils(); + $compExecutor = new \Vaimo\ComposerPatches\Compatibility\Executor(); $lockSanitizer = $this->lockSanitizer; $bootstrap = $this->bootstrap; @@ -107,10 +108,10 @@ class Plugin implements function () use ($bootstrap, $event) { return $bootstrap->applyPatches($event->isDevMode()); }, - function () use ($event, $lockSanitizer) { + function () use ($event, $lockSanitizer, $compExecutor) { $repository = $event->getComposer()->getRepositoryManager()->getLocalRepository(); - - $repository->write($event->isDevMode(), $event->getComposer()->getInstallationManager()); + $installationManager = $event->getComposer()->getInstallationManager(); + $compExecutor->repositoryWrite($repository, $installationManager, $event->isDevMode()); $lockSanitizer->sanitize(); } );
change V2-style call to repo->write to use copmatibilityExecutor
diff --git a/gg/scale.go b/gg/scale.go index <HASH>..<HASH> 100644 --- a/gg/scale.go +++ b/gg/scale.go @@ -275,7 +275,7 @@ func defaultRanger(aes string) Ranger { return &defaultColorRanger{} case "opacity": - return NewFloatRanger(0, 1) + return NewFloatRanger(0.1, 1) case "size": // Default to ranging between 1% and 10% of the
gg: change default opacity range to [<I>,1] Currently it goes from 0 to 1, but you can't see something that 0% opaque, so bring up the lower bound to where it's visible.
diff --git a/resources/assets/build/config.js b/resources/assets/build/config.js index <HASH>..<HASH> 100644 --- a/resources/assets/build/config.js +++ b/resources/assets/build/config.js @@ -20,7 +20,6 @@ const config = merge({ root: rootPath, assets: path.join(rootPath, 'resources/assets'), dist: path.join(rootPath, 'dist'), - eslintProd: path.join(rootPath, '.eslintrc.production.json'), }, enabled: { sourceMaps: !isProduction,
Don't need this any more! :(
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -72,7 +72,7 @@ setup( name='pyspool', version=find_version('spool', '__init__.py'), url='https://github.com/ascribe/pyspool', - license='Apache Software License', + license='Apache2', author='pyspool contributors', author_email='devel@ascribe.io', packages=['spool'],
Fixed the license value in setup.py Changed it from "Apache" to "Apache2". Note that the other license string, `'License :: OSI Approved :: Apache Software License'` is correct: it [should not contain a 2](<URL>).
diff --git a/mongo_connector/doc_managers/mongo_doc_manager.py b/mongo_connector/doc_managers/mongo_doc_manager.py index <HASH>..<HASH> 100644 --- a/mongo_connector/doc_managers/mongo_doc_manager.py +++ b/mongo_connector/doc_managers/mongo_doc_manager.py @@ -55,8 +55,6 @@ class DocManager(DocManagerBase): except pymongo.errors.ConnectionFailure: raise errors.ConnectionFailed("Failed to connect to MongoDB") self.namespace_set = kwargs.get("namespace_set") - for namespace in self._namespaces(): - self.mongo["__mongo_connector"][namespace].create_index("_ts") @wrap_exceptions def _namespaces(self): @@ -83,8 +81,8 @@ class DocManager(DocManagerBase): """ logging.info( "Mongo DocManager Stopped: If you will not target this system " - "again with mongo-connector then please drop the database " - "__mongo_connector in order to return resources to the OS." + "again with mongo-connector then you may drop the database " + "__mongo_connector, which holds metadata for Mongo Connector." ) @wrap_exceptions
Don't create an index on '_ts' when replicating to MongoDB, since this causes continuously growing index names like '__mongo_connector.__mongo_connector.__mongo_connector.<...>'.
diff --git a/imbox/imap.py b/imbox/imap.py index <HASH>..<HASH> 100644 --- a/imbox/imap.py +++ b/imbox/imap.py @@ -11,22 +11,19 @@ class ImapTransport(object): def __init__(self, hostname, port=None, ssl=True, usesslcontext=True): self.hostname = hostname self.port = port + kwargs = {} if ssl: - if usesslcontext is True: - context = pythonssllib.create_default_context() - else: - context = None - + self.transport = IMAP4_SSL if not self.port: self.port = 993 - self.server = self.IMAP4_SSL(self.hostname, self.port, - ssl_context=context) + kwargs["ssl_context"] = pythonssllib.create_default_context() else: + self.transport = IMAP4 if not self.port: self.port = 143 - self.server = self.IMAP4(self.hostname, self.port) + self.server = self.transport(self.hostname, self.port, **kwargs) logger.debug("Created IMAP4 transport for {host}:{port}" .format(host=self.hostname, port=self.port))
Fix IMAP transport instantiation This reverts the approach to IMAP transport instantiation back to how it was done prior to 2a<I>b6 which introduced the usesslcontext parameter. This reduces code duplication and importantly make instantiation work again because self.IMAP4 and self.IMAP4_SSL do not exist.
diff --git a/src/sultan/echo/__init__.py b/src/sultan/echo/__init__.py index <HASH>..<HASH> 100644 --- a/src/sultan/echo/__init__.py +++ b/src/sultan/echo/__init__.py @@ -4,7 +4,14 @@ from sultan.echo.colorlog import StreamHandler, ColoredFormatter handler = StreamHandler() handler.setFormatter(ColoredFormatter( - '%(log_color)s[%(name)s]: %(message)s' + '%(log_color)s[%(name)s]: %(message)s', + log_colors={ + 'DEBUG': 'cyan', + 'INFO': 'green', + 'WARNING': 'yellow', + 'ERROR': 'red', + 'CRITICAL': 'bold_red', + } ))
Made better color scheme for logging.
diff --git a/src/Artifact.js b/src/Artifact.js index <HASH>..<HASH> 100644 --- a/src/Artifact.js +++ b/src/Artifact.js @@ -152,8 +152,14 @@ class Artifact extends OIPObject { * @param {number} time - The Timestamp you wish to set the Artifact to */ setTimestamp(time){ - if (typeof time === "number") - this.artifact.timestamp = time; + if (typeof time === "number"){ + if (String(time).length === 13){ + let seconds_time_string = parseInt(time/1000) + this.artifact.timestamp = seconds_time_string + } else if (String(time).length === 10) { + this.artifact.timestamp = time; + } + } } /** * Get the publish/signature timestamp for the Artifact
Store timestamp in seconds instead of miliseconds
diff --git a/ipywidgets/widgets/widget_selection.py b/ipywidgets/widgets/widget_selection.py index <HASH>..<HASH> 100644 --- a/ipywidgets/widgets/widget_selection.py +++ b/ipywidgets/widgets/widget_selection.py @@ -166,6 +166,7 @@ class _Selection(DescriptionWidget, ValueWidget, CoreWidget): # Select the first item by default, if we can if 'index' not in kwargs and 'value' not in kwargs and 'label' not in kwargs: + options = self._options_full nonempty = (len(options) > 0) kwargs['index'] = 0 if nonempty else None kwargs['label'], kwargs['value'] = options[0] if nonempty else (None, None)
Fix options initialization logic for selection widgets
diff --git a/lxc/copy.go b/lxc/copy.go index <HASH>..<HASH> 100644 --- a/lxc/copy.go +++ b/lxc/copy.go @@ -135,6 +135,10 @@ func (c *cmdCopy) copyContainer(conf *config.Config, sourceResource string, var op lxd.RemoteOperation if shared.IsSnapshot(sourceName) { + if containerOnly { + return fmt.Errorf(i18n.G("--container-only can't be passed when the source is a snapshot")) + } + // Prepare the container creation request args := lxd.ContainerSnapshotCopyArgs{ Name: destName,
lxc/copy: --container-only is meaningless for snapshots
diff --git a/src/CatLab/Accounts/Models/User.php b/src/CatLab/Accounts/Models/User.php index <HASH>..<HASH> 100644 --- a/src/CatLab/Accounts/Models/User.php +++ b/src/CatLab/Accounts/Models/User.php @@ -208,10 +208,14 @@ class User implements \Neuron\Interfaces\Models\User */ public function getDisplayName($formal = false) { - if ($formal) { + if ($formal && $this->getFirstName() && $this->getFamilyName()) { return $this->getFirstName() . ' ' . $this->getFamilyName(); - } else { + } elseif ($this->getFirstName()) { return $this->getFirstName(); + } elseif ($this->getFamilyName()) { + return $this->getFamilyName(); + } else { + return 'User ' . $this->getId(); } }
Make sure User::getDisplayName() always returns something.
diff --git a/executor/oci/mounts_test.go b/executor/oci/mounts_test.go index <HASH>..<HASH> 100644 --- a/executor/oci/mounts_test.go +++ b/executor/oci/mounts_test.go @@ -3,7 +3,7 @@ package oci import ( "testing" - "github.com/stretchr/testify/require" + "github.com/stretchr/testify/assert" ) func TestHasPrefix(t *testing.T) { @@ -51,6 +51,6 @@ func TestHasPrefix(t *testing.T) { } for i, tc := range testCases { actual := hasPrefix(tc.path, tc.prefix) - require.Equal(t, tc.expected, actual, "#%d: under(%q,%q)", i, tc.path, tc.prefix) + assert.Equal(t, tc.expected, actual, "#%d: under(%q,%q)", i, tc.path, tc.prefix) } }
Run all the hasPrefix test-cases, even if one fails This makes it easier to see what's gone wrong if they start failing.
diff --git a/javamelody-for-spring-boot/src/main/java/hello/JavaMelodyConfiguration.java b/javamelody-for-spring-boot/src/main/java/hello/JavaMelodyConfiguration.java index <HASH>..<HASH> 100644 --- a/javamelody-for-spring-boot/src/main/java/hello/JavaMelodyConfiguration.java +++ b/javamelody-for-spring-boot/src/main/java/hello/JavaMelodyConfiguration.java @@ -55,8 +55,6 @@ public class JavaMelodyConfiguration implements ServletContextInitializer { return javaMelody; } - // Note: if you have auto-proxy issues, you can add the following in your application.properties instead of that method: - // spring.aop.proxy-target-class=true @Bean public DefaultAdvisorAutoProxyCreator getDefaultAdvisorAutoProxyCreator() { return new DefaultAdvisorAutoProxyCreator();
adding aspectjweaver dependency is better
diff --git a/lib/git_diff/diff_file.rb b/lib/git_diff/diff_file.rb index <HASH>..<HASH> 100644 --- a/lib/git_diff/diff_file.rb +++ b/lib/git_diff/diff_file.rb @@ -15,8 +15,8 @@ module GitDiff def <<(string) return if extract_diff_meta_data(string) - if(hunk = Hunk.from_string(string)) - add_hunk hunk + if(range_info = RangeInfo.from_string(string)) + add_hunk Hunk.new(range_info) else append_to_current_hunk string end diff --git a/lib/git_diff/hunk.rb b/lib/git_diff/hunk.rb index <HASH>..<HASH> 100644 --- a/lib/git_diff/hunk.rb +++ b/lib/git_diff/hunk.rb @@ -9,19 +9,6 @@ module GitDiff attr_reader :lines, :range_info - module ClassMethods - def from_string(string) - if(range_info = RangeInfo.from_string(string)) - Hunk.new(range_info) - end - end - - # def extract_hunk_range_data(string) - # /@@ \-(\d+,\d+) \+(\d+,\d+) @@(.*)/.match(string) - # end - end - extend ClassMethods - def initialize(range_info) @range_info = range_info @lines = []
Remove extraneous method Hunk.from_string.
diff --git a/findbugs/src/java/edu/umd/cs/findbugs/FindBugs.java b/findbugs/src/java/edu/umd/cs/findbugs/FindBugs.java index <HASH>..<HASH> 100644 --- a/findbugs/src/java/edu/umd/cs/findbugs/FindBugs.java +++ b/findbugs/src/java/edu/umd/cs/findbugs/FindBugs.java @@ -198,6 +198,8 @@ public class FindBugs implements Constants2 private void addFileToRepository(String fileName, List<String> repositoryClassList) throws IOException, InterruptedException { + try { + if (fileName.endsWith(".jar") || fileName.endsWith(".zip")) { ZipFile zipFile = new ZipFile(fileName); Enumeration entries = zipFile.entries(); @@ -223,6 +225,12 @@ public class FindBugs implements Constants2 } progressCallback.finishArchive(); + + } catch (IOException e) { + // You'd think that the message for a FileNotFoundException would include + // the filename, but you'd be wrong. So, we'll add it explicitly. + throw new IOException("Could not analyze " + fileName + ": " + e.getMessage()); + } } /**
If we get an IOException trying to add a file to the repository, make sure the filename is included in the exception. git-svn-id: <URL>
diff --git a/txaws/_auth_v4.py b/txaws/_auth_v4.py index <HASH>..<HASH> 100644 --- a/txaws/_auth_v4.py +++ b/txaws/_auth_v4.py @@ -1,13 +1,13 @@ # Licenced under the txaws licence available at /LICENSE in the txaws source. """ -AWS authorization, version 4 +AWS authorization, version 4. """ -import attr - import hashlib import hmac -import urlparse import urllib +import urlparse + +import attr # The following four functions are taken straight from diff --git a/txaws/tests/test_auth_v4.py b/txaws/tests/test_auth_v4.py index <HASH>..<HASH> 100644 --- a/txaws/tests/test_auth_v4.py +++ b/txaws/tests/test_auth_v4.py @@ -1,11 +1,12 @@ # Licenced under the txaws licence available at /LICENSE in the txaws source. """ -Unit tests for AWS authorization, version 4 +Unit tests for AWS authorization, version 4. """ import datetime import hashlib import hmac +import urlparse from twisted.trial import unittest @@ -29,8 +30,6 @@ from txaws.credentials import AWSCredentials from txaws.service import REGION_US_EAST_1 -import urlparse - def _create_canonical_request_fixture(): """
Clean up docstrings and imports
diff --git a/src/gl/gl_texture.js b/src/gl/gl_texture.js index <HASH>..<HASH> 100644 --- a/src/gl/gl_texture.js +++ b/src/gl/gl_texture.js @@ -25,6 +25,12 @@ export default function GLTexture (gl, name, options = {}) { // TODO: better support for non-URL sources: canvas/video elements, raw pixel buffers this.name = name; + + // Destroy previous texture if present + if (GLTexture.textures[this.name]) { + GLTexture.textures[this.name].destroy(); + } + GLTexture.textures[this.name] = this; this.sprites = options.sprites;
clean up previous texture when re-creating w/same name
diff --git a/application/tests/_ci_phpunit_test/autoloader.php b/application/tests/_ci_phpunit_test/autoloader.php index <HASH>..<HASH> 100644 --- a/application/tests/_ci_phpunit_test/autoloader.php +++ b/application/tests/_ci_phpunit_test/autoloader.php @@ -19,5 +19,6 @@ spl_autoload_register(function ($class) }); // Register CodeIgniter's tests/mocks/autoloader.php +define('SYSTEM_PATH', BASEPATH); require __DIR__ .'/../mocks/autoloader.php'; spl_autoload_register('autoload');
Fix bug which constant SYSTEM_PATH is missing
diff --git a/lib/graphql/schema/warden.rb b/lib/graphql/schema/warden.rb index <HASH>..<HASH> 100644 --- a/lib/graphql/schema/warden.rb +++ b/lib/graphql/schema/warden.rb @@ -138,16 +138,18 @@ module GraphQL def visible_type?(type_defn) return false unless visible?(type_defn) - referenced = referenced_by_visible_members?(type_defn) - if type_defn.kind.object? && has_abstract_type?(type_defn) - if orphan?(type_defn) - member_or_implements?(type_defn) - else - referenced || member_or_implements?(type_defn) - end + visible_implementation?(type_defn) + else + referenced_by_visible_members?(type_defn) + end + end + + def visible_implementation?(type_defn) + if orphan?(type_defn) + member_or_implements?(type_defn) else - referenced + referenced_by_visible_members?(type_defn) || member_or_implements?(type_defn) end end
break up visible_type? in smaller methods
diff --git a/lib/index.js b/lib/index.js index <HASH>..<HASH> 100644 --- a/lib/index.js +++ b/lib/index.js @@ -132,6 +132,7 @@ RpcClient.prototype.batch = function(batchCallback, resultCallback) { }; RpcClient.callspec = { + abandonTransaction: 'str', addMultiSigAddress: '', addNode: '', backupWallet: '',
added abandonTransaction method to spec
diff --git a/lib/rabbitmq/util.rb b/lib/rabbitmq/util.rb index <HASH>..<HASH> 100644 --- a/lib/rabbitmq/util.rb +++ b/lib/rabbitmq/util.rb @@ -4,7 +4,8 @@ class RabbitMQ::FFI::Error < RuntimeError; end module RabbitMQ::Util class << self - def error_check rc + def error_check rc=nil + rc ||= yield return if rc == 0 raise RabbitMQ::FFI::Error, RabbitMQ::FFI.amqp_error_string2(rc) end diff --git a/spec/util_spec.rb b/spec/util_spec.rb index <HASH>..<HASH> 100644 --- a/spec/util_spec.rb +++ b/spec/util_spec.rb @@ -13,5 +13,13 @@ describe RabbitMQ::Util do it "raises an error when given a nonzero result code" do expect { subject.error_check(-1) }.to raise_error RabbitMQ::FFI::Error end + + it "returns nil when given a zero result code in a block" do + subject.error_check { 0 }.should eq nil + end + + it "raises an error when given a nonzero result code in a block" do + expect { subject.error_check { -1 } }.to raise_error RabbitMQ::FFI::Error + end end end
Add block form to Util.error_check.
diff --git a/lib/IDS/Converter.php b/lib/IDS/Converter.php index <HASH>..<HASH> 100644 --- a/lib/IDS/Converter.php +++ b/lib/IDS/Converter.php @@ -561,6 +561,9 @@ class IDS_Converter $value ); + // normalize separation char repetion + $value = preg_replace('/([.+~=\-])\1{2,}/m', '$1', $value); + //remove parenthesis inside sentences $value = preg_replace('/(\w\s)\(([&\w]+)\)(\s\w|$)/', '$1$2$3', $value);
added code to deal with abnormal repetiton of separation chars git-svn-id: <URL>
diff --git a/classes/MUtil/Ra/RaObject.php b/classes/MUtil/Ra/RaObject.php index <HASH>..<HASH> 100644 --- a/classes/MUtil/Ra/RaObject.php +++ b/classes/MUtil/Ra/RaObject.php @@ -84,6 +84,17 @@ class RaObject extends \ArrayObject implements \MUtil_Registry_TargetInterface } /** + * + * @param mixed $input The input parameter accepts an array or an Object. + * @param int $flags Flags to control the behaviour of the ArrayObject object, STD_PROP_LIST is always set on + * @param string $iterator_class Specify the class that will be used for iteration of the ArrayObject object. + */ + public function __construct($input = array(), $flags = 0, $iterator_class = "ArrayIterator") + { + parent::__construct($input, $flags | \ArrayObject::STD_PROP_LIST, $iterator_class); + } + + /** * Called after the check that all required registry values * have been set correctly has run. *
RaObject should use it's props as a normal object
diff --git a/functions/timber-post.php b/functions/timber-post.php index <HASH>..<HASH> 100644 --- a/functions/timber-post.php +++ b/functions/timber-post.php @@ -30,7 +30,11 @@ class TimberPost extends TimberCore implements TimberCoreInterface { * @return \TimberPost TimberPost object -- woo! */ function __construct($pid = null) { - if ($pid === null && get_the_ID()) { + global $wp_query; + if ($pid === null && isset($wp_query->queried_object_id) && $wp_query->queried_object_id) { + $pid = $wp_query->queried_object_id; + $this->ID = $pid; + } else if ($pid === null && get_the_ID()) { $pid = get_the_ID(); $this->ID = $pid; } else if ($pid === null && ($pid_from_loop = TimberPostGetter::loop_to_id())) {
ref #<I> -- changed TimberPost to prefer data from $wp_query before get_the_ID
diff --git a/src/Model/Table/QueueProcessesTable.php b/src/Model/Table/QueueProcessesTable.php index <HASH>..<HASH> 100644 --- a/src/Model/Table/QueueProcessesTable.php +++ b/src/Model/Table/QueueProcessesTable.php @@ -66,9 +66,7 @@ class QueueProcessesTable extends Table { 'bindingKey' => 'workerkey', 'propertyName' => 'active_job', 'conditions' => [ - 'CurrentQueuedJobs.completed IS NULL', - 'CurrentQueuedJobs.failure_message IS NULL', - 'CurrentQueuedJobs.failed = 0', + 'CurrentQueuedJobs.completed IS NULL' ], ] );
remove conditions from hasOne CurrentQueuedJobs Assoc so failed, re-run jobs are still being shown
diff --git a/client/deis.py b/client/deis.py index <HASH>..<HASH> 100755 --- a/client/deis.py +++ b/client/deis.py @@ -600,7 +600,9 @@ class DeisClient(object): Usage: deis apps:run <command>... """ - app = self._session.app + app = args.get('--app') + if not app: + app = self._session.app body = {'command': ' '.join(sys.argv[2:])} response = self._dispatch('post', "/api/apps/{}/run".format(app),
feat(client): add --app option to apps:run All of the other apps commands have a --app option. This commit introduces that option to the apps:run command as well. fixes #<I>
diff --git a/query/src/test/java/org/infinispan/query/backend/KeyTransformationHandlerTest.java b/query/src/test/java/org/infinispan/query/backend/KeyTransformationHandlerTest.java index <HASH>..<HASH> 100644 --- a/query/src/test/java/org/infinispan/query/backend/KeyTransformationHandlerTest.java +++ b/query/src/test/java/org/infinispan/query/backend/KeyTransformationHandlerTest.java @@ -134,7 +134,7 @@ public class KeyTransformationHandlerTest { public void testStringToKeyWithInvalidTransformer() { ClassLoader contextClassLoader = Thread.currentThread().getContextClassLoader(); - key = keyTransformationHandler.stringToKey("T:org.infinispan.SomeTransformer:key1", contextClassLoader); + key = keyTransformationHandler.stringToKey("T:org.infinispan.InexistentTransformer:key1", contextClassLoader); } public void testStringToKeyWithCustomTransformable() {
ISPN-<I> Make it easier to spot expected exceptions in the test
diff --git a/pywindow/molecular.py b/pywindow/molecular.py index <HASH>..<HASH> 100644 --- a/pywindow/molecular.py +++ b/pywindow/molecular.py @@ -121,7 +121,7 @@ class Molecule(object): self.MW = molecular_weight(self.elements) return self.MW - def save_molecule_json(self, filepath=None, molecular=False, **kwargs): + def dump_properties_json(self, filepath=None, molecular=False, **kwargs): # We pass a copy of the properties dictionary. dict_obj = deepcopy(self.properties) # If molecular data is also required we update the dictionary. @@ -138,7 +138,7 @@ class Molecule(object): # Dump the dictionary to json file. self._Output.dump2json(dict_obj, filepath, **kwargs) - def save_molecule(self, filepath=None, include_coms=False, **kwargs): + def dump_molecule(self, filepath=None, include_coms=False, **kwargs): # If no filepath is provided we create one. if filepath is None: filepath = "_".join(
Changed the names of function for saving output and molecule
diff --git a/src/main/java/com/xebia/incubator/xebium/ScreenCapture.java b/src/main/java/com/xebia/incubator/xebium/ScreenCapture.java index <HASH>..<HASH> 100644 --- a/src/main/java/com/xebia/incubator/xebium/ScreenCapture.java +++ b/src/main/java/com/xebia/incubator/xebium/ScreenCapture.java @@ -71,11 +71,12 @@ class ScreenCapture { } } - void setScreenshotPolicy(String policy) { + void setScreenshotPolicy(String policy) throws IOException { if ("none".equals(policy) || "nothing".equals(policy)) { screenshotPolicy = ScreenshotPolicy.NONE; } else if ("failure".equals(policy) || "error".equals(policy)) { - screenshotPolicy =ScreenshotPolicy.FAILURE; + screenshotPolicy = ScreenshotPolicy.FAILURE; + initializeIndexIfNeeded(); } else if ("step".equals(policy) || "every step".equals(policy)) { screenshotPolicy = ScreenshotPolicy.STEP; } else if ("assertion".equals(policy) || "every assertion".equals(policy)) {
Initialize index file early when screenshots are triggered by errors
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -49,7 +49,7 @@ CONSOLE_SCRIPTS = [ py_version = platform.python_version() -_APITOOLS_VERSION = '0.5.26' +_APITOOLS_VERSION = '0.5.27' with open('README.rst') as fileobj: README = fileobj.read()
Update for <I> release. (#<I>)
diff --git a/test/test_blackbox.py b/test/test_blackbox.py index <HASH>..<HASH> 100644 --- a/test/test_blackbox.py +++ b/test/test_blackbox.py @@ -7,7 +7,7 @@ from pyphi import compute, config, macro, models, Network, utils # TODO: move these to examples.py -@pytest.mark.slow +@pytest.mark.veryslow def test_basic_propogation_delay(): # Create basic network with propagation delay. # COPY gates on each of the connections in the original network.
Mark basic propogation delay test as `veryslow`
diff --git a/webapps/webapp/src/main/webapp/app/cockpit/directives/stateCircle.js b/webapps/webapp/src/main/webapp/app/cockpit/directives/stateCircle.js index <HASH>..<HASH> 100644 --- a/webapps/webapp/src/main/webapp/app/cockpit/directives/stateCircle.js +++ b/webapps/webapp/src/main/webapp/app/cockpit/directives/stateCircle.js @@ -1,12 +1,11 @@ /* global ngDefine: false */ -ngDefine('camunda.common.directives.stateCircle', [], function(module) { +ngDefine('camunda.common.directives', [], function(module) { 'use strict'; var CircleDirective = function () { return { restrict: 'EAC', link: function(scope, element, attrs) { - element.addClass('circle'); scope.$watch(attrs.incidents, function() {
fix(cockpit/dashboard): fix the missing state circle
diff --git a/src/Testing/TestCase.php b/src/Testing/TestCase.php index <HASH>..<HASH> 100644 --- a/src/Testing/TestCase.php +++ b/src/Testing/TestCase.php @@ -42,6 +42,6 @@ abstract class TestCase extends BaseTestCase protected function getTestName() { - return class_basename(static::class) . '::' . $this->getName(); + return class_basename(static::class).'::'.$this->getName(); } }
Apply fixes from StyleCI (#9)
diff --git a/test/images/agnhost/guestbook/guestbook.go b/test/images/agnhost/guestbook/guestbook.go index <HASH>..<HASH> 100644 --- a/test/images/agnhost/guestbook/guestbook.go +++ b/test/images/agnhost/guestbook/guestbook.go @@ -84,14 +84,14 @@ func registerNode(registerTo, port string) { for time.Since(start) < timeout { _, err := net.ResolveTCPAddr("tcp", hostPort) if err != nil { - log.Printf("--slaveof param and/or --backend-port param are invalid. %v. Retrying in 1 second.", err) + log.Printf("unable to resolve %s, --slaveof param and/or --backend-port param are invalid: %v. Retrying in %s.", hostPort, err, sleep) time.Sleep(sleep) continue } response, err := dialHTTP(request, hostPort) if err != nil { - log.Printf("encountered error while registering to master: %v. Retrying in 1 second.", err) + log.Printf("encountered error while registering to master: %v. Retrying in %s.", err, sleep) time.Sleep(sleep) continue }
Improve error messages in agnhost/guestbook This updates the error messages when registering a node to be more explicit about what error occurred and how long it will wait to retry.
diff --git a/src/client/actions/GuildMemberRemove.js b/src/client/actions/GuildMemberRemove.js index <HASH>..<HASH> 100644 --- a/src/client/actions/GuildMemberRemove.js +++ b/src/client/actions/GuildMemberRemove.js @@ -8,8 +8,8 @@ class GuildMemberRemoveAction extends Action { let member = null; if (guild) { member = guild.members.get(data.user.id); + guild.memberCount--; if (member) { - guild.memberCount--; guild.members.remove(member.id); if (client.status === Status.READY) client.emit(Events.GUILD_MEMBER_REMOVE, member); } diff --git a/src/structures/GuildMember.js b/src/structures/GuildMember.js index <HASH>..<HASH> 100644 --- a/src/structures/GuildMember.js +++ b/src/structures/GuildMember.js @@ -526,12 +526,7 @@ class GuildMember extends Base { */ kick(reason) { return this.client.api.guilds(this.guild.id).members(this.user.id).delete({ reason }) - .then(() => - this.client.actions.GuildMemberRemove.handle({ - guild_id: this.guild.id, - user: this.user, - }).member - ); + .then(() => this); } /**
fix(Guild): memberCount not decrementing when an uncached member leaves This leads to GuildMemberStore#_fetchMany to always reject because it expects more member than possible. Also no longer call the GuildMemberRemove handler locally to not decrement twice.
diff --git a/core-bundle/src/Image/Studio/Figure.php b/core-bundle/src/Image/Studio/Figure.php index <HASH>..<HASH> 100644 --- a/core-bundle/src/Image/Studio/Figure.php +++ b/core-bundle/src/Image/Studio/Figure.php @@ -25,7 +25,7 @@ use Contao\Template; * * Wherever possible, the actual data is only requested/built on demand. * - * @final + * @final This class will be made final in Contao 5. */ class Figure {
Add note that Figure will be final in Contao 5 (see #<I>) Description ----------- | Q | A | -----------------| --- | Fixed issues | See #<I> | Docs PR or issue | - Adds a reminder, that the `@final` annotation will be upgraded to `final` in Contao 5. Commits ------- 6e<I> add note that Figure will be final in Contao 5
diff --git a/src/Search.php b/src/Search.php index <HASH>..<HASH> 100644 --- a/src/Search.php +++ b/src/Search.php @@ -159,8 +159,6 @@ class Search { $query = '(' . implode(') AND (', $q) . ')'; } else if (count($q) > 0) { $query = $q[0]; - } else { - return false; } // Implode different sort arrays
Removed to allow pagination or sorting without searching.
diff --git a/src/Illuminate/Console/Scheduling/ScheduleWorkCommand.php b/src/Illuminate/Console/Scheduling/ScheduleWorkCommand.php index <HASH>..<HASH> 100644 --- a/src/Illuminate/Console/Scheduling/ScheduleWorkCommand.php +++ b/src/Illuminate/Console/Scheduling/ScheduleWorkCommand.php @@ -38,7 +38,11 @@ class ScheduleWorkCommand extends Command if (Carbon::now()->second === 0 && ! Carbon::now()->startOfMinute()->equalTo($lastExecutionStartedAt)) { - $executions[] = $execution = new Process([PHP_BINARY, 'artisan', 'schedule:run']); + $executions[] = $execution = new Process([ + PHP_BINARY, + defined('ARTISAN_BINARY') ? ARTISAN_BINARY : 'artisan', + 'schedule:run' + ]); $execution->start();
[8.x] Fix schedule:work command Artisan binary name (#<I>) * Fix schedule:work command Artisan binary name * formatting
diff --git a/core/src/main/java/io/undertow/server/protocol/ajp/AjpServerRequestConduit.java b/core/src/main/java/io/undertow/server/protocol/ajp/AjpServerRequestConduit.java index <HASH>..<HASH> 100644 --- a/core/src/main/java/io/undertow/server/protocol/ajp/AjpServerRequestConduit.java +++ b/core/src/main/java/io/undertow/server/protocol/ajp/AjpServerRequestConduit.java @@ -96,7 +96,7 @@ public class AjpServerRequestConduit extends AbstractStreamSourceConduit<StreamS if (size == null) { state = STATE_SEND_REQUIRED; remaining = -1; - } else if (size.equals(0)) { + } else if (size.longValue() == 0L) { state = STATE_FINISHED; remaining = 0; } else {
- fixes the initialization of state and remaining fields in case size is zero (Long.equals(Integer) results always in false; replaced by simpler and faster code).
diff --git a/src/Curl.php b/src/Curl.php index <HASH>..<HASH> 100644 --- a/src/Curl.php +++ b/src/Curl.php @@ -234,10 +234,6 @@ class Curl curl_close($ch); if ($curlInfo['result'] == CURLE_OK) { $this->onProcess($task, $param); - if (isset($task['opt'][CURLOPT_FILE]) && - is_resource($task['opt'][CURLOPT_FILE])) { - fclose($task['opt'][CURLOPT_FILE]); - } } // error handle $callFail = false;
Remove auto close for CURLOPT_FILE.