diff
stringlengths
65
26.7k
message
stringlengths
7
9.92k
diff --git a/src/rez/build_process.py b/src/rez/build_process.py index <HASH>..<HASH> 100644 --- a/src/rez/build_process.py +++ b/src/rez/build_process.py @@ -291,6 +291,13 @@ class LocalSequentialBuildProcess(StandardBuildProcess): """A BuildProcess that sequentially builds the variants of the current package, on the local host. """ + + def _use_existing_context_file(self, rxt_file): + if os.path.exists(rxt_file): + if os.path.getmtime(self.package.metafile) < os.path.getmtime(rxt_file): + return True + return False + def _build(self, install_path, build_path, clean=False, install=False): base_install_path = self._get_base_install_path(install_path) nvariants = max(self.package.num_variants, 1) @@ -314,7 +321,8 @@ class LocalSequentialBuildProcess(StandardBuildProcess): # resolve build environment and save to file rxt_path = os.path.join(build_subdir, "build.rxt") - if os.path.exists(rxt_path): + + if self._use_existing_context_file(rxt_path): self._pr("Loading existing environment context...") r = ResolvedContext.load(rxt_path) else:
+ Only reuse the context if the package.yaml hasn't changed.
diff --git a/src/application/shared/main.js b/src/application/shared/main.js index <HASH>..<HASH> 100644 --- a/src/application/shared/main.js +++ b/src/application/shared/main.js @@ -0,0 +1,19 @@ +// const jsToHtml = require("@chooie/js_to_html"); + +function createJsToHtmlPreprocessor(logger, basePath, args, config) { + const log = logger.create("preprocessor.js"); + + return function(content, file, done) { + log.debug("Procesing '%s'.", file.originalPath); + file.path = file.originalPath.replace(/\.js$/, ".html"); + log.debug("Content '%s'.", content); + done(content); + }; +} + +createJsToHtmlPreprocessor.$inject = ["logger", "config.basePath", "args", "config.pugPreprocessor"]; + +// PUBLISH DI MODULE +module.exports = { + "preprocessor:pug": ["factory", createJsToHtmlPreprocessor] +};
Log the content the preprocessor receives
diff --git a/packages/router5/modules/core/navigation.js b/packages/router5/modules/core/navigation.js index <HASH>..<HASH> 100644 --- a/packages/router5/modules/core/navigation.js +++ b/packages/router5/modules/core/navigation.js @@ -42,7 +42,7 @@ export default function withNavigation(router) { * Navigate to a route * @param {String} routeName The route name * @param {Object} [routeParams] The route params - * @param {Object} [options] The navigation options (`replace`, `reload`) + * @param {Object} [options] The navigation options (`replace`, `reload`, `skipTransition`) * @param {Function} [done] A done node style callback (err, state) * @return {Function} A cancel function */ @@ -98,6 +98,11 @@ export default function withNavigation(router) { const fromState = sameStates ? null : router.getState(); + if (opts.skipTransition) { + done(null, toState); + return noop; + } + // Transition return transitionToState(toState, fromState, opts, (err, state) => { if (err) {
feat: add navigation option to skip transition
diff --git a/blimpy/io/hdf_reader.py b/blimpy/io/hdf_reader.py index <HASH>..<HASH> 100644 --- a/blimpy/io/hdf_reader.py +++ b/blimpy/io/hdf_reader.py @@ -26,10 +26,12 @@ def examine_h5(h5): verblob = h5.attrs["VERSION"] else: oops("examine_h5: HDF5 VERSION attribute missing") - try: + if type(verblob) == str: + version = float(verblob) + elif type(verblob) == bytes or type(verblob) == np.bytes_: version = float(verblob.decode("utf-8")) - except: - oops("examine_h5: HDF5 VERSION attribute is corrupted, saw {}".format(verblob)) + else: + oops("examine_h5: HDF5 VERSION attribute is neither str nor bytes, saw {}".format(verblob)) if not "data" in h5: oops("examine_h5: HDF5 data matrix missing") if h5["data"].ndim != 3:
Sometimes, the type(VERSION) = numpy.bytes_ This was observed in the data centre using pytest. When run interactively, the same file yielded a VERSION of type bytes. And, for some files, type(VERSION) = str.
diff --git a/generator/classes/propel/engine/builder/om/php5/PHP5BasicPeerBuilder.php b/generator/classes/propel/engine/builder/om/php5/PHP5BasicPeerBuilder.php index <HASH>..<HASH> 100644 --- a/generator/classes/propel/engine/builder/om/php5/PHP5BasicPeerBuilder.php +++ b/generator/classes/propel/engine/builder/om/php5/PHP5BasicPeerBuilder.php @@ -362,7 +362,7 @@ if (Propel::isInit()) { * @return array The PHP to DB name map for this peer * @throws PropelException Any exceptions caught during processing will be * rethrown wrapped into a PropelException. - * @todo Consider having template build the array rather than doing it at runtime. + * @deprecated Use the getFieldNames() and translateFieldName() methods instead of this. */ public static function getPhpNameMap() { @@ -436,7 +436,7 @@ if (Propel::isInit()) { */ public static function alias(\$alias, \$column) { - return \$alias . substr(\$column, strlen(".$this->getPeerClassname()."::TABLE_NAME)); + return str_replace(".$this->getPeerClassname()."::TABLE_NAME.'.', \$alias.'.', \$column); } "; } // addAliasMethod
#<I> (from: synace). Improved substitution in alias() method.
diff --git a/controller/extjs/tests/Controller/ExtJS/Coupon/DefaultTest.php b/controller/extjs/tests/Controller/ExtJS/Coupon/DefaultTest.php index <HASH>..<HASH> 100644 --- a/controller/extjs/tests/Controller/ExtJS/Coupon/DefaultTest.php +++ b/controller/extjs/tests/Controller/ExtJS/Coupon/DefaultTest.php @@ -60,7 +60,7 @@ class Controller_ExtJS_Coupon_DefaultTest extends MW_Unittest_Testcase 'condition' => (object) array( '&&' => array( 0 => array( '~=' => (object) array( 'coupon.provider' => 'FixedRebate' ) ), - 1 => array( '==' => (object) array( 'coupon.editor' => 'coupon:test' ) ) + 1 => array( '==' => (object) array( 'coupon.editor' => 'core:unittest' ) ) ) ), 'sort' => 'coupon.label',
Fixes coupon ExtJS controller test
diff --git a/ryu/lib/packet/bgp.py b/ryu/lib/packet/bgp.py index <HASH>..<HASH> 100644 --- a/ryu/lib/packet/bgp.py +++ b/ryu/lib/packet/bgp.py @@ -2332,7 +2332,8 @@ class _FlowSpecPrefixBase(_FlowSpecComponentBase, IPAddrPrefix): def __init__(self, length, addr, type_=None): super(_FlowSpecPrefixBase, self).__init__(type_) self.length = length - self.addr = addr + prefix = "%s/%s" % (addr, length) + self.addr = str(netaddr.ip.IPNetwork(prefix).network) @classmethod def parse_body(cls, buf):
packet/bgp: Add the address converter for Flow Specification Argument "addr" of "_FlowSpecPrefixBase" must be specified in the network address. If argument "addr" specified in the host address, this patch converts the given address into the network address.
diff --git a/xmlnuke-php5/src/Xmlnuke/Util/CreatePhp5Project.php b/xmlnuke-php5/src/Xmlnuke/Util/CreatePhp5Project.php index <HASH>..<HASH> 100644 --- a/xmlnuke-php5/src/Xmlnuke/Util/CreatePhp5Project.php +++ b/xmlnuke-php5/src/Xmlnuke/Util/CreatePhp5Project.php @@ -294,6 +294,21 @@ class CreatePhp5Project unlink ("$HTTPDOCS/common"); CreatePhp5Project::executeShell( "ln -sf", array("$XMLNUKE/xmlnuke-common", "$HTTPDOCS/common") ); } + + // Rename Dist Files + $directory = new \RecursiveDirectoryIterator($xmlnuke); + $iterator = new \RecursiveIteratorIterator($directory); + $regex = new \RegexIterator($iterator, '/\.dist$/i', \RecursiveRegexIterator::GET_MATCH); + + foreach ($regex as $filename=>$pattern) + { + $newFile = str_replace($pattern[0], '', $filename); + if (!file_exists($newFile)) + { + copy($filename, $newFile); + } + } + return true; }
Copy all dist files after composer update
diff --git a/Gruntfile.js b/Gruntfile.js index <HASH>..<HASH> 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -170,6 +170,10 @@ module.exports = function(grunt) { files: ['**/yui/src/**/*.js'], tasks: ['yui'] }, + gherkinlint: { + files: ['**/tests/behat/*.feature'], + tasks: ['gherkinlint'] + } }, shifter: { options: { @@ -349,6 +353,7 @@ module.exports = function(grunt) { // Run them all!. grunt.task.run('css'); grunt.task.run('js'); + grunt.task.run('gherkinlint'); } }; @@ -363,6 +368,7 @@ module.exports = function(grunt) { grunt.config('uglify.amd.files', [{expand: true, src: files, rename: uglifyRename}]); grunt.config('shifter.options.paths', files); grunt.config('stylelint.less.src', files); + grunt.config('gherkinlint.options.files', files); changedFiles = Object.create(null); }, 200);
MDL-<I> behat: Add gherkin lint to watch and startup
diff --git a/src/PeskyCMF/Scaffold/Form/ImagesFormInput.php b/src/PeskyCMF/Scaffold/Form/ImagesFormInput.php index <HASH>..<HASH> 100644 --- a/src/PeskyCMF/Scaffold/Form/ImagesFormInput.php +++ b/src/PeskyCMF/Scaffold/Form/ImagesFormInput.php @@ -89,7 +89,12 @@ class ImagesFormInput extends FormInput { $table = $this->getScaffoldSectionConfig()->getTable(); $record = $this->getScaffoldSectionConfig()->getTable()->newRecord(); if ($table instanceof KeyValueTableInterface) { - $record->fromData([$record::getPrimaryKeyColumnName() => 0, $this->getTableColumn()->getName() => $value], true); + $fakeData = [$record::getPrimaryKeyColumnName() => 0, $this->getTableColumn()->getName() => $value]; + $fkName = $table->getMainForeignKeyColumnName(); + if ($fkName) { + $fakeData[$fkName] = array_get($data, $fkName); + } + $record->fromData($fakeData, true); } else { $record->fromData($data, !empty($data[$record::getPrimaryKeyColumnName()])); }
ImagesFormInput::doDefaultValueConversionByType() - added foreign key value for key-value table's record so it can be used in ImagesColumn to create path to files based on foreign key value
diff --git a/lib/fog/aws/models/ec2/server.rb b/lib/fog/aws/models/ec2/server.rb index <HASH>..<HASH> 100644 --- a/lib/fog/aws/models/ec2/server.rb +++ b/lib/fog/aws/models/ec2/server.rb @@ -12,7 +12,7 @@ module Fog attribute :group_id, 'groupId' attribute :image_id, 'imageId' attribute :state, 'instanceState' - attribute :flavor, 'instanceType' + attribute :flavor_id, 'instanceType' attribute :kernel_id, 'kernelId' attribute :key_name, 'keyName' attribute :created_at, 'launchTime' @@ -44,12 +44,16 @@ module Fog # @group_id = new_security_group.name # end - def flavor - @flavor || 'm1.small' + def flavor_id + @flavor && @flavor.id || 'm1.small' end def flavor=(new_flavor) - @flavor = new_flavor.id + @flavor = new_flavor + end + + def flavor + @flavor || connection.flavors.all.detect {|flavor| flavor.id == @flavor_id} end def key_pair @@ -78,9 +82,12 @@ module Fog end end + def ready? + @state == 'running' + end + def reboot requires :id - connection.reboot_instances(@id) true end
cleanup flavor handling for aws.servers, add ready?
diff --git a/src/SearchControl.js b/src/SearchControl.js index <HASH>..<HASH> 100644 --- a/src/SearchControl.js +++ b/src/SearchControl.js @@ -398,9 +398,12 @@ export class SearchControl extends Control { * @private */ updateDropdown_ () { - let inputContainsDropdown = (this.features_.indexOf(this.selectedFeature_) > -1) + let inputContainsDropdown = (this.features_.length === 1) && (this.features_[0] === this.selectedFeature_) - if ((this.features_.length > 1) || !inputContainsDropdown) { + if (inputContainsDropdown || (this.features_.length === 0)) { + this.dropdownActive_ = false + return this.dropdown_.slideUp().then(() => this.changed()) + } else { let length = Math.min(this.amountDropdownEntries_, this.features_.length) let entries = [] let handlers = [] @@ -415,9 +418,6 @@ export class SearchControl extends Control { this.dropdown_.setEntries(entries, handlers) this.dropdownActive_ = true return this.dropdown_.slideDown().then(() => this.changed()) - } else { - this.dropdownActive_ = false - return this.dropdown_.slideUp().then(() => this.changed()) } }
Hiding dropdown properly (#<I>)
diff --git a/penman/model.py b/penman/model.py index <HASH>..<HASH> 100644 --- a/penman/model.py +++ b/penman/model.py @@ -7,13 +7,25 @@ Semantic models for interpreting graphs. from penman import graph class Model(object): - def __init__(self, relations=None): - if not relations: - relations = {} - self.relations = relations + + def __init__(self, + top_identifier:str = 'top', + top_role:str = 'TOP', + nodetype_role:str = 'instance', + relations:dict = None): + self.top_identifier = top_identifier + self.top_role = top_role + self.nodetype_role = nodetype_role + self.relations = relations or {} + + @classmethod + def from_dict(cls, d): + return cls(**d) def is_inverted(self, triple: graph.BasicTriple) -> bool: - role = triple[1] + return self.is_role_inverted(triple[1]) + + def is_role_inverted(self, role: str) -> bool: return role not in self.relations and role.endswith('-of') def invert(self, triple: graph.BasicTriple) -> graph.BasicTriple: @@ -27,7 +39,7 @@ class Model(object): return (target, inverse, source) def normalize(self, triple: graph.BasicTriple) -> graph.BasicTriple: - if self.is_inverted(triple): + if self.is_role_inverted(triple[1]): triple = self.invert(triple) return triple
Add Model.is_role_inverted() Also move some properties from the codec class.
diff --git a/tests/acceptance/steps/config_update.py b/tests/acceptance/steps/config_update.py index <HASH>..<HASH> 100644 --- a/tests/acceptance/steps/config_update.py +++ b/tests/acceptance/steps/config_update.py @@ -22,7 +22,7 @@ from .util import update_topic_config from kafka_utils.util.zookeeper import ZK -@when(u'we set the configuration of the topic to 10 bytes') +@when(u'we set the configuration of the topic to 0 bytes') def step_impl1(context): context.output = update_topic_config( context.topic,
updating @when in behave test from <I> to 0
diff --git a/src/index.js b/src/index.js index <HASH>..<HASH> 100644 --- a/src/index.js +++ b/src/index.js @@ -265,10 +265,7 @@ class ReactInteractive extends React.Component { this.computeState(), this.p.props, // create dummy 'event' object that caused the state change, will be passed to onStateChange - { type: 'forcestate', - persist: () => {}, - preventDefault: () => {}, - stopPropagation: () => {} } + dummyEvent('forcestate') ); }
Use dummy event creator for forceState event
diff --git a/core/Http.php b/core/Http.php index <HASH>..<HASH> 100644 --- a/core/Http.php +++ b/core/Http.php @@ -414,7 +414,7 @@ class Piwik_Http } else { - $response = @file_get_contents($aUrl, 0, $ctx); + $response = file_get_contents($aUrl, 0, $ctx); $fileLength = Piwik_Common::strlen($response); }
Removing silent fail to display errors when they occur eg. Unable to find the wrapper "https" - did you forget to enable it when you configured PHP? which requires to uncomment from php.ini: ;extension=php_openssl.dll git-svn-id: <URL>
diff --git a/lib/stagehand/staging/commit_entry.rb b/lib/stagehand/staging/commit_entry.rb index <HASH>..<HASH> 100644 --- a/lib/stagehand/staging/commit_entry.rb +++ b/lib/stagehand/staging/commit_entry.rb @@ -32,7 +32,11 @@ module Stagehand end def record - @record ||= delete_operation? ? build_production_record : record_class.find_by_id(record_id) + @record ||= delete_operation? ? build_production_record : record_class.find_by_id(record_id) if content_operation? + end + + def content_operation? + record_id? && table_name? end def insert_operation?
Don't try to return a record if there is none.
diff --git a/lib/close_enough.rb b/lib/close_enough.rb index <HASH>..<HASH> 100644 --- a/lib/close_enough.rb +++ b/lib/close_enough.rb @@ -1,5 +1,5 @@ require 'damerau-levenshtein' -require 'close_enough/extensions' +require_relative 'close_enough/extensions' module CloseEnough 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 @@ -1,5 +1,5 @@ require 'rspec' -require 'coveralls' +#require 'coveralls' require File.expand_path("../../lib/close_enough", __FILE__) -Coveralls.wear! \ No newline at end of file +#Coveralls.wear! \ No newline at end of file
Comment out Coveralls until File::new is fixed.
diff --git a/lib/route.js b/lib/route.js index <HASH>..<HASH> 100644 --- a/lib/route.js +++ b/lib/route.js @@ -187,7 +187,7 @@ function Route(options) { this.name = options.name || false; this.url = options.url || options.path; - this.log = options.log.child({name: self.name}, true); + this.log = options.log.child({route_name: self.name}, true); // Setup DTrace probes, if applicable addProbes(this.dtrace, this.probe);
minor change to bunyan logger in route.js
diff --git a/test/libs/router.spec.js b/test/libs/router.spec.js index <HASH>..<HASH> 100644 --- a/test/libs/router.spec.js +++ b/test/libs/router.spec.js @@ -457,7 +457,7 @@ describe('Class Router', () => { }); - describe('_isFloat', () => { + describe('_isNumeric', () => { it('should check if passed value is number or not', () => {
test/libs/router.spec.js: correct describe description from _isFloat to _isNumber
diff --git a/glue_vispy_viewers/volume/volume_visual.py b/glue_vispy_viewers/volume/volume_visual.py index <HASH>..<HASH> 100644 --- a/glue_vispy_viewers/volume/volume_visual.py +++ b/glue_vispy_viewers/volume/volume_visual.py @@ -38,6 +38,7 @@ from __future__ import absolute_import, division, print_function +from distutils.version import LooseVersion from collections import defaultdict import numpy as np @@ -52,6 +53,8 @@ from ..extern.vispy.scene.visuals import create_visual_node from .shaders import get_shaders +NUMPY_LT_1_13 = LooseVersion(np.__version__) < LooseVersion('1.13') + class MultiVolumeVisual(VolumeVisual): """ @@ -247,7 +250,11 @@ class MultiVolumeVisual(VolumeVisual): data -= clim[0] data *= 1 / (clim[1] - clim[0]) - np.nan_to_num(data, copy=False) + + if NUMPY_LT_1_13: + data[np.isnan(data)] = 0. + else: + np.nan_to_num(data, copy=False) self.shared_program['u_volumetex_{0:d}'.format(index)].set_data(data)
Fixed compatibility with older Numpy versions
diff --git a/src/org/mozilla/javascript/ScriptRuntime.java b/src/org/mozilla/javascript/ScriptRuntime.java index <HASH>..<HASH> 100644 --- a/src/org/mozilla/javascript/ScriptRuntime.java +++ b/src/org/mozilla/javascript/ScriptRuntime.java @@ -1092,19 +1092,19 @@ public class ScriptRuntime { * See ECMA 10.1.4 */ public static Scriptable bind(Scriptable scope, String id) { - Scriptable obj = scope; - while (obj != null && !ScriptableObject.hasProperty(obj, id)) { - obj = obj.getParentScope(); + while (!ScriptableObject.hasProperty(scope, id)) { + scope = scope.getParentScope(); + if (scope == null) { + break; + } } - return obj; + return scope; } public static Scriptable getBase(Scriptable scope, String id) { - Scriptable obj = scope; - while (obj != null) { - if (ScriptableObject.hasProperty(obj, id)) - return obj; - obj = obj.getParentScope(); + Scriptable base = bind(scope, id); + if (base != null) { + return base; } throw NativeGlobal.constructError( Context.getContext(), "ReferenceError",
As the scope parameter for the bind and getBase methods should never be null, make sure they trigger NullPointerException on "scope == null" to detect bad API usage earlier.
diff --git a/detect_secrets/plugins/common/ini_file_parser.py b/detect_secrets/plugins/common/ini_file_parser.py index <HASH>..<HASH> 100644 --- a/detect_secrets/plugins/common/ini_file_parser.py +++ b/detect_secrets/plugins/common/ini_file_parser.py @@ -1,6 +1,9 @@ from __future__ import unicode_literals -import configparser +try: + from backports import configparser +except ImportError: # pragma: no cover + import configparser import re
:bug: Patch backports configparser too We previously patched configparser with `EfficientParsingError`, however this did not patch the backports version present on Python 2.
diff --git a/test.js b/test.js index <HASH>..<HASH> 100644 --- a/test.js +++ b/test.js @@ -22,4 +22,4 @@ FS.open("zip.zip", "r", "0666", function(err, fd) { var readFromFileDescriptor = reader.toObject('utf-8'); console.log(readFromFileDescriptor); assert.deepEqual(readFromBuffer, readFromFileDescriptor, 'READ from Buffer MUST be equal to READ from file descriptor'); -}); \ No newline at end of file +});
Add missing newline at end of file
diff --git a/iotilecore/RELEASE.md b/iotilecore/RELEASE.md index <HASH>..<HASH> 100644 --- a/iotilecore/RELEASE.md +++ b/iotilecore/RELEASE.md @@ -2,9 +2,14 @@ All major changes in each released version of `iotile-core` are listed here. +## 4.0.1 + +- Actually drop python2 support + ## 4.0.0 - Drop python2 support +- This version was not officially released ## 3.27.2 diff --git a/iotilecore/setup.py b/iotilecore/setup.py index <HASH>..<HASH> 100644 --- a/iotilecore/setup.py +++ b/iotilecore/setup.py @@ -82,6 +82,7 @@ setup( author_email="info@arch-iot.com", url="https://github.com/iotile/coretools/iotilecore", keywords=["iotile", "arch", "embedded", "hardware"], + python_requires=">=3.5, <4", classifiers=[ "Programming Language :: Python", "Development Status :: 5 - Production/Stable", diff --git a/iotilecore/version.py b/iotilecore/version.py index <HASH>..<HASH> 100644 --- a/iotilecore/version.py +++ b/iotilecore/version.py @@ -1 +1 @@ -version = "4.0.0" +version = "4.0.1"
Fix the new major release version to actually enforce py3
diff --git a/src/errors.js b/src/errors.js index <HASH>..<HASH> 100644 --- a/src/errors.js +++ b/src/errors.js @@ -12,6 +12,7 @@ export class SassDocError extends Error { export class Warning extends SassDocError { constructor(message) { super(message); + this.message = message; // rm when native class support. } get name() {
Bring back property inheritance workaround - Introduced with the Babel <I>.* upgrade
diff --git a/Kwf/Assets/Provider/CssByJs.php b/Kwf/Assets/Provider/CssByJs.php index <HASH>..<HASH> 100644 --- a/Kwf/Assets/Provider/CssByJs.php +++ b/Kwf/Assets/Provider/CssByJs.php @@ -15,7 +15,7 @@ class Kwf_Assets_Provider_CssByJs extends Kwf_Assets_Provider_Abstract $fn = $dependency->getFileNameWithType(); $match = false; foreach ($this->_paths as $p) { - if (substr($p, 0, strpos($p, '/')) == substr($fn, 0, strpos($fn, '/'))) { + if ($p == substr($fn, 0, strlen($p))) { $match = true; } }
don't just use type of path, use whole path to activate cssbyjs
diff --git a/plugins/oauth/server/providers/base.py b/plugins/oauth/server/providers/base.py index <HASH>..<HASH> 100644 --- a/plugins/oauth/server/providers/base.py +++ b/plugins/oauth/server/providers/base.py @@ -111,8 +111,8 @@ class ProviderBase(model_importer.ModelImporter): resp.raise_for_status() except requests.HTTPError: raise RestException( - 'Got %s from %s, response="%s".' % ( - resp.status_code, kwargs['url'], content + 'Got %s code from provider, response="%s".' % ( + resp.status_code, content ), code=502) try:
Fix a small security issue in OAuth This prevents possibly private information from leaking in an error message.
diff --git a/src/JmesPath/Parser.php b/src/JmesPath/Parser.php index <HASH>..<HASH> 100644 --- a/src/JmesPath/Parser.php +++ b/src/JmesPath/Parser.php @@ -397,18 +397,7 @@ class Parser private function parse_T_LBRACE(array $token) { $token = $this->match(array(Lexer::T_IDENTIFIER => true, Lexer::T_NUMBER => true)); - $value = $token['value']; - $nextToken = $this->peek(); - - if ($nextToken['type'] == Lexer::T_RBRACE && - ($token['type'] == Lexer::T_NUMBER || $token['type'] == Lexer::T_IDENTIFIER) - ) { - // A simple index extraction - $this->stack[] = array('field', $value); - $this->nextToken(); - } else { - $this->parseMultiBrace($token); - } + $this->parseMultiBrace($token); } private function parseMultiBracket(array $token)
Removing simple token extraction from multi-select-hash because it is invalid
diff --git a/validation/time_series/time_series.py b/validation/time_series/time_series.py index <HASH>..<HASH> 100644 --- a/validation/time_series/time_series.py +++ b/validation/time_series/time_series.py @@ -182,7 +182,7 @@ class Test(AbstractTest): MaxSurfaceSpeed=ExtractTSData(MaxSurfaceSpeed,line,7) MaxBasalSpeed=ExtractTSData(MaxBasalSpeed,line,7) - #Third: generate time series plots, including minimal statistics, + #Third: generate time series plots and minimal statistics #for each diagnostic. WritePlot(Area,'Area',CISM2time,pd) AreaStats=Area.describe()
Some additional unsaved changes missed on last commit.
diff --git a/src/BaseClient.php b/src/BaseClient.php index <HASH>..<HASH> 100644 --- a/src/BaseClient.php +++ b/src/BaseClient.php @@ -75,6 +75,10 @@ class BaseClient extends GuzzleClient $data = array_replace_recursive($data, $config['description_override']); } + if ( ! isset($data['baseUri'])) { + throw new \Exception('A baseUri is required.', 1488211973); + } + return new Description($data); }
Communicate that a baseUri is required.
diff --git a/src/sap.m/src/sap/m/UploadCollection.js b/src/sap.m/src/sap/m/UploadCollection.js index <HASH>..<HASH> 100644 --- a/src/sap.m/src/sap/m/UploadCollection.js +++ b/src/sap.m/src/sap/m/UploadCollection.js @@ -1636,9 +1636,7 @@ sap.ui.define([ UploadCollection.prototype._refreshFileUploaderParams = function (oItem) { this._getFileUploader().removeAllAggregation("headerParameters", true); - this.removeAllAggregation("headerParameters", true); this._getFileUploader().removeAllAggregation("parameters", true); - this.removeAllAggregation("parameters", true); // Params this.getParameters().forEach(function (oParam) {
[FIX] sap.m.UploadCollection - Header params were not propagated correctly Change-Id: I<I>c7c7c0fcce<I>bc<I>a0f<I> BCP: <I>
diff --git a/codenerix/__init__.py b/codenerix/__init__.py index <HASH>..<HASH> 100644 --- a/codenerix/__init__.py +++ b/codenerix/__init__.py @@ -1,4 +1,4 @@ -__version__ = "1.1.11" +__version__ = "1.1.12" __authors__ = [ 'Juan Miguel Taboada Godoy <juanmi@juanmitaboada.com>',
Resolved an intermittent bug that prevented views with form_ngcontrollers to work properly
diff --git a/base.php b/base.php index <HASH>..<HASH> 100644 --- a/base.php +++ b/base.php @@ -2042,7 +2042,9 @@ class View extends Prefab { //! Template file $view, //! post-rendering handler - $trigger; + $trigger, + //! Nesting level + $level=0; /** * Encode characters to equivalent HTML entities @@ -2078,11 +2080,11 @@ class View extends Prefab { * @param $hive array **/ protected function sandbox(array $hive=NULL) { + $this->level++; $fw=Base::instance(); if (!$hive) $hive=$fw->hive(); - if (!$fw->exists('RENDERING',$rendering)) { - $fw->set('RENDERING', true); + if ($this->level<2) { if ($fw->get('ESCAPE')) $hive=$this->esc($hive); if (isset($hive['ALIASES'])) @@ -2093,7 +2095,7 @@ class View extends Prefab { unset($hive); ob_start(); require($this->view); - Base::instance()->clear('RENDERING'); + $this->level--; return ob_get_clean(); }
Bugfix: prevent multiple encoding in nested views/templates
diff --git a/test/addons/unpacked-addon/test/test-main.js b/test/addons/unpacked-addon/test/test-main.js index <HASH>..<HASH> 100644 --- a/test/addons/unpacked-addon/test/test-main.js +++ b/test/addons/unpacked-addon/test/test-main.js @@ -7,18 +7,18 @@ const self = require("sdk/self"); const url = require("sdk/url"); const { getAddonByID } = require("sdk/addon/manager"); -exports["test self.packed"] = function (assert) { +exports["test self.packed"] = (assert) => { assert.ok(!self.packed, "require('sdk/self').packed is correct"); } -exports["test url.toFilename"] = function (assert) { +exports["test url.toFilename"] = (assert) => { assert.ok(/.*main\.js$/.test(url.toFilename(module.uri)), "url.toFilename() on resource: URIs should work"); } exports["test Addon is unpacked"] = function*(assert) { let addon = yield getAddonByID(self.id); - assert.ok(addon.unpacked, "the addon is unpacked"); + assert.equal(addon.getResourceURI("").scheme, "file", "the addon is unpacked"); } -require("sdk/test").run(module); +require("sdk/test").run(exports);
Issue #<I> updating the unpacked test add-on
diff --git a/test/class_refinement_test.rb b/test/class_refinement_test.rb index <HASH>..<HASH> 100644 --- a/test/class_refinement_test.rb +++ b/test/class_refinement_test.rb @@ -104,4 +104,16 @@ describe Casting, '.delegating' do jim.greet } end + + it 'sets instances to respond_to? class delegate methods' do + jim = ClassDelegatingPerson.new('Jim') + + refute jim.respond_to?(:greet) + + Casting.delegating(ClassDelegatingPerson => ClassGreeter) do + assert jim.respond_to?(:greet) + end + + refute jim.respond_to?(:greet) + end end \ No newline at end of file
test that instances of class delegates respond to delegated methods
diff --git a/cassiopeia/datastores/ddragon.py b/cassiopeia/datastores/ddragon.py index <HASH>..<HASH> 100644 --- a/cassiopeia/datastores/ddragon.py +++ b/cassiopeia/datastores/ddragon.py @@ -377,7 +377,12 @@ class DDragon(DataSource): find = "name", query["name"] else: raise RuntimeError("Impossible!") - rune = find_matching_attribute(runes["data"].values(), *find) + if isinstance(runes["data"], list): + rune = find_matching_attribute(runes["data"], *find) + elif isinstance(runes["data"], dict): + rune = find_matching_attribute(runes["data"].values(), *find) + else: + raise ValueError("The runes data from DDragon came back in an unexpected format. Please report this on Github!") if rune is None: raise NotFoundError rune["region"] = query["platform"].region.value
bugfix for loading runes from ddragon
diff --git a/orb/core/database.py b/orb/core/database.py index <HASH>..<HASH> 100644 --- a/orb/core/database.py +++ b/orb/core/database.py @@ -279,8 +279,10 @@ class Database(object): all_models.sort(cmp=lambda x,y: cmp(x.schema(), y.schema())) tables = [model for model in all_models if issubclass(model, orb.Table) and + not model.schema().testFlags(orb.Schema.Flags.Abstract) and (not models or model.schema().name() in models)] views = [model for model in all_models if issubclass(model, orb.View) and + not model.schema().testFlags(orb.Schema.Flags.Abstract) and (not models or model.schema().name() in models)] # initialize the database
ignoring abstract schemas for syncing
diff --git a/msm/action/add_action.py b/msm/action/add_action.py index <HASH>..<HASH> 100644 --- a/msm/action/add_action.py +++ b/msm/action/add_action.py @@ -4,6 +4,6 @@ from msm.util import log def execute(args): log.set_config(args) - file = file_manager.add_setting(args.file) + file = file_manager.add_setting(args.alias, args.file) repository.create(args.alias, file) log.restore_config() diff --git a/msm/file_manager.py b/msm/file_manager.py index <HASH>..<HASH> 100644 --- a/msm/file_manager.py +++ b/msm/file_manager.py @@ -15,8 +15,8 @@ def init(): return True -def add_setting(file_path): - file_name = os.path.split(file_path)[1] +def add_setting(alias, file_path): + file_name = alias + os.path.split(file_path)[1] dst_path = config.msm_path + file_name log.debug('Add {F} to {D}'.format(F=file_path, D=dst_path))
Add alias with prefix to the file name
diff --git a/index.js b/index.js index <HASH>..<HASH> 100755 --- a/index.js +++ b/index.js @@ -25,7 +25,15 @@ function run() { console.error('Unable to parse your git URL'); process.exit(2); } - exec('curl "github-changelog-api.herokuapp.com/'+repoInfo[1]+'/'+repoInfo[2]+'"').to('CHANGELOG.md'); + var url = 'github-changelog-api.herokuapp.com/' + repoInfo[1] + '/' + repoInfo[2]; + exec('curl -X POST -s "' + url + '"'); + var newLog; + do { + exec('sleep 1'); + newLog = exec('curl "' + url + '"'); + } while (newLog.match(/^Working, try again.*/)); + // Now that the contents are valid, we can write this out to disk + newLog.to('CHANGELOG.md'); var changelog_was_updated = false; exec('git ls-files --exclude-standard --modified --others').split('\n').forEach(function (file) {
fix: properly works with heroku API (POST then GET)
diff --git a/src/queue/delay.js b/src/queue/delay.js index <HASH>..<HASH> 100644 --- a/src/queue/delay.js +++ b/src/queue/delay.js @@ -5,7 +5,7 @@ define([ ], function( jQuery ) { // Based off of the plugin by Clint Helfers, with permission. -// http://blindsignals.com/index.php/2009/07/jquery-delay/ +// http://web.archive.org/web/20100324014747/http://blindsignals.com/index.php/2009/07/jquery-delay/ jQuery.fn.delay = function( time, type ) { time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time; type = type || "fx";
Change broken url to wayback one
diff --git a/i3pystatus/openvpn.py b/i3pystatus/openvpn.py index <HASH>..<HASH> 100644 --- a/i3pystatus/openvpn.py +++ b/i3pystatus/openvpn.py @@ -18,8 +18,8 @@ class OpenVPN(IntervalModule): """ - colour_up = "#00ff00" - colour_down = "#FF0000" + color_up = "#00ff00" + color_down = "#FF0000" status_up = '▲' status_down = '▼' format = "{vpn_name} {status}" @@ -30,8 +30,8 @@ class OpenVPN(IntervalModule): settings = ( ("format", "Format string"), - ("colour_up", "VPN is up"), - ("colour_down", "VPN is down"), + ("color_up", "VPN is up"), + ("color_down", "VPN is down"), ("status_down", "Symbol to display when down"), ("status_up", "Symbol to display when up"), ("vpn_name", "Name of VPN"), @@ -46,10 +46,10 @@ class OpenVPN(IntervalModule): output = command_result.out.strip() if output == 'active': - color = self.colour_up + color = self.color_up status = self.status_up else: - color = self.colour_down + color = self.color_down status = self.status_down vpn_name = self.vpn_name
openvpn: Rename colour_up/colour_down to color_up/color_down
diff --git a/src/buttongroup.js b/src/buttongroup.js index <HASH>..<HASH> 100644 --- a/src/buttongroup.js +++ b/src/buttongroup.js @@ -70,11 +70,11 @@ $.ButtonGroup = function( options ) { // TODO What if there IS an options.group specified? if( !options.group ){ - this.label = $.makeNeutralElement( "label" ); + this.element.style.display = "inline-block"; + //this.label = $.makeNeutralElement( "label" ); //TODO: support labels for ButtonGroups //this.label.innerHTML = this.labelText; - this.element.style.display = "inline-block"; - this.element.appendChild( this.label ); + //this.element.appendChild( this.label ); for ( i = 0; i < buttons.length; i++ ) { this.element.appendChild( buttons[ i ].element ); }
Don't insert label element until this feature is fully implemented.
diff --git a/docgen/src/main/java/com/google/errorprone/DocGenTool.java b/docgen/src/main/java/com/google/errorprone/DocGenTool.java index <HASH>..<HASH> 100644 --- a/docgen/src/main/java/com/google/errorprone/DocGenTool.java +++ b/docgen/src/main/java/com/google/errorprone/DocGenTool.java @@ -86,7 +86,7 @@ public final class DocGenTool { public static void main(String[] args) throws IOException { Options options = new Options(); - new JCommander(options, args); + JCommander unused = new JCommander(options, args); Path bugPatterns = Paths.get(options.bugPatterns); if (!Files.exists(bugPatterns)) {
Assign unused instance to an unused variable. (Alternatively, we could disable the check w/ an `XepOpt` --- thoughts?) PiperOrigin-RevId: <I>
diff --git a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/jdbc/DatabaseDriver.java b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/jdbc/DatabaseDriver.java index <HASH>..<HASH> 100644 --- a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/jdbc/DatabaseDriver.java +++ b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/jdbc/DatabaseDriver.java @@ -104,7 +104,7 @@ public enum DatabaseDriver { * @since 2.1.0 */ HANA("HDB", "com.sap.db.jdbc.Driver", "com.sap.db.jdbcext.XADataSourceSAP", - "SELECT 1 FROM DUMMY") { + "SELECT 1 FROM SYS.DUMMY") { @Override protected Collection<String> getUrlPrefixes() { return Collections.singleton("sap");
Fix HANA validation query This commit updates the validation query for HANA. It should use the fully qualified dummy table name (SYS.DUMMY) to avoid unexpected results if there is a local table named DUMMY. Closes gh-<I>
diff --git a/geomdl/utilities.py b/geomdl/utilities.py index <HASH>..<HASH> 100644 --- a/geomdl/utilities.py +++ b/geomdl/utilities.py @@ -636,17 +636,15 @@ def polygon_triangulate(tri_idx, *args): :return: list of Triangle objects :rtype: list """ - # Add first element to the end of the list (just to make list traversal easier) - vertices = list(args) - vertices.append(args[0]) - - # Generate triangles + # Initialize variables tidx = 0 triangles = [] - for idx in range(0, len(args), 2): + + # Generate triangles + for idx in range(1, len(args) - 1): tri = Triangle() tri.id = tri_idx + tidx - tri.add_vertex(vertices[idx], vertices[idx + 1], vertices[idx + 2]) + tri.add_vertex(args[0], args[idx], args[idx + 1]) triangles.append(tri) tidx += 1
Fix a logical error in polygon_triangulate
diff --git a/index.js b/index.js index <HASH>..<HASH> 100644 --- a/index.js +++ b/index.js @@ -145,6 +145,7 @@ module.exports = { var endpoint = api_url + '/' + api_version + '/' + config.bucket.slug + '/object-type/' + object.type_slug + searchParams + '&read_key=' + config.bucket.read_key; if (object.limit) endpoint += '&limit=' + object.limit; if (object.skip) endpoint += '&skip=' + object.skip; + if (object.sort) endpoint += '&sort=' + object.sort; if (object.locale) endpoint += '&locale=' + object.locale; fetch(endpoint) .then(function(response){
added sort in getObjectsBySearch
diff --git a/Qt.py b/Qt.py index <HASH>..<HASH> 100644 --- a/Qt.py +++ b/Qt.py @@ -833,12 +833,6 @@ def _loadUi(uifile, baseinstance=None): return the newly created instance of the user interface. """ - # Not sure where this code came from. - # if hasattr(baseinstance, "layout") and baseinstance.layout(): - # message = ("QLayout: Attempting to add Layout to %s which " - # "already has a layout") - # raise RuntimeError(message % (baseinstance)) - if hasattr(Qt, "_uic"): return Qt._uic.loadUi(uifile, baseinstance)
Removing commented code. @mottosso confirmed it was unneeded. Must have been something I added at some point.
diff --git a/tests/test_update_query.py b/tests/test_update_query.py index <HASH>..<HASH> 100644 --- a/tests/test_update_query.py +++ b/tests/test_update_query.py @@ -120,6 +120,10 @@ def test_with_query_list_int(): @pytest.mark.parametrize( "query,expected", [ + pytest.param({"a": []}, "?", id="empty list"), + pytest.param({"a": ()}, "?", id="empty tuple"), + pytest.param({"a": [1]}, "?a=1", id="single list"), + pytest.param({"a": (1,)}, "?a=1", id="single tuple"), pytest.param({"a": [1, 2]}, "?a=1&a=2", id="list"), pytest.param({"a": (1, 2)}, "?a=1&a=2", id="tuple"), pytest.param({"a[]": [1, 2]}, "?a[]=1&a[]=2", id="key with braces"),
Add tests for edge cases of quoting lists and tuples
diff --git a/can/bus.py b/can/bus.py index <HASH>..<HASH> 100644 --- a/can/bus.py +++ b/can/bus.py @@ -92,8 +92,7 @@ class BusABC(object): raise NotImplementedError("Trying to set_filters on unsupported bus") def flush_tx_buffer(self): - """Used for CAN interfaces which need to flush their transmit buffer. - + """Discard every message that may be queued in the output buffer(s). """ pass diff --git a/can/interfaces/kvaser/canlib.py b/can/interfaces/kvaser/canlib.py index <HASH>..<HASH> 100644 --- a/can/interfaces/kvaser/canlib.py +++ b/can/interfaces/kvaser/canlib.py @@ -411,8 +411,7 @@ class KvaserBus(BusABC): canSetAcceptanceFilter(handle, can_id, can_mask, ext) def flush_tx_buffer(self): - """ - Flushes the transmit buffer on the Kvaser + """ Wipeout the transmit buffer on the Kvaser. """ canIoCtl(self._write_handle, canstat.canIOCTL_FLUSH_TX_BUFFER, 0, 0)
Clarify docs about the meaning of flush_tx_buffer, closes #<I>
diff --git a/src/pinch-it.js b/src/pinch-it.js index <HASH>..<HASH> 100644 --- a/src/pinch-it.js +++ b/src/pinch-it.js @@ -47,7 +47,7 @@ const pinchIt = (targets: string, options: Object = {}) => { * @param { String } ease easing css property * @return { Void } */ - const scaleEl = (el, to: number, duration: number, ease: string): void => { + const scaleEl = (el: EventTarget, to: number, duration: number, ease: string): void => { const { transition, transform, hasScale3d } = prefixes; const { style } = el; // Base our new dimention on our prevous value minus our base value @@ -107,7 +107,7 @@ const pinchIt = (targets: string, options: Object = {}) => { if (!isWithin(scale, opts)) { const isLessThan = (scale < opts.minScale); lastScale = isLessThan ? opts.minScale : opts.maxScale; - scaleEl(e.target, lastScale, lastScale, opts.snapBackSpeed, opts.ease); + scaleEl(e.target, lastScale, opts.snapBackSpeed, opts.ease); } };
fixes params to scaleEl whre we lost bounche effect
diff --git a/backup/backup.php b/backup/backup.php index <HASH>..<HASH> 100644 --- a/backup/backup.php +++ b/backup/backup.php @@ -117,7 +117,9 @@ //Call the form, depending the step we are if (!$launch) { // if we're at the start, clear the cache of prefs - unset($SESSION->backupprefs[$course->id]); + if (isset($SESSION->backupprefs[$course->id])) { + unset($SESSION->backupprefs[$course->id]); + } include_once("backup_form.html"); } else if ($launch == "check") { include_once("backup_check.html");
Avoid one notice in backup. Bug <I>. (<URL>) Merged from MOODLE_<I>_STABLE
diff --git a/spec/tripod/repository_spec.rb b/spec/tripod/repository_spec.rb index <HASH>..<HASH> 100644 --- a/spec/tripod/repository_spec.rb +++ b/spec/tripod/repository_spec.rb @@ -30,7 +30,7 @@ describe Tripod::Repository do context 'graph_uri set on object' do it 'populates the object with triples, restricted to the graph_uri' do - Tripod::SparqlClient::Query.should_receive(:query).with(Person.all_triples_query(person.uri, graph_uri: person.graph_uri), 'application/n-triples, text/plain').and_call_original + Tripod::SparqlClient::Query.should_receive(:query).with(Person.all_triples_query(person.uri, graph_uri: person.graph_uri), Tripod.ntriples_header_str).and_call_original person.hydrate! person.repository.should_not be_empty end @@ -38,7 +38,7 @@ describe Tripod::Repository do context 'graph_uri not set on object' do it 'populates the object with triples, not to a graph' do - Tripod::SparqlClient::Query.should_receive(:query).with(Person.all_triples_query(person.uri), 'application/n-triples, text/plain').and_call_original + Tripod::SparqlClient::Query.should_receive(:query).with(Person.all_triples_query(person.uri), Tripod.ntriples_header_str).and_call_original graphless_resource.hydrate! graphless_resource.repository.should_not be_empty end
Update tests to use config option.
diff --git a/salt/modules/cmdmod.py b/salt/modules/cmdmod.py index <HASH>..<HASH> 100644 --- a/salt/modules/cmdmod.py +++ b/salt/modules/cmdmod.py @@ -446,7 +446,18 @@ def _run(cmd, stdout=subprocess.PIPE, stdin=subprocess.PIPE ).communicate(py_code.encode(__salt_system_encoding__)) - if env_encoded.count(marker_b) != 2: + marker_count = env_encoded.count(marker_b) + if marker_count == 0: + # Possibly PAM prevented the login + log.error( + 'Environment could not be retrieved for user \'%s\': ' + 'stderr=%r stdout=%r', + runas, env_encoded_err, env_encoded + ) + # Ensure that we get an empty env_runas dict below since we + # were not able to get the environment. + env_encoded = b'' + elif marker_count != 2: raise CommandExecutionError( 'Environment could not be retrieved for user \'{0}\'', info={'stderr': repr(env_encoded_err),
Allow cases where no marker was found to proceed without raising exception
diff --git a/src/wyjc/testing/tests/RuntimeValidTests.java b/src/wyjc/testing/tests/RuntimeValidTests.java index <HASH>..<HASH> 100755 --- a/src/wyjc/testing/tests/RuntimeValidTests.java +++ b/src/wyjc/testing/tests/RuntimeValidTests.java @@ -257,6 +257,7 @@ public class RuntimeValidTests extends TestHarness { @Test public void RecursiveType_Valid_16_RuntimeTest() { runTest("RecursiveType_Valid_16"); } @Test public void RecursiveType_Valid_17_RuntimeTest() { runTest("RecursiveType_Valid_17"); } @Test public void RecursiveType_Valid_18_RuntimeTest() { runTest("RecursiveType_Valid_18"); } + @Ignore("Known Issue") @Test public void RecursiveType_Valid_19_RuntimeTest() { runTest("RecursiveType_Valid_19"); } @Test public void RecursiveType_Valid_20_RuntimeTest() { runTest("RecursiveType_Valid_20"); } @Test public void Remainder_Valid_1_RuntimeTest() { runTest("Remainder_Valid_1"); }
Ok, had to mark RecursiveType_Valid_<I> as ignore because it causes an infinite loop!!
diff --git a/db/mongo/mapper.php b/db/mongo/mapper.php index <HASH>..<HASH> 100644 --- a/db/mongo/mapper.php +++ b/db/mongo/mapper.php @@ -114,20 +114,21 @@ class Mapper extends \DB\Cursor { $fw->stringify(array($fields,$filter,$options))).'.mongo', $result)) || !$ttl || $cached[0]+$ttl<microtime(TRUE)) { if ($options['group']) { + $grp=$this->collection->group( + $options['group']['keys'], + $options['group']['initial'], + $options['group']['reduce'], + array( + 'condition'=>$filter, + 'finalize'=>$options['group']['finalize'] + ) + ); $tmp=$this->db->selectcollection( $fw->get('HOST').'.'.$fw->get('BASE').'.'. uniqid(NULL,TRUE).'.tmp' ); $tmp->batchinsert( - $this->collection->group( - $options['group']['keys'], - $options['group']['initial'], - $options['group']['reduce'], - array( - 'condition'=>$filter, - 'finalize'=>$options['group']['finalize'] - ) - )['retval'], + $grp['retval'], array('safe'=>TRUE) ); $filter=array();
Made Mongo Mapper select fixes safe for php <I>
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -48,7 +48,7 @@ setup( # http://python-packaging.readthedocs.io/en/latest/command-line-scripts.html#the-console-scripts-entry-point entry_points = { 'console_scripts': [ - 'iota-cli=iota.bin.repl:main', + 'pyota-cli=iota.bin.repl:main', ], },
change REPL name to pyota-cli
diff --git a/spec/dbi.rb b/spec/dbi.rb index <HASH>..<HASH> 100644 --- a/spec/dbi.rb +++ b/spec/dbi.rb @@ -18,7 +18,7 @@ describe 'DBI::DatabaseHandle#select_column' do null.should.be.nil should.raise( DBI::DataError ) do - $dbh.select_column( "SELECT name FROM authors WHERE FALSE" ) + $dbh.select_column( "SELECT name FROM authors WHERE 1+1 = 3" ) end end diff --git a/spec/model.rb b/spec/model.rb index <HASH>..<HASH> 100644 --- a/spec/model.rb +++ b/spec/model.rb @@ -442,7 +442,7 @@ describe 'A DBI::Model subclass' do posts[ 1 ].text.should.equal 'Third post.' posts[ 1 ].class.should.equal @m_post - no_posts = @m_post.s( "SELECT * FROM posts WHERE FALSE" ) + no_posts = @m_post.s( "SELECT * FROM posts WHERE 1+1 = 3" ) no_posts.should.not.be.nil no_posts.should.be.empty end @@ -471,7 +471,7 @@ describe 'A DBI::Model subclass' do post.author_id.should.equal 1 post.text.should.equal 'Third post.' - no_post = @m_post.s1( "SELECT * FROM posts WHERE FALSE" ) + no_post = @m_post.s1( "SELECT * FROM posts WHERE 1+1 = 3" ) no_post.should.be.nil end
Changed "WHERE FALSE" to "WHERE <I> = 3" so the query works also in SQLite.
diff --git a/openquake/utils/db/__init__.py b/openquake/utils/db/__init__.py index <HASH>..<HASH> 100644 --- a/openquake/utils/db/__init__.py +++ b/openquake/utils/db/__init__.py @@ -0,0 +1,20 @@ +from sqlalchemy.databases import postgres +import geoalchemy + +# This allows us to reflect 'geometry' columns from PostGIS tables. +# This is slightly hack-ish, but it's either this or we have to declare +# columns with the appropriate type manually (yuck). +postgres.ischema_names['geometry'] = geoalchemy.Geometry + + + +def create_engine( + dbname, user, password='', host='localhost', engine='postgresql'): + """ + Function wrapper for :py:func:`sqlalchemy.create_engine` which helps + generate a db connection string. + """ + + conn_str = '%s://%s:%s@%s/%s' % (engine, user, password, host, dbname) + db = sqlalchemy.create_engine(conn_str) + return db
basic stuff to setup dbloader utils
diff --git a/src/request/sign-swap/SignSwap.js b/src/request/sign-swap/SignSwap.js index <HASH>..<HASH> 100644 --- a/src/request/sign-swap/SignSwap.js +++ b/src/request/sign-swap/SignSwap.js @@ -255,7 +255,15 @@ class SignSwap { $rightLabel.textContent = I18n.translatePhrase('bitcoin'); } else if (request.redeem.type === 'EUR') { $rightIdenticon.innerHTML = TemplateTags.hasVars(0)`<img src="../../assets/icons/bank.svg"></img>`; - $rightLabel.textContent = request.redeem.bankLabel || I18n.translatePhrase('sign-swap-your-bank'); + + let label = request.redeem.bankLabel || I18n.translatePhrase('sign-swap-your-bank'); + + // Display IBAN as recipient label if available + if (request.redeem.settlement.type === 'sepa') { + label = request.redeem.settlement.recipient.iban; + } + + $rightLabel.textContent = label; } }
Display IBAN as recipient label if available
diff --git a/asv_bench/benchmarks/gil.py b/asv_bench/benchmarks/gil.py index <HASH>..<HASH> 100644 --- a/asv_bench/benchmarks/gil.py +++ b/asv_bench/benchmarks/gil.py @@ -37,7 +37,7 @@ except ImportError: return wrapper -from .pandas_vb_common import BaseIO # noqa: E402 isort:skip +from .pandas_vb_common import BaseIO # isort:skip class ParallelGroupbyMethods: diff --git a/asv_bench/benchmarks/offset.py b/asv_bench/benchmarks/offset.py index <HASH>..<HASH> 100644 --- a/asv_bench/benchmarks/offset.py +++ b/asv_bench/benchmarks/offset.py @@ -3,7 +3,7 @@ import warnings import pandas as pd try: - import pandas.tseries.holiday # noqa + import pandas.tseries.holiday except ImportError: pass
CLN: noqa removal (#<I>)
diff --git a/bingo/static/bingo/js/board_list.js b/bingo/static/bingo/js/board_list.js index <HASH>..<HASH> 100644 --- a/bingo/static/bingo/js/board_list.js +++ b/bingo/static/bingo/js/board_list.js @@ -1,10 +1,10 @@ $(document).ready(function(){ var imgs = $('img.thumbnail'); - imgs.bind('mouseover', function(){console.log(this.src);this.src = this.src.replace("voted", "marked")}); + imgs.bind('mouseover', function(){this.src = this.src.replace("voted", "marked")}); imgs.bind('mouseout', function(){this.src = this.src.replace("marked", "voted")}); }); $(document).ready(function(){ var imgs = $('img.thumbnail'); - imgs.bind('mouseover', function(){console.log(this.src);this.src = this.src.replace("voted", "marked")}); + imgs.bind('mouseover', function(){this.src = this.src.replace("voted", "marked")}); imgs.bind('mouseout', function(){this.src = this.src.replace("marked", "voted")}); });
removed console.log debugging for mouseover
diff --git a/tests/lib/formatters/html.js b/tests/lib/formatters/html.js index <HASH>..<HASH> 100644 --- a/tests/lib/formatters/html.js +++ b/tests/lib/formatters/html.js @@ -329,28 +329,6 @@ describe("formatter:html", () => { }); }); - // // Formatter doesn't use source property - // /* - // describe("when passing a single message with no source", function() { - - // var code = [{ - // filePath: "foo.js", - // messages: [{ - // message: "Unexpected foo.", - // severity: 2, - // line: 5, - // column: 10, - // ruleId: "foo" - // }] - // }]; - - // it("should return a string in HTML format with 1 issue in 1 file", function() { - // var result = formatter(code); - // assert.strictEqual(parseHTML(result), ""); - // }); - // }); - // */ - describe("when passing a single message with no rule id or message", () => { const code = [{ filePath: "foo.js",
Chore: remove commented test for HTML formatter (#<I>) This commit removes a test that has been commented out for 2 years and doesn't appear to work.
diff --git a/packages/theme-data/src/colorSchemes/darkBlue/unresolvedRoles.js b/packages/theme-data/src/colorSchemes/darkBlue/unresolvedRoles.js index <HASH>..<HASH> 100644 --- a/packages/theme-data/src/colorSchemes/darkBlue/unresolvedRoles.js +++ b/packages/theme-data/src/colorSchemes/darkBlue/unresolvedRoles.js @@ -28,7 +28,7 @@ import token from "./components/token"; import tooltip from "./components/tooltip"; import topNav from "./components/topNav"; import treeView from "./components/treeView"; -console.log(tile); + const darkBlueThemeConfig = extendTheme(baseTheme.unresolvedRoles, { ...mediumDensityTheme.unresolvedRoles, ...mapKeys(system.colorScheme, (key) => `colorScheme.${key}`),
refactor: removed console log from dark blue unresolved roles
diff --git a/lib/Doctrine/DBAL/Migrations/Configuration/Configuration.php b/lib/Doctrine/DBAL/Migrations/Configuration/Configuration.php index <HASH>..<HASH> 100644 --- a/lib/Doctrine/DBAL/Migrations/Configuration/Configuration.php +++ b/lib/Doctrine/DBAL/Migrations/Configuration/Configuration.php @@ -188,7 +188,7 @@ class Configuration public function getDateTime($version) { $datetime = str_replace('Version', '', $version); - $datetime = \DateTime::createFromFormat('Ymdhis', $datetime); + $datetime = \DateTime::createFromFormat('YmdHis', $datetime); if ($datetime === false){ return ''; diff --git a/tests/Doctrine/DBAL/Migrations/Tests/ConfigurationTest.php b/tests/Doctrine/DBAL/Migrations/Tests/ConfigurationTest.php index <HASH>..<HASH> 100644 --- a/tests/Doctrine/DBAL/Migrations/Tests/ConfigurationTest.php +++ b/tests/Doctrine/DBAL/Migrations/Tests/ConfigurationTest.php @@ -197,6 +197,7 @@ class ConfigurationTest extends MigrationTestCase ['0000254Version', ''], ['0000254BaldlfqjdVersion', ''], ['20130101123545Version', '2013-01-01 12:35:45'], + ['20150202162811', '2015-02-02 04:28:11'] ]; } }
getDateTime does not understand <I>h format
diff --git a/GVRf/Framework/src/org/gearvrf/GVRSurfaceView.java b/GVRf/Framework/src/org/gearvrf/GVRSurfaceView.java index <HASH>..<HASH> 100644 --- a/GVRf/Framework/src/org/gearvrf/GVRSurfaceView.java +++ b/GVRf/Framework/src/org/gearvrf/GVRSurfaceView.java @@ -59,7 +59,7 @@ class GVRSurfaceView extends GLSurfaceView implements setEGLContextClientVersion(3); setPreserveEGLContextOnPause(true); setEGLContextFactory(new GVRContextFactory()); - setEGLConfigChooser(new GVRConfigChooser(8, 8, 8, 0, 0, 0)); + setEGLConfigChooser(new GVRConfigChooser(8, 8, 8, 8, 24, 8)); if (renderer != null) { renderer.setViewManager(viewManager); setRenderer(renderer);
Fix rendering problem. It was a config problem. We weren't asking for a depth buffer, so we weren't getting one. Fixed that :).
diff --git a/searx/engines/bing.py b/searx/engines/bing.py index <HASH>..<HASH> 100644 --- a/searx/engines/bing.py +++ b/searx/engines/bing.py @@ -16,7 +16,7 @@ from lxml import html from searx.engines.xpath import extract_text from searx.url_utils import urlencode -from searx.utils import match_language +from searx.utils import match_language, gen_useragent # engine dependent config categories = ['general'] @@ -43,6 +43,9 @@ def request(query, params): offset=offset) params['url'] = base_url + search_path + + params['headers']['User-Agent'] = gen_useragent('Windows NT 6.3; WOW64') + return params diff --git a/searx/utils.py b/searx/utils.py index <HASH>..<HASH> 100644 --- a/searx/utils.py +++ b/searx/utils.py @@ -57,9 +57,9 @@ blocked_tags = ('script', 'style') -def gen_useragent(): +def gen_useragent(os=None): # TODO - return ua.format(os=choice(ua_os), version=choice(ua_versions)) + return ua.format(os=os or choice(ua_os), version=choice(ua_versions)) def searx_useragent():
fix bing "garbage" results (issue #<I>)
diff --git a/source/CommonCode.php b/source/CommonCode.php index <HASH>..<HASH> 100644 --- a/source/CommonCode.php +++ b/source/CommonCode.php @@ -441,12 +441,13 @@ trait CommonCode ->ignoreUnreadableDirs(true) ->followLinks() ->in($sourcePath); + $sFiles = []; foreach ($iterator as $file) { - $sFiles[] = $file->getRealPath(); -// $targetFile = $targetPath . DIRECTORY_SEPARATOR . $file->getFilename(); -// $filesystem->rename($file->getRealPath(), $targetFile, $overwrite); + $relativePathFile = str_replace($sourcePath, '', $file->getRealPath()); + if (!file_exists($targetPath . $relativePathFile)) { + $sFiles[$relativePathFile] = $targetPath . $relativePathFile; + } } - // TODO: compare the file copied w. source and highlight any missmatch return $this->setArrayToJson($sFiles); }
in the function that moves the file now the checking if the action was performed is complete
diff --git a/client/controller/shared.js b/client/controller/shared.js index <HASH>..<HASH> 100644 --- a/client/controller/shared.js +++ b/client/controller/shared.js @@ -86,7 +86,7 @@ export function loadSectionCSS( context, next ) { } loadCSS( cssUrl, ( err, newLink ) => { - if ( currentLink ) { + if ( currentLink && currentLink.parentElement ) { currentLink.parentElement.removeChild( currentLink ); } @@ -109,7 +109,7 @@ export function setUpLocale( context, next ) { } else if ( currentUser ) { context.lang = currentUser.localeSlug; } else { - context.lang = context.lang || config( 'i18n_default_locale_slug' ); + context.lang = config( 'i18n_default_locale_slug' ); } context.store.dispatch( setLocale( context.lang ) );
Make sure the previous link element is still in the page before removing it
diff --git a/phing/tasks/GuzzleSubSplitTask.php b/phing/tasks/GuzzleSubSplitTask.php index <HASH>..<HASH> 100644 --- a/phing/tasks/GuzzleSubSplitTask.php +++ b/phing/tasks/GuzzleSubSplitTask.php @@ -226,7 +226,7 @@ class GuzzleSubSplitTask extends GitBaseTask $cmd = $this->client->getCommand('subsplit'); $cmd->addArgument('update'); try { - $output = $cmd->execute(); + $cmd->execute(); } catch (Exception $e) { throw new BuildException('git subsplit update failed'. $e); }
Removed unused output variable from the split task
diff --git a/tests/Fixer/FunctionNotation/PhpdocToReturnTypeFixerTest.php b/tests/Fixer/FunctionNotation/PhpdocToReturnTypeFixerTest.php index <HASH>..<HASH> 100644 --- a/tests/Fixer/FunctionNotation/PhpdocToReturnTypeFixerTest.php +++ b/tests/Fixer/FunctionNotation/PhpdocToReturnTypeFixerTest.php @@ -31,7 +31,7 @@ final class PhpdocToReturnTypeFixerTest extends AbstractFixerTestCase * * @dataProvider provideFixCases */ - public function testFix($expected, $input = null, $versionSpecificFix = null, $config = null) + public function testFix($expected, $input = null, $versionSpecificFix = null, array $config = []) { if ( (null !== $input && \PHP_VERSION_ID < 70000) @@ -40,9 +40,8 @@ final class PhpdocToReturnTypeFixerTest extends AbstractFixerTestCase $expected = $input; $input = null; } - if (null !== $config) { - $this->fixer->configure($config); - } + + $this->fixer->configure($config); $this->doTest($expected, $input); }
DX: cleanup testing with fixer config
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100755 --- a/setup.py +++ b/setup.py @@ -12,8 +12,8 @@ test_requirements = [ setup( name='adb_android', - version='0.5.0', - description="Enables android adb in your python script", + version='1.0.0', + description="Enable android adb in your python script", long_description='This python package is a wrapper for standard android adb\ implementation. It allows you to execute android adb commands in your \ python script.', @@ -29,7 +29,6 @@ setup( license="GNU", keywords='adb, android', classifiers=[ - 'Development Status :: 4 - Beta', 'Programming Language :: Python :: 2.7', 'License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)', 'Topic :: Software Development :: Testing',
Increase package version to <I> Change-Id: I8f5b3ec5a1a1f<I>a0c0a<I>ff<I>bb<I>f<I>fb
diff --git a/server/server.js b/server/server.js index <HASH>..<HASH> 100644 --- a/server/server.js +++ b/server/server.js @@ -43,7 +43,8 @@ global.constants = { }, loggly: { subdomain: 'stimulant', // https://stimulant.loggly.com/dashboards - inputToken: 'b8eeee6e-12f4-4f2f-b6b4-62f087ad795e' + inputToken: 'b8eeee6e-12f4-4f2f-b6b4-62f087ad795e', + json: true }, mail: { host: 'smtp.gmail.com', @@ -198,9 +199,11 @@ winston.info('Server started.'); /* Content Updater Update from non-web location + Don't shut down app while downloading to temp App Updater Update from non-web location + Don't shut down app while downloading to temp Logger Log app events
loggly should use json
diff --git a/repo/fsrepo/component/datastore.go b/repo/fsrepo/component/datastore.go index <HASH>..<HASH> 100644 --- a/repo/fsrepo/component/datastore.go +++ b/repo/fsrepo/component/datastore.go @@ -3,7 +3,6 @@ package component import ( "errors" "path" - "path/filepath" "sync" datastore "github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-datastore" @@ -39,9 +38,6 @@ func init() { func InitDatastoreComponent(dspath string, conf *config.Config) error { // The actual datastore contents are initialized lazily when Opened. // During Init, we merely check that the directory is writeable. - if !filepath.IsAbs(dspath) { - return debugerror.New("datastore filepath must be absolute") // during initialization (this isn't persisted) - } p := path.Join(dspath, DefaultDataStoreDirectory) if err := dir.Writable(p); err != nil { return debugerror.Errorf("datastore: %s", err)
fix(fsrepo) don't enforce absolute path in datastore component we only actually care that it isn't tidle'd ~
diff --git a/lib/serf/downloader.js b/lib/serf/downloader.js index <HASH>..<HASH> 100644 --- a/lib/serf/downloader.js +++ b/lib/serf/downloader.js @@ -8,6 +8,7 @@ var Download = require('download'), fs = require('fs'), + os = require('os'), Q = require('q'); var ConsoleLogger = require('../console-logger').ConsoleLogger;
Load required library. "os" is automatically loaded in the interactive node console but it have to be loaded manually in scripts.
diff --git a/torchvision/models/detection/rpn.py b/torchvision/models/detection/rpn.py index <HASH>..<HASH> 100644 --- a/torchvision/models/detection/rpn.py +++ b/torchvision/models/detection/rpn.py @@ -160,8 +160,8 @@ class AnchorGenerator(nn.Module): grid_sizes = list([feature_map.shape[-2:] for feature_map in feature_maps]) image_size = image_list.tensors.shape[-2:] dtype, device = feature_maps[0].dtype, feature_maps[0].device - strides = [[torch.tensor(image_size[0] / g[0], dtype=torch.int64, device=device), - torch.tensor(image_size[1] / g[1], dtype=torch.int64, device=device)] for g in grid_sizes] + strides = [[torch.tensor(image_size[0] // g[0], dtype=torch.int64, device=device), + torch.tensor(image_size[1] // g[1], dtype=torch.int64, device=device)] for g in grid_sizes] self.set_cell_anchors(dtype, device) anchors_over_all_feature_maps = self.cached_grid_anchors(grid_sizes, strides) anchors = torch.jit.annotate(List[List[torch.Tensor]], [])
Updates integer division to use floor division operator (#<I>) Integer division using the div operator is deprecated and will throw a RuntimeError in PyTorch <I> (and on PyTorch Master very soon). Running a test build with a recent Torchvision commit and integer division using div ('/') disabled revealed this integer division. I'll re-run the tests once this is fixed in case it's masking additional issues.
diff --git a/lib/runBlock.js b/lib/runBlock.js index <HASH>..<HASH> 100644 --- a/lib/runBlock.js +++ b/lib/runBlock.js @@ -1,7 +1,7 @@ const Buffer = require('safe-buffer').Buffer const async = require('async') const ethUtil = require('ethereumjs-util') -const Bloom = require('./bloom.js') +const Bloom = require('./bloom') const rlp = ethUtil.rlp const Trie = require('merkle-patricia-tree') const BN = ethUtil.BN diff --git a/lib/runTx.js b/lib/runTx.js index <HASH>..<HASH> 100644 --- a/lib/runTx.js +++ b/lib/runTx.js @@ -2,7 +2,7 @@ const Buffer = require('safe-buffer').Buffer const async = require('async') const utils = require('ethereumjs-util') const BN = utils.BN -const Bloom = require('./bloom.js') +const Bloom = require('./bloom') const Block = require('ethereumjs-block') const Account = require('ethereumjs-account') const StorageReader = require('./storageReader')
Fix bloom imports in runBlock and runTx
diff --git a/staging/src/k8s.io/apimachinery/pkg/util/intstr/intstr.go b/staging/src/k8s.io/apimachinery/pkg/util/intstr/intstr.go index <HASH>..<HASH> 100644 --- a/staging/src/k8s.io/apimachinery/pkg/util/intstr/intstr.go +++ b/staging/src/k8s.io/apimachinery/pkg/util/intstr/intstr.go @@ -131,6 +131,10 @@ func (IntOrString) OpenAPISchemaType() []string { return []string{"string"} } // the OpenAPI spec of this type. func (IntOrString) OpenAPISchemaFormat() string { return "int-or-string" } +// OpenAPIV3OneOfTypes is used by the kube-openapi generator when constructing +// the OpenAPI v3 spec of this type. +func (IntOrString) OpenAPIV3OneOfTypes() []string { return []string{"integer", "string"} } + func ValueOrDefault(intOrPercent *IntOrString, defaultValue IntOrString) *IntOrString { if intOrPercent == nil { return &defaultValue
oneOf types for IntOrString
diff --git a/stripe/src/main/java/com/stripe/android/util/StripeNetworkUtils.java b/stripe/src/main/java/com/stripe/android/util/StripeNetworkUtils.java index <HASH>..<HASH> 100644 --- a/stripe/src/main/java/com/stripe/android/util/StripeNetworkUtils.java +++ b/stripe/src/main/java/com/stripe/android/util/StripeNetworkUtils.java @@ -161,6 +161,7 @@ public class StripeNetworkUtils { removeNullParams(accountParams); tokenParams.put(Token.TYPE_BANK_ACCOUNT, accountParams); + addUidParams(provider, context, tokenParams); return tokenParams; }
adding muid/guid logging to bank token requests (#<I>) * adding muid-guid logging to bank tokens * moving method back to private
diff --git a/lib/zest.js b/lib/zest.js index <HASH>..<HASH> 100644 --- a/lib/zest.js +++ b/lib/zest.js @@ -238,7 +238,7 @@ var selectors = { }, ':nth-match': function(param) { var args = param.split(/\s*,\s*/) - , p = args.pop() + , p = args.shift() , test = compileGroup(args.join(',')); return nth(p, test); @@ -429,7 +429,7 @@ var rules = { combinator: /^(?: +([^ \w*]) +|( )+|([^ \w*]))(?! *$)/, attr: /^\[([\w-]+)(?:([^\w]?=)(inside))?\]/, pseudo: /^(:[\w-]+)(?:\((inside)\))?/, - inside: /(?:"(?:\\"|[^"])*"|'(?:\\'|[^'])*'|<[^"'>]*>|\\["'>]|[^"'>])+/ + inside: /(?:"(?:\\"|[^"])*"|'(?:\\'|[^'])*'|\\["'>]|[^"'>])+/ //inside: /(?:"(?:\\"|[^"])*"|'(?:\\'|[^'])*'|<[^"'>]*>|\\["'>]|[^"'<>]+)+/ };
clean inside rule, fix nth-match
diff --git a/spyder/plugins/ipythonconsole/widgets/shell.py b/spyder/plugins/ipythonconsole/widgets/shell.py index <HASH>..<HASH> 100644 --- a/spyder/plugins/ipythonconsole/widgets/shell.py +++ b/spyder/plugins/ipythonconsole/widgets/shell.py @@ -173,6 +173,9 @@ class ShellWidget(NamepaceBrowserWidget, HelpWidget, DebuggingWidget, return self.shutting_down = True if shutdown_kernel: + if not self.kernel_manager: + return + self.interrupt_kernel() self.spyder_kernel_comm.close() self.kernel_manager.stop_restarter()
IPython console: Catch error when shutting down kernels and no kernel manager is available
diff --git a/Vps/Component/Data.php b/Vps/Component/Data.php index <HASH>..<HASH> 100644 --- a/Vps/Component/Data.php +++ b/Vps/Component/Data.php @@ -253,7 +253,12 @@ class Vps_Component_Data foreach ($generators as $g) { if (!$g['static']) { $gen = Vps_Component_Generator_Abstract::getInstance($g['class'], $g['key']); - foreach ($gen->getChildData(null, clone $select) as $d) { + $s = clone $select; + if (!$noSubPages) { + //unset limit as we may have filter away results + $s->unsetPart('limitCount'); + } + foreach ($gen->getChildData(null, $s) as $d) { $add = true; if (!$noSubPages) { // sucht über unterseiten hinweg, wird hier erst im Nachhinein gehandelt, langsam $add = false;
don't use limit in generator as we limit after that fixes finding home in trl
diff --git a/src/main/java/com/couchbase/lite/replicator/PullerInternal.java b/src/main/java/com/couchbase/lite/replicator/PullerInternal.java index <HASH>..<HASH> 100644 --- a/src/main/java/com/couchbase/lite/replicator/PullerInternal.java +++ b/src/main/java/com/couchbase/lite/replicator/PullerInternal.java @@ -122,7 +122,9 @@ public class PullerInternal extends ReplicationInternal implements ChangeTracker @Override protected void onBeforeScheduleRetry() { - // do nothing + // stop change tracker + if (changeTracker != null) + changeTracker.stop(); } public boolean isPull() {
Fixed #<I> - Pull replicator skipped documents to pull Pull replicator can not retry (in case of error occurs) if ChangeTracker received changes continuously in less than <I> sec because pull replicator cancel & reschedule retry whenever it enters IDLE state.
diff --git a/salt/cloud/__init__.py b/salt/cloud/__init__.py index <HASH>..<HASH> 100644 --- a/salt/cloud/__init__.py +++ b/salt/cloud/__init__.py @@ -228,7 +228,7 @@ class CloudClient(object): if a.get('provider', '')] if providers: _providers = opts.get('providers', {}) - for provider in six.iterkeys(_providers): + for provider in _providers.keys(): if provider not in providers: _providers.pop(provider) return opts
Avoid RunTimeError (dictionary changed size during iteration) with keys() Fixes #<I>
diff --git a/graphene_django/views.py b/graphene_django/views.py index <HASH>..<HASH> 100644 --- a/graphene_django/views.py +++ b/graphene_django/views.py @@ -53,7 +53,7 @@ def instantiate_middleware(middlewares): class GraphQLView(View): - graphiql_version = '0.7.8' + graphiql_version = '0.10.2' graphiql_template = 'graphene/graphiql.html' schema = None
Updated graphiql version for new versions
diff --git a/src/NlpTools/Optimizers/GradientDescentOptimizer.php b/src/NlpTools/Optimizers/GradientDescentOptimizer.php index <HASH>..<HASH> 100644 --- a/src/NlpTools/Optimizers/GradientDescentOptimizer.php +++ b/src/NlpTools/Optimizers/GradientDescentOptimizer.php @@ -68,15 +68,16 @@ abstract class GradientDescentOptimizer implements FeatureBasedLinearOptimizerIn $optimized = false; $maxiter = $this->maxiter; $prec = $this->precision; + $step = $this->step; $l = array(); $this->initParameters($feature_array,$l); - while (!$optimized && $itercount++<$maxiter) { + while (!$optimized && $itercount++!=$maxiter) { //$start = microtime(true); $optimized = true; $this->prepareFprime($feature_array,$l); $this->Fprime($feature_array,$l); foreach ($this->fprime_vector as $i=>$fprime_i_val) { - $l[$i] -= $fprime_i_val; + $l[$i] -= $step*$fprime_i_val; if (abs($fprime_i_val) > $prec) { $optimized = false; }
Fix gradient descent optimizer to use the learning rate
diff --git a/source/Mocka/ClassMock.php b/source/Mocka/ClassMock.php index <HASH>..<HASH> 100644 --- a/source/Mocka/ClassMock.php +++ b/source/Mocka/ClassMock.php @@ -177,8 +177,9 @@ class ClassMock { } $reflectionTrait = new \ReflectionClass('\\Mocka\\ClassTrait'); - return array_filter($methods, function (\ReflectionMethod $reflectionMethod) use ($reflectionTrait) { + $methods = array_filter($methods, function (\ReflectionMethod $reflectionMethod) use ($reflectionTrait) { return !$reflectionMethod->isPrivate() && !$reflectionMethod->isFinal() && !$reflectionTrait->hasMethod($reflectionMethod->getName()); }); + return $methods; } }
Be more specific what is returned/filtered
diff --git a/nodeconductor/billing/backend/whmcs.py b/nodeconductor/billing/backend/whmcs.py index <HASH>..<HASH> 100644 --- a/nodeconductor/billing/backend/whmcs.py +++ b/nodeconductor/billing/backend/whmcs.py @@ -487,6 +487,7 @@ class WHMCSAPI(object): type='server', paytype='recurring', module='autorelease', + proratabilling=True, ) pid = response['pid']
Create whmcs products with pro-rata setting on - ITACLOUD-<I>
diff --git a/lib/disney/disneyBuses.js b/lib/disney/disneyBuses.js index <HASH>..<HASH> 100644 --- a/lib/disney/disneyBuses.js +++ b/lib/disney/disneyBuses.js @@ -61,9 +61,9 @@ class DisneyLiveBusTimes extends EventEmitter { dest.arrivals.forEach((arrival) => { this.emit('busupdate', { from: name, - from_id: id, + from_id: Number(id), to: dest.name, - to_id: DisneyUtil.CleanID(dest.id), + to_id: Number(DisneyUtil.CleanID(dest.id)), atStop: arrival.atStop, atStopHuman: arrival.atStop_human, atDestination: arrival.atDestination, @@ -76,9 +76,9 @@ class DisneyLiveBusTimes extends EventEmitter { // emit event with boring "every 20 minutes" update this.emit('busupdate', { from: name, - from_id: id, + from_id: Number(id), to: dest.name, - to_id: DisneyUtil.CleanID(dest.id), + to_id: Number(DisneyUtil.CleanID(dest.id)), frequency: dest.frequency, frequencyHuman: dest.frequency_human, });
[~] Report IDs as numbers from the disneyBus test script
diff --git a/src/Parse.js b/src/Parse.js index <HASH>..<HASH> 100644 --- a/src/Parse.js +++ b/src/Parse.js @@ -77,6 +77,9 @@ _html2canvas.Parse = function (images, options, cb) { for (i = 0, j = classes.length; i < j; i++) { classes[i] = classes[i].match(/(^[^:]*)/)[1]; } + + // remove empty values, if not could cause invalid selectors with querySelectorAll + classes = classes.filter(function (n) { return n }); } // Using the list of elements we know how pseudo el styles, create fake pseudo elements. @@ -1273,4 +1276,4 @@ _html2canvas.Parse = function (images, options, cb) { } } } -}; \ No newline at end of file +};
Fix invalid selector exception with empty class values After removing :before and :after pseudo selectors, a class name may be empty, causing an invalid selector string when joined. Remove empty elements before calling querySelectorAll.
diff --git a/ryu/lib/ovs/db_client.py b/ryu/lib/ovs/db_client.py index <HASH>..<HASH> 100644 --- a/ryu/lib/ovs/db_client.py +++ b/ryu/lib/ovs/db_client.py @@ -17,11 +17,8 @@ import logging import os -import ryu.contrib -ryu.contrib.update_module_path() - -from ovs import (jsonrpc, - stream) +from ovs import jsonrpc +from ovs import stream from ovs import util as ovs_util from ovs.db import schema diff --git a/ryu/lib/ovs/vsctl.py b/ryu/lib/ovs/vsctl.py index <HASH>..<HASH> 100644 --- a/ryu/lib/ovs/vsctl.py +++ b/ryu/lib/ovs/vsctl.py @@ -25,15 +25,12 @@ import six import sys import weakref -import ryu.contrib -ryu.contrib.update_module_path() - import ovs.db.data import ovs.db.types import ovs.poller -from ovs import (jsonrpc, - ovsuuid, - stream) +from ovs import jsonrpc +from ovs import ovsuuid +from ovs import stream from ovs.db import idl from ryu.lib import hub
ovs: Revert ovs module path Because contrib.ovs has been removed, we no longer need to update the path for loading ovs module.
diff --git a/kconfiglib.py b/kconfiglib.py index <HASH>..<HASH> 100644 --- a/kconfiglib.py +++ b/kconfiglib.py @@ -3888,9 +3888,9 @@ def _finalize_choice(node): break # Each choice item of UNKNOWN type gets the type of the choice - for item in choice.syms: - if item.orig_type == UNKNOWN: - item.orig_type = choice.orig_type + for sym in choice.syms: + if sym.orig_type == UNKNOWN: + sym.orig_type = choice.orig_type def _finalize_tree(node): """
Use 'sym' instead of 'item' in choice-related loop Only symbols appear in choice.syms. Clearer.
diff --git a/generator/language.go b/generator/language.go index <HASH>..<HASH> 100644 --- a/generator/language.go +++ b/generator/language.go @@ -262,7 +262,7 @@ func GoLangOpts() *LanguageOpts { if err != nil { return "", err } - return strings.ReplaceAll(strings.ReplaceAll(strings.ReplaceAll(string(b), "}", ",}"), "[", "{"), "]", ",}"), nil + return strings.ReplaceAll(strings.ReplaceAll(strings.ReplaceAll(strings.ReplaceAll(string(b), "}", ",}"), "[", "{"), "]", ",}"), "{,}", "{}"), nil } opts.BaseImportFunc = func(tgt string) string { diff --git a/generator/language_test.go b/generator/language_test.go index <HASH>..<HASH> 100644 --- a/generator/language_test.go +++ b/generator/language_test.go @@ -74,6 +74,11 @@ func TestGolang_SliceInitializer(t *testing.T) { B func() string }{A: "good", B: func() string { return "" }}) require.Error(t, err) + + a3 := []interface{}{} + res, err = goSliceInitializer(a3) + assert.NoError(t, err) + assert.Equal(t, `{}`, res) } func TestGolangInit(t *testing.T) {
generator: fix initialization of empty arrays
diff --git a/lib/geokit/geocoders/geocodio.rb b/lib/geokit/geocoders/geocodio.rb index <HASH>..<HASH> 100644 --- a/lib/geokit/geocoders/geocodio.rb +++ b/lib/geokit/geocoders/geocodio.rb @@ -28,7 +28,7 @@ module Geokit loc.all.push(create_new_loc(address)) end end - + loc.success = true loc end
Fixes geocoding with geocodio - sets success to true after parsing json response so that it no longer incorrectly returns a failed location
diff --git a/lib/openstax/connect/version.rb b/lib/openstax/connect/version.rb index <HASH>..<HASH> 100644 --- a/lib/openstax/connect/version.rb +++ b/lib/openstax/connect/version.rb @@ -1,5 +1,5 @@ module OpenStax module Connect - VERSION = "0.0.1" + VERSION = "0.0.2.alpha" end end
going to <I>.alpha
diff --git a/spec/integration/plugin_spec.rb b/spec/integration/plugin_spec.rb index <HASH>..<HASH> 100644 --- a/spec/integration/plugin_spec.rb +++ b/spec/integration/plugin_spec.rb @@ -81,4 +81,21 @@ EOF expect(network_opts).to include(:ip => '10.20.1.2') end end + + context 'when destroying a machine' do + def current_ip(machine) + settings.pool_manager.with_pool_for(machine) {|p| p.address_for(machine)} + end + + it 'releases the allocated IP address' do + env = test_env.create_vagrant_env + test_machine = env.machine(:test1, :dummy) + + expect(current_ip(test_machine)).to eq('10.20.1.2') + + test_machine.action(:destroy) + + expect(current_ip(test_machine)).to be_nil + end + end end
Add integration tests for release action Test that destroying a machine results in an IP address being released from the pool.
diff --git a/framework/src/play/src/main/java/play/mvc/Http.java b/framework/src/play/src/main/java/play/mvc/Http.java index <HASH>..<HASH> 100644 --- a/framework/src/play/src/main/java/play/mvc/Http.java +++ b/framework/src/play/src/main/java/play/mvc/Http.java @@ -1473,11 +1473,14 @@ public class Http { cookies.add(new Cookie(name, "", -86400, path, domain, secure, false)); } - // FIXME return a more convenient type? e.g. Map<String, Cookie> - public Iterable<Cookie> cookies() { + public Collection<Cookie> cookies() { return cookies; } + public Optional<Cookie> cookie(String name) { + return cookies.stream().filter(x -> { return x.name().equals(name); }).findFirst(); + } + } /**
Make it easier to get a cookie from a response
diff --git a/spec/lib/udongo/search/frontend_spec.rb b/spec/lib/udongo/search/frontend_spec.rb index <HASH>..<HASH> 100644 --- a/spec/lib/udongo/search/frontend_spec.rb +++ b/spec/lib/udongo/search/frontend_spec.rb @@ -2,10 +2,11 @@ require 'rails_helper' describe Udongo::Search::Frontend do let(:klass) { described_class.to_s.underscore.to_sym } - subject { described_class.new('foo') } + let(:controller) { double(:controller, class_name: 'Frontend', locale: 'nl') } + subject { described_class.new('foo', controller: controller) } before(:each) do - module Udongo::Search::ResultObjects::Frontend + module Udongo::Search::ResultObjects::RSpec class Class < Udongo::Search::ResultObjects::Base end end
fix failing Udongo::Search::Frontend test due to the controller call in the search term save in #search
diff --git a/pymbar/bar.py b/pymbar/bar.py index <HASH>..<HASH> 100644 --- a/pymbar/bar.py +++ b/pymbar/bar.py @@ -51,7 +51,7 @@ import math import numpy import numpy.linalg from pymbar.utils import _logsum, ParameterError, ConvergenceError, BoundsError -from pymbar.exponential_averaging import EXP +from pymbar.exp import EXP #============================================================================================= # Bennett acceptance ratio function to be zeroed to solve for BAR.
Fixed issue with EXP import.
diff --git a/test/generator_test.rb b/test/generator_test.rb index <HASH>..<HASH> 100644 --- a/test/generator_test.rb +++ b/test/generator_test.rb @@ -21,8 +21,11 @@ class GeneratorTest < Minitest::Test assert generator.word end + # Depending on your corpus and n-gram size, this is hard to guarantee, so we + # skip this test for now... def test_minimum_word_length - min_length = 5 + skip + min_length = 6 generator = get_generator(min_length: min_length) num_iterations.times do word = generator.word
skip min_length test because it can't be always guaranteed