diff
stringlengths
65
26.7k
message
stringlengths
7
9.92k
diff --git a/will/backends/io_adapters/slack.py b/will/backends/io_adapters/slack.py index <HASH>..<HASH> 100644 --- a/will/backends/io_adapters/slack.py +++ b/will/backends/io_adapters/slack.py @@ -353,7 +353,7 @@ class SlackBackend(IOBackend, SleepMixin, StorageMixin): }) if hasattr(event, "kwargs") and "html" in event.kwargs and event.kwargs["html"]: data.update({ - "parse": "full", + "parse": "none", }) headers = {'Accept': 'text/plain'}
Change parse option from full to none in Slack, this will not format html messages
diff --git a/psiturk/experiment.py b/psiturk/experiment.py index <HASH>..<HASH> 100644 --- a/psiturk/experiment.py +++ b/psiturk/experiment.py @@ -364,7 +364,7 @@ def start_exp(): raise ExperimentError('already_did_exp_hit') if debug_mode: - ad_server_location = '' + ad_server_location = '/complete' else: # if everything goes ok here relatively safe to assume we can lookup the ad ad_id = get_ad_via_hitid(hitId)
gets rid of error messages that was appear and end of debug sequence
diff --git a/server/conf.go b/server/conf.go index <HASH>..<HASH> 100644 --- a/server/conf.go +++ b/server/conf.go @@ -16,7 +16,6 @@ package server import ( "flag" "fmt" - "io/ioutil" "reflect" "strconv" "strings" @@ -31,11 +30,7 @@ import ( // ProcessConfigFile parses the configuration file `configFile` and updates // the given Streaming options `opts`. func ProcessConfigFile(configFile string, opts *Options) error { - data, err := ioutil.ReadFile(configFile) - if err != nil { - return err - } - m, err := conf.Parse(string(data)) + m, err := conf.ParseFile(configFile) if err != nil { return err }
[FIXED] Possible issue with confi files using include directive This was observed in the context of Docker. Resolves #<I>
diff --git a/lib/LitleOnlineRequest.rb b/lib/LitleOnlineRequest.rb index <HASH>..<HASH> 100755 --- a/lib/LitleOnlineRequest.rb +++ b/lib/LitleOnlineRequest.rb @@ -264,7 +264,7 @@ module LitleOnline request.authentication = authentication request.merchantId = get_merchant_id(options) - request.version = '10.1' + request.version = '11.0' request.loggedInUser = get_logged_in_user(options) request.xmlns = "http://www.litle.com/schema" request.merchantSdk = get_merchant_sdk(options) @@ -294,7 +294,7 @@ module LitleOnline end def get_merchant_sdk(options) - options['merchantSdk'] || 'Ruby;10.1' + options['merchantSdk'] || 'Ruby;11.0' end def get_report_group(options)
Change XML and SDK version
diff --git a/model_organization/__init__.py b/model_organization/__init__.py index <HASH>..<HASH> 100644 --- a/model_organization/__init__.py +++ b/model_organization/__init__.py @@ -1,5 +1,6 @@ from __future__ import print_function, division import os +import sys import glob import copy import os.path as osp @@ -530,7 +531,11 @@ class ModelOrganizer(object): return def tar_add(path, file_obj): - file_obj.add(path, self.relpath(path), exclude=to_exclude) + if sys.version_info[:2] < (3, 7): + file_obj.add(path, self.relpath(path), exclude=to_exclude) + else: + file_obj.add(path, self.relpath(path), + filter=lambda f: None if to_exclude(f) else f) def zip_add(path, file_obj): # ziph is zipfile handle
Compatibility fix for py<I> in TarFile.add
diff --git a/PyFunceble/query/http_status_code.py b/PyFunceble/query/http_status_code.py index <HASH>..<HASH> 100644 --- a/PyFunceble/query/http_status_code.py +++ b/PyFunceble/query/http_status_code.py @@ -357,7 +357,11 @@ class HTTPStatusCode: req.url ).get_converted() - if not self.allow_redirects and first_origin != final_origin: + if ( + not self.allow_redirects + and first_origin != final_origin + and req.history + ): return req.history[0].status_code return req.status_code
Fix issue when the history is empty. Indeed, in some rare cases, the history may be empty. This patch fixes the issue by checking if the history is filled with data. Contributors: * @mitchellkrogza
diff --git a/secretballot/views.py b/secretballot/views.py index <HASH>..<HASH> 100644 --- a/secretballot/views.py +++ b/secretballot/views.py @@ -2,6 +2,8 @@ from django.template import loader, RequestContext from django.core.exceptions import ImproperlyConfigured from django.http import (HttpResponse, HttpResponseRedirect, Http404, HttpResponseForbidden) +from django.db.models import Model, get_model +from django.contrib.contenttypes.models import ContentType from secretballot.models import Vote def vote(request, content_type, object_id, vote, can_vote_test=None, @@ -13,6 +15,15 @@ def vote(request, content_type, object_id, vote, can_vote_test=None, raise ImproperlyConfigured('To use secretballot a SecretBallotMiddleware must be installed. (see secretballot/middleware.py)') token = request.secretballot_token + if isinstance(content_type, ContentType) + pass + elif isinstance(content_type, Model): + content_type = ContentType.objects.get_for_model(content_type) + elif isinstance(content_type, basestring) and '.' in content_type: + content_type = ContentType.objects.get(app_label=app, model__iexact=modelname) + else: + raise ValueError('content_type must be an instance of ContentType, a model, or "app.modelname" string') + # do the action if vote:
made content_type argument to view more flexible
diff --git a/lib/workers/branch/index.js b/lib/workers/branch/index.js index <HASH>..<HASH> 100644 --- a/lib/workers/branch/index.js +++ b/lib/workers/branch/index.js @@ -61,7 +61,7 @@ async function processBranch(branchConfig) { }). You will still receive a PR once a newer version is released, so if you wish to permanently ignore this dependency, please add it to the \`ignoreDeps\` array of your renovate config.`; } content += - '\n\nIf this PR was closed by mistake or you changed your mind, you can simply reopen or rename it to reactivate Renovate for this dependency version.'; + '\n\nIf this PR was closed by mistake or you changed your mind, you can simply rename this PR and you will soon get a fresh replacement PR opened.'; await platform.ensureComment(pr.number, subject, content); if (branchExists) { await platform.deleteBranch(config.branchName);
refactor: Recommend blocking PRs be renamed and not reopened
diff --git a/qng/generator.py b/qng/generator.py index <HASH>..<HASH> 100644 --- a/qng/generator.py +++ b/qng/generator.py @@ -1,3 +1,4 @@ +import copy import json import operator import os @@ -90,13 +91,15 @@ class QuebNameGenerator: return names def _get_male_names(self): - names = [name for name in self._names if name['gender'] == 'male'] + names = copy.deepcopy(self._names) + names = [name for name in names if name['gender'] == 'male'] names = self._compute_weights(names) return names def _get_female_names(self): - names = [name for name in self._names if name['gender'] == 'female'] + names = copy.deepcopy(self._names) + names = [name for name in names if name['gender'] == 'female'] names = self._compute_weights(names) return names
Fix: deepcopy dictionaries for gendered lists
diff --git a/gothic/gothic.go b/gothic/gothic.go index <HASH>..<HASH> 100644 --- a/gothic/gothic.go +++ b/gothic/gothic.go @@ -200,23 +200,15 @@ func getProviderName(req *http.Request) (string, error) { } func storeInSession(key string, value string, req *http.Request, res http.ResponseWriter) error { - session, err := Store.Get(req, key + SessionName) - if err != nil { - return err - } + session, _ := Store.Get(req, key + SessionName) session.Values[key] = value - err = session.Save(req, res) - - return err + return session.Save(req, res) } func getFromSession(key string, req *http.Request) (string, error) { - session, err := Store.Get(req, key + SessionName) - if err != nil { - return "", err - } + session, _ := Store.Get(req, key + SessionName) value := session.Values[key] if value == nil {
ignore errors when session is not yet registered (otherwise it will give an error on first attempt to use the new provider)
diff --git a/src/aria/resources/DateRes_vi_VN.js b/src/aria/resources/DateRes_vi_VN.js index <HASH>..<HASH> 100644 --- a/src/aria/resources/DateRes_vi_VN.js +++ b/src/aria/resources/DateRes_vi_VN.js @@ -27,8 +27,15 @@ Aria.resourcesDefinition({ ], // a false value for the following items mean: use substring // to generate the short versions of days or months - dayShort : false, - monthShort : false, + dayShort : [ + "CN", + "T2", + "T3", + "T4", + "T5", + "T6", + "T7" + ], month : [ "Tháng một", "Tháng hai", @@ -42,6 +49,20 @@ Aria.resourcesDefinition({ "Tháng mười", "Tháng mười một", "Tháng mười hai" + ], + monthShort : [ + "Th1", + "Th2", + "Th3", + "Th4", + "Th5", + "Th6", + "Th7", + "Th8", + "Th9", + "Th10", + "Th11", + "Th12" ] } });
fix Add the short day/month translations for VN close #<I>
diff --git a/phpUnitTests/bootstrap.php b/phpUnitTests/bootstrap.php index <HASH>..<HASH> 100644 --- a/phpUnitTests/bootstrap.php +++ b/phpUnitTests/bootstrap.php @@ -1,3 +1,3 @@ <?php -require_once __DIR__.'/../example/init.inc.php'; +(include_once __DIR__.'/../vendor/autoload.php') OR die(PHP_EOL.'ERROR: composer autoloader not found, run "composer install" or see README for instructions'.PHP_EOL);
Use composer autoloader (or complain if missing)
diff --git a/src/Arr.php b/src/Arr.php index <HASH>..<HASH> 100644 --- a/src/Arr.php +++ b/src/Arr.php @@ -80,7 +80,7 @@ class Arr if (count($keys) === 1) { if ($firstKey === '*') { return $array; - } else if (isset($array[$firstKey])) { + } else if (array_key_exists($firstKey, $array) === true) { return $array[$firstKey]; } else { $instance->keys[] = $firstKey; @@ -108,7 +108,7 @@ class Arr return $value; } else if (is_numeric($firstKey) === true && is_int((int) $firstKey) === true) { - if (isset($array[$firstKey]) === true) { + if (array_key_exists($firstKey, $array) === true) { $value = $array[$firstKey]; return static::_traverse($instance, $value, $otherKeys); @@ -116,7 +116,7 @@ class Arr throw new OutOfBoundsException("Undefined offset: {$instance->_key()}"); } } else { - if (isset($array[$firstKey]) === true) { + if (array_key_exists($firstKey, $array) === true) { $value = $array[$firstKey]; if (is_array($value) === false) {
fixed a bug when a null value was considered not existing
diff --git a/warehouse/filters.py b/warehouse/filters.py index <HASH>..<HASH> 100644 --- a/warehouse/filters.py +++ b/warehouse/filters.py @@ -132,7 +132,7 @@ def format_classifiers(classifiers): if value: structured[key].append(value[0]) - # Go thorugh and ensure that all of the lists in our classifiers are in + # Go through and ensure that all of the lists in our classifiers are in # sorted order. structured = {k: sorted(v) for k, v in structured.items()}
Fix simple typo: thorugh -> through (#<I>) Closes #<I>
diff --git a/system/src/Grav/Common/Grav.php b/system/src/Grav/Common/Grav.php index <HASH>..<HASH> 100644 --- a/system/src/Grav/Common/Grav.php +++ b/system/src/Grav/Common/Grav.php @@ -209,7 +209,9 @@ class Grav extends Container $this->fireEvent('onPagesInitialized'); $debugger->stopTimer('pages'); + $debugger->startTimer('pageinit', 'Page Initialized'); $this->fireEvent('onPageInitialized'); + $debugger->stopTimer('pageinit'); $debugger->addAssets();
added a timer around pageInitialized event
diff --git a/actionpack/lib/action_dispatch/routing/mapper.rb b/actionpack/lib/action_dispatch/routing/mapper.rb index <HASH>..<HASH> 100644 --- a/actionpack/lib/action_dispatch/routing/mapper.rb +++ b/actionpack/lib/action_dispatch/routing/mapper.rb @@ -1690,7 +1690,7 @@ module ActionDispatch end def shallow_nesting_depth #:nodoc: - @nesting.select(&:shallow?).size + @nesting.count(&:shallow?) end def param_constraint? #:nodoc:
A shorter and more concise version of select..size
diff --git a/sentry/models.py b/sentry/models.py index <HASH>..<HASH> 100644 --- a/sentry/models.py +++ b/sentry/models.py @@ -8,6 +8,8 @@ except ImportError: import logging import math +from datetime import datetime + from django.conf import settings from django.db import models from django.db.models import Count @@ -64,7 +66,7 @@ class GzippedDictField(models.TextField): class MessageBase(Model): logger = models.CharField(max_length=64, blank=True, default='root', db_index=True) - timestamp = models.DateTimeField(auto_now_add=True, db_index=True) + timestamp = models.DateTimeField(editable=False, default=datetime.now) class_name = models.CharField(_('type'), max_length=128, blank=True, null=True, db_index=True) level = models.PositiveIntegerField(choices=conf.LOG_LEVELS, default=logging.ERROR, blank=True, db_index=True) message = models.TextField()
added the field timestamp to the MessageBase model. not editable, defaults to `now`.
diff --git a/example/project/settings.py b/example/project/settings.py index <HASH>..<HASH> 100644 --- a/example/project/settings.py +++ b/example/project/settings.py @@ -22,8 +22,6 @@ SECRET_KEY = 'qpd-psx8c+xna6!sg^@k)b3h@=hog+gwpu#z%*^(vat3=d&i1z' # SECURITY WARNING: don't run with debug turned on in production! DEBUG = True -TEMPLATE_DEBUG = True - TEMPLATES = [ { 'BACKEND': 'django.template.backends.django.DjangoTemplates',
remove depricated settings from example
diff --git a/pf/html/admin/person/lookup.php b/pf/html/admin/person/lookup.php index <HASH>..<HASH> 100644 --- a/pf/html/admin/person/lookup.php +++ b/pf/html/admin/person/lookup.php @@ -24,7 +24,13 @@ if($view_item){ $person_view = new table("person view $view_item"); if($person_view->rows[0]['pid'] == $view_item){ - $lookup['name'] = $person_view->rows[0]['pid']; + $lookup['pid'] = $person_view->rows[0]['pid']; + $lookup['firstname'] = $person_view->rows[0]['firstname']; + $lookup['lastname'] = $person_view->rows[0]['lastname']; + $lookup['email'] = $person_view->rows[0]['email']; + $lookup['telephone'] = $person_view->rows[0]['telephone']; + $lookup['company'] = $person_view->rows[0]['company']; + $lookup['address'] = $person_view->rows[0]['address']; $lookup['notes'] = $person_view->rows[0]['notes']; $node_view = new table("node view pid=$view_item");
added the new fields in the person table to person lookup in web admin GUI Monotone-Parent: <I>cd9daafbfc<I>e7bd<I>f<I>bdd<I>b<I> Monotone-Revision: e<I>c<I>bf<I>d1b<I>d<I>d3fc4cfcfc0a<I>d Monotone-
diff --git a/Classes/Controller/JsonadmController.php b/Classes/Controller/JsonadmController.php index <HASH>..<HASH> 100644 --- a/Classes/Controller/JsonadmController.php +++ b/Classes/Controller/JsonadmController.php @@ -21,9 +21,6 @@ use Zend\Diactoros\Response; */ class JsonadmController extends AbstractController { - private static $aimeos; - - /** * Initializes the object before the real action is called. */ @@ -148,7 +145,7 @@ class JsonadmController extends AbstractController protected function createClient( $resource ) { $context = $this->getContextBackend( 'admin/jsonadm/templates' ); - return \Aimeos\Admin\JsonAdm\Factory::createClient( $context, [], $resource ); + return \Aimeos\Admin\JsonAdm\Factory::createClient( $context, Base::getAimeos(), $resource ); }
Pass Aimeos object instead of template paths to JsonAdm clients
diff --git a/jquery.geocomplete.js b/jquery.geocomplete.js index <HASH>..<HASH> 100644 --- a/jquery.geocomplete.js +++ b/jquery.geocomplete.js @@ -205,6 +205,7 @@ this.find(); }, this)); + // Saves the previous input value this.$input.bind('geocode:result.' + this._name, $.proxy(function(){ this.lastInputVal = this.$input.val(); }, this)); @@ -218,11 +219,7 @@ if (this.options.geocodeAfterResult === true && this.selected === true) { return; } if (this.options.restoreValueAfterBlur === true && this.selected === true) { - var _this = this; - - setTimeout(function() { - _this.$input.val(_this.lastInputVal); - }, 0); + setTimeout($.proxy(this.restoreLastValue, this), 0); } else { this.find(); } @@ -336,6 +333,11 @@ return firstResult; }, + // Restores the input value using the previous value if it exists + restoreLastValue: function() { + if (this.lastInputVal){ this.$input.val(this.lastInputVal); } + }, + // Handles the geocode response. If more than one results was found // it triggers the "geocode:multiple" events. If there was an error // the "geocode:error" event is fired.
Add comments and refactor to use proxy instead of _this
diff --git a/lib/server.js b/lib/server.js index <HASH>..<HASH> 100644 --- a/lib/server.js +++ b/lib/server.js @@ -327,8 +327,9 @@ Server.prototype._onInstanceRequest = function(instanceId, req, callback) { }; Server.prototype._onInstanceListening = function(instanceId, address) { + var host = address.address || '*'; console.log('%s: Service "%s" listening on %s:%d', this._cmdName, - instanceId, address.address, address.port); + instanceId, host, address.port); }; Server.prototype.start = function start(cb) {
server: print listening host correctly It used to print: sl-pm: Service "1" listening on null:<I>
diff --git a/isso/js/app/isso.js b/isso/js/app/isso.js index <HASH>..<HASH> 100644 --- a/isso/js/app/isso.js +++ b/isso/js/app/isso.js @@ -89,10 +89,6 @@ define(["app/dom", "app/utils", "app/config", "app/api", "app/jade", "app/i18n", if(rv.hidden_replies > 0) { insert_loader(rv, lastcreated); } - - if (window.location.hash.length > 0) { - $(window.location.hash).scrollIntoView(); - } }, function(err) { console.log(err);
don't scrollIntoView on expanding comments A regression introduced in <I>ee6a<I>
diff --git a/aioftp/server.py b/aioftp/server.py index <HASH>..<HASH> 100644 --- a/aioftp/server.py +++ b/aioftp/server.py @@ -529,6 +529,7 @@ class BaseServer: loop=self.loop, extra_workers=set(), response=lambda *args: response_queue.put_nowait(args), + acquired=False, _dispatcher=asyncio.Task.current_task(loop=self.loop), ) @@ -608,7 +609,10 @@ class BaseServer: writer.close() - self.available_connections[self].release() + if connection.acquired: + + self.available_connections[self].release() + if connection.future.user.done(): self.available_connections[connection.user].release() @@ -931,6 +935,7 @@ class Server(BaseServer): else: ok, code, info = True, "220", "welcome" + connection.acquired = True self.available_connections[self].acquire() connection.response(code, info)
connection.acquired state for not to release not acquired semaphore
diff --git a/tests/test_parser.py b/tests/test_parser.py index <HASH>..<HASH> 100644 --- a/tests/test_parser.py +++ b/tests/test_parser.py @@ -54,7 +54,7 @@ try: except ImportError: pass -sys.stderr.write('Testing trees '+ " ".join(treeTypes.keys())) +sys.stdout.write('Testing trees '+ " ".join(treeTypes.keys()) + "\n") #Run the parse error checks checkParseErrors = False
Send output to stdout, make it appear on its own line --HG-- extra : convert_revision : svn%3Aacbfec<I>-<I>-<I>-a<I>-<I>a<I>e<I>e0/trunk%<I>
diff --git a/index.js b/index.js index <HASH>..<HASH> 100644 --- a/index.js +++ b/index.js @@ -349,7 +349,7 @@ THREE.Projector = function () { _object.object = object; _vector3.setFromMatrixPosition( object.matrixWorld ); - _vector3.applyProjection( _viewProjectionMatrix ); + _vector3.applyMatrix4( _viewProjectionMatrix ); _object.z = _vector3.z; _object.renderOrder = object.renderOrder; @@ -2050,4 +2050,4 @@ THREE.CanvasRenderer = function ( parameters ) { }; -module.exports = THREE; \ No newline at end of file +module.exports = THREE;
Fix warning about deprecation of `applyProjection` This prevents a bunch of console spew about deprecated function calls.
diff --git a/admin/javascript/LeftAndMain.Content.js b/admin/javascript/LeftAndMain.Content.js index <HASH>..<HASH> 100644 --- a/admin/javascript/LeftAndMain.Content.js +++ b/admin/javascript/LeftAndMain.Content.js @@ -150,7 +150,10 @@ formData.push({name: 'BackURL', value:History.getPageUrl()}); jQuery.ajax(jQuery.extend({ - headers: {"X-Pjax" : "CurrentForm"}, + headers: { + "X-Pjax" : "CurrentForm", + 'X-Pjax-Selector': '.cms-edit-form' + }, url: form.attr('action'), data: formData, type: 'POST',
MINOR Retaining correct PJAX selector on (fake) redirects after form submissions
diff --git a/middleman-core/lib/middleman-core/sitemap/extensions/traversal.rb b/middleman-core/lib/middleman-core/sitemap/extensions/traversal.rb index <HASH>..<HASH> 100644 --- a/middleman-core/lib/middleman-core/sitemap/extensions/traversal.rb +++ b/middleman-core/lib/middleman-core/sitemap/extensions/traversal.rb @@ -68,6 +68,9 @@ module Middleman # (e.g., if the resource is named 'gallery.html' and a path exists named 'gallery/', this would return true) # @return [Boolean] def eponymous_directory? + if !path.end_with?("/#{app.index_file}") && destination_path.end_with?("/#{app.index_file}") + return true + end full_path = File.join(app.source_dir, eponymous_directory_path) !!(File.exists?(full_path) && File.directory?(full_path)) end
Attempt a fix for #<I>
diff --git a/prometheus/graphite/bridge.go b/prometheus/graphite/bridge.go index <HASH>..<HASH> 100644 --- a/prometheus/graphite/bridge.go +++ b/prometheus/graphite/bridge.go @@ -182,9 +182,12 @@ func (b *Bridge) Push() error { } func writeMetrics(w io.Writer, mfs []*dto.MetricFamily, prefix string, now model.Time) error { - vec := expfmt.ExtractSamples(&expfmt.DecodeOptions{ + vec, err := expfmt.ExtractSamples(&expfmt.DecodeOptions{ Timestamp: now, }, mfs...) + if err != nil { + return err + } buf := bufio.NewWriter(w) for _, s := range vec {
graphite: Adjust ExtractSamples call to new interface
diff --git a/sling/core/commons/src/main/java/com/composum/sling/cpnl/CpnlElFunctions.java b/sling/core/commons/src/main/java/com/composum/sling/cpnl/CpnlElFunctions.java index <HASH>..<HASH> 100644 --- a/sling/core/commons/src/main/java/com/composum/sling/cpnl/CpnlElFunctions.java +++ b/sling/core/commons/src/main/java/com/composum/sling/cpnl/CpnlElFunctions.java @@ -19,7 +19,7 @@ public class CpnlElFunctions { private static final Logger LOG = LoggerFactory.getLogger(CpnlElFunctions.class); - public static final Pattern HREF_PATTERN = Pattern.compile("(<a(\\s*.*)?\\s*href\\s*=\\s*['\"])([^'\"]+)([\"'])"); + public static final Pattern HREF_PATTERN = Pattern.compile("(<a(\\s*[^>]*)?\\s*href\\s*=\\s*['\"])([^'\"]+)([\"'])"); public static String i18n(SlingHttpServletRequest request, String text) { String translated = null;
fix for the content link transformation in rich text properties
diff --git a/salt/modules/win_dns_client.py b/salt/modules/win_dns_client.py index <HASH>..<HASH> 100644 --- a/salt/modules/win_dns_client.py +++ b/salt/modules/win_dns_client.py @@ -45,7 +45,10 @@ def get_dns_servers(interface='Local Area Connection'): for iface in c.Win32_NetworkAdapter(NetEnabled=True): if interface == iface.NetConnectionID: iface_config = c.Win32_NetworkAdapterConfiguration(Index=iface.Index).pop() - return list(iface_config.DNSServerSearchOrder) ++ try: ++ return list(iface_config.DNSServerSearchOrder) ++ except: ++ return [] log.debug('Interface "{0}" not found'.format(interface)) return False
Update win_dns_client.py If there is no dns address setted in the windows client, the iface_config.DNSServerSearchOrder method will return None, therefore this module will generate TypeError, 'NoneType' object is not iterable.
diff --git a/server.go b/server.go index <HASH>..<HASH> 100644 --- a/server.go +++ b/server.go @@ -180,6 +180,9 @@ func (s *Server) processPacket(b []byte, addr Addr) { } s.mu.Lock() defer s.mu.Unlock() + if s.closed.IsSet() { + return + } if d.Y == "q" { readQuery.Add(1) s.handleQuery(addr, d)
dht: Stop processing packet if server closes after unmarshalling
diff --git a/modules/quality-immutable-object/src/main/java/net/sf/qualitycheck/immutableobject/domain/Package.java b/modules/quality-immutable-object/src/main/java/net/sf/qualitycheck/immutableobject/domain/Package.java index <HASH>..<HASH> 100644 --- a/modules/quality-immutable-object/src/main/java/net/sf/qualitycheck/immutableobject/domain/Package.java +++ b/modules/quality-immutable-object/src/main/java/net/sf/qualitycheck/immutableobject/domain/Package.java @@ -16,6 +16,11 @@ public final class Package implements Characters { public static final Package UNDEFINED = new Package(); /** + * Represents the package <code>java.lang</code> + */ + public static final Package JAVA_LANG = new Package("java.lang"); + + /** * Prefix when written in class file */ private static final String PREFIX = "package";
Added type definition to be able to query them in StringTemplate templates which have very limited conditionals
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -6,8 +6,8 @@ import sys import distutils.errors import setuptools -if not hasattr(sys, "hexversion") or sys.hexversion < 0x02040000: - raise distutils.errors.DistutilsError("Python 2.4 or newer is required") +if not hasattr(sys, "hexversion") or sys.hexversion < 0x02060000: + raise distutils.errors.DistutilsError("Python 2.6 or newer is required") if os.name == "posix": from setup_posix import get_config
Requires at least Python <I>
diff --git a/jsonapi.go b/jsonapi.go index <HASH>..<HASH> 100644 --- a/jsonapi.go +++ b/jsonapi.go @@ -103,7 +103,7 @@ type Vin struct { Txid string `json:"txid,omitempty"` Vout int `json:"vout,omitempty"` ScriptSig *ScriptSig `json:"scriptSig,omitempty"` - Sequence float64 `json:"sequence"` + Sequence uint32 `json:"sequence"` } // Vout models parts of the tx data. It is defined seperately since both
The sequence num of a tx input is a uint<I>.
diff --git a/tests/test_common.py b/tests/test_common.py index <HASH>..<HASH> 100644 --- a/tests/test_common.py +++ b/tests/test_common.py @@ -68,9 +68,8 @@ def test_normalization_by_one(left, right, alg): assert isclose(s + d, 1) -# TODO: fix 0-size strings @pytest.mark.parametrize('alg', ALGS) -@hypothesis.given(text=hypothesis.strategies.text(min_size=1)) +@hypothesis.given(text=hypothesis.strategies.text()) def test_normalization_same(text, alg): assert alg.normalized_distance(text, text) == 0 assert alg.distance(text, text) == 0 diff --git a/textdistance/algorithms/base.py b/textdistance/algorithms/base.py index <HASH>..<HASH> 100644 --- a/textdistance/algorithms/base.py +++ b/textdistance/algorithms/base.py @@ -41,7 +41,7 @@ class Base: """ maximum = self.maximum(*sequences) if maximum == 0: - return 1 + return 0 return self.distance(*sequences) / maximum def normalized_similarity(self, *sequences):
fix normalized distance for empty strings. CLose #<I>
diff --git a/spyder_kernels/console/tests/test_console_kernel.py b/spyder_kernels/console/tests/test_console_kernel.py index <HASH>..<HASH> 100644 --- a/spyder_kernels/console/tests/test_console_kernel.py +++ b/spyder_kernels/console/tests/test_console_kernel.py @@ -27,7 +27,6 @@ import pytest from flaky import flaky from jupyter_core import paths from jupyter_client import BlockingKernelClient -from ipython_genutils import py3compat import numpy as np # Local imports @@ -77,7 +76,8 @@ def setup_kernel(cmd): if kernel.poll() is not None: o,e = kernel.communicate() - e = py3compat.cast_unicode(e) + if not PY3 and isinstance(e, bytes): + e = e.decode() raise IOError("Kernel failed to start:\n%s" % e) if not os.path.exists(connection_file):
Remove deps on ipython_genutils It requires nose in test suite, that is not package on many linux distrib and should not be used anymore. Technically this change is a bit more conservative than what genutils was doing when trying to detect the default encoding, but that should not matter much now.
diff --git a/condoor/version.py b/condoor/version.py index <HASH>..<HASH> 100644 --- a/condoor/version.py +++ b/condoor/version.py @@ -1,3 +1,3 @@ """Version information.""" -__version__ = '1.0.15' +__version__ = '1.0.16'
Bumping version number to <I>
diff --git a/packages/origin.js/src/resources/purchases.js b/packages/origin.js/src/resources/purchases.js index <HASH>..<HASH> 100644 --- a/packages/origin.js/src/resources/purchases.js +++ b/packages/origin.js/src/resources/purchases.js @@ -4,12 +4,18 @@ class Purchases { this.ipfsService = ipfsService } - async get(address){ + async contractFn(address, functionName, args=[]){ const purchaseContract = this.contractService.purchaseContract const purchase = await purchaseContract.at(address) const account = await this.contractService.currentAccount() - const contractData = await purchase.data( - { from: account } + args.push({ from: account }) + return await purchase[functionName](args) + } + + async get(address){ + const contractData = await this.contractFn( + address, + 'data' ) return { address: address,
Refactor out helper for calling contract functions
diff --git a/ledgerautosync/ledger.py b/ledgerautosync/ledger.py index <HASH>..<HASH> 100644 --- a/ledgerautosync/ledger.py +++ b/ledgerautosync/ledger.py @@ -81,7 +81,11 @@ class Ledger(object): self.t.daemon = True # thread dies with the program self.t.start() # read output until prompt - self.q.get() + try: + self.q.get(True, 5) + except Empty: + logging.error("Could not get prompt from ledger!") + exit(1) def run(self, cmd): if self.use_pipe: @@ -89,7 +93,11 @@ class Ledger(object): self.p.stdin.write(" ".join(pipe_clean(cmd))) self.p.stdin.write("\n") logging.debug(" ".join(pipe_clean(cmd))) - return ET.fromstring(self.q.get()) + try: + return ET.fromstring(self.q.get(True, 5)) + except Empty: + logging.error("Could not get prompt from ledger!") + exit(1) else: cmd = self.args + ["xml"] + cmd if os.name == 'nt':
add timeouts for reading prompts
diff --git a/src/FontLib/AdobeFontMetrics.php b/src/FontLib/AdobeFontMetrics.php index <HASH>..<HASH> 100644 --- a/src/FontLib/AdobeFontMetrics.php +++ b/src/FontLib/AdobeFontMetrics.php @@ -139,7 +139,7 @@ class AdobeFontMetrics { $this->endSection("CharMetrics"); $kern = $font->getData("kern", "subtable"); - $tree = $kern["tree"]; + $tree = is_array($kern) ? $kern["tree"] : null; if (!$encoding && is_array($tree)) { $this->startSection("KernData");
Fixes a problem with php <I> This would fix the issue #<I>
diff --git a/rinoh/style.py b/rinoh/style.py index <HASH>..<HASH> 100644 --- a/rinoh/style.py +++ b/rinoh/style.py @@ -197,6 +197,10 @@ class SelectorWithPriority(Selector): return self.selector.get_style_name(matcher) @property + def selectors(self): + return (self, ) + + @property def referenced_selectors(self): return self.selector.referenced_selectors
Implement SelectorWithPriority.selectors The Selector class hierarchy can use some cleaning up.
diff --git a/imgaug/augmenters/meta.py b/imgaug/augmenters/meta.py index <HASH>..<HASH> 100644 --- a/imgaug/augmenters/meta.py +++ b/imgaug/augmenters/meta.py @@ -3830,8 +3830,8 @@ class Noop(Augmenter): super(Noop, self).__init__(name=name, deterministic=deterministic, random_state=random_state) - def _augment_images(self, images, random_state, parents, hooks): - return images + def _augment_batch(self, batch, random_state, parents, hooks): + return batch def get_parameters(self): return []
Switch Noop to augment_batch() interface
diff --git a/tests/test_pages.py b/tests/test_pages.py index <HASH>..<HASH> 100644 --- a/tests/test_pages.py +++ b/tests/test_pages.py @@ -11,7 +11,16 @@ except ImportError: import pytest from conftest import skip_if_pypy -from pikepdf import Array, Dictionary, Name, Page, Pdf, PdfMatrix, Stream +from pikepdf import ( + Array, + Dictionary, + Name, + Page, + Pdf, + PdfMatrix, + Stream, + __libqpdf_version__, +) from pikepdf._cpphelpers import label_from_label_dict # pylint: disable=redefined-outer-name,pointless-statement @@ -343,7 +352,7 @@ def test_add_foreign_twice(graph, outpdf): out.save(outpdf) -@pytest.mark.xfail(reason="needs qpdf fix to issue 514") +@pytest.mark.xfail(__libqpdf_version__ < '10.3.2', reason="qpdf issue 514") def test_add_twice_without_copy_foreign(graph, outpdf): out = Pdf.new() out.pages.append(graph.pages[0])
tests: mark test as passing newer qpdf versions
diff --git a/test/model_test.rb b/test/model_test.rb index <HASH>..<HASH> 100644 --- a/test/model_test.rb +++ b/test/model_test.rb @@ -974,7 +974,7 @@ class ModelTest < Test::Unit::TestCase end context "Exporting" do - class Person < Ohm::Model + class Venue < Ohm::Model attribute :name def validate @@ -984,14 +984,14 @@ class ModelTest < Test::Unit::TestCase context "a new model without errors" do should "export an empty hash via to_hash" do - person = Person.new + person = Venue.new assert_equal({}, person.to_hash) end end context "a new model with some errors" do should "export a hash with the errors" do - person = Person.new + person = Venue.new person.valid? assert_equal({ :errors => [[:name, :not_present]] }, person.to_hash) @@ -1000,14 +1000,14 @@ class ModelTest < Test::Unit::TestCase context "an existing model" do should "export a hash with the its id" do - person = Person.create(:name => "John Doe") + person = Venue.create(:name => "John Doe") assert_equal({ :id => '1' }, person.to_hash) end end context "an existing model with validation errors" do should "export a hash with its id and the errors" do - person = Person.create(:name => "John Doe") + person = Venue.create(:name => "John Doe") person.name = nil person.valid?
Fix build under <I>. Need to investigate if this is an issue in real-world apps or just in our test suite.
diff --git a/service-catalog-ui/src/components/ServiceInstanceList/ServiceInstanceTable/ServiceInstanceRowRenderer.js b/service-catalog-ui/src/components/ServiceInstanceList/ServiceInstanceTable/ServiceInstanceRowRenderer.js index <HASH>..<HASH> 100644 --- a/service-catalog-ui/src/components/ServiceInstanceList/ServiceInstanceTable/ServiceInstanceRowRenderer.js +++ b/service-catalog-ui/src/components/ServiceInstanceList/ServiceInstanceTable/ServiceInstanceRowRenderer.js @@ -157,7 +157,6 @@ const BindingUsagesCount = ({ instance }) => { }; const Status = ({ instance }) => { - instance.status = undefined; const type = instance.status ? instance.status.type : 'UNKNOWN'; return ( <StatusBadge
Remove forgotten testing assignment (#<I>)
diff --git a/app/models/content.rb b/app/models/content.rb index <HASH>..<HASH> 100644 --- a/app/models/content.rb +++ b/app/models/content.rb @@ -46,6 +46,18 @@ class Content < ActiveRecord::Base end end + # Set the text filter for this object. + # NOTE: Due to how Rails injects association methods, this cannot be put in ContentBase + # TODO: Allowing assignment of a string here is not very clean. + def text_filter= filter + filter_object = filter.to_text_filter + if filter_object + self.text_filter_id = filter_object.id + else + self.text_filter_id = filter.to_i + end + end + def shorten_url return unless self.published diff --git a/app/models/content_base.rb b/app/models/content_base.rb index <HASH>..<HASH> 100644 --- a/app/models/content_base.rb +++ b/app/models/content_base.rb @@ -10,16 +10,6 @@ module ContentBase attr_accessor :just_changed_published_status alias_method :just_changed_published_status?, :just_changed_published_status - # Set the text filter for this object. - def text_filter= filter - filter_object = filter.to_text_filter - if filter_object - self.text_filter_id = filter_object.id - else - self.text_filter_id = filter.to_i - end - end - def really_send_notifications interested_users.each do |value| send_notification_to_user(value)
Move #text_filter= override to where it will be picked up
diff --git a/lib/searchkick/reindex.rb b/lib/searchkick/reindex.rb index <HASH>..<HASH> 100644 --- a/lib/searchkick/reindex.rb +++ b/lib/searchkick/reindex.rb @@ -17,7 +17,7 @@ module Searchkick # check if alias exists if Searchkick.client.indices.exists_alias(name: alias_name) # import before swap - searchkick_import(index) unless skip_import + searchkick_import(index: index) unless skip_import # get existing indices to remove old_indices = Searchkick.client.indices.get_alias(name: alias_name).keys @@ -29,7 +29,7 @@ module Searchkick Searchkick.client.indices.update_aliases body: {actions: [{add: {index: new_name, alias: alias_name}}]} # import after swap - searchkick_import(index) unless skip_import + searchkick_import(index: index) unless skip_import end index.refresh @@ -52,9 +52,8 @@ module Searchkick @descendents << klass unless @descendents.include?(klass) end - private - - def searchkick_import(index) + def searchkick_import(options = {}) + index = options[:index] || searchkick_index batch_size = searchkick_options[:batch_size] || 1000 # use scope for import
Expose searchkick_import and searchkick_index_options
diff --git a/tests/test_s3_calling_format.py b/tests/test_s3_calling_format.py index <HASH>..<HASH> 100644 --- a/tests/test_s3_calling_format.py +++ b/tests/test_s3_calling_format.py @@ -1,4 +1,5 @@ import boto +import inspect import os import pytest @@ -272,7 +273,15 @@ def test_cipher_suites(): # seems to be a more natural choice, but leaves the '.sock' # attribute null. conn.get_all_buckets() - htcon = conn._pool.get_http_connection('s3.amazonaws.com', True) + + # Set up 'port' keyword argument for newer Botos that require it. + spec = inspect.getargspec(conn._pool.get_http_connection) + kw = {'host': 's3.amazonaws.com', + 'is_secure': True} + if 'port' in spec.args: + kw['port'] = 443 + + htcon = conn._pool.get_http_connection(**kw) chosen_cipher_suite = htcon.sock.cipher()[0].split('-')
Test compatability with newer boto New Boto versions require a 'port' argument be supplied to get_http_connection.
diff --git a/src/Type/AbstractPhpEnumType.php b/src/Type/AbstractPhpEnumType.php index <HASH>..<HASH> 100644 --- a/src/Type/AbstractPhpEnumType.php +++ b/src/Type/AbstractPhpEnumType.php @@ -41,7 +41,7 @@ abstract class AbstractPhpEnumType extends Type */ public function getSQLDeclaration(array $fieldDeclaration, AbstractPlatform $platform) { - return 'VARCHAR(256) COMMENT "php_enum"'; + return $platform->getVarcharTypeDeclarationSQL([]); } /** diff --git a/tests/Type/AbstractPhpEnumTypeTest.php b/tests/Type/AbstractPhpEnumTypeTest.php index <HASH>..<HASH> 100644 --- a/tests/Type/AbstractPhpEnumTypeTest.php +++ b/tests/Type/AbstractPhpEnumTypeTest.php @@ -42,8 +42,12 @@ class AbstractPhpEnumTypeTest extends TestCase public function testGetSQLDeclaration() { + $this->platform + ->method('getVarcharTypeDeclarationSQL') + ->will($this->returnValue('declaration')); + $this->assertEquals( - 'VARCHAR(256) COMMENT "php_enum"', + 'declaration', $this->type->getSQLDeclaration([], $this->platform) ); }
Removed column comment from type SQL declaration. Some platforms supported by doctrine don't support comments (e.g sqlite, which I'm trying to use for integration tests). Looking into the primary doctrine column definitions it doesn't seem like doctrine uses comments anywhere. Seeing as the comment doesn't seem to have any programmtic use I've removed it.
diff --git a/alphatwirl/concurrently/run.py b/alphatwirl/concurrently/run.py index <HASH>..<HASH> 100755 --- a/alphatwirl/concurrently/run.py +++ b/alphatwirl/concurrently/run.py @@ -140,8 +140,8 @@ def compose_result_path(package_path): ##__________________________________________________________________|| def store_result(result, result_path): mkdir_p(os.path.dirname(result_path)) - f = gzip.open(result_path, 'wb') - pickle.dump(result, f, protocol=pickle.HIGHEST_PROTOCOL) + with gzip.open(result_path, 'wb') as f: + pickle.dump(result, f, protocol=pickle.HIGHEST_PROTOCOL) ##__________________________________________________________________|| def mkdir_p(path):
use with for file in run.py
diff --git a/src/Elements/CssStore.js b/src/Elements/CssStore.js index <HASH>..<HASH> 100644 --- a/src/Elements/CssStore.js +++ b/src/Elements/CssStore.js @@ -1,4 +1,4 @@ -import {each, has} from '../lib/util'; +import {each} from '../lib/util'; function formatStyle(style) { @@ -46,8 +46,14 @@ export default class CssStore each(document.styleSheets, (styleSheet) => { - // Started with version 64, Chrome does not allow cross origin script to access this property. - if (!has(styleSheet, 'cssRules')) return; + try + { + // Started with version 64, Chrome does not allow cross origin script to access this property. + if (!styleSheet.cssRules) return; + } catch (e) + { + return; + } each(styleSheet.cssRules, (cssRule) => {
Dev: Revert to use try catch #<I>
diff --git a/Library/Installation/Updater/Updater020500.php b/Library/Installation/Updater/Updater020500.php index <HASH>..<HASH> 100644 --- a/Library/Installation/Updater/Updater020500.php +++ b/Library/Installation/Updater/Updater020500.php @@ -12,6 +12,7 @@ namespace Claroline\CoreBundle\Library\Installation\Updater; use Claroline\CoreBundle\Entity\Tool\Tool; +use Claroline\CoreBundle\Entity\Widget\Widget; class Updater020500 { @@ -57,6 +58,7 @@ class Updater020500 $em->flush(); } + $this->log('Adding agenda widget...'); $widget = new Widget(); $widget->setName('agenda'); $widget->setConfigurable(false);
[CoreBundle] added widget for the desktop
diff --git a/anyconfig/mergeabledict.py b/anyconfig/mergeabledict.py index <HASH>..<HASH> 100644 --- a/anyconfig/mergeabledict.py +++ b/anyconfig/mergeabledict.py @@ -8,6 +8,9 @@ .. versionadded: 0.3.1 Added naive and partial implementation of JSON Pointer support +.. versionchanged: 0.5.0 + Convert collections.namedtuple objects to dicts recursively + .. note:: JSON Pointer: http://tools.ietf.org/html/rfc6901 """
fix: add a note about collections.namedtuple conversion
diff --git a/msm/skill_repo.py b/msm/skill_repo.py index <HASH>..<HASH> 100644 --- a/msm/skill_repo.py +++ b/msm/skill_repo.py @@ -74,7 +74,7 @@ class SkillRepo(object): def __init__(self, path=None, url=None, branch=None): self.path = path or "/opt/mycroft/.skills-repo" self.url = url or "https://github.com/MycroftAI/mycroft-skills" - self.branch = branch or "19.08" + self.branch = branch or "20.02" self.repo_info = {} @cached_property(ttl=FIVE_MINUTES)
Update default branch to <I>
diff --git a/addon/components/mobile/object-list-view-row.js b/addon/components/mobile/object-list-view-row.js index <HASH>..<HASH> 100644 --- a/addon/components/mobile/object-list-view-row.js +++ b/addon/components/mobile/object-list-view-row.js @@ -13,10 +13,21 @@ import ObjectListViewRowComponent from '../object-list-view-row'; */ export default ObjectListViewRowComponent.extend({ /** + Stores the number of pixels to isolate one level of hierarchy. + + @property _hierarchicalIndent + @type Number + @default 10 + @private */ _hierarchicalIndent: 10, /** + Number of pixels to isolate the current level of the hierarchy. + + @property hierarchicalIndent + @type Number + @default 10 */ hierarchicalIndent: Ember.computed({ get() {
Docs object-list-view-row mobile
diff --git a/lib/extract.js b/lib/extract.js index <HASH>..<HASH> 100644 --- a/lib/extract.js +++ b/lib/extract.js @@ -203,19 +203,19 @@ module.exports = function (grunt) { return key; } - function MissingContextException(item, collidingPoItem) { - this.item = item; + function MissingContextException(poItem, collidingPoItem) { + this.poItem = poItem; this.collidingPoItem = collidingPoItem; this.toString = function () { return [ 'Usage of singular and plural form of "', - item.msgid, + poItem.msgid, '" in the same context: ', (collidingPoItem.msgctxt || '[no context]'), - '\n\nReferences: ', - item.fileName, ':', item.line, + '\n\nReferences:\n', + poItem.references.join(', '), '\n', - collidingPoItem.references, + collidingPoItem.references.join(', '), '\n\nChange the context of at least one of the strings (pgettext) or use ngettext/npgettext in both cases.' ].join(''); };
cleanup output of exception the item indeed is a po item and has references. The old behaviour was tailored to an older implementation of the fix.
diff --git a/staging/src/k8s.io/legacy-cloud-providers/azure/azure_standard.go b/staging/src/k8s.io/legacy-cloud-providers/azure/azure_standard.go index <HASH>..<HASH> 100644 --- a/staging/src/k8s.io/legacy-cloud-providers/azure/azure_standard.go +++ b/staging/src/k8s.io/legacy-cloud-providers/azure/azure_standard.go @@ -381,7 +381,7 @@ func (az *Cloud) serviceOwnsFrontendIP(fip network.FrontendIPConfiguration, serv return false, isPrimaryService, nil } - return false, isPrimaryService, fmt.Errorf("serviceOwnsFrontendIP: wrong parameters") + return false, isPrimaryService, nil } // for internal secondary service the private IP address on the frontend IP config should be checked
serviceOwnsFrontendIP shouldn't report error when the public IP doesn't match
diff --git a/types/model.go b/types/model.go index <HASH>..<HASH> 100644 --- a/types/model.go +++ b/types/model.go @@ -1,5 +1,7 @@ package types +import "time" + // FunctionDeployment represents a request to create or update a Function. type FunctionDeployment struct { @@ -100,7 +102,9 @@ type FunctionStatus struct { // mount-point. ReadOnlyRootFilesystem bool `json:"readOnlyRootFilesystem,omitempty"` - // ** Status fields *8 + // ================ + // Fields for status + // ================ // InvocationCount count of invocations InvocationCount float64 `json:"invocationCount,omitempty"` @@ -111,4 +115,8 @@ type FunctionStatus struct { // AvailableReplicas is the count of replicas ready to receive // invocations as reported by the faas-provider AvailableReplicas uint64 `json:"availableReplicas,omitempty"` + + // CreatedAt is the time read back from the faas backend's + // data store for when the function or its container was created. + CreatedAt time.Time `json:"created_at,omitempty"` }
Add CreatedAt to schema Enables contributors to proceed with changes for #<I> in the various back-ends
diff --git a/lib/simple_notifications/base.rb b/lib/simple_notifications/base.rb index <HASH>..<HASH> 100644 --- a/lib/simple_notifications/base.rb +++ b/lib/simple_notifications/base.rb @@ -93,7 +93,7 @@ module SimpleNotifications raise 'SimpleNotification::SenderReceiverError' unless @@options[:sender] && @@options[:receivers] @message = options[:message] if options[:message] notification = notifications.build(entity: self, sender: get_obj(options[:sender]), message: default_message(self, get_obj(options[:sender]), 'created')) - get_obj(options[:receivers]).each {|receiver| notification.deliveries.build(receiver: receiver)} + [get_obj(options[:receivers])].flatten.each {|receiver| notification.deliveries.build(receiver: receiver)} notification.save end end diff --git a/lib/simple_notifications/version.rb b/lib/simple_notifications/version.rb index <HASH>..<HASH> 100644 --- a/lib/simple_notifications/version.rb +++ b/lib/simple_notifications/version.rb @@ -1,3 +1,3 @@ module SimpleNotifications - VERSION = "1.1.6" + VERSION = "1.1.7" end
Issue Fixed: receiver association can be singular
diff --git a/salt/modules/iptables.py b/salt/modules/iptables.py index <HASH>..<HASH> 100644 --- a/salt/modules/iptables.py +++ b/salt/modules/iptables.py @@ -818,6 +818,8 @@ def insert(table='filter', chain=None, position=None, rule=None, family='ipv4'): position = 1 wait = '--wait' if _has_option('--wait', family) else '' + if check(table, chain, rule, family): + return True cmd = '{0} {1} -t {2} -I {3} {4} {5}'.format( _iptables_cmd(family), wait, table, chain, position, rule) out = __salt__['cmd.run'](cmd)
Add Check to the Rule Check to see if the rule exists before insert
diff --git a/tests/settings.py b/tests/settings.py index <HASH>..<HASH> 100644 --- a/tests/settings.py +++ b/tests/settings.py @@ -29,7 +29,4 @@ INSTALLED_APPS = [ SITE_ID = 1 -if django.VERSION >= (1, 10): - MIDDLEWARE = () -else: - MIDDLEWARE_CLASSES = () +MIDDLEWARE = ()
Remove compat with Django <<I>
diff --git a/lib/ruby2d/window.rb b/lib/ruby2d/window.rb index <HASH>..<HASH> 100644 --- a/lib/ruby2d/window.rb +++ b/lib/ruby2d/window.rb @@ -38,16 +38,10 @@ module Ruby2D end def set(opts) - valid_keys = [:title, :width, :height] - valid_opts = opts.reject { |k| !valid_keys.include?(k) } - if !valid_opts.empty? - @title = valid_opts[:title] - @width = valid_opts[:width] - @height = valid_opts[:height] - return true - else - return false - end + # Store new window attributes, or ignore if nil + @title = opts[:title] || @title + @width = opts[:width] || @width + @height = opts[:height] || @height end def add(o)
Fix failing DSL test `set` must be able set a single window attribute without making others nil
diff --git a/lib/read_concern.js b/lib/read_concern.js index <HASH>..<HASH> 100644 --- a/lib/read_concern.js +++ b/lib/read_concern.js @@ -29,10 +29,16 @@ class ReadConcern { } if (options.readConcern) { + if (options.readConcern instanceof ReadConcern) { + return options.readConcern; + } + return new ReadConcern(options.readConcern.level); } - return new ReadConcern(options.level); + if (options.level) { + return new ReadConcern(options.level); + } } static get MAJORITY() {
refactor: improve robustness of `ReadConcern.fromOptions` We made some assumptions in this method about the existence of keys, as well as that no `readConcern` passed in would ever already be of the type we were looking to cast to.
diff --git a/Python/ibmcloudsql/SQLQuery.py b/Python/ibmcloudsql/SQLQuery.py index <HASH>..<HASH> 100644 --- a/Python/ibmcloudsql/SQLQuery.py +++ b/Python/ibmcloudsql/SQLQuery.py @@ -857,7 +857,7 @@ class SQLQuery(COSClient, SQLBuilder, HiveMetastore): ) ) - if "resultset_location" not in job_details or not job_details["resultset_format"]: + if "resultset_location" not in job_details or "resultset_format" not in job_details: return None url_parsed = self.analyze_cos_url(job_details["resultset_location"]) diff --git a/Python/ibmcloudsql/__init__.py b/Python/ibmcloudsql/__init__.py index <HASH>..<HASH> 100644 --- a/Python/ibmcloudsql/__init__.py +++ b/Python/ibmcloudsql/__init__.py @@ -14,7 +14,7 @@ # limitations under the License. # ------------------------------------------------------------------------------ -__version__ = "0.5.3" +__version__ = "0.5.4" # flake8: noqa F401 from .SQLQuery import SQLQuery from .sql_query_ts import SQLClientTimeSeries
Fixing the previous improvement :-)
diff --git a/lib/magic_grid/html_grid.rb b/lib/magic_grid/html_grid.rb index <HASH>..<HASH> 100644 --- a/lib/magic_grid/html_grid.rb +++ b/lib/magic_grid/html_grid.rb @@ -149,7 +149,7 @@ module MagicGrid my_params = grid.base_params.merge(grid.param_key(:col) => id) default_sort_order = Order.from_param(grid.default_order) params = HashWithIndifferentAccess.new(my_params) - if id.to_s == grid.current_sort_col.to_s and Order.from_param(params[grid.param_key(:order)]) != default_sort_order + if id.to_s == grid.current_sort_col.to_s params[grid.param_key(:order)] = grid.current_order.reverse.to_param else params.delete(grid.param_key(:order))
Remove conditional that is redundant with polymorphism
diff --git a/src/AccordionItem/accordion-item.js b/src/AccordionItem/accordion-item.js index <HASH>..<HASH> 100644 --- a/src/AccordionItem/accordion-item.js +++ b/src/AccordionItem/accordion-item.js @@ -15,7 +15,7 @@ type AccordionItemProps = ElementProps<'div'> & { }; class AccordionItem extends Component<AccordionItemProps, *> { - async componentDidMount() { + componentDidMount() { const { uuid, accordionStore, disabled } = this.props; accordionStore.addItem({
Remove async/await from accordion-item
diff --git a/openstack_dashboard/karma.conf.js b/openstack_dashboard/karma.conf.js index <HASH>..<HASH> 100644 --- a/openstack_dashboard/karma.conf.js +++ b/openstack_dashboard/karma.conf.js @@ -46,7 +46,8 @@ module.exports = function (config) { // NOTE: the templates must also be listed in the files section below. './**/*.html': ['ng-html2js'], // Used to indicate files requiring coverage reports. - './**/!(*.spec).js': ['coverage'] + '../static/**/!(*.spec).js': ['coverage'], + '../dashboards/**/static/**/!(*.spec).js': ['coverage'] }, // Sets up module to process templates. @@ -160,10 +161,10 @@ module.exports = function (config) { // Coverage threshold values. thresholdReporter: { - statements: 93, // target 100 - branches: 93, // target 100 - functions: 93, // target 100 - lines: 93 // target 100 + statements: 89, // target 100 + branches: 82, // target 100 + functions: 88, // target 100 + lines: 89 // target 100 } }); };
Include JS from openstack_dashboard/**/static for code coverage Code coverage metrics in Horizon for openstack_dashboard do not include metrics from JS files in openstack_dashboard/**/static. Change-Id: I<I>c<I>e<I>e<I>ed<I>dfdeb<I>c8e<I> Closes-Bug: #<I>
diff --git a/src/Alaouy/Youtube/YoutubeServiceProvider.php b/src/Alaouy/Youtube/YoutubeServiceProvider.php index <HASH>..<HASH> 100644 --- a/src/Alaouy/Youtube/YoutubeServiceProvider.php +++ b/src/Alaouy/Youtube/YoutubeServiceProvider.php @@ -49,7 +49,7 @@ class YoutubeServiceProvider extends ServiceProvider $this->publishes(array(__DIR__ . '/../../config/youtube.php' => config_path('youtube.php'))); //Laravel 5.1+ fix - if(Str::startsWith(Application::VERSION, "5.1.")){ + if(floatval(Application::VERSION,10) >= 5.1){ $this->app->bind("youtube", null, true, function(){ return $this->app->make('Alaouy\Youtube\Youtube', [config('youtube.KEY')]); });
Changes to apply for <I> and higher Must easier fix for upcoming versions. Sorry to bother you twice.
diff --git a/pysoundfile.py b/pysoundfile.py index <HASH>..<HASH> 100644 --- a/pysoundfile.py +++ b/pysoundfile.py @@ -662,9 +662,6 @@ class SoundFile(object): "Not allowed for existing files (except 'RAW'): " "samplerate, channels, format, subtype, endian") - if not closefd and not isinstance(file, int): - raise ValueError("closefd=False only allowed for file descriptors") - if isinstance(file, str): if _os.path.isfile(file): if 'x' in modes: diff --git a/tests/test_pysoundfile.py b/tests/test_pysoundfile.py index <HASH>..<HASH> 100644 --- a/tests/test_pysoundfile.py +++ b/tests/test_pysoundfile.py @@ -356,9 +356,6 @@ def test_open_with_more_invalid_arguments(): with pytest.raises(ValueError) as excinfo: sf.SoundFile(filename_new, 'w', 44100, 2, endian='BOTH', format='WAV') assert "Invalid endian-ness" in str(excinfo.value) - with pytest.raises(ValueError) as excinfo: - sf.SoundFile(filename_stereo, closefd=False) - assert "closefd=False" in str(excinfo.value) def test_open_r_and_rplus_with_too_many_arguments():
Don't throw exception if closefd is given for non-fd The documentation already mentions that closefd is only applicable if a file descriptor is used.
diff --git a/lib/emir/recipes/aiv/mask.py b/lib/emir/recipes/aiv/mask.py index <HASH>..<HASH> 100644 --- a/lib/emir/recipes/aiv/mask.py +++ b/lib/emir/recipes/aiv/mask.py @@ -110,16 +110,18 @@ def _centering_centroid_loop(data, center, box): # returns y,x def centering_centroid(data, center, box, nloop=10, toldist=1e-3, maxdist=10): - icenter = center.copy() + + # Store original center + ocenter = center.copy() for i in range(nloop): ncenter = _centering_centroid_loop(data, center, box) #_logger.debug('new center is %s', ncenter) # if we are to far away from the initial point, break - dst = distance.euclidean(icenter, ncenter) + dst = distance.euclidean(ocenter, ncenter) if dst > maxdist: - return icenter, 'maximum distance (%i) from origin reached' % maxdist + return center, 'maximum distance (%i) from origin reached' % maxdist # check convergence dst = distance.euclidean(ncenter, center)
Return the center in the last iteration of recentering
diff --git a/Generator/PHPFile.php b/Generator/PHPFile.php index <HASH>..<HASH> 100644 --- a/Generator/PHPFile.php +++ b/Generator/PHPFile.php @@ -195,14 +195,14 @@ class PHPFile extends File { $imports = []; if ($imported_classes) { - // Sort the imported classes. - natcasesort($imported_classes); - foreach ($imported_classes as $fully_qualified_class_name) { $fully_qualified_class_name = ltrim($fully_qualified_class_name, '\\'); $imports[] = "use $fully_qualified_class_name;"; } + // Sort the imported classes. + natcasesort($imports); + $imports[] = ''; }
Fixed sorting should happen after trimming.
diff --git a/Schema/Grammars/MySqlGrammar.php b/Schema/Grammars/MySqlGrammar.php index <HASH>..<HASH> 100755 --- a/Schema/Grammars/MySqlGrammar.php +++ b/Schema/Grammars/MySqlGrammar.php @@ -14,7 +14,7 @@ class MySqlGrammar extends Grammar * @var array */ protected $modifiers = [ - 'VirtualAs', 'StoredAs', 'Unsigned', 'Charset', 'Collate', 'Nullable', + 'Unsigned', 'VirtualAs', 'StoredAs', 'Charset', 'Collate', 'Nullable', 'Default', 'Increment', 'Comment', 'After', 'First', ];
[<I>] Make sure sql for virtual columns is added after the unsigned modifier (#<I>) * re-order * append unsigned modifier before virtual columns to prevent a sql syntax error
diff --git a/tests/test_yaml.py b/tests/test_yaml.py index <HASH>..<HASH> 100644 --- a/tests/test_yaml.py +++ b/tests/test_yaml.py @@ -1,4 +1,5 @@ from __future__ import unicode_literals +import sys from config_loader.loader import ConfigLoader from config_loader.config import ConfigBaseWildcardDict @@ -70,7 +71,11 @@ line_b: !2 # -------- line_c: 8""" - assert isinstance(config.as_text(), unicode) + # We want to make sure we're getting unicode back + if sys.version_info.major < 3: + assert isinstance(config.as_text(), unicode) + else: + assert isinstance(config.as_text(), str) assert config.as_dict() == {'config': None, 'config_text': 'line_a: True\nline_b: !2\nline_c: 8',
do robust testing with python 2/3 compatibility
diff --git a/demo/index.php b/demo/index.php index <HASH>..<HASH> 100644 --- a/demo/index.php +++ b/demo/index.php @@ -33,6 +33,11 @@ if (!empty($_GET['input'])) { $feed->input_encoding($_GET['input']); } +// Allow us to snap into IHBB mode. +if (!empty($_GET['image'])) { + $feed->bypass_image_hotlink($_GET['image']); +} + // Initialize the whole SimplePie object. Read the feed, process it, parse it, cache it, and // all that other good stuff. The feed's information will not be available to SimplePie before // this is called.
Allow us to snap the demo into "Image Hotlink Block Bypass" (IHBB) mode.
diff --git a/search.py b/search.py index <HASH>..<HASH> 100644 --- a/search.py +++ b/search.py @@ -151,9 +151,9 @@ def graph_search(problem, frontier): if problem.goal_test(node.state): return node explored.add(node.state) - frontier.extend(successor for successor in node.expand(problem) - if successor.state not in explored - and successor.state not in frontier) + frontier.extend(child for child in node.expand(problem) + if child.state not in explored + and child.state not in frontier) return None def breadth_first_tree_search(problem): @@ -189,8 +189,8 @@ def depth_limited_search(problem, limit=50): return 'cutoff' else: cutoff_occurred = False - for successor in node.expand(problem): - result = recursive_dls(successor, problem, limit) + for child in node.expand(problem): + result = recursive_dls(child, problem, limit) if result == 'cutoff': cutoff_occurred = True elif result is not None:
s/successor/child/
diff --git a/examples/fib/wasm/js/index.js b/examples/fib/wasm/js/index.js index <HASH>..<HASH> 100644 --- a/examples/fib/wasm/js/index.js +++ b/examples/fib/wasm/js/index.js @@ -1,5 +1,5 @@ import { JsByteStorage} from 'prototty-wasm-storage-js'; -const wasm = import('../wasm_out/web'); +const wasm = import('../wasm_out/wasm'); wasm.then(async wasm => { let storage = await JsByteStorage.make_async("fib");
Fix crate name in fib wasm example
diff --git a/php/WP_CLI/REPL.php b/php/WP_CLI/REPL.php index <HASH>..<HASH> 100644 --- a/php/WP_CLI/REPL.php +++ b/php/WP_CLI/REPL.php @@ -21,7 +21,13 @@ class REPL { $line = rtrim( $line, ';' ) . ';'; if ( self::starts_with( self::non_expressions(), $line ) ) { + ob_start(); eval( $line ); + $out = ob_get_clean(); + if ( 0 < strlen ( $out ) ) { + $out = rtrim( $out, "\n" ) . "\n"; + } + fwrite( STDOUT, $out ); } else { if ( !self::starts_with( 'return', $line ) ) $line = 'return ' . $line; @@ -29,7 +35,8 @@ class REPL { // Write directly to STDOUT, to sidestep any output buffers created by plugins ob_start(); var_dump( eval( $line ) ); - fwrite( STDOUT, ob_get_clean() ); + $out = rtrim( ob_get_clean(), "\n" ) . "\n"; + fwrite( STDOUT, $out ); } } }
always include a newline after non-null eval output
diff --git a/app/models/concerns/searchable_post.rb b/app/models/concerns/searchable_post.rb index <HASH>..<HASH> 100644 --- a/app/models/concerns/searchable_post.rb +++ b/app/models/concerns/searchable_post.rb @@ -19,7 +19,7 @@ module SearchablePost indexes :categories, :analyzer => :keyword, :as => 'categories.collect{ |c| c.name }' indexes :job_phase, :analyzer => :keyword indexes :type, :analyzer => :keyword, :as => 'type' - indexes :industries, :analyzer => :keyword, :as => 'industry.title' + indexes :industries, :analyzer => :keyword, :as => 'industry.soc' end def related(published = nil)
Use SOC code for Post/Industry mapping
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -3,7 +3,14 @@ import os import shutil from setuptools import setup, find_packages -from txtorcon import __version__, __author__, __contact__, __copyright__, __license__, __url__ +## can't just naively import these from txtorcon, as that will only +## work if you already installed the dependencies +__version__ = '0.5' +__author__ = 'meejah' +__contact__ = 'meejah@meejah.ca' +__url__ = 'https://github.com/meejah/txtorcon' +__license__ = 'MIT' +__copyright__ = 'Copyright 2012' setup(name = 'txtorcon', version = __version__, diff --git a/txtorcon/__init__.py b/txtorcon/__init__.py index <HASH>..<HASH> 100644 --- a/txtorcon/__init__.py +++ b/txtorcon/__init__.py @@ -1,4 +1,6 @@ +## for now, this needs to be changed in setup.py also until I find a +## better solution __version__ = '0.5' __author__ = 'meejah' __contact__ = 'meejah@meejah.ca'
change where setup.py gets information from
diff --git a/master/buildbot/process/buildrequest.py b/master/buildbot/process/buildrequest.py index <HASH>..<HASH> 100644 --- a/master/buildbot/process/buildrequest.py +++ b/master/buildbot/process/buildrequest.py @@ -118,6 +118,18 @@ class TempSourceStamp(object): return result +class TempChange(object): + # temporary fake change; attributes are added below + + def __init__(self, d): + for k, v in d.items(): + setattr(self, k, v) + self.properties = properties.Properties() + for k, v in d['properties'].items(): + self.properties.setProperty(k, v[0], v[1]) + self.who = d['author'] + + class BuildRequest(object): """ @@ -218,6 +230,9 @@ class BuildRequest(object): ss.patch = None ss.patch_info = (None, None) ss.changes = [] + change = yield master.db.changes.getChangeFromSSid(ss.ssid) + if change: + ss.changes.append(TempChange(change)) # XXX: sourcestamps don't have changes anymore; this affects merging!! defer.returnValue(buildrequest)
populate the sourcestamp change list Some build step are needing change properties to be mixed in build properties
diff --git a/tests/integration/array/reverse-test.js b/tests/integration/array/reverse-test.js index <HASH>..<HASH> 100644 --- a/tests/integration/array/reverse-test.js +++ b/tests/integration/array/reverse-test.js @@ -31,6 +31,17 @@ test('it calls reverse on array', function(assert) { }); }); +test('it doesn\'t mutate original array', function(assert) { + compute({ + computed: reverse('array'), + properties: { + array + } + }); + + assert.deepEqual(array, [1, 2]); +}); + test('it responds to length changes', function(assert) { let { subject } = compute({ computed: reverse('array'),
verify reverse doesn't mutate array
diff --git a/source/git-promise.js b/source/git-promise.js index <HASH>..<HASH> 100644 --- a/source/git-promise.js +++ b/source/git-promise.js @@ -271,7 +271,7 @@ git.binaryFileContent = (repoPath, filename, version, outPipe) => { } git.diffFile = (repoPath, filename, sha1, ignoreWhiteSpace) => { - const newFileDiffArgs = ['diff', '--no-index', isWindows ? 'NUL' : '/dev/null', '--', filename.trim()]; + const newFileDiffArgs = ['diff', '--no-index', isWindows ? 'NUL' : '/dev/null', filename.trim()]; return git.revParse(repoPath) .then((revParse) => { return revParse.type === 'bare' ? { files: {} } : git.status(repoPath) }) // if bare do not call status .then((status) => {
git doesn't like "--" for new file diffs...
diff --git a/lib/clenver/repository.rb b/lib/clenver/repository.rb index <HASH>..<HASH> 100644 --- a/lib/clenver/repository.rb +++ b/lib/clenver/repository.rb @@ -5,15 +5,19 @@ class Repository @repo_uri = repo @dst = dst @abs_path = nil + @repo = nil end def clone repo_basename = File.basename("#{@repo_uri}",".git") - Git.clone(@repo_uri, repo_basename) + @repo = Git.clone(@repo_uri, repo_basename) @abs_path = Dir::pwd + "/" + repo_basename end def get_abs_path @abs_path end + def add_remote(name, uri) + @repo.add_remote(name, uri) + end end
add_remote support in Repository class
diff --git a/python/dllib/src/bigdl/dllib/keras/engine/topology.py b/python/dllib/src/bigdl/dllib/keras/engine/topology.py index <HASH>..<HASH> 100644 --- a/python/dllib/src/bigdl/dllib/keras/engine/topology.py +++ b/python/dllib/src/bigdl/dllib/keras/engine/topology.py @@ -190,7 +190,7 @@ class KerasNet(ZooKerasLayer): distributed: Boolean. Whether to do prediction in distributed mode or local mode. Default is True. In local mode, x must be a Numpy array. """ - if is_distributed: + if distributed: if isinstance(x, np.ndarray): features = to_sample_rdd(x, np.zeros([x.shape[0]])) elif isinstance(x, RDD):
fix predict (#<I>)
diff --git a/niftypet/nimpa/prc/prc.py b/niftypet/nimpa/prc/prc.py index <HASH>..<HASH> 100644 --- a/niftypet/nimpa/prc/prc.py +++ b/niftypet/nimpa/prc/prc.py @@ -448,7 +448,7 @@ def pvc_iyang( #if affine transf. (faff) is given then take the T1 and resample it too. if isinstance(faff, basestring) and not os.path.isfile(faff): # faff is not given; get it by running the affine; get T1w to PET space - faff = reg_mr2pet(fpet, mridct, Cnt, outpath=outpath, fcomment=fcomment) + faff, _ = reg_mr2pet(fpet, mridct, Cnt, outpath=outpath, fcomment=fcomment) # establish the output folder if outpath=='': diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -182,7 +182,7 @@ elif platform.system() == 'Windows' : setup( name='nimpa', license = 'Apache 2.0', - version='1.0.14', + version='1.0.15', description='CUDA-accelerated Python utilities for high-throughput PET/MR image processing and analysis.', long_description=long_description, author='Pawel J. Markiewicz',
fixed bug with new registration in prc.py in nimpa
diff --git a/bigquery.js b/bigquery.js index <HASH>..<HASH> 100644 --- a/bigquery.js +++ b/bigquery.js @@ -21,6 +21,7 @@ var assert = require('assert'); var async = require('async'); var Dataset = require('../lib/bigquery/dataset'); +var Table = require('../lib/bigquery/table'); var env = require('./env'); var fs = require('fs'); var Job = require('../lib/bigquery/job'); @@ -272,6 +273,28 @@ describe('BigQuery', function() { }); }); }); + + it('should get tables', function(done) { + dataset.getTables(function(err, tables) { + assert.ifError(err); + assert(tables[0] instanceof Table); + done(); + }); + }); + + it('should get tables as a stream', function(done) { + var tableEmitted = false; + + dataset.getTables() + .on('error', done) + .on('data', function(table) { + tableEmitted = table instanceof Table; + }) + .on('end', function() { + assert.strictEqual(tableEmitted, true); + done(); + }); + }); }); describe('BigQuery/Table', function() {
bigquery: implemented streamrouter in dataset updated unit and system tests added a bit more documentation
diff --git a/examples/pytorch/language-modeling/run_clm_no_trainer.py b/examples/pytorch/language-modeling/run_clm_no_trainer.py index <HASH>..<HASH> 100755 --- a/examples/pytorch/language-modeling/run_clm_no_trainer.py +++ b/examples/pytorch/language-modeling/run_clm_no_trainer.py @@ -14,7 +14,7 @@ # See the License for the specific language governing permissions and # limitations under the License. """ -Fine-tuning the library models for causal language modeling (BERT, ALBERT, RoBERTa...) +Fine-tuning the library models for causal language modeling (GPT, GPT-2, CTRL, ...) on a text file or a dataset without using HuggingFace Trainer. Here is the full list of checkpoints on the hub that can be fine-tuned by this script:
Fix comment in run_clm_no_trainer.py (#<I>)
diff --git a/azure-eventhubs/src/main/java/com/microsoft/azure/servicebus/MessageSender.java b/azure-eventhubs/src/main/java/com/microsoft/azure/servicebus/MessageSender.java index <HASH>..<HASH> 100644 --- a/azure-eventhubs/src/main/java/com/microsoft/azure/servicebus/MessageSender.java +++ b/azure-eventhubs/src/main/java/com/microsoft/azure/servicebus/MessageSender.java @@ -303,6 +303,7 @@ public class MessageSender extends ClientEntity implements IAmqpSender, IErrorCo @Override public void onClose(ErrorCondition condition) { + // TODO: code-refactor pending - refer to issue: https://github.com/Azure/azure-event-hubs/issues/73 Exception completionException = condition != null ? ExceptionUtil.toException(condition) : new ServiceBusException(ClientConstants.DEFAULT_IS_TRANSIENT, "The entity has been close due to transient failures (underlying link closed), please retry the operation.");
add code reference to issue#<I>
diff --git a/lib/rest-ftp-daemon/remote.rb b/lib/rest-ftp-daemon/remote.rb index <HASH>..<HASH> 100644 --- a/lib/rest-ftp-daemon/remote.rb +++ b/lib/rest-ftp-daemon/remote.rb @@ -14,7 +14,7 @@ module RestFtpDaemon @url.user ||= "anonymous" # Annnounce object - log_info "Remote.initialize [#{url.to_s}]" + log_info "Remote.initialize [#{url}]" end def connect diff --git a/lib/rest-ftp-daemon/remote_ftp.rb b/lib/rest-ftp-daemon/remote_ftp.rb index <HASH>..<HASH> 100644 --- a/lib/rest-ftp-daemon/remote_ftp.rb +++ b/lib/rest-ftp-daemon/remote_ftp.rb @@ -135,7 +135,7 @@ module RestFtpDaemon @ftp = DoubleBagFTPS.new @ftp.ssl_context = DoubleBagFTPS.create_ssl_context(verify_mode: OpenSSL::SSL::VERIFY_NONE) @ftp.ftps_mode = DoubleBagFTPS::EXPLICIT - end + end end
Rubocop: alignments, redundant use of Object#to_s in interpolation
diff --git a/tools/c7n_azure/c7n_azure/filters.py b/tools/c7n_azure/c7n_azure/filters.py index <HASH>..<HASH> 100644 --- a/tools/c7n_azure/c7n_azure/filters.py +++ b/tools/c7n_azure/c7n_azure/filters.py @@ -113,8 +113,8 @@ class MetricFilter(Filter): 'average': Math.mean, 'total': Math.sum, 'count': Math.sum, - 'minimum': Math.max, - 'maximum': Math.min + 'minimum': Math.min, + 'maximum': Math.max } schema = {
azure - metrics filter - fix aggregation funcs (#<I>)
diff --git a/v2client/src/test/java/com/yubico/client/v2/YubicoClientTest.java b/v2client/src/test/java/com/yubico/client/v2/YubicoClientTest.java index <HASH>..<HASH> 100644 --- a/v2client/src/test/java/com/yubico/client/v2/YubicoClientTest.java +++ b/v2client/src/test/java/com/yubico/client/v2/YubicoClientTest.java @@ -88,6 +88,7 @@ public class YubicoClientTest { assertTrue(response.getStatus() == YubicoResponseStatus.REPLAYED_OTP); } + @Test public void testBadSignature() throws YubicoValidationException, YubicoValidationFailure { String otp = "cccccccfhcbelrhifnjrrddcgrburluurftrgfdrdifj"; client.setKey("bAX9u78e8BRHXPGDVV3lQUm4yVw=");
Added missing @Test to test method
diff --git a/src/com/google/javascript/jscomp/NodeUtil.java b/src/com/google/javascript/jscomp/NodeUtil.java index <HASH>..<HASH> 100644 --- a/src/com/google/javascript/jscomp/NodeUtil.java +++ b/src/com/google/javascript/jscomp/NodeUtil.java @@ -2546,7 +2546,7 @@ public final class NodeUtil { static final Predicate<Node> createsScope = new Predicate<Node>() { @Override public boolean apply(Node n) { - return createsBlockScope(n) || n.isFunction() + return createsBlockScope(n) || n.isFunction() || n.isModuleBody() // The ROOT nodes that are the root of the externs tree or main JS tree do not // create scopes. The parent of those two, which is the root of the entire AST and // therefore has no parent, is the only ROOT node that creates a scope.
Small correction: Module bodies are also scope roots. ------------- Created by MOE: <URL>
diff --git a/pyphi/connectivity.py b/pyphi/connectivity.py index <HASH>..<HASH> 100644 --- a/pyphi/connectivity.py +++ b/pyphi/connectivity.py @@ -78,7 +78,7 @@ def block_cm(cm): For example, the following connectivity matrix represents connections from ``nodes1 = A, B, C`` to ``nodes2 = D, E, F, G`` (without loss of - generality—note that ``nodes1`` and ``nodes2`` may share elements):: + generality, note that ``nodes1`` and ``nodes2`` may share elements):: D E F G A [1, 1, 0, 0] @@ -143,8 +143,9 @@ def block_reducible(cm, nodes1, nodes2): nodes1 (tuple[int]): Source nodes nodes2 (tuple[int]): Sink nodes """ + # Trivial case if not nodes1 or not nodes2: - return True # trivially + return True cm = cm[np.ix_(nodes1, nodes2)]
Fix code style in `connectivity`
diff --git a/SafeMarkup.php b/SafeMarkup.php index <HASH>..<HASH> 100644 --- a/SafeMarkup.php +++ b/SafeMarkup.php @@ -169,6 +169,13 @@ class SafeMarkup { * * @ingroup sanitization * + * @deprecated Will be removed before Drupal 8.0.0. Rely on Twig's + * auto-escaping feature, or use the @link theme_render #plain_text @endlink + * key when constructing a render array that contains plain text in order to + * use the renderer's auto-escaping feature. If neither of these are + * possible, \Drupal\Component\Utility\Html::escape() can be used in places + * where explicit escaping is needed. + * * @see drupal_validate_utf8() */ public static function checkPlain($text) {
Issue #<I> by stefan.r, cilefen, alexpott, plach: Deprecate SafeMarkup::checkPlain() for Drupal <I>.x
diff --git a/littletable.py b/littletable.py index <HASH>..<HASH> 100644 --- a/littletable.py +++ b/littletable.py @@ -777,10 +777,7 @@ class Table(object): val = fn(rec) except Exception: val = default - if isinstance(rec, DataObject): - object.__setattr__(rec, attrname, val) - else: - setattr(rec, attrname, val) + object.__setattr__(rec, attrname, val) def groupby(self, keyexpr, **outexprs): """simple prototype of group by, with support for expressions in the group-by clause @@ -1071,7 +1068,7 @@ if __name__ == "__main__": dict(state="TX"), dict(city="New York"), dict(city="Phoenix", _orderby="stn"), - dict(city="Phoenix", _orderbydesc="stn"), + dict(city="Phoenix", _orderby="stn desc"), ]: print queryargs, result = stations.query(**queryargs)
Fix compute to handle namedtuple records correctly. Fixed demo code to use _orderby instead of deprecated _orderbydesc
diff --git a/src/edu/jhu/hltcoe/data/DepTree.java b/src/edu/jhu/hltcoe/data/DepTree.java index <HASH>..<HASH> 100644 --- a/src/edu/jhu/hltcoe/data/DepTree.java +++ b/src/edu/jhu/hltcoe/data/DepTree.java @@ -121,13 +121,10 @@ public class DepTree implements Iterable<DepTreeNode> { private void addParentChildLinksToNodes() { checkTree(); for (int i=0; i<parents.length; i++) { - NonprojDepTreeNode node = (NonprojDepTreeNode)getNodeByPosition(i); - node.setParent((NonprojDepTreeNode)getNodeByPosition(parents[i])); - for (int j=0; j<parents.length; j++) { - if (parents[j] == i) { - node.addChild((NonprojDepTreeNode)getNodeByPosition(j)); - } - } + NonprojDepTreeNode child = (NonprojDepTreeNode)getNodeByPosition(i); + NonprojDepTreeNode parent = (NonprojDepTreeNode)getNodeByPosition(parents[i]); + child.setParent(parent); + parent.addChild(child); } }
Bug fix: wasn't adding child to wall node git-svn-id: svn+ssh://external.hltcoe.jhu.edu/home/hltcoe/mgormley/public/repos/dep_parse_filtered/trunk@<I> <I>f-cb4b-<I>-8b<I>-c<I>bcb<I>
diff --git a/tilequeue/process.py b/tilequeue/process.py index <HASH>..<HASH> 100644 --- a/tilequeue/process.py +++ b/tilequeue/process.py @@ -72,9 +72,14 @@ def _postprocess_data(feature_layers, post_process_data): for index, feature_layer in enumerate(feature_layers): layer_datum = feature_layer['layer_datum'] layer_name = layer_datum['name'] - if layer_name == layer['name']: + if layer_name == layer['layer_datum']['name']: feature_layers[index] = layer + layer = None break + # if this layer isn't replacing an old layer, then + # append it. + if layer is not None: + feature_layers.append(layer) return feature_layers
Fix bug where post-processing would only replace existing layers, not add new ones.
diff --git a/test/visible.js b/test/visible.js index <HASH>..<HASH> 100644 --- a/test/visible.js +++ b/test/visible.js @@ -2,10 +2,11 @@ describe('asking if a visible div scrolled', function() { var scrolled = false; var test = createTest(); - before(function() { + before(function(done) { insertTest(test); inViewport(test, function() { scrolled = true; + done(); }); });
make visible test async While the callback is immediately called because element is immediately visible, it must be/could be async
diff --git a/src/main/java/com/twilio/converter/DateConverter.java b/src/main/java/com/twilio/converter/DateConverter.java index <HASH>..<HASH> 100644 --- a/src/main/java/com/twilio/converter/DateConverter.java +++ b/src/main/java/com/twilio/converter/DateConverter.java @@ -1,5 +1,6 @@ package com.twilio.converter; +import java.util.Locale; import org.joda.time.DateTime; import org.joda.time.DateTimeZone; import org.joda.time.LocalDate; @@ -16,7 +17,7 @@ public class DateConverter { DateTimeFormat.forPattern(DATE_PATTERN).withZone(DateTimeZone.UTC); private static final DateTimeFormatter RFC2822_DATE_TIME_FORMATTER = - DateTimeFormat.forPattern(RFC2822_DATE_TIME).withZone(DateTimeZone.UTC); + DateTimeFormat.forPattern(RFC2822_DATE_TIME).withZone(DateTimeZone.UTC).withLocale(new Locale("en_US")); private static final DateTimeFormatter ISO8601_DATE_TIME_FORMATTER = DateTimeFormat.forPattern(ISO8601_DATE_TIME).withZone(DateTimeZone.UTC);
Fix exception parsing rfc<I> dates for some locales, always use us locale