diff
stringlengths
65
26.7k
message
stringlengths
7
9.92k
diff --git a/src/SetupCommand.php b/src/SetupCommand.php index <HASH>..<HASH> 100644 --- a/src/SetupCommand.php +++ b/src/SetupCommand.php @@ -69,7 +69,7 @@ class SetupCommand extends Command // DOMAIN PATH $this->_print('------------------------------'); $this->_lineBreak(); - $this->_print('Enter your project\'s domain (example: my-app), this will be used for localization and builds:'); + $this->_print('Enter your project\'s text domain (example: my-app), this will be used for localization and builds:'); $this->_lineBreak(); $domain = $this->listener->getInput(); $domain = empty($domain) ? 'my-app' : $domain; @@ -82,9 +82,9 @@ class SetupCommand extends Command // End $this->_print('------------------------------'); $this->_lineBreak(); - $this->_print('Your project namespace is "%s"', $namespace); + $this->_print('Your project\'s namespace is "%s"', $namespace); $this->_lineBreak(); - $this->_print('Your project domain is "%s"', $domain); + $this->_print('Your project\'s text domain is "%s"', $domain); $this->_lineBreak(); $this->_print('Setup completed!'); $this->_lineBreak();
Clarify domain to be text domain Also updated project to project's for grammar
diff --git a/src/Exscript/workqueue/WorkQueue.py b/src/Exscript/workqueue/WorkQueue.py index <HASH>..<HASH> 100644 --- a/src/Exscript/workqueue/WorkQueue.py +++ b/src/Exscript/workqueue/WorkQueue.py @@ -20,12 +20,14 @@ class WorkQueue(object): This class implements the asynchronous workqueue and is the main API for using the workqueue module. """ - def __init__(self, **kwargs): + def __init__(self, debug = 0, max_threads = 1): """ Constructor. - @keyword debug: The debug level (default is 0) - @keyword max_threads: Number of concurrent connections (default is 1). + @type debug: int + @param debug: The debug level. + @type max_threads: int + @param max_threads: The maximum number of concurrent threads. """ self.job_init_event = Event() self.job_started_event = Event() @@ -33,8 +35,8 @@ class WorkQueue(object): self.job_succeeded_event = Event() self.job_aborted_event = Event() self.queue_empty_event = Event() - self.debug = kwargs.get('debug', 0) - self.max_threads = kwargs.get('max_threads', 1) + self.debug = debug + self.max_threads = max_threads self.main_loop = None self._init()
Exscript.workqueue: replace **kwargs by explicit keywords.
diff --git a/prow/kube/types.go b/prow/kube/types.go index <HASH>..<HASH> 100644 --- a/prow/kube/types.go +++ b/prow/kube/types.go @@ -133,6 +133,27 @@ type Container struct { Resources Resources `json:"resources,omitempty"` SecurityContext *SecurityContext `json:"securityContext,omitempty"` VolumeMounts []VolumeMount `json:"volumeMounts,omitempty"` + Lifecycle *Lifecycle `json:"lifecycle,omitempty"` +} + +// Lifecycle describes actions that the management system should take in response to container lifecycle +// events. For the PostStart and PreStop lifecycle handlers, management of the container blocks +// until the action is complete, unless the container process fails, in which case the handler is aborted. +type Lifecycle struct { + PostStart *Handler `json:"postStart,omitempty"` + PreStop *Handler `json:"preStop,omitempty"` +} + +// Handler defines a specific action that should be taken +// TODO: pass structured data to these actions, and document that data here. +type Handler struct { + // Exec specifies the action to take. + Exec *ExecAction `json:"exec,omitempty"` +} + +// ExecAction describes a "run in container" action. +type ExecAction struct { + Command []string `json:"command,omitempty"` } type Port struct {
Add support for ProwJob lifecycle hooks
diff --git a/GPy/models/GP.py b/GPy/models/GP.py index <HASH>..<HASH> 100644 --- a/GPy/models/GP.py +++ b/GPy/models/GP.py @@ -253,8 +253,9 @@ class GP(model): Xnew, xmin, xmax = x_frame1D(Xu, plot_limits=plot_limits) m, var, lower, upper = self.predict(Xnew, which_parts=which_parts) - gpplot(Xnew, m, lower, upper) - pb.plot(Xu[which_data], self.likelihood.data[which_data], 'kx', mew=1.5) + for d in range(m.shape[1]): + gpplot(Xnew, m[:,d], lower[:,d], upper[:,d]) + pb.plot(Xu[which_data], self.likelihood.data[which_data,d], 'kx', mew=1.5) if self.has_uncertain_inputs: pb.errorbar(Xu[which_data, 0], self.likelihood.data[which_data, 0], xerr=2 * np.sqrt(self.X_variance[which_data, 0]),
allowed GP models to plot multiple outputs (in 1D at least)
diff --git a/cmd/erasure-metadata.go b/cmd/erasure-metadata.go index <HASH>..<HASH> 100644 --- a/cmd/erasure-metadata.go +++ b/cmd/erasure-metadata.go @@ -102,7 +102,7 @@ func (fi FileInfo) IsValid() bool { func (fi FileInfo) ToObjectInfo(bucket, object string) ObjectInfo { object = decodeDirObject(object) versionID := fi.VersionID - if globalBucketVersioningSys.Enabled(bucket) && versionID == "" { + if (globalBucketVersioningSys.Enabled(bucket) || globalBucketVersioningSys.Suspended(bucket)) && versionID == "" { versionID = nullVersionID }
fix: translate empty versionID string to null version where appropriate (#<I>) We store the null version as empty string. We should translate it to null version for bucket with version suspended too.
diff --git a/bypy.py b/bypy.py index <HASH>..<HASH> 100755 --- a/bypy.py +++ b/bypy.py @@ -44,7 +44,7 @@ from __future__ import print_function from __future__ import division ### special variables that say about this module -__version__ = '1.2.15' +__version__ = '1.2.16' ### return (error) codes # they are put at the top because:
Version bumped to <I>
diff --git a/src/GitElephant/Command/Caller/Caller.php b/src/GitElephant/Command/Caller/Caller.php index <HASH>..<HASH> 100755 --- a/src/GitElephant/Command/Caller/Caller.php +++ b/src/GitElephant/Command/Caller/Caller.php @@ -92,7 +92,13 @@ class Caller extends AbstractCaller if (is_null($cwd) || !is_dir($cwd)) { $cwd = $this->repositoryPath; } - $process = Process::fromShellCommandline($cmd, $cwd); + + if (method_exists(Process::class, 'fromShellCommandline')) { + $process = Process::fromShellCommandline($cmd, $cwd); + } else { + // compatibility fix required for Symfony/Process < 4. + $process = new Process($cmd, $cwd); + } $process->setTimeout(15000); $process->run(); if (!in_array($process->getExitCode(), $acceptedExitCodes)) {
Fix #<I> by introducing a case distinction between Symfony Process versions
diff --git a/lib/arel/nodes/delete_statement.rb b/lib/arel/nodes/delete_statement.rb index <HASH>..<HASH> 100644 --- a/lib/arel/nodes/delete_statement.rb +++ b/lib/arel/nodes/delete_statement.rb @@ -1,7 +1,8 @@ # frozen_string_literal: true module Arel module Nodes - class DeleteStatement < Arel::Nodes::Binary + class DeleteStatement < Arel::Nodes::Node + attr_accessor :left, :right attr_accessor :limit alias :relation :left @@ -10,13 +11,27 @@ module Arel alias :wheres= :right= def initialize relation = nil, wheres = [] - super + super() + @left = relation + @right = wheres end def initialize_copy other super - @right = @right.clone + @left = @left.clone if @left + @right = @right.clone if @right + end + + def hash + [self.class, @left, @right].hash + end + + def eql? other + self.class == other.class && + self.left == other.left && + self.right == other.right end + alias :== :eql? end end end
Delete is not a NodeExpression, change parent This requires a little cut and paste from the Binary node, but it is used in different parts of sql
diff --git a/lib/models/make.js b/lib/models/make.js index <HASH>..<HASH> 100644 --- a/lib/models/make.js +++ b/lib/models/make.js @@ -53,9 +53,7 @@ module.exports = function( environment, mongoInstance ) { }, thumbnail: { type: String, - es_indexed: true, - required: true, - validate: validate( "isUrl" ) + es_indexed: true }, author: { type: String,
[#<I>] Thumbnail no longer required.
diff --git a/openid.php b/openid.php index <HASH>..<HASH> 100644 --- a/openid.php +++ b/openid.php @@ -293,7 +293,9 @@ class LightOpenID protected function request($url, $method='GET', $params=array()) { - if(function_exists('curl_init') && !ini_get('safe_mode') && !ini_get('open_basedir')) { + if (function_exists('curl_init') + && (!in_array('https', stream_get_wrappers()) || !ini_get('safe_mode') && !ini_get('open_basedir')) + ) { return $this->request_curl($url, $method, $params); } return $this->request_streams($url, $method, $params);
A compatibility fix for certain php configurations.
diff --git a/security/Member.php b/security/Member.php index <HASH>..<HASH> 100644 --- a/security/Member.php +++ b/security/Member.php @@ -421,9 +421,12 @@ class Member extends DataObject implements TemplateGlobalProvider { $this->extend('memberLoggedOut'); $this->RememberLoginToken = null; - Cookie::set('alc_enc', null); + Cookie::set('alc_enc', null); // // Clear the Remember Me cookie Cookie::forceExpiry('alc_enc'); + // Switch back to live in order to avoid infinite loops when redirecting to the login screen (if this login screen is versioned) + Session::clear('readingMode'); + $this->write(); // Audit logging hook diff --git a/security/Security.php b/security/Security.php index <HASH>..<HASH> 100644 --- a/security/Security.php +++ b/security/Security.php @@ -951,7 +951,7 @@ class Security extends Controller { */ public static function set_login_url($loginUrl) { self::$login_url = $loginUrl; - } +} /** * Get the URL of the log-in page. * Defaults to Security/login but can be re-set with {@link set_login_url()}
BUGFIX Avoid infinite redirection when logging out and when showing a custom login page after displaying the draft version of a page.
diff --git a/src/Config.php b/src/Config.php index <HASH>..<HASH> 100644 --- a/src/Config.php +++ b/src/Config.php @@ -563,7 +563,7 @@ class Config $contentType['slug'] = Slugify::create()->slugify($contentType['name']); } if (!isset($contentType['name'])) { - $contentType['name'] = ucwords(preg_replace('/[^a-z0-9]/', ' ', $contentType['slug'])); + $contentType['name'] = ucwords(preg_replace('/[^a-z0-9]/i', ' ', $contentType['slug'])); } if (!isset($contentType['singular_slug'])) { $contentType['singular_slug'] = Slugify::create()->slugify($contentType['singular_name']);
Should be case insensitive, too.
diff --git a/activeweb/src/main/java/org/javalite/activeweb/RequestDispatcher.java b/activeweb/src/main/java/org/javalite/activeweb/RequestDispatcher.java index <HASH>..<HASH> 100644 --- a/activeweb/src/main/java/org/javalite/activeweb/RequestDispatcher.java +++ b/activeweb/src/main/java/org/javalite/activeweb/RequestDispatcher.java @@ -15,6 +15,7 @@ limitations under the License. */ package org.javalite.activeweb; +import com.google.inject.Injector; import org.javalite.activejdbc.DB; import org.javalite.common.Util; import org.slf4j.Logger; @@ -132,9 +133,7 @@ public class RequestDispatcher implements Filter { if(appConfig instanceof Bootstrap){ appBootstrap = (Bootstrap) appConfig; if(!Configuration.isTesting() ){ - if(appBootstrap.getInjector() != null){ - Context.getControllerRegistry().setInjector(appBootstrap.getInjector()); - } + Context.getControllerRegistry().setInjector(appBootstrap.getInjector()); } } appConfig.completeInit();
#<I> Injector should not be set in case of testing
diff --git a/gulpfile.js b/gulpfile.js index <HASH>..<HASH> 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -256,7 +256,7 @@ gulp.task('build-externs', repeatTaskForAllLocales( 'build-firebaseui-js-$', ['build-externs', 'build-ts', 'build-soy'], - buildFirebaseUiJs, + buildFirebaseUiJs ); // Bundles the FirebaseUI JS with its dependencies as a NPM module. This builds
remove extra comma in gulp
diff --git a/src/Annotation/Link.php b/src/Annotation/Link.php index <HASH>..<HASH> 100644 --- a/src/Annotation/Link.php +++ b/src/Annotation/Link.php @@ -12,16 +12,6 @@ namespace BEAR\Resource\Annotation; */ final class Link { - const REL = 'rel'; - - const SRC = 'src'; - - const HREF = 'href'; - - const TITLE = 'title'; - - const TEMPLATED = 'templated'; - /** * @var string */ @@ -47,11 +37,4 @@ final class Link * @var string */ public $method = 'get'; - - /** - * Embed resource uri - * - * @var string - */ - public $src; }
remove Link constants and src prop
diff --git a/src/Product/CatalogImportApiRequestHandler.php b/src/Product/CatalogImportApiRequestHandler.php index <HASH>..<HASH> 100644 --- a/src/Product/CatalogImportApiRequestHandler.php +++ b/src/Product/CatalogImportApiRequestHandler.php @@ -92,7 +92,7 @@ class CatalogImportApiRequestHandler extends ApiRequestHandler if (!is_array($requestArguments) || !isset($requestArguments['fileName']) || !$requestArguments['fileName']) { throw new CatalogImportFileNameNotFoundInRequestBodyException( - 'Import file name is not fount in request body.' + 'Import file name is not found in request body.' ); }
Issue #<I>: Fix typo in error message
diff --git a/js/util.go b/js/util.go index <HASH>..<HASH> 100644 --- a/js/util.go +++ b/js/util.go @@ -41,3 +41,19 @@ func throw(vm *otto.Otto, v interface{}) { } panic(v) } + +func newSnippetRunner(src string) (*Runner, error) { + rt, err := New() + if err != nil { + return nil, err + } + rt.VM.Set("require", rt.require) + defer rt.VM.Set("require", nil) + + exp, err := rt.load("__snippet__", []byte(src)) + if err != nil { + return nil, err + } + + return NewRunner(rt, exp) +}
[dev] Test util: func to make a snippet runner
diff --git a/paging_result.go b/paging_result.go index <HASH>..<HASH> 100644 --- a/paging_result.go +++ b/paging_result.go @@ -115,6 +115,10 @@ func (pr *PagingResult) navigate(url *string) (noMore bool, err error) { return } + if pr.paging.Paging != nil { + pr.paging.Paging.Next = "" + pr.paging.Paging.Previous = "" + } paging := &pr.paging err = res.Decode(paging)
fix infinite loop in paging by clearing Next/Previous fields from previous query
diff --git a/isso/js/tests/unit/isso.test.js b/isso/js/tests/unit/isso.test.js index <HASH>..<HASH> 100644 --- a/isso/js/tests/unit/isso.test.js +++ b/isso/js/tests/unit/isso.test.js @@ -18,7 +18,7 @@ * Also, untangle Postbox functions from DOM element */ -test('Editorify text area', () => { +test.skip('Editorify text area', () => { // Set up our document body document.body.innerHTML = '<div id=isso-thread></div>' +
js: tests: Skip outdated Postbox editorify() test
diff --git a/internal/qtls/go118.go b/internal/qtls/go118.go index <HASH>..<HASH> 100644 --- a/internal/qtls/go118.go +++ b/internal/qtls/go118.go @@ -1,3 +1,5 @@ // +build go1.18 -"quic-go doesn't build on Go 1.18 yet." +package qtls + +var _ int = "quic-go doesn't build on Go 1.18 yet."
prevent go mod vendor from stumbling over the Go <I> file
diff --git a/src/lib/mocha/mocha-wrapper.js b/src/lib/mocha/mocha-wrapper.js index <HASH>..<HASH> 100644 --- a/src/lib/mocha/mocha-wrapper.js +++ b/src/lib/mocha/mocha-wrapper.js @@ -3,7 +3,8 @@ var Mocha = require('mocha'), path = require('path'), exit = require('exit'), glob = require('glob'), - ui = require('./mocha-fiberized-ui'); + ui = require('./mocha-fiberized-ui'), + booleanHelper = require('../boolean-helper'); var mochaOptions = { ui: 'fiberized-bdd-ui', @@ -12,7 +13,7 @@ var mochaOptions = { reporter: process.env['chimp.mochaReporter'] }; -if (process.env['chimp.watch']) { +if (booleanHelper.isTruthy(process.env['chimp.watch'])) { mochaOptions.grep = new RegExp(process.env['chimp.watchTags'].replace(/,/g, '|')); }
Fixes mocha watchTags being always added
diff --git a/modules/social_features/social_event/modules/social_event_addtocal/src/Form/SocialAddToCalendarSettingsForm.php b/modules/social_features/social_event/modules/social_event_addtocal/src/Form/SocialAddToCalendarSettingsForm.php index <HASH>..<HASH> 100644 --- a/modules/social_features/social_event/modules/social_event_addtocal/src/Form/SocialAddToCalendarSettingsForm.php +++ b/modules/social_features/social_event/modules/social_event_addtocal/src/Form/SocialAddToCalendarSettingsForm.php @@ -92,7 +92,7 @@ class SocialAddToCalendarSettingsForm extends ConfigFormBase { ':input[name="enable_add_to_calendar"]' => ['checked' => TRUE], ], ], - '#default_value' => $config->get('allowed_calendars'), + '#default_value' => $config->get('allowed_calendars') ?: [], ]; return parent::buildForm($form, $form_state);
Issue #<I> by tBKoT: Fix warning when confing not exist
diff --git a/vraptor-core/src/main/java/br/com/caelum/vraptor4/extensions/ControllersExtension.java b/vraptor-core/src/main/java/br/com/caelum/vraptor4/extensions/ControllersExtension.java index <HASH>..<HASH> 100644 --- a/vraptor-core/src/main/java/br/com/caelum/vraptor4/extensions/ControllersExtension.java +++ b/vraptor-core/src/main/java/br/com/caelum/vraptor4/extensions/ControllersExtension.java @@ -21,7 +21,7 @@ public class ControllersExtension implements Extension{ if (Modifier.isAbstract(clazz.getModifiers())) return; for (Annotation annotation : clazz.getAnnotations()) { - if (annotation.annotationType() == Controller.class + if (annotation.annotationType().equals(Controller.class) || annotation.annotationType().isAnnotationPresent(Controller.class)) { controllers.add(clazz); }
Using equals instead == operator
diff --git a/src/SimpleThings/EntityAudit/AuditReader.php b/src/SimpleThings/EntityAudit/AuditReader.php index <HASH>..<HASH> 100755 --- a/src/SimpleThings/EntityAudit/AuditReader.php +++ b/src/SimpleThings/EntityAudit/AuditReader.php @@ -457,7 +457,7 @@ class AuditReader $id = array($class->identifier[0] => $id); } - $whereId = []; + $whereId = array(); foreach ($class->identifier AS $idField) { if (isset($class->fieldMappings[$idField])) { $columnName = $class->fieldMappings[$idField]['columnName'];
Replaced `[]` with `array()` for php <I> compatibility
diff --git a/build/build.py b/build/build.py index <HASH>..<HASH> 100755 --- a/build/build.py +++ b/build/build.py @@ -49,7 +49,7 @@ import shakaBuildHelpers common_closure_opts = [ - '--language_in', 'ECMASCRIPT5', + '--language_in', 'ECMASCRIPT6', '--language_out', 'ECMASCRIPT3', '--jscomp_error=*',
[ES6] Allow ES6 input in the Closure Compiler Note that until we replace gjslint, the linter will still not accept ES6 syntax. So we cannot yet merge any commits which use ES6. But this should allow us to start experimenting with ES6 locally by bypassing the old linter. Issue #<I> Change-Id: Ic<I>f<I>a<I>f<I>b0a<I>c3e<I>cee6e<I>f
diff --git a/codespell_lib/_codespell.py b/codespell_lib/_codespell.py index <HASH>..<HASH> 100755 --- a/codespell_lib/_codespell.py +++ b/codespell_lib/_codespell.py @@ -631,9 +631,11 @@ def main(*args): del dirs[:] continue for file_ in files: - if glob_match.match(file_): + if glob_match.match(file_): # skip files continue fname = os.path.join(root, file_) + if glob_match.match(fname): # skip paths + continue if not os.path.isfile(fname) or not os.path.getsize(fname): continue bad_count += parse_file(fname, colors, summary) diff --git a/codespell_lib/tests/test_basic.py b/codespell_lib/tests/test_basic.py index <HASH>..<HASH> 100644 --- a/codespell_lib/tests/test_basic.py +++ b/codespell_lib/tests/test_basic.py @@ -276,6 +276,7 @@ def test_ignore(): assert cs.main('--skip=bad*', d) == 0 assert cs.main('--skip=*ignoredir*', d) == 1 assert cs.main('--skip=ignoredir', d) == 1 + assert cs.main('--skip=*ignoredir/bad*', d) == 1 def test_check_filename():
Extend --skip to match globs across full paths. Closes #<I> (#<I>) * Add a test for skipping globs with directory and filename in * Forcing a Travis build * Tidy the Travis force * Skip paths with the glob mathing too
diff --git a/src/crypto/verification/request/ToDeviceChannel.js b/src/crypto/verification/request/ToDeviceChannel.js index <HASH>..<HASH> 100644 --- a/src/crypto/verification/request/ToDeviceChannel.js +++ b/src/crypto/verification/request/ToDeviceChannel.js @@ -179,7 +179,9 @@ export class ToDeviceChannel { const isAcceptingEvent = type === START_TYPE || type === READY_TYPE; // the request has picked a ready or start event, tell the other devices about it if (isAcceptingEvent && !wasStarted && isStarted && this._deviceId) { - const nonChosenDevices = this._devices.filter(d => d !== this._deviceId); + const nonChosenDevices = this._devices.filter( + d => d !== this._deviceId && d !== this._client.getDeviceId(), + ); if (nonChosenDevices.length) { const message = this.completeContent({ code: "m.accepted",
don't cancel ourselves when selecting a self-verification partner
diff --git a/telethon/utils.py b/telethon/utils.py index <HASH>..<HASH> 100644 --- a/telethon/utils.py +++ b/telethon/utils.py @@ -678,7 +678,8 @@ def _get_extension(file): # Note: ``file.name`` works for :tl:`InputFile` and some `IOBase` return _get_extension(file.name) else: - return '' + # Maybe it's a Telegram media + return get_extension(file) def is_image(file):
Fix is_image not considering MessageMedia objects This was causing albums with MessageMedia objects to fail.
diff --git a/src/main/java/net/magik6k/jwwf/core/JwwfServer.java b/src/main/java/net/magik6k/jwwf/core/JwwfServer.java index <HASH>..<HASH> 100644 --- a/src/main/java/net/magik6k/jwwf/core/JwwfServer.java +++ b/src/main/java/net/magik6k/jwwf/core/JwwfServer.java @@ -1,6 +1,7 @@ package net.magik6k.jwwf.core; import java.util.LinkedList; +import java.util.List; import javax.servlet.Servlet; @@ -173,6 +174,16 @@ public class JwwfServer { } /** + * This method returns list containing instances of all plugins + * attached to this server. + * @return List containing instances of attached plugins. + */ + @SuppressWarnings("unchecked") + public List<JwwfPlugin> getPlugins(){ + return (List<JwwfPlugin>) plugins.clone(); + } + + /** * <p> * Sometimes you have to release your application and you can't set proxy for * websocket connections, you need to set url of api here.
Added ability to get plugins contained in server instance
diff --git a/cherrypy/lib/sessions.py b/cherrypy/lib/sessions.py index <HASH>..<HASH> 100644 --- a/cherrypy/lib/sessions.py +++ b/cherrypy/lib/sessions.py @@ -476,7 +476,7 @@ class FileSession(Session): if path is None: path = self._get_file_path() path += self.LOCK_SUFFIX - checker = locking.LockChecker(self.lock_timeout) + checker = locking.LockChecker(self.id, self.lock_timeout) while not checker.expired(): # always try once try:
Added session id to LockChecker construction
diff --git a/aioredis/commands/pubsub.py b/aioredis/commands/pubsub.py index <HASH>..<HASH> 100644 --- a/aioredis/commands/pubsub.py +++ b/aioredis/commands/pubsub.py @@ -23,7 +23,7 @@ class PubSubCommandsMixin: subscribe to specified channels. Returns :func:`asyncio.gather()` coroutine which when done will return - a list of subscribed channels. + a list of :class:`~aioredis.Channel` objects. """ conn = self._conn return wait_return_channels( @@ -39,7 +39,8 @@ class PubSubCommandsMixin: subscribe to specified patterns. Returns :func:`asyncio.gather()` coroutine which when done will return - a list of subscribed patterns. + a list of subscribed :class:`~aioredis.Channel` objects with + ``is_pattern`` property set to ``True``. """ conn = self._conn return wait_return_channels(
add refs to Channel documentation in Pub/Sub section (see #<I>)
diff --git a/core/src/playn/core/Image.java b/core/src/playn/core/Image.java index <HASH>..<HASH> 100644 --- a/core/src/playn/core/Image.java +++ b/core/src/playn/core/Image.java @@ -136,7 +136,7 @@ public interface Image { * Configures the use of mipmaps when rendering this image at scales less than 1. This only * applies to GL-based backends (it is a NOOP on other backends). */ - void setMipmapped (boolean mipmapped); + void setMipmapped(boolean mipmapped); /** * Creates a texture for this image (if one does not already exist) and returns its OpenGL
Wouldn't want to waste a drop of that precious, precious whitespace.
diff --git a/dingo/core/network/__init__.py b/dingo/core/network/__init__.py index <HASH>..<HASH> 100644 --- a/dingo/core/network/__init__.py +++ b/dingo/core/network/__init__.py @@ -24,7 +24,7 @@ class GridDingo: self.grid_district = kwargs.get('region', None) #self.geo_data = kwargs.get('geo_data', None) self.v_level = kwargs.get('v_level', None) - self.branch_type = kwargs.get('branch_type', None) + self._graph = nx.Graph() def graph_add_node(self, node_object):
move branch type to MVGrid class and rename it to default_branch_kind
diff --git a/kubespawner/proxy.py b/kubespawner/proxy.py index <HASH>..<HASH> 100644 --- a/kubespawner/proxy.py +++ b/kubespawner/proxy.py @@ -86,10 +86,11 @@ class KubeIngressProxy(Proxy): def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) - # We want 3x concurrent spawn limit as our threadpool. This means that if - # concurrent_spawn_limit servers start instantly, we can add all 3 objects - # required to add proxy routing for them instantly as well. - self.executor = ThreadPoolExecutor(max_workers=self.app.concurrent_spawn_limit * 3) + # We use the maximum number of concurrent user server starts (and thus proxy adds) + # as our threadpool maximum. This ensures that contention here does not become + # an accidental bottleneck. Since we serialize our create operations, we only + # need 1x concurrent_spawn_limit, not 3x. + self.executor = ThreadPoolExecutor(max_workers=self.app.concurrent_spawn_limit) self.ingress_reflector = IngressReflector(parent=self, namespace=self.namespace) self.service_reflector = ServiceReflector(parent=self, namespace=self.namespace)
Bump proxy threadpool to 1x concurrent spawn limit, not 3x We seriealize creates, so 1x is enough
diff --git a/lib/weblib.php b/lib/weblib.php index <HASH>..<HASH> 100644 --- a/lib/weblib.php +++ b/lib/weblib.php @@ -313,7 +313,7 @@ function stripslashes_safe($string) { $string = str_replace("\\'", "'", $string); $string = str_replace('\\"', '"', $string); - //$string = str_replace('\\\\', '\\', $string); // why? + $string = str_replace('\\\\', '\\', $string); return $string; }
Reinstated the line in stripslashes_safe() that removes the slash that escapes a backslash. Martin removed this line in March. Why?
diff --git a/registry.py b/registry.py index <HASH>..<HASH> 100644 --- a/registry.py +++ b/registry.py @@ -22,7 +22,7 @@ from flask import current_app from flask.ext.registry import ImportPathRegistry, SingletonRegistry, \ RegistryProxy, RegistryError from invenio.modules.deposit.models import DepositionType -from invenio.modules.workflows.loader import workflows +from invenio.modules.workflows.registry import workflows class DepositSingletonRegistry(SingletonRegistry):
workflows: revamp testsuite * Implements a renewed testsuite for workflows with better coverage overall. * Moves the workflows and widgets loading to use registry. Tests also use their own test registry. * Test specific workflows are now moved to the testsuite. * Cleans up the tests a bit, renaming and moving the tests in test_halt into the renewed test_workflows suite. * Makes the tests visible for the overall invenio testsuite by adding the TEST_SUITE variable. * Fixes an issue with the custom Log handler and inheritance.
diff --git a/lib/insightly/base.rb b/lib/insightly/base.rb index <HASH>..<HASH> 100644 --- a/lib/insightly/base.rb +++ b/lib/insightly/base.rb @@ -1,3 +1,4 @@ +#METODO look at tags vs custom fields #METODO only allow build to set fields that are part of the API fields #METODO make a distinction between fields that you can set and save and ones you can only read - like DATE_UPDATED_UTC module Insightly
Added a note about tags vs custom fields
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -32,7 +32,7 @@ cmdclass = dict(test=PyTest) # requirements install_requires = set(x.strip() for x in open('requirements.txt')) install_requires_replacements = { - 'https://github.com/ethereum/pyrlp/tarball/develop': 'rlp>=0.3.9', + 'https://github.com/ethereum/pyrlp/tarball/develop': 'rlp==0.3.9', 'https://github.com/ethereum/ethash/tarball/master': 'pyethash'} install_requires = [install_requires_replacements.get(r, r) for r in install_requires]
Force rlp=<I> to attempt fix build
diff --git a/src/Guards/TokenGuard.php b/src/Guards/TokenGuard.php index <HASH>..<HASH> 100644 --- a/src/Guards/TokenGuard.php +++ b/src/Guards/TokenGuard.php @@ -187,7 +187,7 @@ class TokenGuard protected function decodeJwtTokenCookie($request) { return (array) JWT::decode( - $this->encrypter->decrypt($request->cookie(Passport::cookie())), + $this->encrypter->decrypt($request->cookie(Passport::cookie()), Passport::$unserializesCookies), $this->encrypter->getKey(), ['HS256'] ); } diff --git a/src/Passport.php b/src/Passport.php index <HASH>..<HASH> 100644 --- a/src/Passport.php +++ b/src/Passport.php @@ -118,6 +118,13 @@ class Passport public static $runsMigrations = true; /** + * Indicates if Passport should unserializes cookies. + * + * @var bool + */ + public static $unserializesCookies = true; + + /** * Enable the implicit grant type. * * @return static @@ -506,4 +513,16 @@ class Passport return new static; } + + /** + * Configure Passport to stop unserializing cookies. + * + * @return static + */ + public static function dontUnserializeCookies() + { + static::$unserializesCookies = false; + + return new static; + } }
adapt for laravel breakingc hange
diff --git a/extensions/composer/yii/composer/Installer.php b/extensions/composer/yii/composer/Installer.php index <HASH>..<HASH> 100644 --- a/extensions/composer/yii/composer/Installer.php +++ b/extensions/composer/yii/composer/Installer.php @@ -31,7 +31,7 @@ class Installer extends LibraryInstaller */ public function supports($packageType) { - return $packageType === 'yii-extension'; + return $packageType === 'yii2-extension'; } /** @@ -65,7 +65,7 @@ class Installer extends LibraryInstaller protected function addPackage(PackageInterface $package) { $extension = [ - 'name' => $package->getPrettyName(), + 'name' => $package->getName(), 'version' => $package->getVersion(), ]; @@ -76,14 +76,14 @@ class Installer extends LibraryInstaller } $extensions = $this->loadExtensions(); - $extensions[$package->getUniqueName()] = $extension; + $extensions[$package->getName()] = $extension; $this->saveExtensions($extensions); } protected function removePackage(PackageInterface $package) { $packages = $this->loadExtensions(); - unset($packages[$package->getUniqueName()]); + unset($packages[$package->getName()]); $this->saveExtensions($packages); }
renamed composer installation type.
diff --git a/AmqpSubscriptionConsumer.php b/AmqpSubscriptionConsumer.php index <HASH>..<HASH> 100644 --- a/AmqpSubscriptionConsumer.php +++ b/AmqpSubscriptionConsumer.php @@ -29,6 +29,8 @@ class AmqpSubscriptionConsumer implements PsrSubscriptionConsumer public function __construct(AmqpContext $context) { $this->context = $context; + + $this->subscribers = []; } /**
move subscription logic of amqplib and amqpext to separate classes.
diff --git a/includes/functions/functions_print.php b/includes/functions/functions_print.php index <HASH>..<HASH> 100644 --- a/includes/functions/functions_print.php +++ b/includes/functions/functions_print.php @@ -1105,7 +1105,7 @@ function print_findfact_link($element_id) { function get_lds_glance(WT_Individual $indi) { $BAPL = $indi->getFacts('BAPL') ? 'B' : '_'; $ENDL = $indi->getFacts('ENDL') ? 'E' : '_'; - $ENDL = $indi->getFacts('SLGC') ? 'C' : '_'; + $SLGC = $indi->getFacts('SLGC') ? 'C' : '_'; $SLGS = '_'; foreach ($indi->getSpouseFamilies() as $family) {
Correct typo in functions_print.php - LDS ordinance
diff --git a/framework/core/migrations/2018_01_11_155200_change_discussions_b8_columns.php b/framework/core/migrations/2018_01_11_155200_change_discussions_b8_columns.php index <HASH>..<HASH> 100644 --- a/framework/core/migrations/2018_01_11_155200_change_discussions_b8_columns.php +++ b/framework/core/migrations/2018_01_11_155200_change_discussions_b8_columns.php @@ -48,8 +48,8 @@ return [ $table->renameColumn('hidden_user_id', 'hide_user_id'); $table->dropForeign([ - 'discussions_user_id_foreign', 'discussions_last_posted_user_id', 'hidden_user_id', - 'first_post_id', 'last_post_id' + 'discussions_user_id_foreign', 'discussions_last_posted_user_id_foreign', 'discussions_hidden_user_id_foreign', + 'discussions_first_post_id_foreign', 'discussions_last_post_id_foreign' ]); }); }
forgot to name a few constraints properly on the dropForeign statement
diff --git a/src/Leevel/Di/Container.php b/src/Leevel/Di/Container.php index <HASH>..<HASH> 100644 --- a/src/Leevel/Di/Container.php +++ b/src/Leevel/Di/Container.php @@ -875,7 +875,7 @@ class Container implements IContainer, ArrayAccess /** * 解析数组回调反射参数. */ - protected function parseMethodReflection(callable $injection): array + protected function parseMethodReflection(array $injection): array { return (new ReflectionMethod($injection[0], $injection[1]))->getParameters(); }
chore(di): fix for phpstan level 3
diff --git a/admin/upgradesettings.php b/admin/upgradesettings.php index <HASH>..<HASH> 100644 --- a/admin/upgradesettings.php +++ b/admin/upgradesettings.php @@ -63,6 +63,7 @@ echo '<input type="hidden" name="sesskey" value="' . sesskey() . '" />'; echo '<fieldset>'; echo '<div class="clearer"><!-- --></div>'; echo $newsettingshtml; +echo '</fieldset>'; echo '<div class="form-buttons"><input class="form-submit" type="submit" value="' . get_string('savechanges','admin') . '" /></div>'; echo '</form>'; diff --git a/lib/adminlib.php b/lib/adminlib.php index <HASH>..<HASH> 100644 --- a/lib/adminlib.php +++ b/lib/adminlib.php @@ -2356,7 +2356,7 @@ class admin_setting_special_gradebookroles extends admin_setting { $first = true; foreach ($roles as $roleid=>$role) { if (is_array($currentsetting) && in_array($roleid, array_keys($currentsetting))) { - $checked = 'checked="checked"'; + $checked = ' checked="checked"'; } else { $checked = ''; }
Fixes MDL-<I> "XML well-formed bug, need space before 'checked' attribute." (Merged from MOODLE_<I>_GROUPS)
diff --git a/lib/rediska/transaction_commands.rb b/lib/rediska/transaction_commands.rb index <HASH>..<HASH> 100644 --- a/lib/rediska/transaction_commands.rb +++ b/lib/rediska/transaction_commands.rb @@ -72,7 +72,7 @@ module Rediska 'OK' end - def watch(_) + def watch(*_) 'OK' end
Watch needs to support multiple arguments (fakeredis #<I>).
diff --git a/index.js b/index.js index <HASH>..<HASH> 100644 --- a/index.js +++ b/index.js @@ -1,9 +1,7 @@ module.exports = function(value) { var length = value.length; - // If `value` is an empty string, then it will have 0 caps and a length of 0, - // which, when divided, will yield `NaN`. A string with a length of 0 will - // obviously have no caps. + // A string with a length of 0 will obviously have no caps. if (!length) { return 0; }
Simplify comment on 0 length strings
diff --git a/i3pystatus/wireguard.py b/i3pystatus/wireguard.py index <HASH>..<HASH> 100644 --- a/i3pystatus/wireguard.py +++ b/i3pystatus/wireguard.py @@ -76,6 +76,6 @@ class Wireguard(IntervalModule): self.data = locals() self.output = { - "full_text": self.format.format(**locals()), + "full_text": self.format.format(**self.data), 'color': color, }
Use self.data instead of locals
diff --git a/lib/riddle/auto_version.rb b/lib/riddle/auto_version.rb index <HASH>..<HASH> 100644 --- a/lib/riddle/auto_version.rb +++ b/lib/riddle/auto_version.rb @@ -8,6 +8,9 @@ class Riddle::AutoVersion require "riddle/#{version}" when '1.10-beta', '1.10-id64-beta', '1.10-dev' require 'riddle/1.10' + else + puts "found version: #{version}" + exit end end end diff --git a/lib/riddle/controller.rb b/lib/riddle/controller.rb index <HASH>..<HASH> 100644 --- a/lib/riddle/controller.rb +++ b/lib/riddle/controller.rb @@ -12,7 +12,7 @@ module Riddle end def sphinx_version - `#{indexer} 2>&1`[/^Sphinx (\d+\.\d+(\.\d+|(\-id64)?\-beta))/, 1] + `#{indexer} 2>&1`[/^Sphinx (\d+\.\d+(\.\d+|(?:-dev|(\-id64)?\-beta)))/, 1] rescue nil end
allow compiling from svn
diff --git a/ailib/src/main/java/ai/api/model/Result.java b/ailib/src/main/java/ai/api/model/Result.java index <HASH>..<HASH> 100644 --- a/ailib/src/main/java/ai/api/model/Result.java +++ b/ailib/src/main/java/ai/api/model/Result.java @@ -55,7 +55,7 @@ public class Result implements Serializable { * Currently active contexts */ @SerializedName("contexts") - private AIOutputContext[] contexts; + private List<AIOutputContext> contexts; @SerializedName("metadata") @@ -225,10 +225,28 @@ public class Result implements Serializable { return getComplexParameter(name, null); } - public AIOutputContext[] getContexts() { + public List<AIOutputContext> getContexts() { return contexts; } + public AIOutputContext getContext(final String name) { + if (TextUtils.isEmpty(name)) { + throw new IllegalArgumentException("name argument must be not empty"); + } + + if (contexts == null) { + return null; + } + + for (final AIOutputContext c : contexts) { + if (name.equalsIgnoreCase(c.getName())) { + return c; + } + } + + return null; + } + /** * The query that was used to produce this result */
Contexts property in Result now List
diff --git a/lib/autoprefixer-rails/sprockets.rb b/lib/autoprefixer-rails/sprockets.rb index <HASH>..<HASH> 100644 --- a/lib/autoprefixer-rails/sprockets.rb +++ b/lib/autoprefixer-rails/sprockets.rb @@ -57,7 +57,7 @@ module AutoprefixerRails end # Sprockets 2 API new and render - def render(_, _) + def render(*) self.class.run(@filename, @source) end end
Workaround for Sorbet rbi generation (#<I>) Please note we don't guarantee any support for sorbet.
diff --git a/bika/lims/browser/instrument.py b/bika/lims/browser/instrument.py index <HASH>..<HASH> 100644 --- a/bika/lims/browser/instrument.py +++ b/bika/lims/browser/instrument.py @@ -567,6 +567,12 @@ class InstrumentCertificationsView(BikaListingView): BikaListingView.__init__(self, context, request, **kwargs) self.form_id = "instrumentcertifications" + self.icon = self.portal_url + "/++resource++bika.lims.images/instrumentcertification_big.png" + self.title = self.context.translate(_("Calibration Certificates")) + self.context_actions = {_('Add'): + {'url': 'createObject?type_name=InstrumentCertification', + 'icon': '++resource++bika.lims.images/add.png'}} + self.columns = { 'Title': {'title': _('Cert. Num'), 'index': 'sortable_title'}, 'getAgency': {'title': _('Agency'), 'sortable': False},
Added context action for instrument certifications
diff --git a/linshareapi/core.py b/linshareapi/core.py index <HASH>..<HASH> 100644 --- a/linshareapi/core.py +++ b/linshareapi/core.py @@ -195,7 +195,11 @@ class CoreCli(object): return True if not quiet: if request.status_code == 401: - self.log.error("Authentication failed: %s: %s", request.status_code, request.text) + self.log.debug("Authentication failed: %s: %s", request.status_code, request.text) + trace_request(request) + error_code = request.headers.get('X-Linshare-Auth-Error-Code') + error_msg = request.headers.get('X-Linshare-Auth-Error-Msg') + self.log.error("Authentication failed: error code=%s: %s", error_code, error_msg) return False def process_request(self, request, url, force_nocontent=False):
Improving error message related to authentication request.
diff --git a/lib/graph_matching/bipartite_graph.rb b/lib/graph_matching/bipartite_graph.rb index <HASH>..<HASH> 100644 --- a/lib/graph_matching/bipartite_graph.rb +++ b/lib/graph_matching/bipartite_graph.rb @@ -15,6 +15,10 @@ module GraphMatching class BipartiteGraph < Graph include Explainable + def vertices_adjacent_to(vertex, except: []) + adjacent_vertices(vertex) - except + end + # `maximum_cardinality_matching` returns a `Set` of arrays, # each representing an edge in the matching. The augmenting # path algorithm is used. @@ -49,7 +53,7 @@ module GraphMatching t.add(vi) predecessors[vi] = start - adj_u = adjacent_vertices(vi).reject { |vie| vie == start } + adj_u = vertices_adjacent_to(vi, except: [start]) if adj_u.empty? log("Vertex #{vi} has no adjacent vertexes, so we found an augmenting path") aug_path = [vi, start]
Extracts `vertices_adjacent_to` to improve readability
diff --git a/images/builder/main.go b/images/builder/main.go index <HASH>..<HASH> 100644 --- a/images/builder/main.go +++ b/images/builder/main.go @@ -271,7 +271,7 @@ func runBuildJobs(o options) []error { log.Println("Running build jobs...") tagFlags := []string{"--tags", "--always", "--dirty"} if len(o.tagMatch) > 0 { - tagFlags = append(tagFlags, "--match "+o.tagMatch) + tagFlags = append(tagFlags, fmt.Sprintf(`--match "%s"`, o.tagMatch)) } tag, err := getVersion(tagFlags) if err != nil {
Fix parsing of --tag-match image builder flag
diff --git a/src/raven.js b/src/raven.js index <HASH>..<HASH> 100644 --- a/src/raven.js +++ b/src/raven.js @@ -637,9 +637,20 @@ Raven.prototype = { self._lastCapturedEvent = evt; var elem = evt.target; + + var target; + + // try/catch htmlTreeAsString because it's particularly complicated, and + // just accessing the DOM incorrectly can throw an exception in some circumstances. + try { + target = htmlTreeAsString(elem); + } catch (e) { + target = '<unknown>'; + } + self.captureBreadcrumb('ui_event', { type: evtName, - target: htmlTreeAsString(elem) + target: target }); }; },
try/catch serializing DOM element targets
diff --git a/views/index.blade.php b/views/index.blade.php index <HASH>..<HASH> 100644 --- a/views/index.blade.php +++ b/views/index.blade.php @@ -4,6 +4,7 @@ <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <title>{{ Admin::title() }}</title> + <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <!-- Tell the browser to be responsive to screen width --> <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
Add charset utf-8 Add charset utf-8 to fix broken characters in js AlertBox
diff --git a/octohatrack/code_contrib.py b/octohatrack/code_contrib.py index <HASH>..<HASH> 100644 --- a/octohatrack/code_contrib.py +++ b/octohatrack/code_contrib.py @@ -25,6 +25,10 @@ def pri_contributors(repo_name): "repos/%s/%s?state=all&page=1&per_page=1" % (repo_name, _type), "number" ) + # No results for search type + if not _count: + continue + for i in range(1, _count + 1): uri_stub = "/".join(["repos", repo_name, _type, str(i)])
Fix usecase where repo has no pulls or issues (e.g. a fork)
diff --git a/sos/report/plugins/networking.py b/sos/report/plugins/networking.py index <HASH>..<HASH> 100644 --- a/sos/report/plugins/networking.py +++ b/sos/report/plugins/networking.py @@ -147,7 +147,8 @@ class Networking(Plugin): "ethtool -l " + eth, "ethtool --phy-statistics " + eth, "ethtool --show-priv-flags " + eth, - "ethtool --show-eee " + eth + "ethtool --show-eee " + eth, + "tc -s filter show dev " + eth ], tags=eth) # skip EEPROM collection by default, as it might hang or
[networking] collect tc filters per each device Collect "tc -s filter show dev <DEV>" for each device. Resolves: #<I>
diff --git a/lib/instrumental.js b/lib/instrumental.js index <HASH>..<HASH> 100644 --- a/lib/instrumental.js +++ b/lib/instrumental.js @@ -252,8 +252,8 @@ exports.init = function instrumental_init(startup_time, config, events) { } keepMetric = function(metric){ metricName = metric.split(" ")[1]; - return (!metricFiltersExclude.some(function(filter) { return filter.test(metricName); }) && - (metricFiltersInclude.length == 0 || metricFiltersInclude.some(function(filter) { return filter.test(metricName); }))); + return (!metricFiltersExclude.some(function(filter) { return metricName.match(filter); }) && + (metricFiltersInclude.length == 0 || metricFiltersInclude.some(function(filter) { return metricName.match(filter); }))); }; if(typeof(config.instrumental.metricPrefix) !== 'undefined' &&
revert from regex.test to string.match for compatibility with older javascript
diff --git a/apptentive/src/main/java/com/apptentive/android/sdk/model/JsonPayload.java b/apptentive/src/main/java/com/apptentive/android/sdk/model/JsonPayload.java index <HASH>..<HASH> 100644 --- a/apptentive/src/main/java/com/apptentive/android/sdk/model/JsonPayload.java +++ b/apptentive/src/main/java/com/apptentive/android/sdk/model/JsonPayload.java @@ -39,7 +39,7 @@ public abstract class JsonPayload extends Payload { JSONObject wrapper = new JSONObject(); wrapper.put("token", token); wrapper.put("payload", jsonObject); - byte[] bytes = jsonObject.toString().getBytes(); + byte[] bytes = wrapper.toString().getBytes(); Encryptor encryptor = new Encryptor(encryptionKey); ApptentiveLog.v(ApptentiveLogTag.PAYLOADS, "Getting data for encrypted payload."); return encryptor.encrypt(bytes);
Encrypt wrapper, not original payload.
diff --git a/holoviews/core/layout.py b/holoviews/core/layout.py index <HASH>..<HASH> 100644 --- a/holoviews/core/layout.py +++ b/holoviews/core/layout.py @@ -172,8 +172,7 @@ class NdLayout(UniformNdMapping): value = param.String(default='NdLayout') data_type = (ViewableElement, AdjointLayout, UniformNdMapping) - - def __init__(self, initial_items, **params): + def __init__(self, initial_items=None, **params): self._max_cols = 4 self._style = None if isinstance(initial_items, list):
Allowed empty NdLayout
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -160,7 +160,7 @@ class PyTestCommand(test): setup( name='openhtf', - version='1.0.3', + version='1.1.0', description='OpenHTF, the open hardware testing framework.', author='John Hawley', author_email='madsci@google.com',
Update version to <I> (#<I>)
diff --git a/slacker_cli/__init__.py b/slacker_cli/__init__.py index <HASH>..<HASH> 100755 --- a/slacker_cli/__init__.py +++ b/slacker_cli/__init__.py @@ -64,13 +64,12 @@ def get_channel_id(token, channel_name): return get_item_id_by_name(channels, channel_name) -def upload_file(token, channel, file_name): +def upload_file(token, channel_name, file_name): """ upload file to a channel """ slack = Slacker(token) - channel_id = get_channel_id(token, channel) - slack.files.upload(file_name, channels=channel_id) + slack.files.upload(file_name, channels=channel_name) def args_priority(args, environ): @@ -153,8 +152,11 @@ def main(): post_message(token, channel, message, name, as_user, icon, as_slackbot, team) - if token and channel and file_name: - upload_file(token, channel, file_name) + if token and file_name: + if user: + upload_file(token, '@' + user, file_name) + elif channel: + upload_file(token, '#' + channel, file_name) if __name__ == '__main__':
send files to user with -u #<I>
diff --git a/tests/Helpers.php b/tests/Helpers.php index <HASH>..<HASH> 100644 --- a/tests/Helpers.php +++ b/tests/Helpers.php @@ -21,7 +21,8 @@ class Helpers extends PHPUnit_Framework_TestCase { protected function _assertEqualsXmlFile(hemio\html\Interface_\HtmlCode $objHtml, $strFile) { - $expected = DOMDocument::load(__DIR__ . DIRECTORY_SEPARATOR . $strFile); + $expected = DOMDocument; + $expected->load(__DIR__ . DIRECTORY_SEPARATOR . $strFile); $actual = new DOMDocument; $actualString = (string) $objHtml; $actual->loadXML($actualString);
Fixes wrong static call to DOM load
diff --git a/app_generators/ahn/templates/config/startup.rb b/app_generators/ahn/templates/config/startup.rb index <HASH>..<HASH> 100644 --- a/app_generators/ahn/templates/config/startup.rb +++ b/app_generators/ahn/templates/config/startup.rb @@ -10,8 +10,10 @@ Adhearsion::Configuration.configure do |config| # By default Asterisk is enabled with the default settings config.enable_asterisk + # config.asterisk.enable_ami :host => "127.0.0.1", :username => "admin", :password => "password" + + # config.enable_drb - # # config.asterisk.speech_engine = :cepstral # Configure FreeSwitch
Added comments to startup.rb to help newbies use the AMI and DRb stuff for the first time. git-svn-id: <URL>
diff --git a/ijroi/ijroi.py b/ijroi/ijroi.py index <HASH>..<HASH> 100644 --- a/ijroi/ijroi.py +++ b/ijroi/ijroi.py @@ -89,14 +89,16 @@ def read_roi(fileobj): if options & SUB_PIXEL_RESOLUTION: getc = getfloat points = np.empty((n_coordinates, 2), dtype=np.float32) + fileobj.seek(4*n_coordinates,1) else: getc = get16 points = np.empty((n_coordinates, 2), dtype=np.int16) points[:,1] = [getc() for i in range(n_coordinates)] points[:,0] = [getc() for i in range(n_coordinates)] - points[:,1] += left - points[:,0] += top - points -= 1 + if options & SUB_PIXEL_RESOLUTION == 0: + points[:,1] += left + points[:,0] += top + points -= 1 return points def read_roi_zip(fname):
Handle freehand selections with subpixel resolution Skip over the integer data when we have floating point data later in the file. The floating point values don't need to be adjusted by the bounding box.
diff --git a/tests/HTMLTests.php b/tests/HTMLTests.php index <HASH>..<HASH> 100644 --- a/tests/HTMLTests.php +++ b/tests/HTMLTests.php @@ -100,7 +100,10 @@ class HTMLTests extends \PHPUnit_Framework_TestCase public function testHeaderTable() { $document = $this->parseHTML('table2.rst'); - echo "$document"; + + $this->assertEquals(2, substr_count($document, '<th>')); + $this->assertEquals(2, substr_count($document, '</th>')); + $this->assertNotContains('==', $document); } /**
Fixing tests for table header (see #<I>)
diff --git a/war/resources/scripts/hudson-behavior.js b/war/resources/scripts/hudson-behavior.js index <HASH>..<HASH> 100644 --- a/war/resources/scripts/hudson-behavior.js +++ b/war/resources/scripts/hudson-behavior.js @@ -285,7 +285,7 @@ function refreshPart(id,url) { window.setTimeout(function() { new Ajax.Request(url, { method: "post", - onComplete: function(rsp, _) { + onSuccess: function(rsp) { var hist = $(id); var p = hist.parentNode; var next = hist.nextSibling;
onComplete would trigger even if the request fails. git-svn-id: <URL>
diff --git a/lib/sensu-plugin.rb b/lib/sensu-plugin.rb index <HASH>..<HASH> 100644 --- a/lib/sensu-plugin.rb +++ b/lib/sensu-plugin.rb @@ -1,6 +1,6 @@ module Sensu module Plugin - VERSION = "0.1.3" + VERSION = "0.1.4.beta" EXIT_CODES = { 'OK' => 0, 'WARNING' => 1,
[beta] cut a <I> beta
diff --git a/lib/instrumentation/trace.js b/lib/instrumentation/trace.js index <HASH>..<HASH> 100644 --- a/lib/instrumentation/trace.js +++ b/lib/instrumentation/trace.js @@ -22,12 +22,23 @@ Trace.prototype.end = function () { } Trace.prototype.duration = function () { - if (!this.ended) throw new Error('Trace is not ended') + if (!this.ended) { + // TODO: Use the opbeat logger + console.error('Trying to call trace.duration() on un-ended Trace!') + return null + } + var ns = this._diff[0] * 1e9 + this._diff[1] return ns / 1e6 } Trace.prototype.startTime = function () { + if (!this.ended || !this.transaction.ended) { + // TODO: Use the opbeat logger + console.error('Trying to call trace.startTime() for un-ended Trace/Transaction!') + return null + } + var parent = this._parent() if (!parent) return 0 var start = parent._hrtime @@ -36,6 +47,12 @@ Trace.prototype.startTime = function () { } Trace.prototype.ancestors = function () { + if (!this.ended || !this.transaction.ended) { + // TODO: Use the opbeat logger + console.error('Trying to call trace.ancestors() for un-ended Trace/Transaction!') + return null + } + var parent = this._parent() if (!parent) return [] return [parent.signature].concat(parent.ancestors())
Add guards if trying to get data from non-ended traces
diff --git a/src/Http/Request.php b/src/Http/Request.php index <HASH>..<HASH> 100644 --- a/src/Http/Request.php +++ b/src/Http/Request.php @@ -11,7 +11,7 @@ use Lead\Net\Scheme; * Facilitates HTTP request creation by assembling connection and path info, `GET` and `POST` data, * and authentication credentials in a single, stateful object. */ -class Request extends \Lead\Net\Http\Message +class Request extends \Lead\Net\Http\Message implements \Psr\Http\Message\RequestInterface { use Psr7\MessageTrait, Psr7\RequestTrait; diff --git a/src/Http/Response.php b/src/Http/Response.php index <HASH>..<HASH> 100644 --- a/src/Http/Response.php +++ b/src/Http/Response.php @@ -7,7 +7,7 @@ use Lead\Set\Set; /** * Parses and stores the status, headers and body of an HTTP response. */ -class Response extends \Lead\Net\Http\Message +class Response extends \Lead\Net\Http\Message implements \Psr\Http\Message\ResponseInterface { use Psr7\MessageTrait, Psr7\ResponseTrait;
Adds missing implements to be PSR-7 compatible.
diff --git a/gwpy/detector/units.py b/gwpy/detector/units.py index <HASH>..<HASH> 100644 --- a/gwpy/detector/units.py +++ b/gwpy/detector/units.py @@ -158,7 +158,7 @@ units.add_enabled_units(units.imperial) # 1) alternative names registry = units.get_current_unit_registry().registry for unit, aliases in [ - (units.Unit('count'), ('counts')), + (units.Unit('ct'), ('counts',)), (units.Unit('Celsius'), ('Degrees_C', 'DegC')), (units.Unit('Fahrenheit'), ('Degrees_F', 'DegF')), ]:
gwpy.detector: fixed bug in unit aliasing need commas to make a tuple!
diff --git a/plugin/pkg/auth/authorizer/node/graph.go b/plugin/pkg/auth/authorizer/node/graph.go index <HASH>..<HASH> 100644 --- a/plugin/pkg/auth/authorizer/node/graph.go +++ b/plugin/pkg/auth/authorizer/node/graph.go @@ -22,6 +22,7 @@ import ( corev1 "k8s.io/api/core/v1" utilfeature "k8s.io/apiserver/pkg/util/feature" + "k8s.io/component-helpers/storage/ephemeral" pvutil "k8s.io/kubernetes/pkg/api/v1/persistentvolume" podutil "k8s.io/kubernetes/pkg/api/v1/pod" "k8s.io/kubernetes/pkg/features" @@ -386,7 +387,7 @@ func (g *Graph) AddPod(pod *corev1.Pod) { if v.PersistentVolumeClaim != nil { claimName = v.PersistentVolumeClaim.ClaimName } else if v.Ephemeral != nil && utilfeature.DefaultFeatureGate.Enabled(features.GenericEphemeralVolume) { - claimName = pod.Name + "-" + v.Name + claimName = ephemeral.VolumeClaimName(pod, &v) } if claimName != "" { pvcVertex := g.getOrCreateVertex_locked(pvcVertexType, pod.Namespace, claimName)
auth: use generic ephemeral volume helper functions The name concatenation and ownership check were originally considered small enough to not warrant dedicated functions, but the intent of the code is more readable with them.
diff --git a/src/Exscript/util/sigintcatcher.py b/src/Exscript/util/sigintcatcher.py index <HASH>..<HASH> 100644 --- a/src/Exscript/util/sigintcatcher.py +++ b/src/Exscript/util/sigintcatcher.py @@ -20,12 +20,13 @@ is the following statement:: import Exscript.util.sigintcatcher -Be warned that this way may of importing it breaks on some -systems, because a fork during an import may cause the following error: +Be warned that this way of importing breaks on some systems, because a +fork during an import may cause the following error:: RuntimeError: not holding the import lock -So in general it is recommended to use the class directly. +So in general it is recommended to use the L{sigint.SigIntWatcher()} +class directly. """ from Exscript.util.sigint import SigIntWatcher _watcher = SigIntWatcher()
minor API doc fix in Exscript.util.sigintcatcher.
diff --git a/lib/algoliasearch-rails.rb b/lib/algoliasearch-rails.rb index <HASH>..<HASH> 100644 --- a/lib/algoliasearch-rails.rb +++ b/lib/algoliasearch-rails.rb @@ -743,6 +743,7 @@ module AlgoliaSearch return object.send(:algolia_dirty?) if (object.respond_to?(:algolia_dirty?)) # Loop over each index to see if a attribute used in records has changed algolia_configurations.each do |options, settings| + next if algolia_indexing_disabled?(options) next if options[:slave] || options[:replica] return true if algolia_object_id_changed?(object, options) settings.get_attribute_names(object).each do |k|
Do not check attributes for disabled indexes If indexing is disabled, do not get all of the changed attributes
diff --git a/platform/html5/html.js b/platform/html5/html.js index <HASH>..<HASH> 100644 --- a/platform/html5/html.js +++ b/platform/html5/html.js @@ -32,12 +32,32 @@ StyleCachePrototype.update = function(element, name) { } } +StyleCachePrototype._apply = function(entry) { + //fixme: make updateStyle incremental + entry.element.updateStyle() +} + StyleCachePrototype.apply = function(element) { + var cache = this._cache + var id = element._uniqueId + + var entry = cache[id] + if (entry === undefined) + return + + delete cache[id] + this._apply(entry) } StyleCachePrototype.applyAll = function() { + var cache = this._cache + this._cache = {} + for(var id in cache) { + var entry = cache[id] + this._apply(entry) + } } var StyleClassifier = function (prefix) { @@ -607,6 +627,7 @@ exports.run = function(ctx, onloadCallback) { exports.tick = function(ctx) { //log('tick') + //ctx._styleCache.applyAll() } var Modernizr = window.Modernizr
added _apply to apply single entry style, added purge style cache from tick (commented for now)
diff --git a/forms_builder/forms/forms.py b/forms_builder/forms/forms.py index <HASH>..<HASH> 100644 --- a/forms_builder/forms/forms.py +++ b/forms_builder/forms/forms.py @@ -47,6 +47,11 @@ class FormForForm(forms.ModelForm): field_args["widget"] = getattr(import_module(module), widget) self.initial[field_key] = field.default self.fields[field_key] = field_class(**field_args) + # Add identifying CSS classes to the field. + css_class = field_class_name.lower() + if field.required: + css_class += " required" + self.fields[field_key].widget.attrs["class"] = css_class def save(self, **kwargs): """
Add CSS classes to form fields using field type and required.
diff --git a/index.js b/index.js index <HASH>..<HASH> 100644 --- a/index.js +++ b/index.js @@ -5,7 +5,7 @@ var P_PROTO = "___proto_polyfill_proto___"; var P_FUNCT = "___proto_polyfill_funct___"; var P_VALUE = "___proto_polyfill_value___"; - var IS_SYMBOL = /^Symbol\(/; + var SYMBOL = "Symbol("; var getPrototypeOf = O["getPrototypeOf"]; var getOwnPropertyNames = O["getOwnPropertyNames"]; @@ -76,7 +76,7 @@ n = 0; for (; n < names.length; n++) { name = names[n]; - if (name && name !== O_PROTO && name !== P_PROTO && name !== P_FUNCT && name !== P_VALUE && !IS_SYMBOL.test(name) && !dest.hasOwnProperty(name)) { + if (name && name !== O_PROTO && name !== P_PROTO && name !== P_FUNCT && name !== P_VALUE && name.indexOf(SYMBOL) !== 0 && !dest.hasOwnProperty(name)) { setProperty(dest, source, name); } }
replace regex with indexOf for speed
diff --git a/lib/jquery.raty.js b/lib/jquery.raty.js index <HASH>..<HASH> 100644 --- a/lib/jquery.raty.js +++ b/lib/jquery.raty.js @@ -194,7 +194,7 @@ } }); }, _callback: function(options) { - for (i in options) { + for (var i in options) { if (typeof this.opt[options[i]] === 'function') { this.opt[options[i]] = this.opt[options[i]].call(this); }
fixing usage of undefined variable in _callback function
diff --git a/src/androidTest/java/com/couchbase/lite/support/BatcherTest.java b/src/androidTest/java/com/couchbase/lite/support/BatcherTest.java index <HASH>..<HASH> 100644 --- a/src/androidTest/java/com/couchbase/lite/support/BatcherTest.java +++ b/src/androidTest/java/com/couchbase/lite/support/BatcherTest.java @@ -47,7 +47,7 @@ public class BatcherTest extends LiteTestCase { } batcher.queueObjects(objectsToQueue); - boolean didNotTimeOut = doneSignal.await(5, TimeUnit.SECONDS); + boolean didNotTimeOut = doneSignal.await(35, TimeUnit.SECONDS); assertTrue(didNotTimeOut); }
Issue #<I> - extend the allowed time for this test to run Previously this test was executing very quickly, because it was essentially processing everything at once, which is exactly the core issue of issue #<I>. By expecting the test to complete so quickly, we are advocating mis-behavior. Change this to expect the batcher to stream things out more over time, and therefore allow more time for the test to complete. <URL>
diff --git a/openquake/hazardlib/gsim/chiou_youngs_2014.py b/openquake/hazardlib/gsim/chiou_youngs_2014.py index <HASH>..<HASH> 100644 --- a/openquake/hazardlib/gsim/chiou_youngs_2014.py +++ b/openquake/hazardlib/gsim/chiou_youngs_2014.py @@ -106,7 +106,7 @@ class ChiouYoungs2014(GMPE): eta = epsilon = 0. # deep soil correction - no_correction = sites.z1pt0 <= 0 + no_correction = getattr(sites, 'z1pt0', 0) <= 0 deep_s = C['phi5'] * (1.0 - np.exp(-1. * centered_z1pt0 / C['phi6'])) deep_s[no_correction] = 0
Small fix to ChiouYoungs<I> for missing z1pt0
diff --git a/safe/gui/tools/wizard/wizard_strings.py b/safe/gui/tools/wizard/wizard_strings.py index <HASH>..<HASH> 100644 --- a/safe/gui/tools/wizard/wizard_strings.py +++ b/safe/gui/tools/wizard/wizard_strings.py @@ -142,7 +142,8 @@ classify_vector_for_postprocessor_question = tr( 'aggregation postprocessor will need to know mapping of the attribute ' 'values to known categories. Please drag unique values from the list ' 'on the left into the panel on the right and place them in the ' - 'appropriate categories.' + 'appropriate categories. Un-mapped values will go automatically in the ' + '\'Other\' group on runtime.' ) # (subcategory, category, field) select_function_constraints2_question = tr( 'You selected <b>%s</b> hazard and <b>%s</b> exposure. Now, select the '
update wizard strings about "other" class
diff --git a/h2o-py/h2o/frame.py b/h2o-py/h2o/frame.py index <HASH>..<HASH> 100644 --- a/h2o-py/h2o/frame.py +++ b/h2o-py/h2o/frame.py @@ -2537,10 +2537,16 @@ class H2OFrame(object): plt.ylabel("Frequency") plt.title("Histogram of %s" % self.names[0]) - try: - plt.bar(left=lefts, width=widths, height=counts, bottom=0) - except TypeError: - plt.bar(x=lefts, height=counts, width=widths, bottom=0) + # matplotlib deprecated "left" arg in 2.1.0 and removed in 3.0.0 + version_number = matplotlib.__version__ + major = version_number.split('.')[0] + minor = version_number.split('.')[1] + major = int(major) + minor = int(minor) + if major == 2 and minor >= 1 or major >= 3: + plt.bar(x=lefts, width=widths, height=counts, bottom=0) + else: + plt.bar(left=lefts, height=counts, width=widths, bottom=0) if not server: plt.show()
PUBDEV-<I>: updated catch to check matplotlib version number and apply arguments in plt.bar() that work for that version
diff --git a/geo-analyzer/src/main/java/au/gov/amsa/geo/distance/DistanceTravelledCalculator.java b/geo-analyzer/src/main/java/au/gov/amsa/geo/distance/DistanceTravelledCalculator.java index <HASH>..<HASH> 100644 --- a/geo-analyzer/src/main/java/au/gov/amsa/geo/distance/DistanceTravelledCalculator.java +++ b/geo-analyzer/src/main/java/au/gov/amsa/geo/distance/DistanceTravelledCalculator.java @@ -70,7 +70,7 @@ public class DistanceTravelledCalculator { .buffer(Math.max( 1, (int) Math.round(Math.ceil(numFiles - / Runtime.getRuntime().availableProcessors())) - 1)) + / Runtime.getRuntime().availableProcessors())))) .flatMap(fileList -> // extract fixes from each file Observable
use all available processors for distance travelled calculation
diff --git a/utool/util_alg.py b/utool/util_alg.py index <HASH>..<HASH> 100755 --- a/utool/util_alg.py +++ b/utool/util_alg.py @@ -448,6 +448,12 @@ def deg_to_rad(degree): return (degree / 360.0) * tau +def rad_to_deg(radians): + tau = 2 * np.pi + radians %= tau + return (radians / tau) * 360.0 + + def enumerate_primes(max_prime=4100): primes = [num for num in range(2, max_prime) if is_prime(num)] return primes
Added th compliment to deg_to_rad (rad_to_deg)
diff --git a/config/global.ini.php b/config/global.ini.php index <HASH>..<HASH> 100644 --- a/config/global.ini.php +++ b/config/global.ini.php @@ -517,7 +517,6 @@ Plugins[] = ExamplePlugin Plugins[] = ExampleRssWidget Plugins[] = Provider Plugins[] = Feedback -Plugins[] = PleineLune Plugins[] = Login Plugins[] = UsersManager
PleineLune should not be loaded by default. Should be loaded only in config.ini.php.
diff --git a/neutrino.go b/neutrino.go index <HASH>..<HASH> 100644 --- a/neutrino.go +++ b/neutrino.go @@ -1251,16 +1251,14 @@ func (s *ChainService) handleDonePeerMsg(state *peerState, sp *ServerPeer) { list = state.outboundPeers } if _, ok := list[sp.ID()]; ok { - if sp.VersionKnown() { - state.outboundGroups[addrmgr.GroupKey(sp.NA())]-- - } + state.outboundGroups[addrmgr.GroupKey(sp.NA())]-- + delete(list, sp.ID()) if sp.persistent { s.connManager.Disconnect(sp.connReq.ID()) } else { s.connManager.Remove(sp.connReq.ID()) go s.connManager.NewConnReq() } - delete(list, sp.ID()) log.Debugf("Removed peer %s", sp) return }
neutrino: remove redundant VersionKnown check in handleDonePeerMsg We assume that the outbound groups are incremented if the peer was added in the first place, which we check above. Because of this, checking for whether we know their version is redundant.
diff --git a/Domain/Acl.php b/Domain/Acl.php index <HASH>..<HASH> 100644 --- a/Domain/Acl.php +++ b/Domain/Acl.php @@ -1,4 +1,5 @@ <?php + /* * This file is part of the Symfony package. *
CS: Ensure there is no code on the same line as the PHP open tag and it is followed by a blankline
diff --git a/components/ngDroplet.js b/components/ngDroplet.js index <HASH>..<HASH> 100644 --- a/components/ngDroplet.js +++ b/components/ngDroplet.js @@ -1042,7 +1042,11 @@ // Subscribe to the "change" event. element.bind('change', function onChange() { - scope.interface.traverseFiles(element[0].files); + + scope.$apply(function apply() { + scope.interface.traverseFiles(element[0].files); + }); + }); }
Added apply for INPUT elements
diff --git a/invoiceitem.go b/invoiceitem.go index <HASH>..<HASH> 100644 --- a/invoiceitem.go +++ b/invoiceitem.go @@ -31,6 +31,8 @@ type InvoiceItem struct { Currency Currency `json:"currency"` Customer *Customer `json:"customer"` Date int64 `json:"date"` + Period *Period `json:"period"` + Plan *Plan `json:"plan"` Proration bool `json:"proration"` Desc string `json:"description"` Invoice *Invoice `json:"invoice"` @@ -38,6 +40,7 @@ type InvoiceItem struct { Sub string `json:"subscription"` Discountable bool `json:"discountable"` Deleted bool `json:"deleted"` + Quantity int64 `json:"quantity"` } // InvoiceItemList is a list of invoice items as retrieved from a list endpoint.
adding InvoiceItem.Quantity, InvoiceItem.Period.Start/End, InvoiceItem.Plan
diff --git a/test/test_transactions.py b/test/test_transactions.py index <HASH>..<HASH> 100644 --- a/test/test_transactions.py +++ b/test/test_transactions.py @@ -512,9 +512,11 @@ def create_test(scenario_def, test): # Assert final state is expected. expected_c = test['outcome'].get('collection') if expected_c is not None: - # Read from the primary to ensure causal consistency. + # Read from the primary with local read concern to ensure causal + # consistency. primary_coll = collection.with_options( - read_preference=ReadPreference.PRIMARY) + read_preference=ReadPreference.PRIMARY, + read_concern=ReadConcern('local')) self.assertEqual(list(primary_coll.find()), expected_c['data']) return run_scenario
PYTHON-<I> Fix transaction test runner to read the latest data from the primary
diff --git a/src/database/seeds/ScheduleSeeder.php b/src/database/seeds/ScheduleSeeder.php index <HASH>..<HASH> 100644 --- a/src/database/seeds/ScheduleSeeder.php +++ b/src/database/seeds/ScheduleSeeder.php @@ -77,9 +77,9 @@ class ScheduleSeeder extends Seeder 'ping_before' => null, 'ping_after' => null ], - [ // Clear Expired Commands | Daily at 12am + [ // Clear Expired Commands | Every 6 hours 'command' => 'seat:queue:clear-expired', - 'expression' => '0 0 * * * *', + 'expression' => '0 */6 * * *', 'allow_overlap' => false, 'allow_maintenance' => false, 'ping_before' => null,
Seed the expired job time to run every 6 hours
diff --git a/satpy/composites/__init__.py b/satpy/composites/__init__.py index <HASH>..<HASH> 100644 --- a/satpy/composites/__init__.py +++ b/satpy/composites/__init__.py @@ -413,12 +413,9 @@ class PSPRayleighReflectance(CompositeBase): except KeyError: LOG.warning("Could not get the reflectance correction using band name: %s", vis.attrs['name']) LOG.warning("Will try use the wavelength, however, this may be ambiguous!") - refl_cor_band = corrector.get_reflectance(sunz.load().values, - satz.load().values, - ssadiff.load().values, - vis.attrs['wavelength'][1], - red.values) - + refl_cor_band = da.map_blocks(corrector.get_reflectance, sunz.data, + satz.data, ssadiff.data, vis.attrs['wavelength'][1], + red.data) proj = vis - refl_cor_band proj.attrs = vis.attrs self.apply_modifier_info(vis, proj)
Daskify rayleigh, case of missing band name
diff --git a/src/naarad/metrics/metric.py b/src/naarad/metrics/metric.py index <HASH>..<HASH> 100644 --- a/src/naarad/metrics/metric.py +++ b/src/naarad/metrics/metric.py @@ -292,7 +292,7 @@ class Metric(object): items = sub_metric.split('.') if sub_metric in self.important_sub_metrics: return True - if items[len(items)-1] in self.important_sub_metrics: + if items[-1] in self.important_sub_metrics: return True return False
Extend Diff to support URL based CDF csv file paths, also Fix issue <I>: cdf not plotted for sar important metrics
diff --git a/snet_cli/utils_proto.py b/snet_cli/utils_proto.py index <HASH>..<HASH> 100644 --- a/snet_cli/utils_proto.py +++ b/snet_cli/utils_proto.py @@ -57,9 +57,10 @@ def _import_protobuf_from_file(grpc_pyfile, method_name, service_name = None): service_descriptor = getattr(pb2, "DESCRIPTOR").services_by_name[service_name] for method in service_descriptor.methods: if(method.name == method_name): - request_class = getattr(pb2, method.input_type.name) - response_class = getattr(pb2, method.output_type.name) + request_class = method.input_type._concrete_class + response_class = method.output_type._concrete_class stub_class = getattr(pb2_grpc, "%sStub"%service_name) + found_services.append(service_name) if (len(found_services) == 0): return False, None
Use the class instead of assuming it exists in the same module - closes #<I>
diff --git a/test/common.js b/test/common.js index <HASH>..<HASH> 100644 --- a/test/common.js +++ b/test/common.js @@ -81,19 +81,24 @@ module.exports.createTemplate = function() { return jade.compile(template); }; +var ClientFlags = require('../lib/constants/client.js'); + module.exports.createServer = function(onListening, handler) { var server = require('../index.js').createServer(); server.on('connection', function(conn) { conn.on('error', function() { // we are here when client drops connection }); + var flags = 0xffffff; + flags = flags ^ ClientFlags.COMPRESS; + conn.serverHandshake({ protocolVersion: 10, serverVersion: 'node.js rocks', connectionId: 1234, statusFlags: 2, characterSet: 8, - capabilityFlags: 0xffffff + capabilityFlags: flags }); if (handler) handler(conn);
don't set COMPRESS flag in the server
diff --git a/nodeconductor/iaas/models.py b/nodeconductor/iaas/models.py index <HASH>..<HASH> 100644 --- a/nodeconductor/iaas/models.py +++ b/nodeconductor/iaas/models.py @@ -375,8 +375,25 @@ class Instance(core_models.UuidMixin, monthly_fee=template_license.monthly_fee, ) + def _copy_ssh_public_key_attributes(self): + self.ssh_public_key_name = self.ssh_public_key.name + self.ssh_public_key_fingerprint = self.ssh_public_key.fingerprint + + def _copy_flavor_attributes(self): + self.system_volume_size = self.flavor.disk + self.cores = self.flavor.cores + self.ram = self.flavor.ram + self.cloud = self.flavor.cloud + + def _copy_template_attributes(self): + self.agreed_sla = self.template.sla_level + def save(self, *args, **kwargs): created = self.pk is None + if created: + self._copy_template_attributes() + self._copy_flavor_attributes() + self._copy_ssh_public_key_attributes() super(Instance, self).save(*args, **kwargs) if created: self._init_instance_licenses()
copied fields initialization added to Instance model (nc-<I>)
diff --git a/actionpack/lib/action_dispatch/routing/redirection.rb b/actionpack/lib/action_dispatch/routing/redirection.rb index <HASH>..<HASH> 100644 --- a/actionpack/lib/action_dispatch/routing/redirection.rb +++ b/actionpack/lib/action_dispatch/routing/redirection.rb @@ -68,8 +68,8 @@ module ActionDispatch # return value. # # match 'jokes/:number', :to => redirect { |params, request| - # path = (params[:number].to_i.even? ? "/wheres-the-beef" : "/i-love-lamp") - # "http://#{request.host_with_port}#{path}" + # path = (params[:number].to_i.even? ? "wheres-the-beef" : "i-love-lamp") + # "http://#{request.host_with_port}/#{path}" # } # # Note that the `do end` syntax for the redirect block wouldn't work, as Ruby would pass
let's keep the slash in the return value instead of the path variable [ci skip]
diff --git a/ariba/mic_plotter.py b/ariba/mic_plotter.py index <HASH>..<HASH> 100644 --- a/ariba/mic_plotter.py +++ b/ariba/mic_plotter.py @@ -535,7 +535,7 @@ class MicPlotter: corrected_p = min(1, len(output) * x[4]) corrected_significant = 'yes' if corrected_p < p_cutoff else 'no' corrected_effect_size = scipy.stats.norm.ppf(corrected_p) / math.sqrt(x[2] + x[3]) - print(*x, corrected_p, corrected_significant, corrected_effect_size, sep='\t', file=f) + print('\t'.join([str(z) for z in x]), corrected_p, corrected_significant, corrected_effect_size, sep='\t', file=f) def _make_plot(self, mic_data, top_plot_data, all_mutations, mut_combinations):
fix print to work with python <I>