diff
stringlengths
65
26.7k
message
stringlengths
7
9.92k
diff --git a/framework/yii/web/View.php b/framework/yii/web/View.php index <HASH>..<HASH> 100644 --- a/framework/yii/web/View.php +++ b/framework/yii/web/View.php @@ -15,6 +15,7 @@ use yii\web\AssetBundle; use yii\widgets\Block; use yii\widgets\ContentDecorator; use yii\widgets\FragmentCache; +use yii\base\InvalidConfigException; /** * View represents a view object in the MVC pattern.
Fixed View refactoring test breakage
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -23,7 +23,7 @@ setup_args = dict( 'Programming Language :: Python :: Implementation :: PyPy', 'Topic :: Scientific/Engineering :: Bio-Informatics', ], - packages=['biofrills'], + packages=['biofrills', 'biofrills.stats'], #scripts=glob(join(DIR, 'scripts', '*')) )
setup.py: include biofrills.stats sub-package
diff --git a/support/tail.js b/support/tail.js index <HASH>..<HASH> 100644 --- a/support/tail.js +++ b/support/tail.js @@ -70,7 +70,6 @@ window.mocha = require('mocha'); ;(function(){ var suite = new mocha.Suite('', new mocha.Context) , utils = mocha.utils - , Reporter = mocha.reporters.HTML $(function(){ $('code').each(function(){ @@ -124,9 +123,10 @@ window.mocha = require('mocha'); * Run mocha, returning the Runner. */ - mocha.run = function(){ + mocha.run = function(Reporter){ suite.emit('run'); var runner = new mocha.Runner(suite); + Reporter = Reporter || mocha.reporters.HTML; var reporter = new Reporter(runner); var query = parse(window.location.search || ""); if (query.grep) runner.grep(new RegExp(query.grep));
Added reporter to `mocha.run()` as argument
diff --git a/lib/CORL/machine/physical.rb b/lib/CORL/machine/physical.rb index <HASH>..<HASH> 100644 --- a/lib/CORL/machine/physical.rb +++ b/lib/CORL/machine/physical.rb @@ -34,7 +34,7 @@ class Physical < CORL.plugin_class(:machine) #--- def hostname - fact(:hostname) + fact(:fqdn) end #---
Updating the physical machine provider to use the fqdn fact instead of hostname since it is more complete.
diff --git a/vagrant.py b/vagrant.py index <HASH>..<HASH> 100644 --- a/vagrant.py +++ b/vagrant.py @@ -29,6 +29,7 @@ Dependencies: ''' import os +import re import subprocess import sys @@ -172,12 +173,15 @@ class Vagrant(object): output = self._run_vagrant_command('status', vm_name) # sys.stderr.write('status {}: {}\n'.format(vm_name, output)) statuses = {} - state = 1 # parsing state variable. - # The format of output is expected to be a "Current VM states:" line + # The format of output is expected to be a + # - "Current VM states:" line (vagrant 1) + # - "Current machine states" line (vagrant 1.1) # followed by a blank line, followed by one or more status lines, # followed by a blank line. + state = 1 for line in output.splitlines(): - if state == 1 and line.strip().startswith('Current VM states:'): + + if state == 1 and re.search('^Current (VM|machine) states:', line.strip()): state = 2 elif state == 2 and not line.strip(): state = 3
Add support for vagrant <I>? at least for vagrant status output ..
diff --git a/statik.go b/statik.go index <HASH>..<HASH> 100644 --- a/statik.go +++ b/statik.go @@ -31,9 +31,7 @@ import ( "time" ) -const ( - nameSourceFile = "statik.go" -) +const nameSourceFile = "statik.go" var namePackage string @@ -46,7 +44,7 @@ var ( flagTags = flag.String("tags", "", "Write build constraint tags") flagPkg = flag.String("p", "statik", "Name of the generated package") flagPkgCmt = flag.String("c", "Package statik contains static assets.", "The package comment. An empty value disables this comment.\n") - flagInclude = flag.String("include", "*.*", "The patterns of files to be included (by comma separated).\n") + flagInclude = flag.String("include", "*.*", "The patterns of files to be included (by comma separated).\n") ) // mtimeDate holds the arbitrary mtime that we assign to files when
Minor readability improvement and gofmt
diff --git a/hikaricp-common/src/main/java/com/zaxxer/hikari/HikariJNDIFactory.java b/hikaricp-common/src/main/java/com/zaxxer/hikari/HikariJNDIFactory.java index <HASH>..<HASH> 100644 --- a/hikaricp-common/src/main/java/com/zaxxer/hikari/HikariJNDIFactory.java +++ b/hikaricp-common/src/main/java/com/zaxxer/hikari/HikariJNDIFactory.java @@ -30,7 +30,6 @@ import javax.naming.Reference; import javax.naming.spi.ObjectFactory; import javax.sql.DataSource; -import com.zaxxer.hikari.metrics.CodaHaleShim; import com.zaxxer.hikari.util.PropertyBeanSetter; /** @@ -40,11 +39,6 @@ import com.zaxxer.hikari.util.PropertyBeanSetter; */ public class HikariJNDIFactory implements ObjectFactory { - static - { - CodaHaleShim.initialize(); - } - @Override public Object getObjectInstance(Object obj, Name name, Context nameCtx, Hashtable<?, ?> environment) throws Exception {
Fix #<I> no need to initialize the CodaHaleShim in the JNDI factory
diff --git a/mod/assignment/lib.php b/mod/assignment/lib.php index <HASH>..<HASH> 100644 --- a/mod/assignment/lib.php +++ b/mod/assignment/lib.php @@ -1072,7 +1072,8 @@ class assignment_base { global $USER; - if (!$feedback = data_submitted()) { // No incoming data? + //disable referer check because submission form has GET parameters in action URL! + if (!$feedback = data_submitted('nomatch')) { // No incoming data? return false; }
fixed grading when secure forms on bug #<I>; merged from MOODLE_<I>_STABLE
diff --git a/sacredboard/app/config/routes.py b/sacredboard/app/config/routes.py index <HASH>..<HASH> 100644 --- a/sacredboard/app/config/routes.py +++ b/sacredboard/app/config/routes.py @@ -5,7 +5,7 @@ from pathlib import Path from flask import Blueprint from flask import current_app from flask import render_template -from flask import request, Response, redirect +from flask import request, Response, redirect, url_for from ..process import process import sacredboard.app.process.process as proc @@ -13,8 +13,8 @@ routes = Blueprint("routes", __name__) @routes.route("/") -def hello_world(): - return "Hello world" +def index(): + return redirect(url_for("routes.show_runs")) @routes.route("/runs") diff --git a/sacredboard/webapp.py b/sacredboard/webapp.py index <HASH>..<HASH> 100644 --- a/sacredboard/webapp.py +++ b/sacredboard/webapp.py @@ -24,6 +24,7 @@ def run(debug, m): routes.setup_routes(app) app.config["data"].connect() print("Starting sacredboard on port 5000") + print("Try to navigate to http://127.0.0.1:5000") if debug: app.run(host="0.0.0.0", debug=True) else:
Add redirect from / to /runs
diff --git a/ips_vagrant/commands/cmd_new.py b/ips_vagrant/commands/cmd_new.py index <HASH>..<HASH> 100644 --- a/ips_vagrant/commands/cmd_new.py +++ b/ips_vagrant/commands/cmd_new.py @@ -205,5 +205,5 @@ def cli(ctx, name, dname, license_key, force, enable, ssl, spdy, gzip, cache, in for filename in dirnames: os.chmod(os.path.join(dirname, filename), 0o777) - shutil.move(os.path.join(site.root, 'conf_global.dist.php'), os.path.join(site.root, 'conf_global.php')) - os.chmod(os.path.join(site.root, 'conf_global.php'), 0o777) + shutil.move(os.path.join(site.root, 'conf_global.dist.php'), os.path.join(site.root, 'conf_global.php')) + os.chmod(os.path.join(site.root, 'conf_global.php'), 0o777)
(Bugfix) move shutil out of for loop
diff --git a/swifter/swifter_tests.py b/swifter/swifter_tests.py index <HASH>..<HASH> 100644 --- a/swifter/swifter_tests.py +++ b/swifter/swifter_tests.py @@ -1,3 +1,4 @@ +import sys import unittest import subprocess import time @@ -147,7 +148,7 @@ class TestSwifter(unittest.TestCase): def test_stdout_redirected(self): print_messages = subprocess.check_output( [ - "python", + sys.executable, "-c", "import pandas as pd; import numpy as np; import swifter; " + "df = pd.DataFrame({'x': np.random.normal(size=4)}); "
Use the current python executable in tests Currently it is hard-coded to use the default python executable rather than the one you are currently using to run swifter. The default python may not have swifter installed for it.
diff --git a/sklearn_porter/utils/Environment.py b/sklearn_porter/utils/Environment.py index <HASH>..<HASH> 100644 --- a/sklearn_porter/utils/Environment.py +++ b/sklearn_porter/utils/Environment.py @@ -4,9 +4,9 @@ import os import sys try: - from shutil import which + from shutil import which as _which except ImportError: - def which(cmd, mode=os.F_OK | os.X_OK, path=None): + def _which(cmd, mode=os.F_OK | os.X_OK, path=None): """Given a command, mode, and a PATH string, return the path which conforms to the given mode on the PATH, or None if there is no such file. @@ -93,7 +93,7 @@ class Environment(object): """Check whether the application <name> is installed.""" if check_win: Environment.check_windows() - return which(str(name)) is not None + return _which(str(name)) is not None @staticmethod def has_apps(names, check_win=True):
release/<I>: Make 'which' private
diff --git a/lib/branch_io_cli/commands/report_command.rb b/lib/branch_io_cli/commands/report_command.rb index <HASH>..<HASH> 100644 --- a/lib/branch_io_cli/commands/report_command.rb +++ b/lib/branch_io_cli/commands/report_command.rb @@ -43,7 +43,7 @@ module BranchIOCLI cmd = "xcodebuild" cmd = "#{cmd} -scheme #{config_helper.scheme}" if config_helper.scheme cmd = "#{cmd} -workspace #{config_helper.workspace_path}" if config_helper.workspace_path - cmd = "#{cmd} -project #{config_helper.xcodeproj_path}" if config_helper.xcodeproj_path + cmd = "#{cmd} -project #{config_helper.xcodeproj_path}" if config_helper.xcodeproj_path && !config_helper.workspace_path cmd = "#{cmd} -target #{config_helper.target}" if config_helper.target cmd = "#{cmd} -configuration #{config_helper.configuration}" if config_helper.configuration cmd @@ -76,6 +76,7 @@ module BranchIOCLI info_plist = CFPropertyList.native_types raw_info_plist.value return info_plist["CFBundleVersion"] end + # TODO: Detect if the Branch SDK source is included in the project. nil end
Do not pass -project to xcodebuild if -workspace is present
diff --git a/djedi/plugins/img.py b/djedi/plugins/img.py index <HASH>..<HASH> 100644 --- a/djedi/plugins/img.py +++ b/djedi/plugins/img.py @@ -1,6 +1,5 @@ import json import six -from PIL import Image from django.utils.html import escape from django.core.files.uploadedfile import InMemoryUploadedFile from django import forms @@ -75,6 +74,7 @@ class ImagePluginBase(FormsBasePlugin): return {'filename': None, 'url': None} def save(self, data): + from PIL import Image width = int(data.get('width') or 0) height = int(data.get('height') or 0)
Move PIL Image import back into save method to avoid import errors
diff --git a/app/decorators/wallaby/resource_decorator.rb b/app/decorators/wallaby/resource_decorator.rb index <HASH>..<HASH> 100644 --- a/app/decorators/wallaby/resource_decorator.rb +++ b/app/decorators/wallaby/resource_decorator.rb @@ -1,10 +1,4 @@ class Wallaby::ResourceDecorator - def self.inherited(subclass) - [ '', 'index_', 'show_', 'form_' ].each do |prefix| - subclass.send "#{ prefix }field_names" - end - end - class << self def model_class if self < Wallaby::ResourceDecorator @@ -38,6 +32,13 @@ class Wallaby::ResourceDecorator def initialize resource @resource = resource @model_decorator = self.class.model_decorator model_class + + if self.class < Wallaby::ResourceDecorator + [ '', 'index_', 'show_', 'form_' ].each do |prefix| + send "#{ prefix }field_names" + send "#{ prefix }fields" + end + end end def method_missing method_id, *args
don't use inherited, move the setup into initialize constructor for resource decorator
diff --git a/src/com/google/javascript/jscomp/DefaultPassConfig.java b/src/com/google/javascript/jscomp/DefaultPassConfig.java index <HASH>..<HASH> 100644 --- a/src/com/google/javascript/jscomp/DefaultPassConfig.java +++ b/src/com/google/javascript/jscomp/DefaultPassConfig.java @@ -190,6 +190,8 @@ public class DefaultPassConfig extends PassConfig { protected List<PassFactory> getChecks() { List<PassFactory> checks = Lists.newArrayList(); + checks.add(createEmptyPass("beforeStandardChecks")); + if (options.closurePass) { checks.add(closureGoogScopeAliases); }
Move some passes into the compiler. R=mwr,wwen,rrhett DELTA=<I> (<I> added, <I> deleted, 4 changed) Revision created by MOE tool push_codebase. MOE_MIGRATION=<I> git-svn-id: <URL>
diff --git a/extensions/guacamole-auth-ldap/src/main/java/org/apache/guacamole/auth/ldap/LDAPConnectionService.java b/extensions/guacamole-auth-ldap/src/main/java/org/apache/guacamole/auth/ldap/LDAPConnectionService.java index <HASH>..<HASH> 100644 --- a/extensions/guacamole-auth-ldap/src/main/java/org/apache/guacamole/auth/ldap/LDAPConnectionService.java +++ b/extensions/guacamole-auth-ldap/src/main/java/org/apache/guacamole/auth/ldap/LDAPConnectionService.java @@ -156,14 +156,12 @@ public class LDAPConnectionService { // Disconnect if an error occurs during bind catch (LdapException e) { logger.debug("Unable to bind to LDAP server.", e); + disconnect(ldapConnection); throw new GuacamoleInvalidCredentialsException( "Unable to bind to the LDAP server.", CredentialsInfo.USERNAME_PASSWORD); } - finally { - disconnect(ldapConnection); - } - + return ldapConnection; }
GUACAMOLE-<I>: Don't close the connection after bind.
diff --git a/app/models/socializer/person.rb b/app/models/socializer/person.rb index <HASH>..<HASH> 100644 --- a/app/models/socializer/person.rb +++ b/app/models/socializer/person.rb @@ -51,6 +51,7 @@ module Socializer delegate :circles, to: :activity_object, allow_nil: true delegate :comments, to: :activity_object, allow_nil: true + delegate :contacts, to: :activity_object, allow_nil: true delegate :groups, to: :activity_object, allow_nil: true delegate :notes, to: :activity_object, allow_nil: true delegate :memberships, to: :activity_object, allow_nil: true @@ -103,13 +104,6 @@ module Socializer @notifications ||= activity_object.notifications.newest_first end - # Collection of contacts for the user - # - # @return [Array] Returns a collection of contacts - def contacts - circles.flat_map(&:contacts).uniq - end - def contact_of @contact_of ||= Circle.joins(:ties).merge(Tie.by_contact_id(guid)).map(&:author).uniq end
delegate contacts to the activity_object
diff --git a/scan/route_params.go b/scan/route_params.go index <HASH>..<HASH> 100644 --- a/scan/route_params.go +++ b/scan/route_params.go @@ -4,6 +4,7 @@ import ( "github.com/go-openapi/spec" "strconv" "strings" + "errors" ) const ( @@ -99,6 +100,10 @@ func (s *setOpParams) Parse(lines []string) error { key := strings.ToLower(strings.TrimSpace(kv[0])) value := strings.TrimSpace(kv[1]) + if current == nil { + return errors.New("invalid route/operation schema provided") + } + switch key { case ParamDescriptionKey: current.Description = value
fixed "runtime error: invalid memory address or nil pointer dereference" when invalid signature for route provided
diff --git a/transactions/services/daemonservice.py b/transactions/services/daemonservice.py index <HASH>..<HASH> 100644 --- a/transactions/services/daemonservice.py +++ b/transactions/services/daemonservice.py @@ -139,5 +139,5 @@ class RegtestDaemonService(BitcoinDaemonService): def make_request(self, method, params=[]): response = super(RegtestDaemonService, self).make_request(method, params) if method == 'sendrawtransaction': - super(RegtestDaemonService, self).make_request("setgenerate", [True, 1]) + super(RegtestDaemonService, self).make_request("generate", [1]) return response
Changed the command to generate new blocks for bitcoind > <I>
diff --git a/salt/states/file.py b/salt/states/file.py index <HASH>..<HASH> 100644 --- a/salt/states/file.py +++ b/salt/states/file.py @@ -4489,7 +4489,10 @@ def append(name, text = _validate_str_list(text) with salt.utils.fopen(name, 'rb') as fp_: - slines = fp_.read().splitlines() + slines = fp_.read() + if six.PY3: + slines = slines.decode(__salt_system_encoding__) + slines = slines.splitlines() append_lines = [] try: @@ -4537,7 +4540,10 @@ def append(name, ret['comment'] = 'File {0} is in correct state'.format(name) with salt.utils.fopen(name, 'rb') as fp_: - nlines = fp_.read().splitlines() + nlines = fp_.read() + if six.PY3: + nlines = nlines.decode(__salt_system_encoding__) + nlines = nlines.splitlines() if slines != nlines: if not salt.utils.istextfile(name):
Under Py3, decode what's read, from bytes to strings
diff --git a/modeltranslation/management/commands/update_translation_fields.py b/modeltranslation/management/commands/update_translation_fields.py index <HASH>..<HASH> 100644 --- a/modeltranslation/management/commands/update_translation_fields.py +++ b/modeltranslation/management/commands/update_translation_fields.py @@ -12,7 +12,7 @@ class Command(NoArgsCommand): 'translated application using the value of the original field.') def handle(self, **options): - verbosity = options['verbosity'] + verbosity = int(options['verbosity']) if verbosity > 0: self.stdout.write("Using default language: %s\n" % DEFAULT_LANGUAGE) for model, trans_opts in translator._registry.items():
Fixed verbosity switch, which is used as an int but was not coerced.
diff --git a/sllurp/llrp_proto.py b/sllurp/llrp_proto.py index <HASH>..<HASH> 100644 --- a/sllurp/llrp_proto.py +++ b/sllurp/llrp_proto.py @@ -778,8 +778,9 @@ def decode_ReaderEventNotification(data): msg['ReaderEventNotificationData'] = ret # Check the end of the message - if len(body) > 0: - raise LLRPError('junk at end of message: ' + bin2dump(body)) + if len(body): + logger.debug('Unprocessed bytes in READER_EVENT_NOTIFICATION: %s', + hexlify(body)) return msg
don't freak out about extra event notification data
diff --git a/processing/src/main/java/io/druid/query/groupby/epinephelinae/Groupers.java b/processing/src/main/java/io/druid/query/groupby/epinephelinae/Groupers.java index <HASH>..<HASH> 100644 --- a/processing/src/main/java/io/druid/query/groupby/epinephelinae/Groupers.java +++ b/processing/src/main/java/io/druid/query/groupby/epinephelinae/Groupers.java @@ -46,7 +46,9 @@ public class Groupers public static int hash(final Object obj) { // Mask off the high bit so we can use that to determine if a bucket is used or not. - return obj.hashCode() & 0x7fffffff; + // Also apply the same XOR transformation that j.u.HashMap applies, to improve distribution. + final int code = obj.hashCode(); + return (code ^ (code >>> 16)) & 0x7fffffff; } public static <KeyType extends Comparable<KeyType>> Iterator<Grouper.Entry<KeyType>> mergeIterators(
GroupBy v2: Improve hash code distribution. (#<I>) Without this transformation, distribution of hash % X is poor in general. It is catastrophically poor when X is a multiple of <I> (many slots would be empty).
diff --git a/index.js b/index.js index <HASH>..<HASH> 100644 --- a/index.js +++ b/index.js @@ -825,7 +825,7 @@ Dat.prototype.createDiffStream = function (headA, headB, opts) { obj.key = key.slice(i + 1) obj.dataset = key.slice(0, i) } - obj.value = valueEncoding.decode(obj.value) + if (Buffer.isBuffer(obj.value)) obj.value = valueEncoding.decode(obj.value) } var fork = -1
only decode buffers. fixes #<I>
diff --git a/lib/jsi/util.rb b/lib/jsi/util.rb index <HASH>..<HASH> 100644 --- a/lib/jsi/util.rb +++ b/lib/jsi/util.rb @@ -79,6 +79,7 @@ module JSI end module_function :ycomb end + public extend Util module FingerprintHash
fix Util methods not being public on JSI module
diff --git a/src/transporters/tcp.js b/src/transporters/tcp.js index <HASH>..<HASH> 100644 --- a/src/transporters/tcp.js +++ b/src/transporters/tcp.js @@ -178,6 +178,7 @@ class TcpTransporter extends Transporter { */ startTimers() { this.gossipTimer = setInterval(() => this.sendGossipRequest(), Math.max(this.opts.gossipPeriod, 1) * 1000); + this.gossipTimer.unref(); } /** diff --git a/src/transporters/tcp/udp-broadcaster.js b/src/transporters/tcp/udp-broadcaster.js index <HASH>..<HASH> 100644 --- a/src/transporters/tcp/udp-broadcaster.js +++ b/src/transporters/tcp/udp-broadcaster.js @@ -159,6 +159,8 @@ class UdpServer extends EventEmitter { }, (this.opts.multicastPeriod || 5) * 1000); + this.discoverTimer.unref(); + this.logger.info("UDP discovery started."); } }
unref tcp timers
diff --git a/pandas/core/series.py b/pandas/core/series.py index <HASH>..<HASH> 100644 --- a/pandas/core/series.py +++ b/pandas/core/series.py @@ -1320,11 +1320,11 @@ copy : boolean, default False argsorted = argsorted[::-1] if na_last: - n = sum(good) + n = good.sum() sortedIdx[:n] = idx[good][argsorted] sortedIdx[n:] = idx[bad] else: - n = sum(bad) + n = bad.sum() sortedIdx[n:] = idx[good][argsorted] sortedIdx[:n] = idx[bad]
BUG: don't use __builtin__.sum in Series.order, address GH #<I>
diff --git a/course/mod.php b/course/mod.php index <HASH>..<HASH> 100644 --- a/course/mod.php +++ b/course/mod.php @@ -695,7 +695,7 @@ $defaultformat = FORMAT_MOODLE; } - $icon = '<img align="middle" height="16" width="16" src="'.$CFG->modpixpath.'/'.$module->name.'/icon.gif" alt="" style="vertical-align: middle;" />&nbsp;'; + $icon = '<img height="16" width="16" src="'.$CFG->modpixpath.'/'.$module->name.'/icon.gif" alt="" style="vertical-align:middle;" />&nbsp;'; print_heading_with_help($pageheading, "mods", $module->name, $icon); print_simple_box_start('center', '', '', 5, 'generalbox', $module->name);
Removed align attribute. Related to MDL-<I>.
diff --git a/vyked/bus.py b/vyked/bus.py index <HASH>..<HASH> 100644 --- a/vyked/bus.py +++ b/vyked/bus.py @@ -218,8 +218,6 @@ class TCPBus: def handle_connected(self): if self.tcp_host: - self._registry_client.register(self.tcp_host.host, self.tcp_host.port, self.tcp_host.name, - self.tcp_host.version, self.tcp_host.node_id, self.tcp_host.clients, 'tcp') yield from self.tcp_host.initiate() if self.http_host: yield from self.http_host.initiate() diff --git a/vyked/host.py b/vyked/host.py index <HASH>..<HASH> 100644 --- a/vyked/host.py +++ b/vyked/host.py @@ -56,8 +56,8 @@ class Host: Host.pubsub_host = pubsub_host Host.pubsub_port = pubsub_port - @deprecated @classmethod + @deprecated def attach_service(cls, service): """ Allows you to attach one TCP and one HTTP service
Fixed bugs in bus.py (decorator ordering) and host.py (double registration for tcp)
diff --git a/lib/xclarity_client/mixins/remote_access_mixin.rb b/lib/xclarity_client/mixins/remote_access_mixin.rb index <HASH>..<HASH> 100644 --- a/lib/xclarity_client/mixins/remote_access_mixin.rb +++ b/lib/xclarity_client/mixins/remote_access_mixin.rb @@ -4,14 +4,6 @@ module XClarityClient # module Mixins::RemoteAccessMixin def remote_control(uuid) - res = fetch_nodes([uuid]) - tier_level = res[0].FeaturesOnDemand['tierLevel'] - - if tier_level == -1 - raise ['Cannot launch remote console because tier level value is', - ' invalid.Please contact the administrator.'].join - end - RemoteAccessManagement.new(@config).remote_control(uuid) end end
reverted validation change as its breaking test cases
diff --git a/lib/tokenizer/index.js b/lib/tokenizer/index.js index <HASH>..<HASH> 100644 --- a/lib/tokenizer/index.js +++ b/lib/tokenizer/index.js @@ -1195,11 +1195,15 @@ _[SCRIPT_DATA_DOUBLE_ESCAPED_STATE] = function scriptDataDoubleEscapedState(cp) this._emitChars('<'); } - else if (cp === $.NULL) + else if (cp === $.NULL) { + this._err(ERR.unexpectedNullCharacter); this._emitChars(UNICODE.REPLACEMENT_CHARACTER); + } - else if (cp === $.EOF) + else if (cp === $.EOF) { + this._err(ERR.eofInScriptHtmlComment); this._emitEOFToken(); + } else this._emitCodePoint(cp);
Add Script data double escaped state errors.
diff --git a/lib/extract_jwt.js b/lib/extract_jwt.js index <HASH>..<HASH> 100644 --- a/lib/extract_jwt.js +++ b/lib/extract_jwt.js @@ -3,12 +3,15 @@ var url = require('url'), auth_hdr = require('./auth_header'); - +// Note: express http converts all headers +// to lower case. var AUTH_HEADER = "authorization", DEFAULT_AUTH_SCHEME = "JWT"; + var extractors = {}; + extractors.fromHeader = function (header_name) { return function (request) { var token = null; diff --git a/lib/strategy.js b/lib/strategy.js index <HASH>..<HASH> 100644 --- a/lib/strategy.js +++ b/lib/strategy.js @@ -3,12 +3,7 @@ var passport = require('passport-strategy') , util = require('util') , url = require('url'); -// Note: express http converts all headers -// to lower case. -var AUTH_HEADER = "authorization" - , DEFAULT_AUTH_SCHEME = "JWT" - , DEFAULT_TOKEN_BODY_FIELD = 'auth_token' - , DEFAULT_TOKEN_QUERY_PARAM_NAME = 'auth_token' + /** * Strategy constructor
Remove unused constants from strategy.js
diff --git a/troposphere/elasticache.py b/troposphere/elasticache.py index <HASH>..<HASH> 100644 --- a/troposphere/elasticache.py +++ b/troposphere/elasticache.py @@ -94,6 +94,8 @@ class ReplicationGroup(AWSObject): resource_type = "AWS::ElastiCache::ReplicationGroup" props = { + 'AtRestEncryptionEnabled': (boolean, False), + 'AuthToken': (basestring, False), 'AutoMinorVersionUpgrade': (boolean, False), 'AutomaticFailoverEnabled': (boolean, False), 'CacheNodeType': (basestring, True), @@ -120,6 +122,7 @@ class ReplicationGroup(AWSObject): 'SnapshottingClusterId': (basestring, False), 'SnapshotWindow': (basestring, False), 'Tags': (Tags, False), + 'TransitEncryptionEnabled': (boolean, False), } def validate(self):
Add new properties to ElastiCache::ReplicationGroup Proerties added: AtRestEncryptionEnabled, AuthToken, TransitEncryptionEnabled
diff --git a/sundial/__init__.py b/sundial/__init__.py index <HASH>..<HASH> 100644 --- a/sundial/__init__.py +++ b/sundial/__init__.py @@ -5,6 +5,6 @@ from sundial.versioning import get_version __all__ = ['VERSION', '__version__'] -VERSION = (1, 0, 1, 'final', 0) +VERSION = (1, 0, 2, 'alpha', 0) __version__ = get_version(VERSION)
Bumped version number to <I> alpha.
diff --git a/hcl2template/types.packer_config.go b/hcl2template/types.packer_config.go index <HASH>..<HASH> 100644 --- a/hcl2template/types.packer_config.go +++ b/hcl2template/types.packer_config.go @@ -353,7 +353,7 @@ func (cfg *PackerConfig) GetBuilds(opts packer.GetBuildsOptions) ([]packer.Build } pcb := &packer.CoreBuild{ - Type: src.Type, + Type: src.Ref().String(), Builder: builder, Provisioners: provisioners, PostProcessors: pps,
HCL2: use source type and name as Name of a CoreBuild
diff --git a/addon/initialize.js b/addon/initialize.js index <HASH>..<HASH> 100644 --- a/addon/initialize.js +++ b/addon/initialize.js @@ -15,6 +15,8 @@ export function initialize(container, config) { }); container.register('liquid-modals:main', Modals); + container.injection('component:liquid-modal', 'owner', 'liquid-modals:main'); + var lwTemplate = container.lookup('template:liquid-with'); if (lwTemplate) { diff --git a/app/initializers/liquid-fire.js b/app/initializers/liquid-fire.js index <HASH>..<HASH> 100644 --- a/app/initializers/liquid-fire.js +++ b/app/initializers/liquid-fire.js @@ -17,8 +17,6 @@ export default { initialize(container, container.lookupFactory('transitions:main')); - application.inject('component:liquid-modal', 'owner', 'liquid-modals:main'); - if (Ember.testing) { Ember.Test.registerWaiter(function(){ return container.lookup('transitions:map').runningTransitions() === 0;
move initializer into library function for use in non-ember-cli builds
diff --git a/testem.js b/testem.js index <HASH>..<HASH> 100644 --- a/testem.js +++ b/testem.js @@ -1,10 +1,13 @@ /* eslint-env node */ +const DotReporter = require('testem/lib/reporters/dot_reporter'); + module.exports = { framework: 'qunit', test_page: 'tests/index.html?hidepassed', timeout: 540, disable_watching: true, + reporter: new DotReporter(), launch_in_ci: [ 'Chrome', 'Firefox',
chore: switch to testem dot reporter
diff --git a/looper/models.py b/looper/models.py index <HASH>..<HASH> 100644 --- a/looper/models.py +++ b/looper/models.py @@ -353,7 +353,8 @@ class Project(AttributeDict): # With all samples, prepare file paths and get read type (optionally make sample dirs) for sample in self.samples: - sample.get_genome() + if hasattr(sample, "organism"): + sample.get_genome() sample.set_file_paths() if not sample.check_input_exists(): continue
remove requirement of genomes and transcriptomes to be set
diff --git a/JSAT/src/jsat/distributions/Normal.java b/JSAT/src/jsat/distributions/Normal.java index <HASH>..<HASH> 100644 --- a/JSAT/src/jsat/distributions/Normal.java +++ b/JSAT/src/jsat/distributions/Normal.java @@ -149,7 +149,7 @@ public class Normal extends Distribution */ public static double logPdf(double x, double mu, double sigma) { - return -0.5*log(2*PI) + log(sigma) + -pow(x-mu,2)/(2*sigma*sigma); + return -0.5*log(2*PI) - log(sigma) + -pow(x-mu,2)/(2*sigma*sigma); } @Override
Correction of mathematical error In <I>f<I>b<I>dade<I>a7ad8a<I>d<I>b<I>f7 a sign error was made when expanding the parenthesis.
diff --git a/pandas/tests/io/test_gcs.py b/pandas/tests/io/test_gcs.py index <HASH>..<HASH> 100644 --- a/pandas/tests/io/test_gcs.py +++ b/pandas/tests/io/test_gcs.py @@ -108,9 +108,7 @@ def test_gcs_get_filepath_or_buffer(monkeypatch): assert_frame_equal(df1, df2) -@pytest.mark.skipif( - td.safe_import("gcsfs"), reason="Only check when gcsfs not installed" -) +@td.skip_if_installed("gcsfs") def test_gcs_not_present_exception(): with pytest.raises(ImportError) as e: read_csv("gs://test/test.csv")
replaced safe_import with a corresponding test decorator (#<I>)
diff --git a/nano.php b/nano.php index <HASH>..<HASH> 100644 --- a/nano.php +++ b/nano.php @@ -59,11 +59,11 @@ final class nano{ return $mValue; }else if(is_object($mValue)){ - + return $mValue(); - }else{ - $aSearchIn = $mValue; } + + $aSearchIn = $mValue; } return (
The method render uses an else expression Else is never necessary and you can simplify the code to work without else.
diff --git a/src/transformers/models/bart/modeling_bart.py b/src/transformers/models/bart/modeling_bart.py index <HASH>..<HASH> 100755 --- a/src/transformers/models/bart/modeling_bart.py +++ b/src/transformers/models/bart/modeling_bart.py @@ -529,8 +529,8 @@ BART_GENERATION_EXAMPLE = r""" >>> from transformers import BartTokenizer, BartForConditionalGeneration, BartConfig - >>> model = BartForConditionalGeneration.from_pretrained('facebook/bart-large') - >>> tokenizer = BartTokenizer.from_pretrained('facebook/bart-large') + >>> model = BartForConditionalGeneration.from_pretrained('facebook/bart-large-cnn') + >>> tokenizer = BartTokenizer.from_pretrained('facebook/bart-large-cnn') >>> ARTICLE_TO_SUMMARIZE = "My friends are cool but they eat too many carbs." >>> inputs = tokenizer([ARTICLE_TO_SUMMARIZE], max_length=1024, return_tensors='pt')
fix BART Summarization example in doc (#<I>)
diff --git a/O365/message.py b/O365/message.py index <HASH>..<HASH> 100644 --- a/O365/message.py +++ b/O365/message.py @@ -235,7 +235,7 @@ class Message(ApiComponent, AttachableMixin, HandleRecipientsMixin): 'HTML') # default to HTML for new messages if self.has_attachments is False and self.body_type.upper() == 'HTML': # test for inline attachments (Azure responds with hasAttachments=False when there are only inline attachments): - if any(img['src'].startswith('cid:') for img in self.get_body_soup().find_all('img')): + if any(img.get('src', '').startswith('cid:') for img in self.get_body_soup().find_all('img')): self.has_attachments = True if self.has_attachments and download_attachments:
fix for when img tag doesn't have a src
diff --git a/karma.conf.js b/karma.conf.js index <HASH>..<HASH> 100644 --- a/karma.conf.js +++ b/karma.conf.js @@ -15,7 +15,7 @@ module.exports = function (config) { // sl_ie_9: { base: "SauceLabs", browserName: "internet explorer", version: "9" }, // sl_ie_8: { base: "SauceLabs", browserName: "internet explorer", version: "8" }, sl_android: { base: "SauceLabs", browserName: "android", version: "4.0" }, - sl_iphone: { base: "SauceLabs", browserName: "iphone", version: "7.1" } + sl_iphone: { base: "SauceLabs", browserName: "iphone", version: "8.0" } }; config.set({
increasing iphone's browser version as <I> seems unreliable
diff --git a/molgenis-fair/src/main/java/org/molgenis/fair/controller/FairController.java b/molgenis-fair/src/main/java/org/molgenis/fair/controller/FairController.java index <HASH>..<HASH> 100644 --- a/molgenis-fair/src/main/java/org/molgenis/fair/controller/FairController.java +++ b/molgenis-fair/src/main/java/org/molgenis/fair/controller/FairController.java @@ -75,6 +75,10 @@ public class FairController { String subjectIRI = getBaseUri().pathSegment(catalogID, datasetID).toUriString(); Entity subjectEntity = dataService.findOneById("fdp_Dataset", datasetID); + if (subjectEntity == null) + { + throw new UnknownEntityException("fdp_Dataset", datasetID); + } return entityModelWriter.createRdfModel(subjectIRI, subjectEntity); }
Fix: throw UnknownEntityException when dataset does not exist
diff --git a/server/src/main/java/com/orientechnologies/orient/server/network/protocol/distributed/ONetworkProtocolDistributed.java b/server/src/main/java/com/orientechnologies/orient/server/network/protocol/distributed/ONetworkProtocolDistributed.java index <HASH>..<HASH> 100644 --- a/server/src/main/java/com/orientechnologies/orient/server/network/protocol/distributed/ONetworkProtocolDistributed.java +++ b/server/src/main/java/com/orientechnologies/orient/server/network/protocol/distributed/ONetworkProtocolDistributed.java @@ -61,7 +61,7 @@ public class ONetworkProtocolDistributed extends ONetworkProtocolBinary implemen @Override protected void parseCommand() throws IOException, InterruptedException { - if (clientId == null && data.clientId != null) + if (clientId == null && data.clientId != null && data.clientId.startsWith(ODistributedStorage.DNODE_PREFIX)) // ASSIGN CLIENT-ID ONCE clientId = data.clientId.substring(ODistributedStorage.DNODE_PREFIX.length());
Fixed bug found by Anton in binary protocol on clientId in OPEN and CONNECT
diff --git a/src/Handler/File.php b/src/Handler/File.php index <HASH>..<HASH> 100644 --- a/src/Handler/File.php +++ b/src/Handler/File.php @@ -88,9 +88,15 @@ class File extends AbstractHandler ); } - return $this->checkData( - file_get_contents("{$this->path}{$name}.cache") - )["data"]; + try { + return $this->checkData( + file_get_contents("{$this->path}{$name}.cache") + )["data"]; + } catch (CacheDataExpiredException $e) { + // remove expired data and rethrow the exception + $this->remove($name, false); + throw $e; + } } /**
remove cache data if it is expired
diff --git a/src/Command/IssueCreateCommand.php b/src/Command/IssueCreateCommand.php index <HASH>..<HASH> 100644 --- a/src/Command/IssueCreateCommand.php +++ b/src/Command/IssueCreateCommand.php @@ -34,6 +34,7 @@ class IssueCreateCommand extends BaseCommand implements GitHubFeature ->setName('issue:create') ->setDescription('Creates an issue') ->addOption('issue_title', null, InputOption::VALUE_REQUIRED, 'Issue Title') + ->addOption('issue_body', null, InputOption::VALUE_REQUIRED, 'Issue Body') ->setHelp( <<<EOF The <info>%command.name%</info> command creates a new issue for either the current or the given organization @@ -70,9 +71,11 @@ EOF ); } - /** @var EditorHelper $editor */ - $editor = $this->getHelper('editor'); - $body = $editor->fromString(''); + if (!$body = $input->getOption('issue_body')) { + /** @var EditorHelper $editor */ + $editor = $this->getHelper('editor'); + $body = $editor->fromString(''); + } $issue = $adapter->openIssue($title, $body);
added issue body option to issue create command
diff --git a/generators/server/files.js b/generators/server/files.js index <HASH>..<HASH> 100644 --- a/generators/server/files.js +++ b/generators/server/files.js @@ -305,6 +305,7 @@ function writeFiles() { this.template(`${SERVER_MAIN_SRC_DIR}package/config/_FeignConfiguration.java`, `${javaDir}config/FeignConfiguration.java`); this.template(`${SERVER_MAIN_SRC_DIR}package/client/_AuthorizedFeignClient.java`, `${javaDir}client/AuthorizedFeignClient.java`); this.template(`${SERVER_MAIN_SRC_DIR}package/client/_OAuth2InterceptedFeignConfiguration.java`, `${javaDir}client/OAuth2InterceptedFeignConfiguration.java`); + this.template(`${SERVER_MAIN_SRC_DIR}package/client/_FeignClientInterceptor.java`, `${javaDir}client/FeignClientInterceptor.java`); } this.copy(`${SERVER_MAIN_RES_DIR}static/microservices_index.html`, `${SERVER_MAIN_RES_DIR}static/index.html`); },
added new line to files.js
diff --git a/tests/integration/trigger.php b/tests/integration/trigger.php index <HASH>..<HASH> 100644 --- a/tests/integration/trigger.php +++ b/tests/integration/trigger.php @@ -22,7 +22,7 @@ class triggerTestCase extends WatchmanTestCase { $lines = 0; $got = array(); - foreach (file("$root/trigger.json") as $line) { + foreach (@file("$root/trigger.json") as $line) { $lines++; $list = json_decode($line, true); // Filter out the unpredictable data from lstat()
suppress warnings for file to avoid spew on a race condition
diff --git a/lib/active_record/connection_adapters/sqlserver_adapter.rb b/lib/active_record/connection_adapters/sqlserver_adapter.rb index <HASH>..<HASH> 100644 --- a/lib/active_record/connection_adapters/sqlserver_adapter.rb +++ b/lib/active_record/connection_adapters/sqlserver_adapter.rb @@ -311,6 +311,11 @@ module ActiveRecord end def type_to_sql(type, limit = nil, precision = nil, scale = nil) #:nodoc: + # Remove limit for data types which do not require it + # Valid: ALTER TABLE sessions ALTER COLUMN [data] varchar(max) + # Invalid: ALTER TABLE sessions ALTER COLUMN [data] varchar(max)(16777215) + limit = nil if %w{text varchar(max) nvarchar(max) ntext varbinary(max) image}.include?(native_database_types[type.to_sym][:name]) + return super unless type.to_s == 'integer' if limit.nil?
Remove limit for data types which do not require it such as varchar(max) varbinary(max).
diff --git a/test/linked_rails.rb b/test/linked_rails.rb index <HASH>..<HASH> 100644 --- a/test/linked_rails.rb +++ b/test/linked_rails.rb @@ -15,6 +15,9 @@ begin # Necessary for Rails 3 require 'rails' rescue LoadError + # Necessary for Rails 2.3.7 + require 'initializer' +rescue LoadError end if defined?(Rails::Application) # Rails 3 @@ -22,6 +25,10 @@ if defined?(Rails::Application) # Rails 3 config.root = File.join(File.dirname(__FILE__), "../..") end Rails.application = TestApp +elsif defined?(RAILS_ROOT) + RAILS_ROOT.replace(File.join(File.dirname(__FILE__), "../..")) +else + RAILS_ROOT = File.join(File.dirname(__FILE__), "../..") end ActionController::Base.logger = Logger.new(nil) @@ -31,5 +38,5 @@ ActionController::Base.logger = Logger.new(nil) # since we don't want to load the entirety of Rails. Dir[File.dirname(__FILE__) + '/plugins/*'].each do |plugin| $: << plugin + '/lib' - Object.new.instance_eval(File.read(plugin + '/init.rb')) + eval(File.read(plugin + '/init.rb')) end
Load linked Rails properly for Rails <I>.
diff --git a/lib/puppet-lint/lexer.rb b/lib/puppet-lint/lexer.rb index <HASH>..<HASH> 100644 --- a/lib/puppet-lint/lexer.rb +++ b/lib/puppet-lint/lexer.rb @@ -144,7 +144,7 @@ class PuppetLint elsif chunk.match(/\A\/.*?\//) str_content = StringScanner.new(code[i+1..-1]).scan_until(/(\A|[^\\])\//m) - tokens << new_token(:REGEX, str_content, code[0..i]) + tokens << new_token(:REGEX, str_content[0..-2], code[0..i]) i += str_content.size + 1 elsif indent = chunk[/\A\n([ \t]+)/m, 1]
:REGEX token value shouldn't include trailing /
diff --git a/services/discovery/v1-query-builder.js b/services/discovery/v1-query-builder.js index <HASH>..<HASH> 100644 --- a/services/discovery/v1-query-builder.js +++ b/services/discovery/v1-query-builder.js @@ -87,8 +87,7 @@ module.exports = function (RED) { function (err, response) { if (err) { res.json(err); - } - else { + } else { var fieldList = discoveryutils.buildFieldList(response); res.json(fieldList); }
Create New Query Builder Node for Discovery Service
diff --git a/sos/plugins/__init__.py b/sos/plugins/__init__.py index <HASH>..<HASH> 100644 --- a/sos/plugins/__init__.py +++ b/sos/plugins/__init__.py @@ -619,9 +619,12 @@ class Plugin(object): def get_description(self): """ This function will return the description for the plugin""" try: - return self.__doc__.strip() - except: - return "<no description available>" + if hasattr(self, '__doc__') and self.__doc__: + return self.__doc__.strip() + return super(self.__class__, self).__doc__.strip() + except Exception as e: + raise e + #return "<no description available>" def check_enabled(self): """This method will be used to verify that a plugin should execute
[plugin] Use superclass __doc__ if not defined in derived class Fixes #<I>.
diff --git a/ansible_runner/runner_config.py b/ansible_runner/runner_config.py index <HASH>..<HASH> 100644 --- a/ansible_runner/runner_config.py +++ b/ansible_runner/runner_config.py @@ -81,7 +81,7 @@ class RunnerConfig(object): - prepare_env - prepare_command - It's also responsiblel for wrapping the command with the proper ssh agent invocation + It's also responsible for wrapping the command with the proper ssh agent invocation and setting early ANSIBLE_ environment variables. """ if self.private_data_dir is None:
Docstring minor corrections (runner_config)
diff --git a/get_http.go b/get_http.go index <HASH>..<HASH> 100644 --- a/get_http.go +++ b/get_http.go @@ -173,7 +173,6 @@ func (g *HttpGetter) GetFile(dst string, src *url.URL) error { } req.Method = "GET" - req.Header = g.Header resp, err := g.Client.Do(req) if err != nil { return err
don't reset headers to allow range request to work
diff --git a/python_modules/dagster/dagster_tests/cli_tests/command_tests/test_launch_command.py b/python_modules/dagster/dagster_tests/cli_tests/command_tests/test_launch_command.py index <HASH>..<HASH> 100644 --- a/python_modules/dagster/dagster_tests/cli_tests/command_tests/test_launch_command.py +++ b/python_modules/dagster/dagster_tests/cli_tests/command_tests/test_launch_command.py @@ -55,9 +55,7 @@ def test_launch_non_existant_file(): with default_cli_test_instance() as instance: kwargs = non_existant_python_origin_target_args() - with pytest.raises( - DagsterUserCodeProcessError, match=re.escape("No such file or directory") - ): + with pytest.raises(DagsterUserCodeProcessError): run_launch(kwargs, instance)
[easy] fix launch test on windows by being less specific about error message Summary: Missing file messages differ between windows and unix (and escape differently), just don't try to match the string for now. Test Plan: BK + Azure Reviewers: alangenfeld, sashank, max, johann, prha Reviewed By: prha Differential Revision: <URL>
diff --git a/pyup/cli.py b/pyup/cli.py index <HASH>..<HASH> 100644 --- a/pyup/cli.py +++ b/pyup/cli.py @@ -87,6 +87,6 @@ class CLIBundle(RequirementsBundle): class CLIRequirementFile(RequirementFile): def iter_lines(self, lineno=0): - bar = tqdm(self.content.splitlines(), desc="Processing {}".format(self.path)) + bar = tqdm(self.content.splitlines()[lineno:], desc="Processing {}".format(self.path)) for item in bar: yield item
fixed a bug on the CLI where the bot was unable to parse hashed requirements
diff --git a/android/src/main/java/com/dieam/reactnativepushnotification/modules/RNPushNotification.java b/android/src/main/java/com/dieam/reactnativepushnotification/modules/RNPushNotification.java index <HASH>..<HASH> 100644 --- a/android/src/main/java/com/dieam/reactnativepushnotification/modules/RNPushNotification.java +++ b/android/src/main/java/com/dieam/reactnativepushnotification/modules/RNPushNotification.java @@ -60,9 +60,11 @@ public class RNPushNotification extends ReactContextBaseJavaModule { } private void sendEvent(String eventName, Object params) { - mReactContext - .getJSModule(DeviceEventManagerModule.RCTDeviceEventEmitter.class) - .emit(eventName, params); + if ( mReactContext.hasActiveCatalystInstance() ) { + mReactContext + .getJSModule(DeviceEventManagerModule.RCTDeviceEventEmitter.class) + .emit(eventName, params); + } } public void newIntent(Intent intent) {
Check if React instance was fully loaded before sending events
diff --git a/lib/emites/entities/nfse.rb b/lib/emites/entities/nfse.rb index <HASH>..<HASH> 100644 --- a/lib/emites/entities/nfse.rb +++ b/lib/emites/entities/nfse.rb @@ -20,6 +20,8 @@ module Emites attribute :send_nfse_taker, Boolean attribute :service_values, NfseValues attribute :_links, Array + attribute :created_at, DateTime + attribute :updated_at, DateTime def url(action) links = self._links || [] diff --git a/spec/emites/entities/nfse_spec.rb b/spec/emites/entities/nfse_spec.rb index <HASH>..<HASH> 100644 --- a/spec/emites/entities/nfse_spec.rb +++ b/spec/emites/entities/nfse_spec.rb @@ -132,7 +132,7 @@ describe Emites::Entities::Nfse do :emission_date_nfse, :operation_nature, :other_informations, :competence, :special_regime, :status, :description, :send_nfse_taker, :service_values, - :_links + :created_at, :updated_at, :_links ] describe "#url" do
Adds created_at and updated_at properties to nfse.
diff --git a/tests/unit/test_spm.py b/tests/unit/test_spm.py index <HASH>..<HASH> 100644 --- a/tests/unit/test_spm.py +++ b/tests/unit/test_spm.py @@ -1,8 +1,3 @@ -# coding: utf-8 - -# Import Python libs -from __future__ import absolute_import - import os import shutil import tempfile @@ -13,8 +8,6 @@ import salt.utils.files from tests.support.helpers import destructiveTest from tests.support.mixins import AdaptedConfigurationTestCaseMixin from tests.support.mock import MagicMock, patch - -# Import Salt Testing libs from tests.support.unit import TestCase _F1 = {
Drop Py2 and six on tests/unit/test_spm.py
diff --git a/lib/oxcelix/workbook.rb b/lib/oxcelix/workbook.rb index <HASH>..<HASH> 100644 --- a/lib/oxcelix/workbook.rb +++ b/lib/oxcelix/workbook.rb @@ -14,16 +14,12 @@ module Oxcelix # The Workbook class will open the excel file, and convert it to a collection of # Matrix objects - # @!attribute [rw] sheetbase - # @return [Hash] sheetbase Single sheet metadata - will be obsolete in the future # @!attribute [rw] sheets # @return [Array] sheets Collection of {Sheet} objects - # @!attribute [rw] sharedstrings - # @return [Sharedstrings] sharedstrings returns a {Sharedstrings} object used to interpolate string indexes with their actual value. class Workbook include Cellhelper include Workbookhelper - attr_accessor :sheetbase, :sheets, :sharedstrings + attr_accessor :sheets ## # Create a new Workbook object. # @@ -58,6 +54,7 @@ module Oxcelix } @sheets=[] @sheetbase={} + @sharedstrings=[] f=IO.read(@destination+'/xl/workbook.xml') @a=Ox::load(f)
Removed sharedstrings and sheetbase properties as they were useless. Docs updated with the change.
diff --git a/lib/heroku/jsplugin.rb b/lib/heroku/jsplugin.rb index <HASH>..<HASH> 100644 --- a/lib/heroku/jsplugin.rb +++ b/lib/heroku/jsplugin.rb @@ -15,7 +15,7 @@ class Heroku::JSPlugin command = commands.find { |t| t["topic"] == topic && (t["command"] == nil || t["default"]) } end return if !command || command["hidden"] - run(command['topic'], command['command'], ARGV[1..-1]) + run(command['topic'], command['command'], args) end def self.load!
use passed in args for v4 takeover
diff --git a/salt/state.py b/salt/state.py index <HASH>..<HASH> 100644 --- a/salt/state.py +++ b/salt/state.py @@ -33,13 +33,13 @@ import salt.fileclient import salt.utils.event import salt.syspaths as syspaths from salt.utils import context, immutabletypes -from six import string_types +from salt.utils.six import string_types from salt.template import compile_template, compile_template_str from salt.exceptions import SaltRenderError, SaltReqTimeoutError, SaltException from salt.utils.odict import OrderedDict, DefaultOrderedDict # Import third party libs -from six.moves import range +from salt.utils.six.moves import range log = logging.getLogger(__name__)
Replaced module six in file /salt/state.py
diff --git a/asq/test/test_log.py b/asq/test/test_log.py index <HASH>..<HASH> 100644 --- a/asq/test/test_log.py +++ b/asq/test/test_log.py @@ -120,3 +120,9 @@ class TestLog(unittest.TestCase): 'take two : [1] = 8', 'take two : END (EAGER)' ] self.assertEqual(logger.log, c) + + def test_log_closed(self): + a = [1, 6, 4, 3, 9, 2] + b = Queryable(a) + b.close() + self.assertRaises(ValueError, lambda: b.log())
Coverage for calling log() on a closed Queryable.
diff --git a/graylog2-server/src/main/java/org/graylog2/bundles/BundleImporter.java b/graylog2-server/src/main/java/org/graylog2/bundles/BundleImporter.java index <HASH>..<HASH> 100644 --- a/graylog2-server/src/main/java/org/graylog2/bundles/BundleImporter.java +++ b/graylog2-server/src/main/java/org/graylog2/bundles/BundleImporter.java @@ -454,7 +454,7 @@ public class BundleImporter { dashboardService.addWidget(dashboard, widget); final WidgetPositionRequest widgetPosition = new WidgetPositionRequest(widget.getId(), - dashboardWidget.getRow(), dashboardWidget.getCol()); + dashboardWidget.getCol(), dashboardWidget.getRow()); widgetPositions.add(widgetPosition); }
Correct widget position when added in a bundle
diff --git a/src/MultiplexStream.js b/src/MultiplexStream.js index <HASH>..<HASH> 100644 --- a/src/MultiplexStream.js +++ b/src/MultiplexStream.js @@ -115,6 +115,8 @@ function Tunnel(id, streamMultiplexStream) { self.readable = true; self.writable = true; + + self.id = id; self.write = function(data, encoding) { var buffer = Buffer.isBuffer(data) ? data : new Buffer(data, encoding); @@ -188,7 +190,7 @@ function MultiplexStream(callback) { } }); - self.createStream = function(callback, id){ + self.createStream = function(id){ id = id || uuid.v1(); var tunnel = new Tunnel(id, self); registerTunnel(id, tunnel);
Allow streams to be named by the user. 'callback' was entirely unused, and has been replaced.
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -4,7 +4,7 @@ from os.path import join from setuptools import setup # Also in twarc.py -__version__ = '1.0.0' +__version__ = '1.0.1' if sys.version_info[0] < 3: dependencies = open(join('requirements', 'python2.txt')).read().split() diff --git a/twarc.py b/twarc.py index <HASH>..<HASH> 100755 --- a/twarc.py +++ b/twarc.py @@ -2,7 +2,7 @@ from __future__ import print_function -__version__ = '1.0.0' # also in setup.py +__version__ = '1.0.1' # also in setup.py import os import re @@ -58,6 +58,17 @@ def main(): format="%(asctime)s %(levelname)s %(message)s" ) + if command == "version": + print("twarc v%s" % __version__) + sys.exit() + elif command == "help" or not command: + parser.print_help() + print("\nPlease use one of the following commands:\n") + for cmd in commands: + print(" - %s" % cmd) + print("\nFor example:\n\n twarc search blacklivesmatter") + sys.exit(1) + t = Twarc( consumer_key=args.consumer_key, consumer_secret=args.consumer_secret,
allow people to use version and help without asking for credentials. fixes #<I>
diff --git a/ViewErrorBag.php b/ViewErrorBag.php index <HASH>..<HASH> 100644 --- a/ViewErrorBag.php +++ b/ViewErrorBag.php @@ -12,6 +12,17 @@ class ViewErrorBag implements Countable { protected $bags = []; /** + * Get a MessageBag instance from the bags. + * + * @param string $key + * @return \Illuminate\Support\MessageBag + */ + public function getBag($key) + { + return array_get($this->bags, $key, new MessageBag); + } + + /** * Add a new MessageBag instance to the bags. * * @param string $key
Added getBag method to ViewErrorBag.
diff --git a/intranet/apps/auth/backends.py b/intranet/apps/auth/backends.py index <HASH>..<HASH> 100644 --- a/intranet/apps/auth/backends.py +++ b/intranet/apps/auth/backends.py @@ -57,18 +57,9 @@ class KerberosAuthenticationBackend(object): if exitstatus == 0: logger.debug("Kerberos authorized {}@{}".format(username, realm)) - kgetcred = pexpect.spawnu("/usr/bin/kgetcred ldap/{}@{}".format(settings.HOST, settings.LDAP_REALM)) - kgetcred.expect(pexpect.EOF) - kgetcred.close() - - if kgetcred.exitstatus == 0: - logger.debug("Kerberos got ticket for ldap service") - return True - else: - logger.error("Kerberos failed to get ticket for LDAP service") - os.system("/usr/bin/kdestroy") - return False + return True else: + logger.debug("Kerberos failed to authorize {}".format(username)) os.system("/usr/bin/kdestroy") return False
Remove kgetcred from auth procedure
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -37,7 +37,7 @@ setup( 'deform', 'fanstatic', 'js.jquery', - 'js.jquery-form', + 'js.jquery_form', 'js.jquery_maskedinput', 'js.jquery_maskmoney', 'js.jquery_timepicker_addon',
Be consistent The other packages use _ instead of -
diff --git a/ext/RMagick/extconf.rb b/ext/RMagick/extconf.rb index <HASH>..<HASH> 100644 --- a/ext/RMagick/extconf.rb +++ b/ext/RMagick/extconf.rb @@ -358,7 +358,7 @@ module RMagick $defs = [] # Force re-compilation if the generated Makefile changed. - $config_h = 'Makefile rmagick.h' + $config_h = 'Makefile' create_makefile('RMagick2') print_summary
CI: Remove rmagick.h from forced recompile checking (#<I>)
diff --git a/tools/mpremote/mpremote/main.py b/tools/mpremote/mpremote/main.py index <HASH>..<HASH> 100644 --- a/tools/mpremote/mpremote/main.py +++ b/tools/mpremote/mpremote/main.py @@ -268,7 +268,7 @@ def do_filesystem(pyb, args): def _list_recursive(files, path): if os.path.isdir(path): for entry in os.listdir(path): - _list_recursive(files, os.path.join(path, entry)) + _list_recursive(files, "/".join((path, entry))) else: files.append(os.path.split(path)) @@ -289,7 +289,7 @@ def do_filesystem(pyb, args): if d not in known_dirs: pyb.exec_("try:\n uos.mkdir('%s')\nexcept OSError as e:\n print(e)" % d) known_dirs.add(d) - pyboard.filesystem_command(pyb, ["cp", os.path.join(dir, file), ":" + dir + "/"]) + pyboard.filesystem_command(pyb, ["cp", "/".join((dir, file)), ":" + dir + "/"]) else: pyboard.filesystem_command(pyb, args) args.clear()
tools/mpremote: Fix "fs cp -r" on Windows. A backslash in the directory name will end up being passed through to the device and becoming a backslash in a filename, rather than being interpreted as directories. This makes "cp -r" problematic on Windows. Changing to simply "/",join() fixes this.
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -502,10 +502,10 @@ devel = [ 'pre-commit', 'pylint==2.6.0', 'pysftp', - 'pytest', + 'pytest~=6.0', 'pytest-cov', 'pytest-instafail', - 'pytest-rerunfailures', + 'pytest-rerunfailures~=9.1', 'pytest-timeouts', 'pytest-xdist', 'pywinrm',
Update to Pytest <I> (#<I>) And pytest 6 removed a class that the rerunfailures plugin was using, so we have to upgrade that too.
diff --git a/lib/test/phantomas.js b/lib/test/phantomas.js index <HASH>..<HASH> 100644 --- a/lib/test/phantomas.js +++ b/lib/test/phantomas.js @@ -21,7 +21,7 @@ module.exports = function (config, opts) { opts = Object.assign({}, opts); function testPhantomas() { - var phantomasOpts = omit(config, ['src', 'dest']); + var phantomasOpts = omit(config, ['src']); return gulp.src(config.src) .pipe(phantomas(phantomasOpts));
Do not strip dest key in phantomas config
diff --git a/myql/myql.py b/myql/myql.py index <HASH>..<HASH> 100755 --- a/myql/myql.py +++ b/myql/myql.py @@ -109,9 +109,10 @@ class YQL(object): args is a list of ['column', 'operator', 'value'] ''' if cond[1].lower() == 'in': - #if len(cond[2]) > 1: - if not isinstance(cond[2], str): + if not isinstance(cond[2], str) and 'select' not in cond[2][0].lower() : cond[2] = "({0})".format(','.join(map(str,["'{0}'".format(e) for e in cond[2]]))) + elif not isinstance(cond[2], str) and 'select' in cond[2][0].lower() : + cond[2] = "({0})".format(','.join(map(str,["{0}".format(e) for e in cond[2]]))) else: cond[2] = "({0})".format(','.join(map(str,["{0}".format(e) for e in cond[2]])))
fix #<I>: special treatment for IN cond with SELECT statement in it
diff --git a/lib/rango/ext/platform.rb b/lib/rango/ext/platform.rb index <HASH>..<HASH> 100644 --- a/lib/rango/ext/platform.rb +++ b/lib/rango/ext/platform.rb @@ -7,22 +7,22 @@ module Rango def eql?(platform) !! RUBY_PLATFORM.match(/#{platform}/i) end - + def windows? - eql?("win32") + eql?("mswin|mingw") end - + def linux? eql?("linux") end - + def macosx? eql?("universal-darwin") end - + def unix? linux? or macosx? end end end -end +end \ No newline at end of file
Correct indetification of Windows platform
diff --git a/lib/discordrb/events/message.rb b/lib/discordrb/events/message.rb index <HASH>..<HASH> 100644 --- a/lib/discordrb/events/message.rb +++ b/lib/discordrb/events/message.rb @@ -5,7 +5,23 @@ module Discordrb::Events class MessageEvent < Event attr_reader :message, :saved_message + # @!attribute [r] author + # @return [User] who sent this message. + # @see Message#author + # @!attribute [r] channel + # @return [Channel] the channel in which this message was sent. + # @see Message#channel + # @!attribute [r] content + # @return [String] the message's content. + # @see Message#content + # @!attribute [r] timestamp + # @return [Time] the time at which the message was sent. + # @see Message#timestamp delegate :author, :channel, :content, :timestamp, to: :message + + # @!attribute [r] server + # @return [Server, nil] the server where this message was sent, or nil if it was sent in PM. + # @see Channel#server delegate :server, to: :channel def initialize(message, bot)
Do the same for MessageEvent too (not just for AwaitEvent)
diff --git a/bulbs/content/models.py b/bulbs/content/models.py index <HASH>..<HASH> 100644 --- a/bulbs/content/models.py +++ b/bulbs/content/models.py @@ -335,7 +335,7 @@ class PolymorphicIndexable(object): return '%s_%s' % (cls._meta.app_label, cls.__name__.lower()) -class Tag(PolymorphicModel, PolymorphicIndexable): +class Tag(PolymorphicIndexable, PolymorphicModel): """Model for tagging up Content.""" name = models.CharField(max_length=255) slug = models.SlugField() @@ -380,7 +380,7 @@ class Section(Tag): proxy = True -class Content(PolymorphicModel, PolymorphicIndexable): +class Content(PolymorphicIndexable, PolymorphicModel): """The base content model from which all other content derives.""" published = models.DateTimeField(blank=True, null=True) title = models.CharField(max_length=512)
Switch around the MRO so model `save()` doesn't receive `refresh` or `index` parameters
diff --git a/problem-spring-web-autoconfigure/src/main/java/org/zalando/problem/spring/web/autoconfigure/security/SecurityConfiguration.java b/problem-spring-web-autoconfigure/src/main/java/org/zalando/problem/spring/web/autoconfigure/security/SecurityConfiguration.java index <HASH>..<HASH> 100644 --- a/problem-spring-web-autoconfigure/src/main/java/org/zalando/problem/spring/web/autoconfigure/security/SecurityConfiguration.java +++ b/problem-spring-web-autoconfigure/src/main/java/org/zalando/problem/spring/web/autoconfigure/security/SecurityConfiguration.java @@ -1,6 +1,7 @@ package org.zalando.problem.spring.web.autoconfigure.security; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Import; import org.springframework.security.config.annotation.web.builders.HttpSecurity; @@ -11,6 +12,7 @@ import org.zalando.problem.spring.web.advice.security.SecurityProblemSupport; * Registers exception handling in spring-security */ @Configuration +@ConditionalOnClass(WebSecurityConfigurerAdapter.class) //only when spring-security is in classpath @Import(SecurityProblemSupport.class) public class SecurityConfiguration extends WebSecurityConfigurerAdapter { @Autowired
Add missing conditional for spring-security Without it, if spring security is not present, it creates a runtime exception due to AuthenticationEntryPointr not being in the classpath
diff --git a/salt/utils/vmware.py b/salt/utils/vmware.py index <HASH>..<HASH> 100644 --- a/salt/utils/vmware.py +++ b/salt/utils/vmware.py @@ -1407,8 +1407,6 @@ def wait_for_task(task, instance_name, task_type, sleep_seconds=1, log_level='de # task is in an error state try: raise task_info.error - log.error(exc) - raise salt.exceptions.VMwareNotFoundError(exc.msg) except vim.fault.NoPermission as exc: log.error(exc) raise salt.exceptions.VMwareApiError(
Removed additional raise in vmware.wait_for_task
diff --git a/lib/psych/visitors/to_ruby.rb b/lib/psych/visitors/to_ruby.rb index <HASH>..<HASH> 100644 --- a/lib/psych/visitors/to_ruby.rb +++ b/lib/psych/visitors/to_ruby.rb @@ -61,7 +61,7 @@ module Psych case o.tag when '!binary', 'tag:yaml.org,2002:binary' o.value.unpack('m').first - when /^!(?:str|ruby\/string)(?::(.*))?/, 'tag:yaml.org,2002:str' + when /^!(?:str|ruby\/string)(?::(.*))?$/, 'tag:yaml.org,2002:str' klass = resolve_class($1) if klass klass.allocate.replace o.value @@ -208,7 +208,7 @@ module Psych obj end - when /^!(?:str|ruby\/string)(?::(.*))?/, 'tag:yaml.org,2002:str' + when /^!(?:str|ruby\/string)(?::(.*))?$/, 'tag:yaml.org,2002:str' klass = resolve_class($1) members = {} string = nil
don't assume any tag starting with 'str' is a string
diff --git a/modules/streams/src/main/java/com/aboutsip/streams/impl/SimpleCallStateMachine.java b/modules/streams/src/main/java/com/aboutsip/streams/impl/SimpleCallStateMachine.java index <HASH>..<HASH> 100644 --- a/modules/streams/src/main/java/com/aboutsip/streams/impl/SimpleCallStateMachine.java +++ b/modules/streams/src/main/java/com/aboutsip/streams/impl/SimpleCallStateMachine.java @@ -397,7 +397,6 @@ public final class SimpleCallStateMachine { } } - /** * When a messages (or event in general) "arrives" to this state machine but * this message's arrival time is actually before our last seen message then @@ -499,7 +498,7 @@ public final class SimpleCallStateMachine { return -1; } - return t2 - t1; + return (t2 - t1) / 1000; } public long getDuration() {
small bug where we returned the PDD in microseconds instead of milliseconds as the javadoc said we would
diff --git a/registrasion/controllers/invoice.py b/registrasion/controllers/invoice.py index <HASH>..<HASH> 100644 --- a/registrasion/controllers/invoice.py +++ b/registrasion/controllers/invoice.py @@ -122,12 +122,19 @@ class InvoiceController(ForId, object): line_items = [] + def format_product(product): + return "%s - %s" % (product.category.name, product.name) + + def format_discount(discount, product): + description = discount.description + return "%s (%s)" % (description, format_product(product)) + invoice_value = Decimal() for item in product_items: product = item.product line_item = commerce.LineItem( invoice=invoice, - description="%s - %s" % (product.category.name, product.name), + description=format_product(product), quantity=item.quantity, price=product.price, product=product, @@ -137,7 +144,7 @@ class InvoiceController(ForId, object): for item in discount_items: line_item = commerce.LineItem( invoice=invoice, - description=item.discount.description, + description=format_discount(item.discount, item.product), quantity=item.quantity, price=cls.resolve_discount_value(item) * -1, product=item.product,
Discount line items now describe the product that the discount applies to.
diff --git a/attitude/plot/pca_aligned.py b/attitude/plot/pca_aligned.py index <HASH>..<HASH> 100644 --- a/attitude/plot/pca_aligned.py +++ b/attitude/plot/pca_aligned.py @@ -29,6 +29,7 @@ def plot_aligned(pca, sparse=True, **kwargs): lengths = [j-i for i,j in minmax] if sparse: + i = 1 l = len(A) if l > 10000: i = N.ceil(l/10000)
Updated plotting of axis-aligned data
diff --git a/src/Tokens.php b/src/Tokens.php index <HASH>..<HASH> 100644 --- a/src/Tokens.php +++ b/src/Tokens.php @@ -135,6 +135,7 @@ class Tokens try { $validate->structure(); + $validate->algorithmNotNone(); $validate->signature(); return true; } catch (ValidateException $e) {
Added algorithmNotNone check to Tokens Validate method to fix security flaw.
diff --git a/bika/lims/browser/bika_listing.py b/bika/lims/browser/bika_listing.py index <HASH>..<HASH> 100644 --- a/bika/lims/browser/bika_listing.py +++ b/bika/lims/browser/bika_listing.py @@ -944,14 +944,18 @@ class BikaListingView(BrowserView): # Set states and state titles ptype = obj.portal_type for state_var, state in states.items(): + results_dict[state_var] = state st_title = self.state_titles.get(state, None) if not st_title: - st_title = self.workflow.getTitleForStateOnType(state, - ptype) - if st_title: - st_title = t(PMF(st_title)) - self.state_titles[state] = st_title - results_dict[state_var] = state + try: + st_title = self.workflow.getTitleForStateOnType(state, + ptype) + if st_title: + st_title = t(PMF(st_title)) + self.state_titles[state] = st_title + except: + logger.warning("Cannot obtain title for state {0} and " + "object {1}".format(state, obj.getId)) if st_title and state_var == obj.review_state: results_dict['state_title'] = st_title
Added preventive try except on state's title retrieval in bikallisting
diff --git a/lib/redis/connection/memory.rb b/lib/redis/connection/memory.rb index <HASH>..<HASH> 100644 --- a/lib/redis/connection/memory.rb +++ b/lib/redis/connection/memory.rb @@ -16,7 +16,8 @@ class Redis end def self.connect(options = {}) - self.instances[options] ||= self.new(true) + instance_key = [options[:host], options[:port]] + instances[instance_key] ||= self.new(options) end def initialize(connected = false)
Store memory instances by host & port
diff --git a/src/js/bootstrap-datetimepicker.js b/src/js/bootstrap-datetimepicker.js index <HASH>..<HASH> 100644 --- a/src/js/bootstrap-datetimepicker.js +++ b/src/js/bootstrap-datetimepicker.js @@ -851,7 +851,8 @@ detachDatePickerGlobalEvents(); picker.widget.remove(); picker.element.removeData('DateTimePicker'); - picker.component.removeData('DateTimePicker'); + if (picker.component) + picker.component.removeData('DateTimePicker'); }; picker.show = function (e) {
Fixed an exception on destroy() if the element isn't an <input>
diff --git a/test/utils-request-test.js b/test/utils-request-test.js index <HASH>..<HASH> 100644 --- a/test/utils-request-test.js +++ b/test/utils-request-test.js @@ -25,6 +25,8 @@ describe('Request utils', function(){ }); describe('#makeRequest', function(){ + this.timeout(15000); + it('should return object with url and body properties', function(){ return request.makeRequest({}, 'http://example.com').then(function (data) { data.should.have.properties(['url', 'body']);
Add timeout for makeRequest test
diff --git a/Rule.js b/Rule.js index <HASH>..<HASH> 100644 --- a/Rule.js +++ b/Rule.js @@ -81,24 +81,29 @@ Rule.makeItemProcessor = function(rules){ terminatePreviousAcc(currentAccumulator); // TODO: remove currentAccumulator parameter } } + var applyRulesOnNextItem = true; return function(item){ if (!item) // last item of the file => flush buffers return terminateAccumulator(); else if (!item.text) return; - for (var r in rules) { - var accumulator = rules[r].test(item); - if (accumulator) { - terminateAccumulator(); - LOG("current accumulator:", accumulator.methodName); - currentAccumulator = accumulator; - delete rules[r]; - return; + //LOG("ITEM:", item.text, "=> apply rules:", applyRulesOnNextItem); + if (applyRulesOnNextItem) + for (var r in rules) { + var accumulator = rules[r].test(item); + if (accumulator) { + terminateAccumulator(); + LOG("current accumulator:", accumulator.methodName); + currentAccumulator = accumulator; + delete rules[r]; + return; + } } - } + else + applyRulesOnNextItem = true; // if reaching this point, the current item matches none of the rules => accumulating data on current accumulator if (currentAccumulator) - currentAccumulator(item); + applyRulesOnNextItem = !currentAccumulator(item); }; }
new feature: if an accumulator returns true, rules won't be considered on next item => the current accumulator keeps control
diff --git a/lib/instana/tracing/processor.rb b/lib/instana/tracing/processor.rb index <HASH>..<HASH> 100644 --- a/lib/instana/tracing/processor.rb +++ b/lib/instana/tracing/processor.rb @@ -23,8 +23,27 @@ module Instana # Sends all traces in @queue to the host # agent # + # FIXME: Add limits checking here in regards to: + # - Max HTTP Post size + # - Out of control/growing queue + # - Prevent another run of the timer while this is running + # def send return if @queue.empty? + + size = @queue.size + if size > 10 + Instana.logger.debug "Trace queue is #{size}" + end + + spans = [] + until @queue.empty? do + set = @queue.pop(true) + set.each do |s| + spans << s.raw + end + end + ::Instana.agent.report_traces(spans) end end end
Better queue processing and report of traces
diff --git a/py/tests/integration/external_only/test_H2OContext.py b/py/tests/integration/external_only/test_H2OContext.py index <HASH>..<HASH> 100644 --- a/py/tests/integration/external_only/test_H2OContext.py +++ b/py/tests/integration/external_only/test_H2OContext.py @@ -68,7 +68,7 @@ def testDownloadLogsAsLOG(spark): clusterName = hc._conf.cloudName() with open(path, 'r') as f: - lines = list(filter(lambda line: "INFO: H2O cloud name: '" + clusterName + "'" in line, f.readlines())) + lines = list(filter(lambda line: "INFO water.default: H2O cloud name: '" + clusterName + "'" in line, f.readlines())) assert len(lines) >= 1 hc.stop()
[SW-<I>][Followup] Log structure has changed after changes on H2O side (#<I>)
diff --git a/checkers/exceptions.py b/checkers/exceptions.py index <HASH>..<HASH> 100644 --- a/checkers/exceptions.py +++ b/checkers/exceptions.py @@ -75,7 +75,8 @@ MSGS = { 'unpacking-in-except', 'Python3 will not allow implicit unpacking of exceptions in except ' 'clauses. ' - 'See http://www.python.org/dev/peps/pep-3110/'), + 'See http://www.python.org/dev/peps/pep-3110/', + {'maxversion': (3, 0)}), }
Mark unpacking-in-except as python2-specific
diff --git a/benchexec/tablegenerator/test_integration/__init__.py b/benchexec/tablegenerator/test_integration/__init__.py index <HASH>..<HASH> 100644 --- a/benchexec/tablegenerator/test_integration/__init__.py +++ b/benchexec/tablegenerator/test_integration/__init__.py @@ -148,7 +148,7 @@ class TableGeneratorIntegrationTests(unittest.TestCase): csv_file, csv_diff_file, ) = self.generate_tables_and_check_produced_files( - args, table_prefix, diff_prefix + args + ["--static-table"], table_prefix, diff_prefix ) generated_csv = util.read_file(csv_file)
In table-generator's integration tests, continue to use old HTML tables. These tests compare created tables against expected files, and for the dynamically-rendered new tables this does not make as much sense. We need to find a better way to test these.
diff --git a/cms_themes/__init__.py b/cms_themes/__init__.py index <HASH>..<HASH> 100644 --- a/cms_themes/__init__.py +++ b/cms_themes/__init__.py @@ -43,13 +43,12 @@ def set_themes(): return theme_templates = [] - theme_static = [] for theme_dir in os.listdir(settings.THEMES_DIR): if theme_dir in themes: theme_full_path = os.path.join(settings.THEMES_DIR, theme_dir) if os.path.isdir(theme_full_path) and 'templates' in os.listdir(theme_full_path): template_path = os.path.join(theme_full_path, 'templates') - setattr(settings, 'TEMPLATE_DIRS', (template_path,) + settings.DEFAULT_TEMPLATE_DIRS) + setattr(settings, 'TEMPLATE_DIRS', [template_path,] + settings.DEFAULT_TEMPLATE_DIRS) for template in os.listdir(template_path): template_display = '%s (%s)' % (template.replace('_', ' ').title().split('.')[0], theme_dir) theme_templates.append((template, template_display))
Fixed list addition error caused from last code merge
diff --git a/jptsmeta.py b/jptsmeta.py index <HASH>..<HASH> 100644 --- a/jptsmeta.py +++ b/jptsmeta.py @@ -483,7 +483,9 @@ class JPTSMeta(object): """ <copyright-statement> is an optional, 0 or 1, element in <article-meta> which can contain text, address linking elements, and formatting - elements. This method will return the node if it exists. + elements. This method will return the node if it exists. In version 2.3 + it is best practice to put the <copyright-statement> element and its + information within the <permissions> tag. """ try: cs = self.getChildrenByTagName('copyright-statement', self.article_meta)[0] @@ -497,7 +499,8 @@ class JPTSMeta(object): <copyright-year> is an optional, 0 or 1, element in <article-meta> which may contain only text, numbers, and special characters. If the node exists, this method will return the text data it contains as a - string. + string. In version 2.3 it is best practice to put the <copyright-year> + element and its information within the <permissions> tag. """ try: cy = self.getChildrenByTagName('copyright-year', self.article_meta)[0]
Updated docstrings for getCopyrightStatement() and getCopyrightYear() to note that their results should be not used in good practice of the JPTS
diff --git a/qiskit/synthesis/evolution/lie_trotter.py b/qiskit/synthesis/evolution/lie_trotter.py index <HASH>..<HASH> 100644 --- a/qiskit/synthesis/evolution/lie_trotter.py +++ b/qiskit/synthesis/evolution/lie_trotter.py @@ -24,7 +24,7 @@ class LieTrotter(ProductFormula): r"""The Lie-Trotter product formula. The Lie-Trotter formula approximates the exponential of two non-commuting operators - with products of their exponentials up to a first order error: + with products of their exponentials up to a second order error: .. math:: @@ -35,13 +35,16 @@ class LieTrotter(ProductFormula): .. math:: - e^{-it(XX + ZZ)} = e^{-it XX}e^{-it ZZ} + \mathcal{O}(t). + e^{-it(XX + ZZ)} = e^{-it XX}e^{-it ZZ} + \mathcal{O}(t^2). References: [1]: D. Berry, G. Ahokas, R. Cleve and B. Sanders, "Efficient quantum algorithms for simulating sparse Hamiltonians" (2006). `arXiv:quant-ph/0508139 <https://arxiv.org/abs/quant-ph/0508139>`_ + [2]: N. Hatano and M. Suzuki, + "Finding Exponential Product Formulas of Higher Orders" (2005). + `arXiv:math-ph/0506007 <https://arxiv.org/pdf/math-ph/0506007.pdf>`_ """ def __init__(
Fix the order of the Lie-Trotter formula in the documentation (#<I>) * Fix the order of the Lie-Trotter formula in the documentation The Lie-Trotter formula has a second order error [1][2]. [1] <URL>