diff
stringlengths
65
26.7k
message
stringlengths
7
9.92k
diff --git a/test/client_test.go b/test/client_test.go index <HASH>..<HASH> 100644 --- a/test/client_test.go +++ b/test/client_test.go @@ -129,7 +129,7 @@ func createClientFromEnv(t testEnv, waitUntilReady bool, connection ...*driver.C t.Fatalf("Failed to create new client: %s", describe(err)) } if waitUntilReady { - timeout := time.Minute + timeout := 3*time.Minute ctx, cancel := context.WithTimeout(context.Background(), timeout) defer cancel() if up := waitUntilServerAvailable(ctx, c, t); !up { @@ -210,7 +210,7 @@ func TestCreateClientHttpConnectionCustomTransport(t *testing.T) { if err != nil { t.Fatalf("Failed to create new client: %s", describe(err)) } - timeout := time.Minute + timeout := 3*time.Minute ctx, cancel := context.WithTimeout(context.Background(), timeout) defer cancel() if up := waitUntilServerAvailable(ctx, c, t); !up {
<I> secs are too short for full busy cluster
diff --git a/aws/resource_aws_cloudwatch_event_api_destination.go b/aws/resource_aws_cloudwatch_event_api_destination.go index <HASH>..<HASH> 100644 --- a/aws/resource_aws_cloudwatch_event_api_destination.go +++ b/aws/resource_aws_cloudwatch_event_api_destination.go @@ -3,7 +3,6 @@ package aws import ( "fmt" "log" - "math" "regexp" "github.com/aws/aws-sdk-go/aws" @@ -44,7 +43,7 @@ func resourceAwsCloudWatchEventApiDestination() *schema.Resource { "invocation_rate_limit_per_second": { Type: schema.TypeInt, Optional: true, - ValidateFunc: validation.IntBetween(1, math.MaxInt64), + ValidateFunc: validation.IntBetween(1, 300), Default: 300, }, "http_method": {
r/aws_cloudwatch_event_api_destination: Maximum value for 'invocation_rate_limit_per_second' is '<I>'.
diff --git a/test/integration/client/type-coercion-tests.js b/test/integration/client/type-coercion-tests.js index <HASH>..<HASH> 100644 --- a/test/integration/client/type-coercion-tests.js +++ b/test/integration/client/type-coercion-tests.js @@ -179,7 +179,7 @@ suite.test('date range extremes', function (done) { })) client.query('SELECT $1::TIMESTAMPTZ as when', ['4713-12-31 12:31:59 BC GMT'], assert.success(function (res) { - assert.equal(res.rows[0].when.getFullYear(), -4713) + assert.equal(res.rows[0].when.getFullYear(), -4712) })) client.query('SELECT $1::TIMESTAMPTZ as when', ['275760-09-13 00:00:00 -15:00'], assert.success(function (res) {
Fix integration test for <I> of postgres-date sub-dependency (#<I>)
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100755 --- a/setup.py +++ b/setup.py @@ -4,8 +4,10 @@ import email.utils import os import re import sys + from setuptools import setup + if sys.version_info < (2, 7): sys.exit("Python 2.7 or newer is required for check-manifest") @@ -44,7 +46,7 @@ setup( 'Development Status :: 4 - Beta', 'Environment :: Console', 'Intended Audience :: Developers', - 'License :: OSI Approved :: MIT License' + 'License :: OSI Approved :: MIT License', 'Operating System :: OS Independent', 'Programming Language :: Python', 'Programming Language :: Python :: 2.7',
Oops, that trailing comma is _important_
diff --git a/pliers/converters/base.py b/pliers/converters/base.py index <HASH>..<HASH> 100644 --- a/pliers/converters/base.py +++ b/pliers/converters/base.py @@ -55,7 +55,8 @@ def get_converter(in_type, out_type, *args, **kwargs): if not issubclass(cls, Converter): continue concrete = len(cls.__abstractmethods__) == 0 - if cls._input_type == in_type and cls._output_type == out_type and concrete: + if cls._input_type == in_type and cls._output_type == out_type and \ + concrete and cls.available: try: conv = cls(*args, **kwargs) return conv
in get_converters, make sure converter is environment-ready
diff --git a/pauldron-hearth/lib/PermissionDiscovery.js b/pauldron-hearth/lib/PermissionDiscovery.js index <HASH>..<HASH> 100644 --- a/pauldron-hearth/lib/PermissionDiscovery.js +++ b/pauldron-hearth/lib/PermissionDiscovery.js @@ -52,8 +52,8 @@ function consolidatePermissions(permissions) { function securityLabelsToScopes(labels) { return LabelingUtils.trimmedLabels( - LabelingUtils.augmentSecurityLabel( - LabelingUtils.filterLabelsOfInterest(labels) + LabelingUtils.filterLabelsOfInterest( + LabelingUtils.augmentSecurityLabel(labels) ) ); }
fix the order of applying augmentation and filtering of designated labeling systems.
diff --git a/pywal/reload.py b/pywal/reload.py index <HASH>..<HASH> 100644 --- a/pywal/reload.py +++ b/pywal/reload.py @@ -26,7 +26,7 @@ def xrdb(xrdb_files=None): if shutil.which("xrdb") and OS != "Darwin": for file in xrdb_files: - subprocess.Popen(["xrdb", "-merge", "-quiet", file]) + subprocess.run(["xrdb", "-merge", "-quiet", file]) def gtk():
reload: revert to using subprocess.run to wait for each merge to finish
diff --git a/src/input/pointer.js b/src/input/pointer.js index <HASH>..<HASH> 100644 --- a/src/input/pointer.js +++ b/src/input/pointer.js @@ -131,7 +131,7 @@ ]; // internal constants - //var MOUSE_WHEEL = 0; + var MOUSE_WHEEL = 0; var POINTER_MOVE = 1; var POINTER_DOWN = 2; var POINTER_UP = 3; @@ -354,6 +354,17 @@ } } break; + + case MOUSE_WHEEL: + // event inside of bounds: trigger the MOUSE_WHEEL callback + if (eventInBounds) { + // trigger the corresponding callback + if (triggerEvent(handlers, e.type, e, e.pointerId)) { + handled = true; + break; + } + } + break; } } });
fix: mouse-wheel events were ignored
diff --git a/hashmap.go b/hashmap.go index <HASH>..<HASH> 100644 --- a/hashmap.go +++ b/hashmap.go @@ -157,11 +157,24 @@ func (m *HashMap) DelHashedKey(hashedKey uintptr) { return } - _, element := m.indexElement(hashedKey) + // inline HashMap.searchItem() + var element *ListElement +ElementLoop: + for _, element = m.indexElement(hashedKey); element != nil; element = element.Next() { + if element.keyHash == hashedKey { + + break ElementLoop + + } + + if element.keyHash > hashedKey { + return + } + } + if element == nil { return } - m.deleteElement(element) list.Delete(element) }
Fix delete action when using hashed key Search for the desired key in the list returned by indexElement instead of deleting the first element returned
diff --git a/src/Cathedral/Builder/EntityAbstractBuilder.php b/src/Cathedral/Builder/EntityAbstractBuilder.php index <HASH>..<HASH> 100644 --- a/src/Cathedral/Builder/EntityAbstractBuilder.php +++ b/src/Cathedral/Builder/EntityAbstractBuilder.php @@ -142,7 +142,7 @@ MBODY; // METHOD:getRelationChild $functionName = ucwords($tableName); - $method = $this->buildMethod("fetch{$functionName}"); + $method = $this->buildMethod("gather{$functionName}"); $body = <<<MBODY \${$child->tableName} = new \\{$child->namespace_model}\\{$child->modelName}(); return \${$child->tableName}->select(['fk_{$this->getNames()->tableName}' => \$this->{$this->getNames()->primary}]);
Related Tables: function changed to fetch for Single and gather for Many
diff --git a/foolbox/attacks/base.py b/foolbox/attacks/base.py index <HASH>..<HASH> 100644 --- a/foolbox/attacks/base.py +++ b/foolbox/attacks/base.py @@ -324,7 +324,7 @@ class FixedEpsilonAttack(AttackWithDistance): xpcs_ = [restore_type(xpc) for xpc in xpcs] if was_iterable: - return xps_, xpcs_, restore_type(success) + return xps_, xpcs_, restore_type(success_) else: assert len(xps_) == 1 assert len(xpcs_) == 1 @@ -428,7 +428,7 @@ class MinimizationAttack(AttackWithDistance): xpcs_ = [restore_type(xpc) for xpc in xpcs] if was_iterable: - return [xp_] * K, xpcs_, restore_type(success) + return [xp_] * K, xpcs_, restore_type(success_) else: assert len(xpcs_) == 1 return xp_, xpcs_[0], restore_type(success_.squeeze(axis=0))
fixed __call__ implementations
diff --git a/loadCSS.js b/loadCSS.js index <HASH>..<HASH> 100644 --- a/loadCSS.js +++ b/loadCSS.js @@ -33,7 +33,7 @@ function loadCSS( href, before, media, callback ){ ss.onloadcssdefined = function( cb ){ var defined; for( var i = 0; i < sheets.length; i++ ){ - if( sheets[ i ].href && sheets[ i ].href.indexOf( href ) > -1 ){ + if( sheets[ i ].href && sheets[ i ].href === ss.href ){ defined = true; } }
allow relative paths to work. fixes #<I>
diff --git a/test/worker_spec.rb b/test/worker_spec.rb index <HASH>..<HASH> 100644 --- a/test/worker_spec.rb +++ b/test/worker_spec.rb @@ -30,7 +30,7 @@ describe 'the Worker' do end teardown do - @client.close + @pusher.close end given 'valid job data is pushed' do
Fixed a bug in the Worker spec
diff --git a/make/tools/genstubs/GenStubs.java b/make/tools/genstubs/GenStubs.java index <HASH>..<HASH> 100644 --- a/make/tools/genstubs/GenStubs.java +++ b/make/tools/genstubs/GenStubs.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -316,7 +316,8 @@ public class GenStubs { } defs.add(def); } - return m.TopLevel(tree.packageAnnotations, tree.pid, defs.toList()); + tree.defs = tree.defs.intersect(defs.toList()); + return tree; } @Override
<I>: JDK-<I> breaks a bootcycle build Reviewed-by: jjg
diff --git a/lib/chef/mixin/shell_out.rb b/lib/chef/mixin/shell_out.rb index <HASH>..<HASH> 100644 --- a/lib/chef/mixin/shell_out.rb +++ b/lib/chef/mixin/shell_out.rb @@ -29,7 +29,6 @@ class Chef # we use 'en_US.UTF-8' by default because we parse localized strings in English as an API and # generally must support UTF-8 unicode. def shell_out(*args, **options) - args = args.dup options = options.dup env_key = options.has_key?(:env) ? :env : :environment options[env_key] = {
remove duping the args hash we only ever did this in order to mutate the options and with the **options syntax we don't need to do this anymore.
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 @@ -24,8 +24,7 @@ import pandas.util.testing as tm from pandas import ( Index, Series, DataFrame, isnull, date_range, Timestamp, Period, DatetimeIndex, Int64Index, to_datetime, bdate_range, Float64Index, - NaT, timedelta_range, Timedelta, _np_version_under1p8, concat, - PeriodIndex) + NaT, timedelta_range, Timedelta, _np_version_under1p8, concat) from pandas.compat import range, long, StringIO, lrange, lmap, zip, product from pandas.compat.numpy_compat import np_datetime64_compat from pandas.core.common import PerformanceWarning
PEP: fix tseries/test_timeseries.py
diff --git a/commands/pull_request.go b/commands/pull_request.go index <HASH>..<HASH> 100644 --- a/commands/pull_request.go +++ b/commands/pull_request.go @@ -72,7 +72,8 @@ pull-request -i <ISSUE> is deprecated. -l, --labels <LABELS> - Add a comma-separated list of labels to this pull request. + Add a comma-separated list of labels to this pull request. Labels will be + created if they don't already exist. ## Examples: $ hub pull-request
Update --labels documentation to show it will be created if not exists
diff --git a/src/adafruit_blinka/microcontroller/bcm283x/neopixel.py b/src/adafruit_blinka/microcontroller/bcm283x/neopixel.py index <HASH>..<HASH> 100644 --- a/src/adafruit_blinka/microcontroller/bcm283x/neopixel.py +++ b/src/adafruit_blinka/microcontroller/bcm283x/neopixel.py @@ -22,7 +22,7 @@ _buf = None def neopixel_write(gpio, buf): """NeoPixel Writing Function""" global _led_strip # we'll have one strip we init if its not at first - global _buf # we save a reference to the buf, and if it changes we will cleanup and re-initalize. + global _buf # we save a reference to the buf, and if it changes we will cleanup and re-init. if _led_strip is None or buf is not _buf: # This is safe to call since it doesn't do anything if _led_strip is None
Update neopixel.py Fix line too long.
diff --git a/salt/modules/file.py b/salt/modules/file.py index <HASH>..<HASH> 100644 --- a/salt/modules/file.py +++ b/salt/modules/file.py @@ -4358,7 +4358,7 @@ def check_perms(name, ret, user, group, mode, attrs=None, follow_symlinks=False) is_dir = os.path.isdir(name) if not salt.utils.platform.is_windows() and not is_dir and lsattr_cmd: # List attributes on file - perms['lattrs'] = ''.join(lsattr(name)[name]) + perms['lattrs'] = ''.join(lsattr(name).get('name', '')) # Remove attributes on file so changes can be enforced. if perms['lattrs']: chattr(name, operator='remove', attributes=perms['lattrs'])
use .get incase attrs are disabled on the filesystem
diff --git a/stage0/run.go b/stage0/run.go index <HASH>..<HASH> 100644 --- a/stage0/run.go +++ b/stage0/run.go @@ -32,6 +32,7 @@ import ( "path" "path/filepath" "runtime" + "strconv" "strings" "syscall" "time" @@ -152,8 +153,8 @@ func generatePodManifest(cfg PrepareConfig, dir string) ([]byte, error) { if pm.Apps.Get(*appName) != nil { return fmt.Errorf("error: multiple apps with name %s", am.Name) } - if am.App == nil { - return fmt.Errorf("error: image %s has no app section", img) + if am.App == nil && app.Exec == "" { + return fmt.Errorf("error: image %s has no app section and --exec argument is not provided", img) } ra := schema.RuntimeApp{ // TODO(vc): leverage RuntimeApp.Name for disambiguating the apps @@ -167,6 +168,13 @@ func generatePodManifest(cfg PrepareConfig, dir string) ([]byte, error) { } if execOverride := app.Exec; execOverride != "" { + // Create a minimal App section if not present + if am.App == nil { + ra.App = &types.App{ + User: strconv.Itoa(os.Getuid()), + Group: strconv.Itoa(os.Getgid()), + } + } ra.App.Exec = []string{execOverride} }
stage0: create app section if we override exec When an image doesn't have an App section and we override exec with the --exec flag we should create a minimal App section instead of failing. This would fail with a missing app section error: rkt run image-without-app-section.aci But this would succeed and exec the specified command if it exists in the image: rkt run image-without-app-section.aci --exec /bin/sh
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -78,7 +78,7 @@ setup( 'h5py', 'wavio', 'typing', - 'prettyparse>=0.1.4', + 'prettyparse<1.0', 'precise-runner', 'attrs', 'fitipy',
Lock parser version (#<I>) This prevents major errors
diff --git a/server.js b/server.js index <HASH>..<HASH> 100644 --- a/server.js +++ b/server.js @@ -42,7 +42,6 @@ app.get(/^\/proxy\/(.+)$/, function(req, res) { remoteUrl += url.substring(queryStartIndex); } - console.log(remoteUrl); request.get(remoteUrl).pipe(res); });
Don't print URL on every request.
diff --git a/lib/sandbox/pmapi.js b/lib/sandbox/pmapi.js index <HASH>..<HASH> 100644 --- a/lib/sandbox/pmapi.js +++ b/lib/sandbox/pmapi.js @@ -2,11 +2,11 @@ var EXECUTION_ASSERTION_EVENT = 'execution.assertion', EXECUTION_ASSERTION_EVENT_BASE = 'execution.assertion.', _ = require('lodash'), - VariableScope = require('postman-collection').VariableScope, - PostmanRequest = require('postman-collection').Request, - PostmanResponse = require('postman-collection').Response, + sdk = require('postman-collection'), + VariableScope = sdk.VariableScope, + PostmanRequest = sdk.Request, + PostmanResponse = sdk.Response, chai = require('chai'), - chaiPostman = require('./chai-postman'), /** * Use this function to assign readonly properties to an object @@ -142,7 +142,7 @@ Postman = function Postman (bridge, execution, onRequest) { Postman.prototype.expect = chai.expect; // make chai use postman extension -chai.use(chaiPostman); +chai.use(require('chai-postman')(sdk)); // export module.exports = Postman;
Replaced in-house chai assertions with chai-postman
diff --git a/iavl/iavl_proof2.go b/iavl/iavl_proof2.go index <HASH>..<HASH> 100644 --- a/iavl/iavl_proof2.go +++ b/iavl/iavl_proof2.go @@ -174,7 +174,9 @@ type KeyRangeProof struct { func (proof *KeyRangeProof) Verify( startKey, endKey []byte, keys, values [][]byte, root []byte, ) error { - // TODO: Check that range is what we asked for. + if len(proof.PathToKeys) != len(keys) || len(values) != len(keys) { + return errors.New("wrong number of keys or values for proof") + } if len(proof.PathToKeys) == 0 { if proof.LeftPath == nil || proof.RightPath == nil {
Make sure length of keys/values is equal
diff --git a/Cloner/Cloner.php b/Cloner/Cloner.php index <HASH>..<HASH> 100644 --- a/Cloner/Cloner.php +++ b/Cloner/Cloner.php @@ -19,7 +19,6 @@ use Doctrine\Common\Collections\ArrayCollection; use Doctrine\Common\Collections\Collection; use Doctrine\Common\Util\ClassUtils; use Symfony\Component\EventDispatcher\EventDispatcherInterface; -use Symfony\Component\PropertyAccess\Exception\NoSuchPropertyException; use Symfony\Component\PropertyAccess\PropertyAccessorInterface; /** @@ -130,7 +129,7 @@ class Cloner implements ClonerInterface $this->propertyAccessor->setValue($clone, $property, $valueCopy); continue; - } catch (NoSuchPropertyException $ex) { + } catch (\Exception $ex) { } try { $reflectionProperty = $reflectionClass->getProperty($property);
Cloner: catch all exceptions instead of no such property exception (can be thrown in magic methods).
diff --git a/Gruntfile.js b/Gruntfile.js index <HASH>..<HASH> 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -291,6 +291,7 @@ module.exports = function (grunt) { 'test/less/*.less', // Don't test NPM import, obviously '!test/less/plugin-module.less', + '!test/less/import-module.less', '!test/less/javascript.less', '!test/less/urls.less', '!test/less/empty.less'
Exclude import-module from browsert test as node_modules will not be in browser
diff --git a/javamelody-core/src/main/java/net/bull/javamelody/internal/model/TransportFormat.java b/javamelody-core/src/main/java/net/bull/javamelody/internal/model/TransportFormat.java index <HASH>..<HASH> 100644 --- a/javamelody-core/src/main/java/net/bull/javamelody/internal/model/TransportFormat.java +++ b/javamelody-core/src/main/java/net/bull/javamelody/internal/model/TransportFormat.java @@ -139,7 +139,7 @@ public enum TransportFormat { if (json) { // format json xstream = new XStream(new JsonHierarchicalStreamDriver()); - xstream.setMode(XStream.NO_REFERENCES); + // #884 removed xstream.setMode(XStream.NO_REFERENCES); } else { // sinon format xml, utilise la dépendance XPP3 par défaut xstream = new XStream();
fix #<I> CircularReferenceException in External API with JSON for current requests
diff --git a/src/components/splitbutton/SplitButtonItem.js b/src/components/splitbutton/SplitButtonItem.js index <HASH>..<HASH> 100644 --- a/src/components/splitbutton/SplitButtonItem.js +++ b/src/components/splitbutton/SplitButtonItem.js @@ -32,7 +32,13 @@ export class SplitButtonItem extends Component { e.preventDefault(); } - render() { + renderSeparator() { + return ( + <li className="p-menu-separator" role="separator"></li> + ); + } + + renderMenuitem() { let { disabled, icon, label, template } = this.props.menuitem; const className = classNames('p-menuitem-link', { 'p-disabled': disabled }); const itemContent = template ? ObjectUtils.getJSXElement(template, this.props.menuitem) : null; @@ -49,4 +55,18 @@ export class SplitButtonItem extends Component { </li> ); } + + renderItem() { + if (this.props.menuitem.separator) { + return this.renderSeparator(); + } + + return this.renderMenuitem(); + } + + render() { + const item = this.renderItem(); + + return item; + } }
Fixed #<I> - Add separator support to SplitButton
diff --git a/views/layouts/default.html.php b/views/layouts/default.html.php index <HASH>..<HASH> 100644 --- a/views/layouts/default.html.php +++ b/views/layouts/default.html.php @@ -15,7 +15,6 @@ <?=$this->html->link('Icon', null, array('type' => 'icon')); ?> <?=$this->html->script(array( '//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.1/jquery.min.js', - '//cdnjs.cloudflare.com/ajax/libs/jqueryui/1.10.4/jquery-ui.min.js', '//cdnjs.cloudflare.com/ajax/libs/highlight.js/8.0/highlight.min.js', '//cdnjs.cloudflare.com/ajax/libs/highlight.js/8.0/languages/php.min.js' )); ?>
Removing jquery ui dependency.
diff --git a/src/main/java/com/greatmancode/craftconomy3/converter/ConverterList.java b/src/main/java/com/greatmancode/craftconomy3/converter/ConverterList.java index <HASH>..<HASH> 100644 --- a/src/main/java/com/greatmancode/craftconomy3/converter/ConverterList.java +++ b/src/main/java/com/greatmancode/craftconomy3/converter/ConverterList.java @@ -24,6 +24,7 @@ public class ConverterList { public static HashMap<String,Converter> converterList = new HashMap<String,Converter>(); public ConverterList() { - converterList.put("iconomy", new Iconomy6()); + converterList.put("iconomy6", new Iconomy6()); + converterList.put("craftconomy2", new Craftconomy2()); } }
Load the converter for Craftconomy. Renamed iconomy to iconomy6.
diff --git a/asammdf/gui/widgets/list.py b/asammdf/gui/widgets/list.py index <HASH>..<HASH> 100644 --- a/asammdf/gui/widgets/list.py +++ b/asammdf/gui/widgets/list.py @@ -405,7 +405,7 @@ class MinimalListWidget(QtWidgets.QListWidget): super().__init__(*args, **kwargs) - self.setDragDropMode(QtWidgets.QAbstractItemView.DragDrop) + self.setDragDropMode(QtWidgets.QAbstractItemView.InternalMove) self.setSelectionMode(QtWidgets.QAbstractItemView.ExtendedSelection) self.setAlternatingRowColors(True) diff --git a/requirements.txt b/requirements.txt index <HASH>..<HASH> 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,3 +4,4 @@ numexpr numpy>=1.21 pandas typing_extensions +isal diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -108,7 +108,7 @@ setup( "natsort", "psutil", "PyQt5>=5.15.0", - "pyqtgraph>=0.12.1", + "pyqtgraph>=0.12.3", "pyqtlet", "PyQtWebEngine", ],
fix drag and drop in the minimal list needs pyqtgraph <I>
diff --git a/spec/guard/listeners/linux_spec.rb b/spec/guard/listeners/linux_spec.rb index <HASH>..<HASH> 100644 --- a/spec/guard/listeners/linux_spec.rb +++ b/spec/guard/listeners/linux_spec.rb @@ -24,6 +24,7 @@ describe Guard::Linux do describe "#start", :long_running => true do before(:each) do @listener = Guard::Linux.new + @listener.instance_variable_get(:@inotify).stub(:process) end it "calls watch_change on the first start" do @@ -40,7 +41,6 @@ describe Guard::Linux do start @listener.unstub!(:stop) stop - sleep 1 @listener.should_not be_watch_change end end
Stub inotify.process for control flow test. This is necessary, since JRuby doesn't exit process until an event is received.
diff --git a/src/FM/Keystone/Client/Factory.php b/src/FM/Keystone/Client/Factory.php index <HASH>..<HASH> 100644 --- a/src/FM/Keystone/Client/Factory.php +++ b/src/FM/Keystone/Client/Factory.php @@ -93,6 +93,11 @@ class Factory implements EventSubscriberInterface /** @var \Guzzle\Http\Message\Request $request */ $request = $event['request']; + // if this is the token-url, stop now because we won't be able to fetch a token + if ($request->getUrl() === $request->getClient()->getTokenUrl()) { + return; + } + // see if we have retries left if ($request->hasHeader('X-Auth-Retries')) { $headerValues = $request->getHeader('X-Auth-Retries')->toArray();
Fixed a bug which could cause infinite recursion when obtaining a token
diff --git a/lib/chef/http/validate_content_length.rb b/lib/chef/http/validate_content_length.rb index <HASH>..<HASH> 100644 --- a/lib/chef/http/validate_content_length.rb +++ b/lib/chef/http/validate_content_length.rb @@ -61,6 +61,7 @@ class Chef else validate(http_response, @content_length_counter.content_length) end + @content_length_counter = nil # XXX: quickfix to CHEF-5100 return [http_response, rest_request, return_value] end
CHEF-<I>: reset state for streamed downloads quick fix to "free" our state from one streamed download request so that we don't pollute the state of the next streamed request.
diff --git a/selene/core/match.py b/selene/core/match.py index <HASH>..<HASH> 100644 --- a/selene/core/match.py +++ b/selene/core/match.py @@ -22,15 +22,15 @@ import warnings from typing import List, Any -from selene.core import query from selene.common import predicate +from selene.core import query from selene.core.condition import Condition -from selene.core.entity import Collection, Element, Browser from selene.core.conditions import ( ElementCondition, CollectionCondition, BrowserCondition, ) +from selene.core.entity import Collection, Element, Browser # todo: consider moving to selene.match.element.is_visible, etc... element_is_visible: Condition[Element] = ElementCondition.raise_if_not( @@ -464,7 +464,8 @@ def browser_has_tabs_number_less_than_or_equal( def browser_has_js_returned( - expected: Any, script: str, *args) -> Condition[Browser]: + expected: Any, script: str, *args +) -> Condition[Browser]: def script_result(browser: Browser): return browser.driver.execute_script(script, *args)
fix selene/core/match.py:<I>:5: E<I> continuation line with same indent as next logical line
diff --git a/src/main/java/org/psjava/ds/geometry/PointByXYComparator.java b/src/main/java/org/psjava/ds/geometry/PointByXYComparator.java index <HASH>..<HASH> 100644 --- a/src/main/java/org/psjava/ds/geometry/PointByXYComparator.java +++ b/src/main/java/org/psjava/ds/geometry/PointByXYComparator.java @@ -6,15 +6,9 @@ import org.psjava.util.SeriesComparator; public class PointByXYComparator { + @SuppressWarnings("unchecked") public static <T> Comparator<Point2D<T>> create(Comparator<T> comp) { - @SuppressWarnings("unchecked") - final Comparator<Point2D<T>> series = SeriesComparator.create(PointByXComparator.create(comp), PointByYComparator.create(comp)); - return new Comparator<Point2D<T>>() { - @Override - public int compare(Point2D<T> o1, Point2D<T> o2) { - return series.compare(o1, o2); - } - }; + return SeriesComparator.create(PointByXComparator.create(comp), PointByYComparator.create(comp)); } private PointByXYComparator() {
refactoring - make code simpler PointByXYComparator
diff --git a/packages/cli/src/util.js b/packages/cli/src/util.js index <HASH>..<HASH> 100644 --- a/packages/cli/src/util.js +++ b/packages/cli/src/util.js @@ -62,9 +62,5 @@ export function formatExportName(name) { return `Svg${name}` } - if (/[-]/g.test(name)) { - return camelcase(name, { pascalCase: true }) - } - - return name + return camelcase(name, { pascalCase: true }) } diff --git a/packages/cli/src/util.test.js b/packages/cli/src/util.test.js index <HASH>..<HASH> 100644 --- a/packages/cli/src/util.test.js +++ b/packages/cli/src/util.test.js @@ -34,6 +34,7 @@ describe('util', () => { describe('#formatExportName', () => { it('should ensure a valid export name', () => { + expect(formatExportName('foo')).toBe('Foo') expect(formatExportName('foo-bar')).toBe('FooBar') expect(formatExportName('2foo')).toBe('Svg2foo') expect(formatExportName('2foo-bar')).toBe('Svg2FooBar')
fix: formatExportName for single names (#<I>)
diff --git a/pkg/services/notifications/notifications.go b/pkg/services/notifications/notifications.go index <HASH>..<HASH> 100644 --- a/pkg/services/notifications/notifications.go +++ b/pkg/services/notifications/notifications.go @@ -48,7 +48,7 @@ func Init() error { } if !util.IsEmail(setting.Smtp.FromAddress) { - return errors.New("Invalid email address for smpt from_adress config") + return errors.New("Invalid email address for smpt from_address config") } if setting.EmailCodeValidMinutes == 0 {
s/from_adress/from_address
diff --git a/cdrouter/configs.py b/cdrouter/configs.py index <HASH>..<HASH> 100644 --- a/cdrouter/configs.py +++ b/cdrouter/configs.py @@ -248,7 +248,7 @@ class ConfigsService(object): :rtype: string """ - return self.service.get(self.base, params={'template': 'default'}).text + return self.service.get(self.base, params={'template': 'default'}).json()['data'] def get(self, id): # pylint: disable=invalid-name,redefined-builtin """Get a config.
Fix ConfigsService.get_new method Fix the ConfigsService.get_new method such that it returns just the plain-text contents of a new config file and not the full JSON object response as a string.
diff --git a/geth/wrapper.py b/geth/wrapper.py index <HASH>..<HASH> 100644 --- a/geth/wrapper.py +++ b/geth/wrapper.py @@ -89,7 +89,8 @@ def construct_test_chain_kwargs(**overrides): overrides.setdefault('ipc_api', ALL_APIS) overrides.setdefault('verbosity', '5') - overrides.setdefault('shh', True) + if 'shh' in overrides: + overrides.setdefault('shh', overrides['shh']) return overrides
Shh is enabled only when it is passed in overrides
diff --git a/dfs/snapshot.go b/dfs/snapshot.go index <HASH>..<HASH> 100644 --- a/dfs/snapshot.go +++ b/dfs/snapshot.go @@ -40,6 +40,13 @@ func (dfs *DistributedFilesystem) Snapshot(data SnapshotInfo) (string, error) { glog.Errorf("Could not find image %s for snapshot: %s", image, err) return "", err } + + // make sure we actually have the image locally before changing the tag and triggering a push + if _, err := dfs.reg.FindImage(rImage); err != nil { + glog.Errorf("Could not find image %s locally for snapshot: %s", rImage.String(), err) + return "", err + } + rImage.Tag = label if err := dfs.index.PushImage(rImage.String(), rImage.UUID, rImage.Hash); err != nil { glog.Errorf("Could not retag image %s for snapshot: %s", image, err)
When performing a snapshot, make sure we have the images locally before tagging them in the registry and triggering a push
diff --git a/bookstore/publish.py b/bookstore/publish.py index <HASH>..<HASH> 100644 --- a/bookstore/publish.py +++ b/bookstore/publish.py @@ -2,7 +2,7 @@ import json import aiobotocore - +from botocore.exceptions import ClientError from nbformat import ValidationError, validate as validate_nb from notebook.base.handlers import APIHandler, path_regex from notebook.services.contents.handlers import validate_model @@ -90,11 +90,15 @@ class BookstorePublishAPIHandler(APIHandler): region_name=self.bookstore_settings.s3_region_name, ) as client: self.log.info("Processing published write of %s", path) - obj = await client.put_object( - Bucket=self.bookstore_settings.s3_bucket, - Key=s3_object_key, - Body=json.dumps(content), - ) + try: + obj = await client.put_object( + Bucket=self.bookstore_settings.s3_bucket, + Key=s3_object_key, + Body=json.dumps(content), + ) + except ClientError as e: + status_code = e.response['ResponseMetadata'].get('HTTPStatusCode') + raise web.HTTPError(status_code, e.args[0]) self.log.info("Done with published write of %s", path) resp_content = self.prepare_response(path, obj)
Add error handling we use in clone for catching & converting s3 errors
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -9,9 +9,9 @@ if __name__ == '__main__': setup( version='0.1.dev4', name='pyinfra', - description='Stateful deploy with Python.', - author='Nick @ Oxygem', - author_email='nick@oxygem.com', + description='Deploy stuff by diff-ing the state you want against the remote server.', + author='Nick / Fizzadar', + author_email='pointlessrambler@gmail.com', url='http://github.com/Fizzadar/pyinfra', packages=[ 'pyinfra',
Updated author/name/desc.
diff --git a/src/Symfony/Component/HttpKernel/Kernel.php b/src/Symfony/Component/HttpKernel/Kernel.php index <HASH>..<HASH> 100644 --- a/src/Symfony/Component/HttpKernel/Kernel.php +++ b/src/Symfony/Component/HttpKernel/Kernel.php @@ -76,12 +76,12 @@ abstract class Kernel implements KernelInterface, RebootableInterface, Terminabl private static $freshCache = []; - const VERSION = '4.4.0-RC1'; + const VERSION = '4.4.0-DEV'; const VERSION_ID = 40400; const MAJOR_VERSION = 4; const MINOR_VERSION = 4; const RELEASE_VERSION = 0; - const EXTRA_VERSION = 'RC1'; + const EXTRA_VERSION = 'DEV'; const END_OF_MAINTENANCE = '11/2022'; const END_OF_LIFE = '11/2023';
bumped Symfony version to <I>
diff --git a/lib/ruote/engine.rb b/lib/ruote/engine.rb index <HASH>..<HASH> 100644 --- a/lib/ruote/engine.rb +++ b/lib/ruote/engine.rb @@ -331,12 +331,12 @@ module Ruote # This operation is substantially less costly than Engine#processes (though # the 'how substantially' depends on the storage chosen). # - def process_wfids + def process_ids @context.storage.expression_wfids({}) end - alias process_ids process_wfids + alias process_wfids process_ids # Shuts down the engine, mostly passes the shutdown message to the other # services and hope they'll shut down properly.
prefer Engine#process_ids over #process_wfids
diff --git a/src/test/php/ParseTest.php b/src/test/php/ParseTest.php index <HASH>..<HASH> 100644 --- a/src/test/php/ParseTest.php +++ b/src/test/php/ParseTest.php @@ -643,7 +643,7 @@ class ParseTest extends \PHPUnit_Framework_TestCase [['foo', 'bar', 'baz'], '[foo|bar|baz]'], [[1, 2, 3, 4, 5], '1..5'], [['a', 'b', 'c', 'd', 'e'], 'a..e'], - [new \ReflectionClass($this), __CLASS__ . '.class'], + [new \ReflectionClass(__CLASS__), __CLASS__ . '.class'], [MyClass::TEST_CONSTANT, MyClass::class . '::TEST_CONSTANT'], ['just a string', 'just a string'] ];
don't use instance, will yield another result on HHVM
diff --git a/src/Text.php b/src/Text.php index <HASH>..<HASH> 100644 --- a/src/Text.php +++ b/src/Text.php @@ -25,13 +25,9 @@ class Text extends Element } /** The maximum length of the field. */ - public function maxLength($length, $size = null) + public function maxLength($length) { - if (!isset($size)) { - $size = min(32, $length); - } $this->attributes['maxlength'] = (int)$length; - $this->attributes['size'] = (int)$size; return $this->addTest('maxlength', function($value) use ($length) { return mb_strlen(trim($value), 'UTF-8') <= (int)$length; });
we have a separate method for size, so this is bollocks
diff --git a/lib/atomo/ast/global.rb b/lib/atomo/ast/global.rb index <HASH>..<HASH> 100644 --- a/lib/atomo/ast/global.rb +++ b/lib/atomo/ast/global.rb @@ -4,7 +4,7 @@ module Atomo g.sp = g.kleene g.any(" ", "\n", :comment) g.sig_sp = g.many g.any(" ", "\n", :comment) - ident_start = /(?![&@#$~`:])[\p{L}\p{S}_!@#%&*\-.\/\?]/u + ident_start = /(?![&@#\$~`:])[\p{L}\p{S}_!@#%&*\-.\/\?]/u ident_letters = /((?!`)[\p{L}\p{S}_!@#%&*\-.\/\?])*/u g.identifier = @@ -16,7 +16,7 @@ module Atomo c + cs end - op_start = /(?![@#$~`])[\p{S}!@#%&*\-.\/\?:]/u + op_start = /(?![@#\$~`])[\p{S}!@#%&*\-.\/\?:]/u op_letters = /((?!`)[\p{S}!@#%&*\-.\/\?:])*/u g.operator =
corrected $ being allowed at the start of identifier/operator names
diff --git a/FML/Script/Builder.php b/FML/Script/Builder.php index <HASH>..<HASH> 100644 --- a/FML/Script/Builder.php +++ b/FML/Script/Builder.php @@ -49,10 +49,10 @@ abstract class Builder { if (!fmod($value, 1)) $stringVal .= '.'; return $stringVal; } - + /** * Get the Boolean String-Representation of the given Value - * + * * @param bool $value The Value to convert to a ManiaScript Boolean * @return string */ @@ -63,4 +63,31 @@ abstract class Builder { } return "False"; } + + /** + * Get the Include Command for the given File and Namespace + * + * @param string $file Include File + * @param string $namespace Include Namespace + * @return string + */ + public static function getInclude($file, $namespace) { + $includeText = "#Include \"{$file}\" as {$namespace}" . PHP_EOL; + return $includeText; + } + + /** + * Get the Constant Command for the given Name and Value + * + * @param string $name Constant Name + * @param string $value Constant Value + * @return string + */ + public static function getConstant($name, $value) { + if (is_string($value)) { + $value = '"' . $value . '"'; + } + $constantText = "#Const {$name} {$value}" . PHP_EOL; + return $constantText; + } }
added methods for include & constant commands
diff --git a/modules/citrus-ftp/src/main/java/com/consol/citrus/ftp/client/ScpClientBuilder.java b/modules/citrus-ftp/src/main/java/com/consol/citrus/ftp/client/ScpClientBuilder.java index <HASH>..<HASH> 100644 --- a/modules/citrus-ftp/src/main/java/com/consol/citrus/ftp/client/ScpClientBuilder.java +++ b/modules/citrus-ftp/src/main/java/com/consol/citrus/ftp/client/ScpClientBuilder.java @@ -65,6 +65,19 @@ public class ScpClientBuilder extends AbstractEndpointBuilder<ScpClient> { } /** + * Sets the auto read files property. + * + * @param autoReadFiles + * @return + * @deprecated received files are always read automatically making this flag obsolete + */ + @Deprecated + public ScpClientBuilder autoReadFiles(boolean autoReadFiles) { + endpoint.getEndpointConfiguration().setAutoReadFiles(autoReadFiles); + return this; + } + + /** * Sets the client username. * @param username * @return
(#<I>) reverted removal of autoReadFiles method to prevent breaking change
diff --git a/ui/src/shared/functions.js b/ui/src/shared/functions.js index <HASH>..<HASH> 100644 --- a/ui/src/shared/functions.js +++ b/ui/src/shared/functions.js @@ -1,7 +1,6 @@ module.exports = { remCalc: function(values) { - values = values.replace('px', ''); - values = values.split(' '); + values = values.replace('px', '').split(' '); let outputRems = ''; const base = 16;
refactoring rem function
diff --git a/safe/definitions/fields.py b/safe/definitions/fields.py index <HASH>..<HASH> 100644 --- a/safe/definitions/fields.py +++ b/safe/definitions/fields.py @@ -1161,6 +1161,8 @@ from safe.definitions.minimum_needs import minimum_needs_fields # noqa count_fields = [ feature_value_field, population_count_field, + displaced_field, + fatalities_field, female_count_field, male_count_field, youth_count_field,
add displaced and fatalities to count_fields
diff --git a/core/model/src/main/java/it/unibz/inf/ontop/iq/node/normalization/impl/LeftJoinNormalizerImpl.java b/core/model/src/main/java/it/unibz/inf/ontop/iq/node/normalization/impl/LeftJoinNormalizerImpl.java index <HASH>..<HASH> 100644 --- a/core/model/src/main/java/it/unibz/inf/ontop/iq/node/normalization/impl/LeftJoinNormalizerImpl.java +++ b/core/model/src/main/java/it/unibz/inf/ontop/iq/node/normalization/impl/LeftJoinNormalizerImpl.java @@ -638,6 +638,7 @@ public class LeftJoinNormalizerImpl implements LeftJoinNormalizer { ImmutableSubstitution<Constant> nullSubstitution = substitutionFactory.getSubstitution( immutableTerm.getVariableStream() .filter(v -> !leftVariables.contains(v)) + .distinct() .collect(ImmutableCollectors.toMap( v -> v, v -> termFactory.getNullConstant())));
Minor bugfix in LeftJoinNormalizerImpl.
diff --git a/pynes/tests/clc_test.py b/pynes/tests/clc_test.py index <HASH>..<HASH> 100644 --- a/pynes/tests/clc_test.py +++ b/pynes/tests/clc_test.py @@ -10,13 +10,12 @@ from pynes.compiler import lexical, syntax, semantic class ClcTest(unittest.TestCase): - def test_clc_sngl(self): tokens = lexical('CLC') - self.assertEquals(1 , len(tokens)) + self.assertEquals(1, len(tokens)) self.assertEquals('T_INSTRUCTION', tokens[0]['type']) ast = syntax(tokens) - self.assertEquals(1 , len(ast)) + self.assertEquals(1, len(ast)) self.assertEquals('S_IMPLIED', ast[0]['type']) code = semantic(ast) - self.assertEquals(code, [0x18]) \ No newline at end of file + self.assertEquals(code, [0x18])
PEP8 fixes on tests/clc_test.py
diff --git a/src/Layers/BasemapLayer.js b/src/Layers/BasemapLayer.js index <HASH>..<HASH> 100644 --- a/src/Layers/BasemapLayer.js +++ b/src/Layers/BasemapLayer.js @@ -156,6 +156,10 @@ bounds: null, zoom: null, onAdd: function(map){ + if(!map.attributionControl && console){ + console.warn("L.esri.BasemapLayer requires attribution. Please set attributionControl to true on your map"); + return; + } L.TileLayer.prototype.onAdd.call(this, map); if(this._dynamicAttribution){ this.on("load", this._handleTileUpdates, this);
fail with a console.warn to fix #<I>
diff --git a/resources/api/src/main/java/org/jboss/forge/addon/resource/AbstractFileResource.java b/resources/api/src/main/java/org/jboss/forge/addon/resource/AbstractFileResource.java index <HASH>..<HASH> 100644 --- a/resources/api/src/main/java/org/jboss/forge/addon/resource/AbstractFileResource.java +++ b/resources/api/src/main/java/org/jboss/forge/addon/resource/AbstractFileResource.java @@ -435,7 +435,15 @@ public abstract class AbstractFileResource<T extends FileResource<T>> extends Ab protected FileResourceOperations getFileOperations() { - ResourceTransaction transaction = resourceFactory.getTransaction(); + ResourceTransaction transaction; + try + { + transaction = resourceFactory.getTransaction(); + } + catch (UnsupportedOperationException uoe) + { + return DefaultFileOperations.INSTANCE; + } if (transaction.isStarted()) { // TODO: how will other resource types participate in a transaction? XA?
Returning default FileOperations if ResourceFactory impl does not support transactions
diff --git a/tests/Imbo/IntegrationTest/Cache/APCTest.php b/tests/Imbo/IntegrationTest/Cache/APCTest.php index <HASH>..<HASH> 100644 --- a/tests/Imbo/IntegrationTest/Cache/APCTest.php +++ b/tests/Imbo/IntegrationTest/Cache/APCTest.php @@ -18,8 +18,8 @@ use Imbo\Cache\APC; */ class APCTest extends CacheTests { protected function getDriver() { - if (!extension_loaded('apc')) { - $this->markTestSkipped('APC is not installed'); + if (!extension_loaded('apc') && !extension_loaded('apcu')) { + $this->markTestSkipped('APC(u) is not installed'); } if (!ini_get('apc.enable_cli')) {
Allow the usage of pecl/apcu as well
diff --git a/src/edeposit/amqp/storage/settings.py b/src/edeposit/amqp/storage/settings.py index <HASH>..<HASH> 100755 --- a/src/edeposit/amqp/storage/settings.py +++ b/src/edeposit/amqp/storage/settings.py @@ -45,7 +45,12 @@ PRIVATE_INDEX_PASSWORD = "" #: Password for private index. You HAVE TO set it. PUBLIC_DIR = "" #: Path to the directory for public publications. PRIVATE_DIR = "" #: Path to the private directory, for non-downloadabe pubs. -ARCHIVE_DIR = "" #: Path to the directory, where the archives will be stored +ARCHIVE_DIR = "" #: Path to the directory, where the archives will be stored. + +#: Path to the file saved on HNAS, which is used to indicate that HNAS is +#: mounted. +HNAS_INDICATOR = "" +HNAS_IND_ALLOWED = True #: Should the HNAS indicator be used or not? WEB_ADDR = "localhost" #: Address where the webserver should listen. WEB_PORT = 8080 #: Port for the webserver.
#<I>: Added two new options HNAS_INDICATOR and HNAS_IND_ALLOWED.
diff --git a/raven/base.py b/raven/base.py index <HASH>..<HASH> 100644 --- a/raven/base.py +++ b/raven/base.py @@ -443,7 +443,8 @@ class Client(object): interfaces. Any key which contains a '.' will be assumed to be a data interface. :param date: the datetime of this event - :param time_spent: a float value representing the duration of the event + :param time_spent: a integer value representing the duration of the + event (in milliseconds) :param event_id: a 32-length unique string identifying this event :param extra: a dictionary of additional standard metadata :param culprit: a string representing the cause of this event
clarify time_spent, and note that it should be an integer
diff --git a/skorch/exceptions.py b/skorch/exceptions.py index <HASH>..<HASH> 100644 --- a/skorch/exceptions.py +++ b/skorch/exceptions.py @@ -1,11 +1,13 @@ """Contains skorch-specific exceptions and warnings.""" +from sklearn.exceptions import NotFittedError + class SkorchException(BaseException): """Base skorch exception.""" -class NotInitializedError(SkorchException): +class NotInitializedError(SkorchException, NotFittedError): """Module is not initialized, please call the ``.initialize`` method or train the model by calling ``.fit(...)``.
NotInitializedError inherits from NotFittedError (#<I>) This ensures that a user can catch the sklearn `NotFittedError`, just as they can with regular sklearn estimators. As discussed in [1]. [1] <URL>
diff --git a/dramatiq/results/backends/redis.py b/dramatiq/results/backends/redis.py index <HASH>..<HASH> 100644 --- a/dramatiq/results/backends/redis.py +++ b/dramatiq/results/backends/redis.py @@ -31,7 +31,7 @@ class RedisBackend(ResultBackend): client(Redis): An optional client. If this is passed, then all other parameters are ignored. url(str): An optional connection URL. If both a URL and - connection paramters are provided, the URL is used. + connection parameters are provided, the URL is used. **parameters(dict): Connection parameters are passed directly to :class:`redis.Redis`.
doc: added missing character in docstring (#<I>)
diff --git a/test/test_transforms.py b/test/test_transforms.py index <HASH>..<HASH> 100644 --- a/test/test_transforms.py +++ b/test/test_transforms.py @@ -1852,8 +1852,10 @@ def test_randomperspective(): ) +@pytest.mark.parametrize("seed", range(10)) @pytest.mark.parametrize("mode", ["L", "RGB", "F"]) -def test_randomperspective_fill(mode): +def test_randomperspective_fill(mode, seed): + torch.random.manual_seed(seed) # assert fill being either a Sequence or a Number with pytest.raises(TypeError):
Set seed of test_randomperspective_fill (#<I>) * setting <I> seeds, let's see if it fails * Passed with <I>, so setting <I>
diff --git a/bpc8583/transaction.py b/bpc8583/transaction.py index <HASH>..<HASH> 100644 --- a/bpc8583/transaction.py +++ b/bpc8583/transaction.py @@ -55,7 +55,8 @@ class Transaction(): self.IsoMessage.FieldData(35, self.card.get_track2()) else: - return + print('Unknown transaction type: {}'.format(_type)) + return None # Common message fields: self.IsoMessage.FieldData(7, get_datetime())
Showing 'Unknown transaction type:'
diff --git a/spyder/plugins/explorer/widgets/explorer.py b/spyder/plugins/explorer/widgets/explorer.py index <HASH>..<HASH> 100644 --- a/spyder/plugins/explorer/widgets/explorer.py +++ b/spyder/plugins/explorer/widgets/explorer.py @@ -433,7 +433,24 @@ class DirView(QTreeView): def create_file_new_actions(self, fnames): """Return actions for submenu 'New...'""" - root_path = self.fsmodel.rootPath() + if not fnames: + root_path = self.fsmodel.rootPath() + else: + # Verify if the user is trying to add something new inside a folder + # so it can be added in that folder and not in the rootpath + # See spyder-ide/spyder#13444 + level_list = [] + current_index = self.currentIndex() + if current_index.isValid(): + level_list.append(current_index.data()) + + while current_index.isValid(): + current_index = current_index.parent() + if current_index.data() is not None: + level_list.insert(0, current_index.data()) + + root_path = osp.join(*level_list) + new_file_act = create_action(self, _("File..."), icon=ima.icon('TextFileIcon'), triggered=lambda:
Add support for adding new files/folders/etc in the selected directory on the explorer tree
diff --git a/hvac/v1/__init__.py b/hvac/v1/__init__.py index <HASH>..<HASH> 100644 --- a/hvac/v1/__init__.py +++ b/hvac/v1/__init__.py @@ -44,7 +44,7 @@ class Client(object): """ return self._get('/v1/sys/init').json()['initialized'] - def initialize(self, secret_shares=5, secret_threshold=3): + def initialize(self, secret_shares=5, secret_threshold=3, pgp_keys=None): """ PUT /sys/init """ @@ -53,6 +53,12 @@ class Client(object): 'secret_threshold': secret_threshold, } + if pgp_keys: + if len(pgp_keys) != secret_shares: + raise ValueError('Length of pgp_keys must equal secret shares') + + params['pgp_keys'] = pgp_keys + return self._put('/v1/sys/init', json=params).json() @property
Add support for PGP encryption for unseal keys Added in Vault <I>
diff --git a/tests/FontAwesomeTest.php b/tests/FontAwesomeTest.php index <HASH>..<HASH> 100755 --- a/tests/FontAwesomeTest.php +++ b/tests/FontAwesomeTest.php @@ -11,7 +11,7 @@ class FontAwesomeTest extends \PHPUnit_Framework_TestCase { public function testCdnLinkOutput() { - $this->expectOutputString('<link href="//netdna.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet">'); + $this->expectOutputString('<link href="//netdna.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css" rel="stylesheet">'); echo FontAwesome::css(); }
Update FontAwesomeTest.php Fixing the test for the CDN output verification.
diff --git a/lib/init/build.js b/lib/init/build.js index <HASH>..<HASH> 100644 --- a/lib/init/build.js +++ b/lib/init/build.js @@ -3,6 +3,10 @@ var utils = require('utilities') , fs = require('fs'); var init = function (app, callback) { + + if (app.config.disableBuild) { + return; + } setupModels(app); setupSharedHelpers(app);
Allow to disable build The build triggers node supervisor on OpenShift, so if you don' need it, it would be nice if it could be turned off.
diff --git a/lib/validates_formatting_of/version.rb b/lib/validates_formatting_of/version.rb index <HASH>..<HASH> 100644 --- a/lib/validates_formatting_of/version.rb +++ b/lib/validates_formatting_of/version.rb @@ -1,3 +1,3 @@ module ValidatesFormattingOf - VERSION = "0.4.1" + VERSION = "0.5.0" end
Bumped to <I> As support for MRI <I> and Ruby Enterprise Edition has been dropped, a minor version bump was in order [ci skip]
diff --git a/lib/messaging/write.rb b/lib/messaging/write.rb index <HASH>..<HASH> 100644 --- a/lib/messaging/write.rb +++ b/lib/messaging/write.rb @@ -6,7 +6,7 @@ module Messaging cls.class_exec do include Log::Dependency - dependency :message_data_writer + dependency :message_writer dependency :telemetry, ::Telemetry cls.extend Build @@ -52,7 +52,7 @@ module Messaging message_batch = Array(message_or_batch) message_data_batch = message_data_batch(message_batch, reply_stream_name) - last_position = message_data_writer.(message_data_batch, stream_name, expected_version: expected_version) + last_position = message_writer.(message_data_batch, stream_name, expected_version: expected_version) unless message_or_batch.is_a? Array logger.info(tag: :write) { "Wrote message (Position: #{last_position}, Stream Name: #{stream_name}, Type: #{message_or_batch.class.message_type}, Expected Version: #{expected_version.inspect}, Reply Stream Name: #{reply_stream_name.inspect})" }
message_writer, not message_data_writer
diff --git a/eg/color.py b/eg/color.py index <HASH>..<HASH> 100644 --- a/eg/color.py +++ b/eg/color.py @@ -86,7 +86,7 @@ class EgColorizer(): def _color_helper(self, text, pattern, repl): # < 2.7 didn't have the flags named argument. - if sys.version_info[1] < 7: + if sys.version_info < (2, 7): compiled_pattern = re.compile(pattern, re.MULTILINE) return re.sub( compiled_pattern,
Change from minor- to major/minor- aware version check
diff --git a/lib/Model.js b/lib/Model.js index <HASH>..<HASH> 100644 --- a/lib/Model.js +++ b/lib/Model.js @@ -210,6 +210,7 @@ Model.compile = function compile (name, schema, options, base) { return async function () { let args = [...arguments]; if (typeof args[args.length - 1] === "function") { + console.warning("Dynamoose Warning: Passing callback function into transaction method not allowed. Removing callback function from list of arguments."); // Callback function passed in which is not allowed, removing that from arguments list args.pop(); }
Adding warning when passing in callback function to transaction method
diff --git a/js/api.js b/js/api.js index <HASH>..<HASH> 100644 --- a/js/api.js +++ b/js/api.js @@ -353,7 +353,7 @@ window.textsecure.api = function() { } self.getMessageWebsocket = function() { - return getWebsocket(URL_CALLS['push'], true, 60000); + return getWebsocket(URL_CALLS['push'], true, 1000); } self.getTempWebsocket = function() {
Shorten websocket time out. Fixes #<I>
diff --git a/lib/arithmetic/nodes.rb b/lib/arithmetic/nodes.rb index <HASH>..<HASH> 100644 --- a/lib/arithmetic/nodes.rb +++ b/lib/arithmetic/nodes.rb @@ -11,7 +11,17 @@ module Arithmetic end def eval - BigDecimal.new(@operand) + if has_dangling_decimal_point? + BigDecimal.new(@operand + "0") + else + BigDecimal.new(@operand) + end + end + + private + + def has_dangling_decimal_point? + @operand.is_a?(String) && @operand.end_with?(".") end end diff --git a/spec/arithmetic_spec.rb b/spec/arithmetic_spec.rb index <HASH>..<HASH> 100644 --- a/spec/arithmetic_spec.rb +++ b/spec/arithmetic_spec.rb @@ -69,6 +69,10 @@ describe Arithmetic do test_eval(2).should == 2 end + it "handles dangling decimal points" do + test_eval("0.").should == 0 + end + context "invalid expressions" do it "handles blank expressions" do exp_should_error nil
handle issue with dangling decimal point
diff --git a/python/pyspark/context.py b/python/pyspark/context.py index <HASH>..<HASH> 100644 --- a/python/pyspark/context.py +++ b/python/pyspark/context.py @@ -19,6 +19,7 @@ from __future__ import print_function import os import shutil +import signal import sys from threading import Lock from tempfile import NamedTemporaryFile @@ -217,6 +218,12 @@ class SparkContext(object): else: self.profiler_collector = None + # create a signal handler which would be invoked on receiving SIGINT + def signal_handler(signal, frame): + self.cancelAllJobs() + + signal.signal(signal.SIGINT, signal_handler) + def _initialize_context(self, jconf): """ Initialize SparkContext in function to allow subclass specific initialization
[SPARK-<I>] [PYTHON] Add signal handler to trap Ctrl-C in pyspark and cancel all running jobs This patch adds a signal handler to trap Ctrl-C and cancels running job.
diff --git a/lib/bosh/gen/generators/package_generator.rb b/lib/bosh/gen/generators/package_generator.rb index <HASH>..<HASH> 100644 --- a/lib/bosh/gen/generators/package_generator.rb +++ b/lib/bosh/gen/generators/package_generator.rb @@ -61,6 +61,8 @@ module Bosh::Gen ./configure --prefix=${BOSH_INSTALL_TARGET} make make install + # Alternatively, to copy archive contents: + # cp -a #{unpack_base_path}/* $BOSH_INSTALL_TARGET SHELL end
comments to aide simple copying of pkg contents
diff --git a/poco/pocofw.py b/poco/pocofw.py index <HASH>..<HASH> 100644 --- a/poco/pocofw.py +++ b/poco/pocofw.py @@ -78,7 +78,7 @@ class Poco(PocoAccelerationMixin): expression pattern ``UI.xx`` In keyword args, you can only use `xx` or `xxMatches` at the same time. Using both with the same attribute does - not make sence. Besides, `xx` should not start with ``_`` (underscore) as attributes start with ``_`` are + not make sense. Besides, `xx` should not start with ``_`` (underscore) as attributes start with ``_`` are private attributes that used by sdk implementation. ::
Fix a typo in pocofw.py
diff --git a/moskito-webui/src/main/java/net/anotheria/moskito/webui/gauges/api/GaugeAPIImpl.java b/moskito-webui/src/main/java/net/anotheria/moskito/webui/gauges/api/GaugeAPIImpl.java index <HASH>..<HASH> 100644 --- a/moskito-webui/src/main/java/net/anotheria/moskito/webui/gauges/api/GaugeAPIImpl.java +++ b/moskito-webui/src/main/java/net/anotheria/moskito/webui/gauges/api/GaugeAPIImpl.java @@ -72,6 +72,8 @@ public class GaugeAPIImpl extends AbstractMoskitoAPIImpl implements GaugeAPI { public List<GaugeAO> getGauges(){ GaugesConfig gg = MoskitoConfigurationHolder.getConfiguration().getGaugesConfig(); List<GaugeAO> gaugeAOList = new LinkedList<GaugeAO>(); + if (gg == null || gg.getGauges() == null || gg.getGauges().length == 0) + return gaugeAOList; for (GaugeConfig g : gg.getGauges()){ GaugeAO ao = createGaugeAO(g); gaugeAOList.add(ao);
fixed exception on gauges page if there are no configured gauges.
diff --git a/src/scripts/postinstall.js b/src/scripts/postinstall.js index <HASH>..<HASH> 100644 --- a/src/scripts/postinstall.js +++ b/src/scripts/postinstall.js @@ -5121,7 +5121,7 @@ module.exports = function($logger, hookArgs) { for which environment {development|prod} the project was prepared. If needed, we delete the NS .nsprepareinfo file so we force a new prepare */ - var platform = (hookArgs.checkForChangesOpts || hookArgs.platformData).platform.toLowerCase(); + var platform = (hookArgs.checkForChangesOpts || hookArgs.prepareData).platform.toLowerCase(); var projectData = (hookArgs.checkForChangesOpts && hookArgs.checkForChangesOpts.projectData) || hookArgs.projectData; var platformsDir = projectData.platformsDir; var appResourcesDirectoryPath = projectData.appResourcesDirectoryPath;
fix: fix cannot read .toLowerCase() of undefined NativeScript CLI throws `cannot read .toLowerCase() of undefined` error as there isn't platform property in platformData object. We should use prepareData instead.
diff --git a/mockupdb/__init__.py b/mockupdb/__init__.py index <HASH>..<HASH> 100755 --- a/mockupdb/__init__.py +++ b/mockupdb/__init__.py @@ -676,7 +676,7 @@ class OpGetMore(Request): namespace, pos = _get_c_string(msg, 4) num_to_return, = _UNPACK_INT(msg[pos:pos + 4]) pos += 4 - cursor_id = _UNPACK_LONG(msg[pos:pos + 8]) + cursor_id, = _UNPACK_LONG(msg[pos:pos + 8]) return OpGetMore(namespace=namespace, flags=flags, client=client, num_to_return=num_to_return, cursor_id=cursor_id, request_id=request_id, server=server) @@ -691,6 +691,11 @@ class OpGetMore(Request): """The client message's numToReturn field.""" return self._num_to_return + @property + def cursor_id(self): + """The client message's cursorId field.""" + return self._cursor_id + class OpKillCursors(Request): """An OP_KILL_CURSORS the client executes on the server."""
Add cursor_id property.
diff --git a/packages/ra-ui-materialui/src/layout/UserMenu.js b/packages/ra-ui-materialui/src/layout/UserMenu.js index <HASH>..<HASH> 100644 --- a/packages/ra-ui-materialui/src/layout/UserMenu.js +++ b/packages/ra-ui-materialui/src/layout/UserMenu.js @@ -53,7 +53,7 @@ class UserMenu extends React.Component { color="inherit" onClick={this.handleMenu} > - {icon && cloneElement(icon)} + {icon} </IconButton> </Tooltip> <Menu
Don't extra clone icon
diff --git a/espresso-server/app/src/androidTest/java/io/appium/espressoserver/lib/helpers/w3c/state/InputStateTable.java b/espresso-server/app/src/androidTest/java/io/appium/espressoserver/lib/helpers/w3c/state/InputStateTable.java index <HASH>..<HASH> 100644 --- a/espresso-server/app/src/androidTest/java/io/appium/espressoserver/lib/helpers/w3c/state/InputStateTable.java +++ b/espresso-server/app/src/androidTest/java/io/appium/espressoserver/lib/helpers/w3c/state/InputStateTable.java @@ -6,9 +6,10 @@ import java.util.HashMap; import java.util.List; import java.util.Map; +import io.appium.espressoserver.lib.helpers.w3c.models.ActionObject; + import io.appium.espressoserver.lib.handlers.exceptions.AppiumException; import io.appium.espressoserver.lib.helpers.w3c.adapter.W3CActionAdapter; -import io.appium.espressoserver.lib.helpers.w3c.models.ActionObject; /** * Keep the state of all active input sources
Make inputs cancellable (#<I>) * Add 'cancel list' to InputStateTable * Add a KeyUp action object to cancel list when KeyDown is called * Created a copy constructor to create ActionObject * Other * Moved 'active input sources' to 'state' package * Make 'pointerDown' cancellable
diff --git a/clustering/ee/infinispan/src/main/java/org/wildfly/clustering/ee/infinispan/InfinispanBatcher.java b/clustering/ee/infinispan/src/main/java/org/wildfly/clustering/ee/infinispan/InfinispanBatcher.java index <HASH>..<HASH> 100644 --- a/clustering/ee/infinispan/src/main/java/org/wildfly/clustering/ee/infinispan/InfinispanBatcher.java +++ b/clustering/ee/infinispan/src/main/java/org/wildfly/clustering/ee/infinispan/InfinispanBatcher.java @@ -159,7 +159,7 @@ public class InfinispanBatcher implements Batcher<TransactionBatch> { @Override public TransactionBatch suspendBatch() { - if (this.tm == null) return null; + if (this.tm == null) return NON_TX_BATCH; TransactionBatch batch = CURRENT_BATCH.get(); if (batch != null) { try {
WFLY-<I> NPE during Session.requestDone(...) when using <transaction mode="NONE"/>
diff --git a/Task/Generate.php b/Task/Generate.php index <HASH>..<HASH> 100644 --- a/Task/Generate.php +++ b/Task/Generate.php @@ -293,6 +293,8 @@ class Generate extends Base { foreach ($components as $name => $component) { $parent_name = $component->containingComponent(); if (!empty($parent_name)) { + assert(isset($components[$parent_name]), "Containing component '$parent_name' given by '$name' is not a component ID."); + $tree[$parent_name][] = $name; } }
Added assertion to check containing component is a valid ID.
diff --git a/core/src/main/java/org/bitcoinj/core/Peer.java b/core/src/main/java/org/bitcoinj/core/Peer.java index <HASH>..<HASH> 100644 --- a/core/src/main/java/org/bitcoinj/core/Peer.java +++ b/core/src/main/java/org/bitcoinj/core/Peer.java @@ -519,12 +519,10 @@ public class Peer extends PeerSocketHandler { throw new ProtocolException("Got two version messages from peer"); vPeerVersionMessage = m; // Switch to the new protocol version. - int peerVersion = vPeerVersionMessage.clientVersion; - PeerAddress peerAddress = getAddress(); long peerTime = vPeerVersionMessage.time * 1000; - log.info("Connected to {}: version={}, subVer='{}', services=0x{}, time={}, blocks={}", - peerAddress == null ? "Peer" : (peerAddress.getAddr() == null ? peerAddress.getHostname() : peerAddress.getAddr().getHostAddress()), - peerVersion, + log.info("{}: Got version={}, subVer='{}', services=0x{}, time={}, blocks={}", + this, + vPeerVersionMessage.clientVersion, vPeerVersionMessage.subVer, vPeerVersionMessage.localServices, String.format(Locale.US, "%tF %tT", peerTime, peerTime),
Again reword a happy connect log message. Receiving the remote version message doesn't mean we're connected.
diff --git a/test/teststop.js b/test/teststop.js index <HASH>..<HASH> 100644 --- a/test/teststop.js +++ b/test/teststop.js @@ -43,6 +43,7 @@ module.exports.test_stop_callback_and_event = function(test) { test.ok(this === client); test.equals(arguments.length, 0); test.equals(client.state, 'stopped'); + test.equals(client.service, null); if (++count == 2) { test.done(); }
update mqlight.stop unittest to check that service returns null
diff --git a/edxval/admin.py b/edxval/admin.py index <HASH>..<HASH> 100644 --- a/edxval/admin.py +++ b/edxval/admin.py @@ -81,6 +81,8 @@ class TranscriptPreferenceAdmin(admin.ModelAdmin): class ThirdPartyTranscriptCredentialsStateAdmin(admin.ModelAdmin): + list_display = ('org', 'provider', 'exists', 'created', 'modified') + model = ThirdPartyTranscriptCredentialsState verbose_name = 'Organization Transcript Credential State' verbose_name_plural = 'Organization Transcript Credentials State'
Update admin class for org transcript credentials. EDU-<I>
diff --git a/tests/unit/algorithms/metrics/MercuryIntrusionTest.py b/tests/unit/algorithms/metrics/MercuryIntrusionTest.py index <HASH>..<HASH> 100644 --- a/tests/unit/algorithms/metrics/MercuryIntrusionTest.py +++ b/tests/unit/algorithms/metrics/MercuryIntrusionTest.py @@ -13,11 +13,13 @@ class MercuryIntrusionTest: def test_run(self): mip = op.algorithms.metrics.MercuryIntrusion(network=self.net) + mip.run() assert mip['pore.invasion_sequence'].max() > 2 assert mip['throat.invasion_sequence'].max() > 2 def test_pcsnwp_data(self): mip = op.algorithms.metrics.MercuryIntrusion(network=self.net) + mip.run() mip.pc_data = [1e1, 1e3, 1e5, 1e6] mip.snwp_data = [0.0, 0.1, 0.5, 0.9] assert sp.all(mip.pc_data == [1e1, 1e3, 1e5, 1e6]) @@ -25,6 +27,7 @@ class MercuryIntrusionTest: def test_plot_data(self): mip = op.algorithms.metrics.MercuryIntrusion(network=self.net) + mip.run() mip.pc_data = [1e1, 1e3, 1e5, 1e6] mip.snwp_data = [0.0, 0.1, 0.5, 0.9] fig = mip.plot_intrusion_curve()
Updated MIP test to call run
diff --git a/lib/gitkeeper/version.rb b/lib/gitkeeper/version.rb index <HASH>..<HASH> 100644 --- a/lib/gitkeeper/version.rb +++ b/lib/gitkeeper/version.rb @@ -1,3 +1,3 @@ module Gitkeeper - VERSION = "0.0.1" + VERSION = "0.0.7" end
Eureka: really works out of the box now, with VERSION <I> & following the README
diff --git a/logger.go b/logger.go index <HASH>..<HASH> 100644 --- a/logger.go +++ b/logger.go @@ -34,14 +34,14 @@ type Logger struct { } func (l *Logger) Output(depth int, level string, message string, data ...Map) { - // get this as soon as possible - now := formattedDate.String() - buf := bufPool.Get() defer bufPool.Put(buf) flags := FlagSet(atomic.LoadUint64(&l.flags)) + + // if time is being logged, handle time as soon as possible if flags&Ltimestamp != 0 { + now := formattedDate.String() buf.WriteString(`time="`) buf.WriteString(now) buf.Write(i_QUOTE_SPACE)
slightly delay getting time (sloppy anyway), to avoid getting it at all if not used
diff --git a/aslack/__init__.py b/aslack/__init__.py index <HASH>..<HASH> 100644 --- a/aslack/__init__.py +++ b/aslack/__init__.py @@ -5,4 +5,4 @@ import logging logging.getLogger(__name__).addHandler(logging.NullHandler()) __author__ = 'Jonathan Sharpe' -__version__ = '0.0.8' +__version__ = '0.1.0'
Increment minor version number I reckon I've done enough for that
diff --git a/lib/revenant.rb b/lib/revenant.rb index <HASH>..<HASH> 100644 --- a/lib/revenant.rb +++ b/lib/revenant.rb @@ -3,7 +3,7 @@ module Revenant # Register a new type of lock. # User code specifies which by setting lock_type = :something - # while configuring a Revenant::Process + # while configuring a Revenant::Task def self.register(lock_type, klass) @lock_types ||= {} if klass.respond_to?(:lock_function)
Correct a typo in rdoc
diff --git a/lib/chars/char_set.rb b/lib/chars/char_set.rb index <HASH>..<HASH> 100644 --- a/lib/chars/char_set.rb +++ b/lib/chars/char_set.rb @@ -120,9 +120,9 @@ module Chars def random_distinct_bytes(length) if (length.kind_of?(Array) || length.kind_of?(Range)) #return Array.new(length.sort_by { rand }.first) { random_byte } - self.entries.sort_by { rand }.slice(0..(length.sort_by { rand }.first)) + self.entries.sort_by { rand }.slice(0...(length.sort_by { rand }.first)) else - self.entries.sort_by { rand }.slice(0..length) + self.entries.sort_by { rand }.slice(0...length) end end
fixed fencepost error in random_distinct_bytes
diff --git a/test/babelish/commands/test_command_csv2android.rb b/test/babelish/commands/test_command_csv2android.rb index <HASH>..<HASH> 100644 --- a/test/babelish/commands/test_command_csv2android.rb +++ b/test/babelish/commands/test_command_csv2android.rb @@ -16,6 +16,21 @@ class TestCSV2AndroidCommand < Test::Unit::TestCase system("rm -rf ./values-fr/") end + def test_csv2android_with_multiple_2_languages_with_region + options = { + :filename => "test/data/test_data_multiple_langs.csv", + :langs => {"English" => "en-US", "French" => "fr"} + } + Commandline.new([], options).csv2android + + assert File.exist?("./values-en-rUS/strings.xml") + assert File.exist?("./values-fr/strings.xml") + + # clean up + system("rm -rf ./values-en-rUS/") + system("rm -rf ./values-fr/") + end + def test_csv2android_with_output_dir options = { :filename => "test/data/test_data_multiple_langs.csv",
Added test for csv2android with region
diff --git a/km3pipe/logger.py b/km3pipe/logger.py index <HASH>..<HASH> 100644 --- a/km3pipe/logger.py +++ b/km3pipe/logger.py @@ -49,9 +49,21 @@ class LogIO(object): port=28777): self.node = node self.stream = stream + self.url = url + self.port = port self.sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) - self.sock.connect((url, port)) + self.connect() def send(self, message, level='info'): - self.sock.send("+log|{0}|{1}|{2}|{3}\r\n" - .format(self.stream, self.node, level, message)) + message_string = "+log|{0}|{1}|{2}|{3}\r\n" \ + .format(self.stream, self.node, level, message) + try: + self.sock.send(message_string) + except socket.error: + print("Lost connection, reconnecting...") + self.connect() + self.sock.send(message_string) + + def connect(self): + self.sock.connect((self.url, self.port)) +
Retry once if socket connection is closed
diff --git a/actionpack/lib/action_dispatch/middleware/public_exceptions.rb b/actionpack/lib/action_dispatch/middleware/public_exceptions.rb index <HASH>..<HASH> 100644 --- a/actionpack/lib/action_dispatch/middleware/public_exceptions.rb +++ b/actionpack/lib/action_dispatch/middleware/public_exceptions.rb @@ -12,7 +12,7 @@ module ActionDispatch status = env["PATH_INFO"][1..-1] request = ActionDispatch::Request.new(env) content_type = request.formats.first - format = (mime = Mime[content_type]) && "to_#{mime.to_sym}" + format = content_type && "to_#{content_type.to_sym}" body = { :status => status, :error => exception.message } render(status, body, :format => format, :content_type => content_type)
content_type is already a Mime::Type object
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -17,6 +17,9 @@ if sys.version_info >= (3,): install_requires = ['numpy', 'pyserial>2.6', 'scipy'] +if sys.version_info < (2, 7): + print("python version < 2.7 is not supported") + sys.exit(1) if sys.version_info < (3, 4): install_requires.append('enum34') @@ -45,7 +48,7 @@ setup(name='pypot', ], }, - setup_requires=['setuptools_git >= 0.3', ], + # setup_requires=['setuptools_git >= 0.3', ], include_package_data=True, exclude_package_data={'': ['README', '.gitignore']},
remove unnecessary dependency of setuptools_git and prevent usage of python<I>
diff --git a/flask_mwoauth/__init__.py b/flask_mwoauth/__init__.py index <HASH>..<HASH> 100644 --- a/flask_mwoauth/__init__.py +++ b/flask_mwoauth/__init__.py @@ -24,7 +24,8 @@ class MWOAuth(object): default_return_to='index', consumer_key=None, consumer_secret=None, return_json=False, - name="Deprecated"): + name="Deprecated", + user_agent=None): if consumer_key is None: raise TypeError( "MWOAuth() missing 1 required argument: 'consumer_key'") @@ -37,7 +38,7 @@ class MWOAuth(object): self.script_url = base_url + "/index.php" self.api_url = base_url + "/api.php" - self.handshaker = mwoauth.Handshaker(self.script_url, consumer_token) + self.handshaker = mwoauth.Handshaker(self.script_url, consumer_token, user_agent=user_agent) self.bp = Blueprint('mwoauth', __name__)
Pass user_agent to mwoauth.handshaker Each tool running with this wrapper will yield "Sending requests with default User-Agent. Set 'user_agent' on mwoauth.flask.MWOAuth to quiet this message.". This commit should prevent that.
diff --git a/actionmailer/lib/action_mailer/base.rb b/actionmailer/lib/action_mailer/base.rb index <HASH>..<HASH> 100644 --- a/actionmailer/lib/action_mailer/base.rb +++ b/actionmailer/lib/action_mailer/base.rb @@ -334,8 +334,8 @@ module ActionMailer # and starts to use it. # * <tt>:openssl_verify_mode</tt> - When using TLS, you can set how OpenSSL checks the certificate. This is # really useful if you need to validate a self-signed and/or a wildcard certificate. You can use the name - # of an OpenSSL verify constant ('none', 'peer', 'client_once','fail_if_no_peer_cert') or directly the - # constant (OpenSSL::SSL::VERIFY_NONE, OpenSSL::SSL::VERIFY_PEER,...). + # of an OpenSSL verify constant ('none', 'peer', 'client_once', 'fail_if_no_peer_cert') or directly the + # constant (OpenSSL::SSL::VERIFY_NONE, OpenSSL::SSL::VERIFY_PEER, ...). # # * <tt>sendmail_settings</tt> - Allows you to override options for the <tt>:sendmail</tt> delivery method. # * <tt>:location</tt> - The location of the sendmail executable. Defaults to <tt>/usr/sbin/sendmail</tt>.
Cosmetic fixes in AM::Base docs. Missed spaces in OpenSSL constants enumerations. Injected at a<I>ad.
diff --git a/app/libraries/Jentil.php b/app/libraries/Jentil.php index <HASH>..<HASH> 100644 --- a/app/libraries/Jentil.php +++ b/app/libraries/Jentil.php @@ -82,7 +82,7 @@ final class Jentil protected function __construct() { $this->setup['loader'] = new Setup\Loader($this); - $this->setup['updater'] = new Setup\Updater($this); + // $this->setup['updater'] = new Setup\Updater($this); $this->setup['language'] = new Setup\Language($this); $this->setup['styles'] = new Setup\Styles($this); $this->setup['scripts'] = new Setup\Scripts($this);
disabled auto updater setup until this theme reaches stable release (ie <I> and up)
diff --git a/gems/aws-eventstream/spec/decoder_spec.rb b/gems/aws-eventstream/spec/decoder_spec.rb index <HASH>..<HASH> 100644 --- a/gems/aws-eventstream/spec/decoder_spec.rb +++ b/gems/aws-eventstream/spec/decoder_spec.rb @@ -72,7 +72,7 @@ module Aws it '#decode_chunk buffers partial prelude message' do file = Dir.glob(File.expand_path('../fixtures/encoded/positive/*', __FILE__)).first - data = File.read(file) + data = File.open(file, "r:UTF-8", &:read) first_part = data[0..3] second_part = data[4..-1] decoder = Decoder.new(format: false)
Update flakey test to read utf8