diff
stringlengths
65
26.7k
message
stringlengths
7
9.92k
diff --git a/src/main/java/org/hyperledger/fabric/sdk/LifecycleChaincodePackage.java b/src/main/java/org/hyperledger/fabric/sdk/LifecycleChaincodePackage.java index <HASH>..<HASH> 100644 --- a/src/main/java/org/hyperledger/fabric/sdk/LifecycleChaincodePackage.java +++ b/src/main/java/org/hyperledger/fabric/sdk/LifecycleChaincodePackage.java @@ -178,7 +178,7 @@ public class LifecycleChaincodePackage { archiveOutputStream.write(mataDataBytes); archiveOutputStream.closeArchiveEntry(); - archiveEntry = new TarArchiveEntry(chaincodeType.toPackageName().toUpperCase() + "-Code-Package.tar.gz"); + archiveEntry = new TarArchiveEntry("code.tar.gz"); archiveEntry.setMode(0100644); archiveEntry.setSize(dataBytes.length); archiveOutputStream.putArchiveEntry(archiveEntry);
FAB-<I> Standardize _lifecycle code package name The name of the code package currently varies by SDK and is not enforced by the peer. This change is an attempt to homogenize the code package naming so that we may enforce and check for a particular name in the package parsing at the peer. Change-Id: I<I>d<I>b<I>c<I>c
diff --git a/src/Mapper/DefaultMapper.php b/src/Mapper/DefaultMapper.php index <HASH>..<HASH> 100644 --- a/src/Mapper/DefaultMapper.php +++ b/src/Mapper/DefaultMapper.php @@ -14,16 +14,19 @@ class DefaultMapper implements MapperInterface { /** * @var string + * @psalm-suppress PropertyNotSetInConstructor */ public $table; /** * @var string + * @psalm-suppress PropertyNotSetInConstructor */ public $key; /** * @var string + * @psalm-suppress PropertyNotSetInConstructor */ protected $entity;
Suppresses PropertyNotSetInConstructor notices for properties set in child class
diff --git a/lib/server.js b/lib/server.js index <HASH>..<HASH> 100755 --- a/lib/server.js +++ b/lib/server.js @@ -390,7 +390,7 @@ vantageServer.auth = function(middleware, options) { throw new Error("Invalid middleware string passed into Vantage.auth: " + middleware); } else { var fn = middleware.call(this.parent, this, options); - this._authFn = fn; + this.parent._authFn = fn; } };
fix(auth): Fix auth registration to the parent vantage, not the server
diff --git a/pypki2/__init__.py b/pypki2/__init__.py index <HASH>..<HASH> 100644 --- a/pypki2/__init__.py +++ b/pypki2/__init__.py @@ -424,15 +424,15 @@ def pick_loader(loaders): selected = None while selected is None: - print('Available PKI loaders are:') + print('Available PKI configuration loaders are:') for k in sorted(list(options.keys())): print('{0}) {1}'.format(k, options[k].name)) - num = input23('Enter the number of the loader you would like to use: ').strip() + num = input23('Which type of PKI do you want to configure: ').strip() if num in options: - selected = options[k] + selected = options[num] else: print('Invalid selection...') selection = None
Why k is even in scope is beyond me.
diff --git a/lib/discordrb/events/message.rb b/lib/discordrb/events/message.rb index <HASH>..<HASH> 100644 --- a/lib/discordrb/events/message.rb +++ b/lib/discordrb/events/message.rb @@ -64,6 +64,14 @@ module Discordrb::Events nil end + # Drains the currently saved message, which clears it out, resulting in everything being saved before being + # thrown away and nothing being sent to the channel (unless there is something saved after this). + # @see #<< + def drain + @saved_message = '' + nil + end + alias_method :user, :author alias_method :text, :content alias_method :send, :send_message
Add MessageEvent#drain to clear out the saved message
diff --git a/js/jquery.mapael.js b/js/jquery.mapael.js index <HASH>..<HASH> 100644 --- a/js/jquery.mapael.js +++ b/js/jquery.mapael.js @@ -221,6 +221,9 @@ // zoom TimeOut handler (used to set and clear) self.zoomTO = 0; + + // resize TimeOut handler (used to set and clear) + self.resizeTO = 0; // Panning: tell if panning action is in progress self.panning = false; @@ -266,7 +269,6 @@ init: function() { var self = this; var mapConf = {} // the map configuration from the user - , resizeTO = 0 , zoomCenterX = 0 , zoomCenterY = 0 , previousPinchDist = 0; @@ -692,8 +694,8 @@ self.createLegends("plot", self.plots, (self.options.map.width / mapConf.width)); } else { $(window).on("resize." + pluginName, function() { - clearTimeout(resizeTO); - resizeTO = setTimeout(function(){self.$map.trigger("resizeEnd." + pluginName);}, 150); + clearTimeout(self.resizeTO); + self.resizeTO = setTimeout(function(){self.$map.trigger("resizeEnd." + pluginName);}, 150); }); // Create the legends for plots taking into account the scale of the map
Refactor resizeTO in object
diff --git a/lib/src/main/java/com/github/kevinsawicki/http/HttpRequest.java b/lib/src/main/java/com/github/kevinsawicki/http/HttpRequest.java index <HASH>..<HASH> 100644 --- a/lib/src/main/java/com/github/kevinsawicki/http/HttpRequest.java +++ b/lib/src/main/java/com/github/kevinsawicki/http/HttpRequest.java @@ -1755,7 +1755,6 @@ public class HttpRequest { return this; if (multipart) output.write("\r\n--" + BOUNDARY + "--\r\n"); - output.flush(); if (ignoreCloseExceptions) try { output.close();
Remove explicit flush() of request output stream Instead rely on close() calls calling flush() as documented
diff --git a/code/fields/MultiValueTextField.php b/code/fields/MultiValueTextField.php index <HASH>..<HASH> 100644 --- a/code/fields/MultiValueTextField.php +++ b/code/fields/MultiValueTextField.php @@ -59,7 +59,8 @@ class MultiValueTextField extends FormField { } public function createInput($attributes, $value = null) { - return self::create_tag($this->tag, $attributes, $value); + $attributes['value'] = $value; + return self::create_tag($this->tag, $attributes); } public function performReadonlyTransformation() {
fix(MultiValueField) Better support for <I>+ which uses the 'value' field in attributes exclusively
diff --git a/salt/minion.py b/salt/minion.py index <HASH>..<HASH> 100644 --- a/salt/minion.py +++ b/salt/minion.py @@ -731,6 +731,27 @@ class MultiMinion(MinionBase): if HAS_ZMQ: zmq.eventloop.ioloop.install() self.io_loop = LOOP_CLASS.current() + self.process_manager = ProcessManager(name='MultiMinionProcessManager') + self.io_loop.spawn_callback(self.process_manager.run, async=True) + + def destroy(self): + ''' + Tear down the minion + ''' + self._running = False + if hasattr(self, 'schedule'): + del self.schedule + if hasattr(self, 'pub_channel'): + self.pub_channel.on_recv(None) + if hasattr(self.pub_channel, 'close'): + self.pub_channel.close() + del self.pub_channel + if hasattr(self, 'periodic_callbacks'): + for cb in six.itervalues(self.periodic_callbacks): + cb.stop() + + def __del__(self): + self.destroy() def _spawn_minions(self): '''
Give multimion a process manager and its own destroy method
diff --git a/fc/excel_ui.py b/fc/excel_ui.py index <HASH>..<HASH> 100644 --- a/fc/excel_ui.py +++ b/fc/excel_ui.py @@ -1,9 +1,5 @@ """Module containing the Microsoft Excel User Interface. -Authors: Sebastian M. Castillo-Hair (smc9@rice.edu) - -Last Modified: 10/30/2015 - """ import re
Removed author and date information from excel_ui module docstring.
diff --git a/lib/ddl/sql_generator.php b/lib/ddl/sql_generator.php index <HASH>..<HASH> 100644 --- a/lib/ddl/sql_generator.php +++ b/lib/ddl/sql_generator.php @@ -1210,7 +1210,7 @@ abstract class sql_generator { public static function getAllReservedWords() { global $CFG; - $generators = array('mysql', 'postgres', 'oracle', 'mssql', 'sqlite'); + $generators = array('mysql', 'postgres', 'oracle', 'mssql'); $reserved_words = array(); foreach($generators as $generator) {
MDL-<I> removing sqlite because it is not maintained
diff --git a/packages/react-atlas-core/webpack.config.js b/packages/react-atlas-core/webpack.config.js index <HASH>..<HASH> 100644 --- a/packages/react-atlas-core/webpack.config.js +++ b/packages/react-atlas-core/webpack.config.js @@ -40,11 +40,6 @@ let config = { 'process.env': { 'NODE_ENV': JSON.stringify(process.env.NODE_ENV) } - }), - new webpack.optimize.UglifyJsPlugin({ - compress: { - warnings: false - } }) ] };
Don't minimize source during dev builds.
diff --git a/modules/citrus-ws/src/main/java/com/consol/citrus/ws/actions/ReceiveSoapMessageAction.java b/modules/citrus-ws/src/main/java/com/consol/citrus/ws/actions/ReceiveSoapMessageAction.java index <HASH>..<HASH> 100644 --- a/modules/citrus-ws/src/main/java/com/consol/citrus/ws/actions/ReceiveSoapMessageAction.java +++ b/modules/citrus-ws/src/main/java/com/consol/citrus/ws/actions/ReceiveSoapMessageAction.java @@ -64,10 +64,17 @@ public class ReceiveSoapMessageAction extends ReceiveMessageAction { } else { return; //no attachment expected, no validation } + + // handle variables in content id if (controlAttachment.getContentId() != null) { controlAttachment.setContentId(context.replaceDynamicContentInString(controlAttachment.getContentId())); } + // handle variables in content type + if (controlAttachment.getContentType() != null) { + controlAttachment.setContentType(context.replaceDynamicContentInString(controlAttachment.getContentType())); + } + attachmentValidator.validateAttachment(receivedMessage, controlAttachment); } catch (IOException e) { throw new CitrusRuntimeException(e);
Handle variables in content type before SOAP attachment validation
diff --git a/conllu/parser.py b/conllu/parser.py index <HASH>..<HASH> 100644 --- a/conllu/parser.py +++ b/conllu/parser.py @@ -22,7 +22,7 @@ def parse_tree(text): for token in sentence: head_indexed[token["head"]].append(token) - trees.append(create_tree(head_indexed)) + trees += create_tree(head_indexed) return trees diff --git a/tests/fixtures/data1_tree.py b/tests/fixtures/data1_tree.py index <HASH>..<HASH> 100644 --- a/tests/fixtures/data1_tree.py +++ b/tests/fixtures/data1_tree.py @@ -1,7 +1,7 @@ from collections import OrderedDict from conllu.tree_helpers import TreeNode -data1_expected = [[ +data1_expected = [ TreeNode( data=OrderedDict([ ('id', 5), @@ -160,4 +160,4 @@ data1_expected = [[ ) ] ) -]] +]
There's always just one root, no need for a list.
diff --git a/src/Symmetric/Crypto.php b/src/Symmetric/Crypto.php index <HASH>..<HASH> 100644 --- a/src/Symmetric/Crypto.php +++ b/src/Symmetric/Crypto.php @@ -210,13 +210,6 @@ final class Crypto (string) $nonce, (string) $encKey ); - if (!\is_string($plaintext)) { - // @codeCoverageIgnoreStart - throw new InvalidMessage( - 'Invalid message' - ); - // @codeCoverageIgnoreEnd - } \sodium_memzero($encrypted); \sodium_memzero($nonce); \sodium_memzero($encKey);
This condition will never happen, a fatal error will instead.
diff --git a/tests/test_grid.py b/tests/test_grid.py index <HASH>..<HASH> 100644 --- a/tests/test_grid.py +++ b/tests/test_grid.py @@ -76,6 +76,7 @@ def test_grid_append_notdict(): assert False except TypeError as e: assert str(e) == 'value must be a dict' + assert len(g) == 1 def test_grid_append_v2_list_fail(): g = Grid(version='2.0') @@ -110,11 +111,12 @@ def test_grid_setitem_notdict(): g.append(row) try: - g.append('This is not a dict') + g[0] = 'This is not a dict' assert False, 'Accepted a string' except TypeError: pass assert len(g) == 1 + assert g[0]['test'] == 'This is a test' def test_grid_del(): g = Grid()
WC-<I>: grid tests: Tweak data type assertion tests.
diff --git a/backtrader/feeds/ibdata.py b/backtrader/feeds/ibdata.py index <HASH>..<HASH> 100644 --- a/backtrader/feeds/ibdata.py +++ b/backtrader/feeds/ibdata.py @@ -333,6 +333,25 @@ class IBData(with_metaclass(MetaIBData, DataBase)): self.contract = None self.contractdetails = None + # Get the output timezone (if any) + self._tz = self._gettz() + # Lines have already been create, set the tz + self.lines.datetime._settz(self._tz) + + # This should probably be also called from an override-able method + self._tzinput = bt.utils.date.Localizer(self._gettzinput()) + + # Convert user input times to the output timezone (or min/max) + if self.p.fromdate is None: + self.fromdate = float('-inf') + else: + self.fromdate = self.date2num(self.p.fromdate) + + if self.p.todate is None: + self.todate = float('inf') + else: + self.todate = self.date2num(self.p.todate) + if self.p.backfill_from is not None: self._state = self._ST_FROM self.p.backfill_from._start()
Add initialization for timezone and todate (#<I>) IBData.start() needs to initialize timezone and todate in historical mode
diff --git a/runtests/mpi/tester.py b/runtests/mpi/tester.py index <HASH>..<HASH> 100644 --- a/runtests/mpi/tester.py +++ b/runtests/mpi/tester.py @@ -290,7 +290,7 @@ class Tester(BaseTester): parser.addoption("--mpisub-site-dir", default=None, help="site-dir in mpisub") - def __init__(self, *args, mpi_missing='fail', **kwargs): + def __init__(self, *args, **kwargs): """ Parameters ---------- @@ -301,8 +301,10 @@ class Tester(BaseTester): extra path : list of str extra paths to include on PATH when building """ + if 'mpi_missing' in kwargs: + self._mpi_missing = kwargs['mpi_missing'] + del kwargs['mpi_missing'] super(Tester, self).__init__(*args, **kwargs) - self._mpi_missing = mpi_missing @property def comm(self):
BUG: Extract 'mpi_missing' from kwargs
diff --git a/xlsxwriter.class.php b/xlsxwriter.class.php index <HASH>..<HASH> 100644 --- a/xlsxwriter.class.php +++ b/xlsxwriter.class.php @@ -43,12 +43,12 @@ class XLSXWriter } } } - + public function setTempDir($dir) { $this->temp_dir = $dir; } - + protected function tempFilename() { $temp_dir = is_null($this->temp_dir) ? sys_get_temp_dir() : $this->temp_dir; @@ -301,7 +301,7 @@ class XLSXWriter $sheet->file_writer->close(); $sheet->finalized=true; } - + public function markMergedCell($sheet_name, $start_cell_row, $start_cell_column, $end_cell_row, $end_cell_column) { if (empty($sheet_name) || $this->sheets[$sheet_name]->finalized) @@ -582,6 +582,7 @@ class XLSXWriter //------------------------------------------------------------------ public static function xmlspecialchars($val) { + $val=preg_replace('/[\x00-\x08\x0B\x0C\x0E-\x1F\x80-\x9F]/u', '', $val); return str_replace("'", "&#39;", htmlspecialchars($val)); } //------------------------------------------------------------------
Fixed issue: Ctrl character in value strings break the final document
diff --git a/bin/bootstrap.js b/bin/bootstrap.js index <HASH>..<HASH> 100755 --- a/bin/bootstrap.js +++ b/bin/bootstrap.js @@ -150,7 +150,7 @@ if (!phantom.casperLoaded) { } } // trick to locate source file location on error - scriptCode += ";var __fe__ = new Error('__sourceId__')"; + scriptCode += ";var __fe__ = new CasperError('__sourceId__')"; scriptCode += ";__fe__.fileName = '" + file + "'"; scriptCode += ";throw __fe__;"; return scriptCode; @@ -166,7 +166,7 @@ if (!phantom.casperLoaded) { if (typeof callback === "function") { callback(error, file); } else { - console.error(this.getErrorMessage(error)); + console.error(error.stack); this.exit(1); } }; diff --git a/modules/tester.js b/modules/tester.js index <HASH>..<HASH> 100644 --- a/modules/tester.js +++ b/modules/tester.js @@ -320,7 +320,7 @@ var Tester = function(casper, options) { phantom.processScriptError(e, file, function(error) { // do not abort the whole suite, just fail fast displaying the // caught error and process next suite - self.fail(phantom.getErrorMessage(e)); + self.fail(e); self.done(); }); }
better display of uncaught CasperError errors
diff --git a/module/Core/public/scripts/library/codemirror-3.21/addon/search/search.js b/module/Core/public/scripts/library/codemirror-3.21/addon/search/search.js index <HASH>..<HASH> 100644 --- a/module/Core/public/scripts/library/codemirror-3.21/addon/search/search.js +++ b/module/Core/public/scripts/library/codemirror-3.21/addon/search/search.js @@ -47,11 +47,11 @@ return cm.getSearchCursor(query, pos, queryCaseInsensitive(query)); } function dialog(cm, text, shortText, deflt, f) { - if (cm.openDialog) cm.openDialog(text, f, {value: deflt}); + if (cm.openDialog) cm.openDialog(text, f, {value: deflt, bottom: true}); else f(prompt(shortText, deflt)); } function confirmDialog(cm, text, shortText, fs) { - if (cm.openConfirm) cm.openConfirm(text, fs); + if (cm.openConopenDialogfirm) cm.openConfirm(text, fs, {bottom: true}); else if (confirm(shortText)) fs[0](); } function parseQuery(query) {
CodeMirror search addon: open dialogs at the bottom
diff --git a/influxdb/__init__.py b/influxdb/__init__.py index <HASH>..<HASH> 100644 --- a/influxdb/__init__.py +++ b/influxdb/__init__.py @@ -11,4 +11,4 @@ __all__ = [ ] -__version__ = '2.0.0' +__version__ = '2.0.1' diff --git a/influxdb/resultset.py b/influxdb/resultset.py index <HASH>..<HASH> 100644 --- a/influxdb/resultset.py +++ b/influxdb/resultset.py @@ -7,16 +7,16 @@ class ResultSet(object): """A wrapper around series results """ def __init__(self, series): - self.raw = series + self._raw = series @property def raw(self): """Raw JSON from InfluxDB""" - return self.raw + return self._raw @raw.setter def raw(self, value): - self.raw = value + self._raw = value def __getitem__(self, key): """
Fixed recursion issue with raw attribute
diff --git a/Controller/ResourceController.php b/Controller/ResourceController.php index <HASH>..<HASH> 100644 --- a/Controller/ResourceController.php +++ b/Controller/ResourceController.php @@ -24,7 +24,6 @@ use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpKernel\Exception\BadRequestHttpException; use Symfony\Component\HttpKernel\Exception\HttpException; use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; -use Symfony\Component\PropertyAccess\PropertyAccess; use Symfony\Component\Security\Core\Exception\AccessDeniedException; /** @@ -357,6 +356,10 @@ class ResourceController extends Controller $this->isGrantedOr403($configuration, ResourceActions::DELETE); $resource = $this->findOr404($configuration); + if (!$this->isCsrfTokenValid($resource->getId(), $request->request->get('_csrf_token'))) { + throw new HttpException(Response::HTTP_FORBIDDEN, 'Invalid csrf token.'); + } + $event = $this->eventDispatcher->dispatchPreEvent(ResourceActions::DELETE, $configuration, $resource); if ($event->isStopped() && !$configuration->isHtmlRequest()) {
[Resource] Use csrf protection in delete actions
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -17,7 +17,7 @@ except ImportError: from setuptools import setup, find_packages setup( - name='pymongo-orchestration', + name='mongo-orchestration', version='0.1', author='MongoDB, Inc.', author_email='mongodb-user@googlegroups.com',
Change name of project in setup.py to "mongo-orchestration".
diff --git a/views/js/controller/items/action.js b/views/js/controller/items/action.js index <HASH>..<HASH> 100644 --- a/views/js/controller/items/action.js +++ b/views/js/controller/items/action.js @@ -3,12 +3,12 @@ define([ 'uri', 'jquery', 'context', - 'taoItems/preview/preview' -], function(binder, uri, $, context, preview){ + 'taoItems/preview/preview', + 'helpers' +], function(binder, uri, $, context, preview, helpers){ binder.register('itemPreview', function itemPreview(actionContext){ - console.log(context.root_url + context.shownExtension + '/ItemPreview/forwardMe?uri=' + actionContext.uri) - preview.init(context.root_url + context.shownExtension + '/ItemPreview/forwardMe?uri=' + actionContext.uri); + preview.init(helpers._url('forwardMe', 'ItemPreview', context.shownExtension, {uri : actionContext.id})); preview.show(); });
Use non-encoded uri for preview
diff --git a/spacy/about.py b/spacy/about.py index <HASH>..<HASH> 100644 --- a/spacy/about.py +++ b/spacy/about.py @@ -4,13 +4,13 @@ # fmt: off __title__ = "spacy-nightly" -__version__ = "2.1.0a9.dev2" +__version__ = "2.1.0a9" __summary__ = "Industrial-strength Natural Language Processing (NLP) with Python and Cython" __uri__ = "https://spacy.io" __author__ = "Explosion AI" __email__ = "contact@explosion.ai" __license__ = "MIT" -__release__ = False +__release__ = True __download_url__ = "https://github.com/explosion/spacy-models/releases/download" __compatibility__ = "https://raw.githubusercontent.com/explosion/spacy-models/master/compatibility.json"
Set version to <I>a9
diff --git a/test/unit/basic_test.rb b/test/unit/basic_test.rb index <HASH>..<HASH> 100644 --- a/test/unit/basic_test.rb +++ b/test/unit/basic_test.rb @@ -19,14 +19,14 @@ class BasicTest < Test::Unit::TestCase client.use_oauth2_auth = use_auth %i[get delete head].each do |method| stub = stub_request(method, /feed-test/).to_timeout - assert_raise RestClient::RequestTimeout do + assert_raise(RestClient::RequestTimeout, RestClient::Exceptions::OpenTimeout) do client.send(method, stubbed_path, format_headers) assert_requested stub end end %i[post put patch].each do |method| stub = stub_request(method, /feed-test/).to_timeout - assert_raise RestClient::RequestTimeout do + assert_raise(RestClient::RequestTimeout, RestClient::Exceptions::OpenTimeout) do client.send(method, stubbed_path, FHIR::Patient.new, format_headers) assert_requested stub end
Test handles multiple exception types depending on version of RestClient.
diff --git a/coconut/command/util.py b/coconut/command/util.py index <HASH>..<HASH> 100644 --- a/coconut/command/util.py +++ b/coconut/command/util.py @@ -257,7 +257,8 @@ def stdin_readable(): return False try: return bool(select([sys.stdin], [], [], 0)[0]) - except OSError: + except Exception as err: + print(err) pass if not sys.stdout.isatty(): return False diff --git a/coconut/root.py b/coconut/root.py index <HASH>..<HASH> 100644 --- a/coconut/root.py +++ b/coconut/root.py @@ -26,7 +26,7 @@ import sys as _coconut_sys VERSION = "1.2.3" VERSION_NAME = "Colonel" # False for release, int >= 1 for develop -DEVELOP = 28 +DEVELOP = 29 #----------------------------------------------------------------------------------------------------------------------- # CONSTANTS:
Fix Cygwin error Resolves #<I>.
diff --git a/scripts/lateralus.component.model.js b/scripts/lateralus.component.model.js index <HASH>..<HASH> 100644 --- a/scripts/lateralus.component.model.js +++ b/scripts/lateralus.component.model.js @@ -81,6 +81,14 @@ define([ /** * This is the same as the `{{#crossLink + * "Lateralus.mixins/emit"}}{{/crossLink}}` mixin method. See the + * documentation for that. + * @method emit + */ + fn.emit = mixins.emit; + + /** + * This is the same as the `{{#crossLink * "Lateralus.mixins/listenFor"}}{{/crossLink}}` mixin method. See the * documentation for that. * @method listenFor
Add emit mixin method to Lateralus.Component.Model.
diff --git a/pyfilemail/__main__.py b/pyfilemail/__main__.py index <HASH>..<HASH> 100755 --- a/pyfilemail/__main__.py +++ b/pyfilemail/__main__.py @@ -155,7 +155,7 @@ https://github.com/apetrynet/pyfilemail', return args -if __name__ == '__main__': +def main(): args = parse_args() pwd = None @@ -191,3 +191,6 @@ if __name__ == '__main__': if res.status_code == 200: msg = 'Transfer complete!' logger.info(msg) + +if __name__ == '__main__': + main() \ No newline at end of file
put all logic in a main function as attempt to get console_scripts in setup.py to work
diff --git a/lib/legacy/init.php b/lib/legacy/init.php index <HASH>..<HASH> 100644 --- a/lib/legacy/init.php +++ b/lib/legacy/init.php @@ -9,7 +9,7 @@ */ if (!class_exists('Composer\\Autoload\\ClassLoader', false)) { - require_once(__DIR__.'/autoloader.php'); + require_once(__DIR__.'/../autoloader.php'); } if(!isset($GLOBALS['BUILD_OPTIONS'])) {
Fix bad path into legacy/init.php
diff --git a/welly/curve.py b/welly/curve.py index <HASH>..<HASH> 100644 --- a/welly/curve.py +++ b/welly/curve.py @@ -77,7 +77,7 @@ class Curve(object): run=None, service_company=None, units=None, - family=None): + log_type=None): if isinstance(mnemonic, str): mnemonic = [mnemonic] @@ -98,7 +98,7 @@ class Curve(object): self.code = code self.description = description self.units = units - self.family = family + self.log_type = log_type # set parameters related to well self.api = api self.date = date
change 'family' to 'log_type' attribute to be assigned by user
diff --git a/gwpy/plotter/core.py b/gwpy/plotter/core.py index <HASH>..<HASH> 100644 --- a/gwpy/plotter/core.py +++ b/gwpy/plotter/core.py @@ -982,7 +982,7 @@ class Plot(figure.Figure): # -- utilities ------------------------------ @staticmethod - def _get_axes_data(inputs, sep=False): + def _get_axes_data(inputs, sep=False, flat=False): """Determine the number of axes from the input args to this `Plot` Parameters @@ -993,11 +993,15 @@ class Plot(figure.Figure): sep : `bool`, optional plot each set of data on a separate `Axes` + flat : `bool`, optional + Return a flattened list of data objects + Returns ------- axesdata : `list` of lists of array-like data a `list` with one element per required `Axes` containing the - array-like data sets for those `Axes` + array-like data sets for those `Axes`, unless ``flat=True`` + is given. Notes ----- @@ -1041,6 +1045,10 @@ class Plot(figure.Figure): out.append(x.values()) else: out.append([x]) + + if flat: + return [s for group in out for s in group] + return out @staticmethod
Plot._get_axes_data: added flat utility keyword just returns a flattened list of data object
diff --git a/evaluators/melody_eval.py b/evaluators/melody_eval.py index <HASH>..<HASH> 100755 --- a/evaluators/melody_eval.py +++ b/evaluators/melody_eval.py @@ -66,10 +66,10 @@ def evaluate(reference_file, estimated_file): # Check if missing sample at time 0 and if so add one if ref_time[0] > 0: ref_time = np.insert(ref_time, 0, 0) - ref_freq = np.insert(ref_freq, 0, ref_voicing[0]) + ref_freq = np.insert(ref_freq, 0, ref_freq[0]) if est_time[0] > 0: est_time = np.insert(est_time, 0, 0) - est_freq = np.insert(est_freq, 0, est_voicing[0]) + est_freq = np.insert(est_freq, 0, est_freq[0]) # Get separated frequency array and voicing boolean array ref_freq, ref_voicing = mir_eval.melody.freq_to_voicing(ref_freq) est_freq, est_voicing = mir_eval.melody.freq_to_voicing(est_freq)
corrected value inserted into time 0 when missing
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -12,7 +12,7 @@ def get_project_path(*args): return os.path.abspath(os.path.join(this_dir, *args)) PACKAGE_NAME = 'xplenty' -PACKAGE_VERSION = '1.0.8' +PACKAGE_VERSION = '1.1.0' PACKAGE_AUTHOR = 'Xplenty' PACKAGE_AUTHOR_EMAIL = 'opensource@xplenty.com' PACKAGE_URL = 'https://github.com/xplenty/xplenty.py'
Increase minor version New functionality (new args for client.get_packages()) requires a bump in the minor version.
diff --git a/trunk/JLanguageTool/src/java/de/danielnaber/languagetool/tools/Tools.java b/trunk/JLanguageTool/src/java/de/danielnaber/languagetool/tools/Tools.java index <HASH>..<HASH> 100644 --- a/trunk/JLanguageTool/src/java/de/danielnaber/languagetool/tools/Tools.java +++ b/trunk/JLanguageTool/src/java/de/danielnaber/languagetool/tools/Tools.java @@ -93,8 +93,9 @@ public final class Tools { System.out.println("<!--"); } System.out.printf(Locale.ENGLISH, - "Time: %dms for %d sentences (%.1f sentences/sec)\n", + "Time: %dms for %d sentences (%.1f sentences/sec)", time, lt.getSentenceCount(), sentencesPerSecond); + System.out.println(); if (apiFormat) { System.out.println("-->"); }
don't hardcode \n as line break
diff --git a/prestans/bin/pride.py b/prestans/bin/pride.py index <HASH>..<HASH> 100755 --- a/prestans/bin/pride.py +++ b/prestans/bin/pride.py @@ -65,7 +65,8 @@ def main(): if __name__ == "__main__": - prestans_path = os.path.join("..", "..") + directory = os.path.dirname(__file__) + prestans_path = os.path.join(directory, "..", "..") #: #: While in development attempt to import prestans from top dir
added relative import of prestans devel package
diff --git a/public/assets/appCore.js b/public/assets/appCore.js index <HASH>..<HASH> 100644 --- a/public/assets/appCore.js +++ b/public/assets/appCore.js @@ -1066,9 +1066,6 @@ var app = { /* SET LOADING */ app.setLoading($div); - /* MENU ACTIVE */ - checkMenuActive(); - /* VERIFICA NECESSIDADE DE ATUALIZAÇÃO DOS DADOS DAS ENTIDADES */ downloadEntityData(); @@ -1093,7 +1090,7 @@ var app = { }) } } else { - app.applyView('403') + pageTransition('403', 'route', 'fade'); } } else { $div.html(""); @@ -1250,6 +1247,8 @@ function pageTransition(route, type, animation, target, param, scroll, setHistor window[history.state.funcao](history.state.param !== "" ? history.state.param : undefined); } }).then(() => { + checkMenuActive(); + /** * Se tiver requisição de página específica, busca * */
adjust menu active and fix <I> page to pageTransition control
diff --git a/DependencyInjection/ZendCacheExtension.php b/DependencyInjection/ZendCacheExtension.php index <HASH>..<HASH> 100644 --- a/DependencyInjection/ZendCacheExtension.php +++ b/DependencyInjection/ZendCacheExtension.php @@ -22,7 +22,7 @@ class ZendCacheExtension extends Extension /** * Loads the cache manager configuration. */ - public function configLoad(array $configs, ContainerBuilder $container) + public function load(array $configs, ContainerBuilder $container) { foreach ($configs as $config) { $this->doConfigLoad($config, $container);
Upgrade DIC extension to latest Symfony2 requirements
diff --git a/datadog_checks_dev/datadog_checks/dev/tooling/commands/release.py b/datadog_checks_dev/datadog_checks/dev/tooling/commands/release.py index <HASH>..<HASH> 100644 --- a/datadog_checks_dev/datadog_checks/dev/tooling/commands/release.py +++ b/datadog_checks_dev/datadog_checks/dev/tooling/commands/release.py @@ -284,7 +284,7 @@ def testable(ctx, start_id, agent_version, milestone, dry_run): echo_success(current_agent_version) current_release_branch = '{}.x'.format(current_agent_version) - diff_target_branch = 'master' + diff_target_branch = 'origin/master' echo_info('Branch `{}` will be compared to `{}`.'.format(current_release_branch, diff_target_branch)) echo_waiting('Getting diff... ', nl=False) @@ -382,7 +382,7 @@ def testable(ctx, start_id, agent_version, milestone, dry_run): elif api_response.status_code == 403: echo_failure( 'Error getting info for #{}. Please set a GitHub HTTPS ' - 'token to avoid rate limits.'.format(commit_id) + 'token to avoid rate limits.'.format(commit_hash) ) continue
Use origin/master instead of master (#<I>)
diff --git a/src/main/java/org/stripesstuff/plugin/security/SecurityInterceptor.java b/src/main/java/org/stripesstuff/plugin/security/SecurityInterceptor.java index <HASH>..<HASH> 100644 --- a/src/main/java/org/stripesstuff/plugin/security/SecurityInterceptor.java +++ b/src/main/java/org/stripesstuff/plugin/security/SecurityInterceptor.java @@ -116,6 +116,11 @@ public class SecurityInterceptor if (securityManager != null) { + // Add the security manager to the request. + // This is used (for example) by the security tag. + executionContext.getActionBeanContext().getRequest().setAttribute(SecurityInterceptor.SECURITY_MANAGER, + securityManager); + switch (executionContext.getLifecycleStage()) { case BindingAndValidation: @@ -216,12 +221,6 @@ public class SecurityInterceptor protected Resolution interceptResolutionExecution(ExecutionContext executionContext) throws Exception { - // Before processing the resolution, add the security manager to the request. - // This is used (for example) by the security tag. - - executionContext.getActionBeanContext().getRequest().setAttribute(SecurityInterceptor.SECURITY_MANAGER, - securityManager); - return executionContext.proceed(); }
Fixes #<I>. SecurityManager is set in request first. SecurityManager is set in request as soon as the interceptor is called in case an exception is thrown before ResolutionExecution.
diff --git a/lib/firefox/webdriver/firefoxDelegate.js b/lib/firefox/webdriver/firefoxDelegate.js index <HASH>..<HASH> 100644 --- a/lib/firefox/webdriver/firefoxDelegate.js +++ b/lib/firefox/webdriver/firefoxDelegate.js @@ -216,8 +216,14 @@ class FirefoxDelegate { async afterCollect(index, result) { for (let i = 0; i < result.length; i++) { if (!this.options.firefox.appconstants) { - delete result[i].browserScripts.browser.appConstants; - delete result[i].browserScripts.browser.asyncAppConstants; + // We need to be extra careful here, see + // https://github.com/sitespeedio/browsertime/issues/1261 + if (result[i].browserScripts.browser.appConstants) { + delete result[i].browserScripts.browser.appConstants; + } + if (result[i].browserScripts.browser.asyncAppConstants) { + delete result[i].browserScripts.browser.asyncAppConstants; + } } if (this.firefoxConfig.geckoProfiler && this.options.visualMetrics) {
Verify that the FF data exist before deleting it #<I> (#<I>)
diff --git a/pyqode/python/bootstrapper.py b/pyqode/python/bootstrapper.py index <HASH>..<HASH> 100644 --- a/pyqode/python/bootstrapper.py +++ b/pyqode/python/bootstrapper.py @@ -32,12 +32,21 @@ class PreloadWorker(object): def __init__(self, modules): self.modules = modules - def __call__(self, *args, **kwargs): - import jedi + def __call__(self, conn, *args, **kwargs): logger.debug("Boostrapper.preload started: %r" % self.modules) - jedi.api.preload_module(*self.modules) + for m in self.modules: + conn.send("Preloading module %s" % m) + self.preload(m) logger.debug("Boostrapper.preload finished") + def preload(self, m): + import jedi + try: + s = "import %s as x; x." % m + jedi.Script(s, 1, len(s), None).completions() + except : + logger.exception("Failed to preload %s" % m) + class Bootstrapper(QtCore.QObject): """
Send preload log message to the main process (may be used in a splash screen)
diff --git a/reactor-core/src/test/java/reactor/core/publisher/FluxGenerateTest.java b/reactor-core/src/test/java/reactor/core/publisher/FluxGenerateTest.java index <HASH>..<HASH> 100644 --- a/reactor-core/src/test/java/reactor/core/publisher/FluxGenerateTest.java +++ b/reactor-core/src/test/java/reactor/core/publisher/FluxGenerateTest.java @@ -207,6 +207,15 @@ public class FluxGenerateTest { } @Test + public void generatorThrowsFusion() { + StepVerifier.create( + Flux.<Integer>generate(o -> { throw new IllegalStateException("forced failure"); })) + .expectFusion(Fuseable.SYNC) + .verifyErrorSatisfies(e -> assertThat(e).isInstanceOf(IllegalStateException.class) + .hasMessage("forced failure")); + } + + @Test public void generatorMultipleOnErrors() { AssertSubscriber<Integer> ts = AssertSubscriber.create();
Polish: test coverage of generate throwing in SYNC fusion
diff --git a/examples/sys_info.py b/examples/sys_info.py index <HASH>..<HASH> 100644 --- a/examples/sys_info.py +++ b/examples/sys_info.py @@ -1,7 +1,8 @@ #!/usr/bin/env python # -# !!! Needs psutil installing: +# !!! Needs psutil (+ dependencies) installing: # +# $ sudo apt-get install python-dev # $ sudo pip install psutil #
Add note about python-dev dependency on installing psutil
diff --git a/index.js b/index.js index <HASH>..<HASH> 100644 --- a/index.js +++ b/index.js @@ -570,7 +570,6 @@ microgear.prototype.resettoken = function(callback) { result += chunk; }); res.on('end', function(){ - console.log('result=='+result); if (result !== 'FAILED') { clearGearCache(); if (typeof(callback)=='function') callback(null);
remove token from local cache only after the revocation succeeds
diff --git a/src/client/websocket/packets/handlers/GuildMembersChunk.js b/src/client/websocket/packets/handlers/GuildMembersChunk.js index <HASH>..<HASH> 100644 --- a/src/client/websocket/packets/handlers/GuildMembersChunk.js +++ b/src/client/websocket/packets/handlers/GuildMembersChunk.js @@ -26,7 +26,7 @@ class GuildMembersChunkHandler extends AbstractHandler { /** * Emitted whenever a chunk of guild members is received (all members come from the same guild). * @event Client#guildMembersChunk - * @param {Collection<Snowflake, GuildMember>} members The members in the chunk + * @param {GuildMember[]} members The members in the chunk * @param {Guild} guild The guild related to the member chunk */
Fix guildMembersChunk documents for <I>-dev (#<I>)
diff --git a/ampersand-form-view.js b/ampersand-form-view.js index <HASH>..<HASH> 100644 --- a/ampersand-form-view.js +++ b/ampersand-form-view.js @@ -129,7 +129,7 @@ extend(FormView.prototype, BBEvents, { clear: function (skipValidation) { for (var key in this._fieldViews) { - if (this._fieldViews[key].clear === 'function') { + if (typeof this._fieldViews[key].clear === 'function') { this._fieldViews[key].clear(skipValidation); } }
Forgot typeof in check for clear method in child views
diff --git a/Test/CLI_test.py b/Test/CLI_test.py index <HASH>..<HASH> 100644 --- a/Test/CLI_test.py +++ b/Test/CLI_test.py @@ -12,7 +12,7 @@ import argparse class CLITest(unittest.TestCase): def setUp(self): # create a directory to use in testing the cp command - self.client = Algorithmia.client('simdylfCeXZ8/MgaQzokUHlalWm1') + self.client = Algorithmia.client() CLI().mkdir("data://.my/moredata", self.client) if(not os.path.exists("./TestFiles/")): os.mkdir("./TestFiles/") @@ -130,7 +130,7 @@ class CLITest(unittest.TestCase): def test_auth(self): #key for test account - key = "simdylfCeXZ8/MgaQzokUHlalWm1" + key = os.getenv('ALGORITHMIA_API_KEY') address = 'apiAddress' profile = 'default' CLI().auth(key,address,profile)
Remove test key (#<I>)
diff --git a/lib/i18n/tasks/data/file_system_base.rb b/lib/i18n/tasks/data/file_system_base.rb index <HASH>..<HASH> 100644 --- a/lib/i18n/tasks/data/file_system_base.rb +++ b/lib/i18n/tasks/data/file_system_base.rb @@ -48,7 +48,7 @@ module I18n::Tasks router.route locale, tree do |path, tree_slice| write_tree path, tree_slice end - @trees&.delete(locale) + @trees.delete(locale) if @trees @available_locales = nil end diff --git a/lib/i18n/tasks/data/tree/traversal.rb b/lib/i18n/tasks/data/tree/traversal.rb index <HASH>..<HASH> 100644 --- a/lib/i18n/tasks/data/tree/traversal.rb +++ b/lib/i18n/tasks/data/tree/traversal.rb @@ -102,7 +102,7 @@ module I18n::Tasks to_remove = [] each do |node| if block.yield(node) - node.children&.select_nodes!(&block) + node.children.select_nodes!(&block) if node.children else # removing during each is unsafe to_remove << node
revert lonely operator change since we support older rubies
diff --git a/lib/tetra/version_matcher.rb b/lib/tetra/version_matcher.rb index <HASH>..<HASH> 100644 --- a/lib/tetra/version_matcher.rb +++ b/lib/tetra/version_matcher.rb @@ -38,7 +38,8 @@ module Tetra [] end ) - their_chunks_for_version += [nil] * [my_chunks.length - their_chunks_for_version.length, 0].max + chunks_count = [my_chunks.length - their_chunks_for_version.length, 0].max + their_chunks_for_version += [nil] * chunks_count [their_version, their_chunks_for_version] end ]
Refactoring: fixing rubocop LineTooLong offenses
diff --git a/guava-tests/test/com/google/common/util/concurrent/FuturesTest.java b/guava-tests/test/com/google/common/util/concurrent/FuturesTest.java index <HASH>..<HASH> 100644 --- a/guava-tests/test/com/google/common/util/concurrent/FuturesTest.java +++ b/guava-tests/test/com/google/common/util/concurrent/FuturesTest.java @@ -1809,9 +1809,9 @@ public class FuturesTest extends TestCase { tester.setDefault(Future.class, Futures.immediateFuture(DATA1)); tester.setDefault(Executor.class, MoreExecutors.sameThreadExecutor()); tester.setDefault(Callable.class, Callables.returning(null)); - tester.setDefault(AsyncFunction.class, new AsyncFunction() { + tester.setDefault(AsyncFunction.class, new AsyncFunction<Object, String>() { @Override - public ListenableFuture apply(Object input) throws Exception { + public ListenableFuture<String> apply(Object input) throws Exception { return immediateFuture(DATA1); } });
Internal-only changes with some spillover. ------------- Created by MOE: <URL>
diff --git a/pkglib/pkglib/multipkg.py b/pkglib/pkglib/multipkg.py index <HASH>..<HASH> 100644 --- a/pkglib/pkglib/multipkg.py +++ b/pkglib/pkglib/multipkg.py @@ -18,17 +18,17 @@ import sys import subprocess import config -import manage +import cmdline def setup(): """ Mirror pkglib's setup() method for each sub-package in this repository. """ top_level_parser = config.get_pkg_cfg_parser() - cfg = config._parse_metadata(top_level_parser, 'multipkg', ['pkg_dirs']) + cfg = config.parse_section(top_level_parser, 'multipkg', ['pkg_dirs']) rc = [0] for dirname in cfg['pkg_dirs']: - with manage.chdir(dirname): + with cmdline.chdir(dirname): # Update sub-package setup.cfg with top-level version if it's specified if 'version' in cfg: sub_parser = config.get_pkg_cfg_parser()
Fixing imports on clean environment.
diff --git a/alignak/misc/filter.py b/alignak/misc/filter.py index <HASH>..<HASH> 100755 --- a/alignak/misc/filter.py +++ b/alignak/misc/filter.py @@ -68,26 +68,26 @@ def only_related_to(lst, user): return lst # Ok the user is a simple user, we should filter - r = set() - for i in lst: + res = set() + for item in lst: # Maybe the user is a direct contact - if user in i.contacts: - r.add(i) + if user in item.contacts: + res.add(item) continue # TODO: add a notified_contact pass # Maybe it's a contact of a linked elements (source problems or impacts) is_find = False - for s in i.source_problems: - if user in s.contacts: - r.add(i) + for serv in item.source_problems: + if user in serv.contacts: + res.add(item) is_find = True # Ok skip this object now if is_find: continue # Now impacts related maybe? - for imp in i.impacts: + for imp in item.impacts: if user in imp.contacts: - r.add(i) + res.add(item) - return list(r) + return list(res)
Enh: Pylint - C<I> on variables names in filter.py
diff --git a/datasketch/hyperloglog.py b/datasketch/hyperloglog.py index <HASH>..<HASH> 100644 --- a/datasketch/hyperloglog.py +++ b/datasketch/hyperloglog.py @@ -184,7 +184,7 @@ class HyperLogLog(object): ''' Estimate the cardinality of the data seen so far. ''' - num_zero = self.reg.count(0) + num_zero = sum(1 for v in self.reg if v == 0) if num_zero > 0: # linear counting lc = self.m * math.log(self.m / float(num_zero))
make hyperloglog compatible with numpy array as reg
diff --git a/checkpoint.go b/checkpoint.go index <HASH>..<HASH> 100644 --- a/checkpoint.go +++ b/checkpoint.go @@ -4,8 +4,8 @@ package checkpoint import ( "crypto/rand" - "encoding/json" "encoding/binary" + "encoding/json" "fmt" "io" "io/ioutil" @@ -87,6 +87,10 @@ type CheckAlert struct { // Check checks for alerts and new version information. func Check(p *CheckParams) (*CheckResponse, error) { + if disabled := os.Getenv("CHECKPOINT_DISABLE"); disabled != "" { + return &CheckResponse{}, nil + } + // If we have a cached result, then use that if r, err := checkCache(p.Version, p.CacheFile, p.CacheDuration); err != nil { return nil, err
Provide a way to disable checkpoint via environment variable
diff --git a/spyder/widgets/reporterror.py b/spyder/widgets/reporterror.py index <HASH>..<HASH> 100644 --- a/spyder/widgets/reporterror.py +++ b/spyder/widgets/reporterror.py @@ -13,6 +13,8 @@ from qtpy.QtCore import Qt, Signal # Local Imports from spyder.config.base import _ +from spyder.widgets.sourcecode.codeeditor import CodeEditor +from spyder.config.main import CONF class SpyderErrorMsgBox(QMessageBox): @@ -68,11 +70,19 @@ class FillDescription(QDialog): def __init__(self, parent=None): super().__init__(parent) + + color_scheme = CONF.get('color_schemes', 'selected') + self.setWindowTitle(_("Error Description")) self.label_description = QLabel( "What steps will reproduce the problem") - self.input_description = QPlainTextEdit() + self.input_description = CodeEditor() + self.input_description.setup_editor( + language='md', linenumbers=False, scrollflagarea=False, + color_scheme=color_scheme) + self.input_description.set_text("1. \n2. \n3. ") + self.input_description.move_cursor(3) self.input_description.textChanged.connect(self.text_changed) self.ok_button = QPushButton("Ok")
Use a CodeEditor in the error dialog. I personally dislike this change because it makes the error dialog complex and will be really annoying a failure while trying to report an error.
diff --git a/bin/now-deploy.js b/bin/now-deploy.js index <HASH>..<HASH> 100755 --- a/bin/now-deploy.js +++ b/bin/now-deploy.js @@ -1,7 +1,7 @@ #!/usr/bin/env node // Native -const { resolve } = require('path') +const { resolve, basename } = require('path') // Packages const Progress = require('progress') @@ -263,6 +263,11 @@ if (deploymentName || wantsPublic) { let alwaysForwardNpm async function main() { + if (!fs.existsSync(path)) { + error(`The specified directory "${basename(path)}" doesn't exist.`) + process.exit(1) + } + let config = await cfg.read({ token: argv.token }) alwaysForwardNpm = config.forwardNpm
Display proper error message if path doesn't exist This closes #<I>
diff --git a/setuptools/package_index.py b/setuptools/package_index.py index <HASH>..<HASH> 100755 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -623,7 +623,11 @@ def fix_sf_url(url): def get_sf_ip(_mirrors=[]): if not _mirrors: - _mirrors[:] = socket.gethostbyname_ex('dl.sourceforge.net')[-1] + try: + _mirrors[:] = socket.gethostbyname_ex('dl.sourceforge.net')[-1] + except socket.error: + # DNS-bl0ck1n9 f1r3w4llz sUx0rs! + _mirrors[:] = ['dl.sourceforge.net'] return random.choice(_mirrors) @@ -650,7 +654,3 @@ def get_sf_ip(_mirrors=[]): - - - -
Fall back to a reasonable default Sourceforge address if the machine is unable to obtain the mirror IP list via DNS. --HG-- branch : setuptools extra : convert_revision : svn%3A<I>fed2-<I>-<I>-9fe1-9d<I>cc<I>/sandbox/trunk/setuptools%<I>
diff --git a/lib/clicoder/sites/aoj.rb b/lib/clicoder/sites/aoj.rb index <HASH>..<HASH> 100644 --- a/lib/clicoder/sites/aoj.rb +++ b/lib/clicoder/sites/aoj.rb @@ -40,11 +40,11 @@ module Clicoder end def inputs_xpath - '//pre[preceding-sibling::h2[1][text()="Sample Input"]]' + '//pre[preceding-sibling::*[self::h2 or self::h3][1][text()="Sample Input"]]' end def outputs_xpath - '//pre[preceding-sibling::h2[1][text()="Output for the Sample Input"]]' + '//pre[preceding-sibling::*[self::h2 or self::h3][text()="Output for the Sample Input"]]' end def working_directory
Fix AOJ download xpaths
diff --git a/tests/frontend/org/voltdb/regressionsuites/RegressionSuite.java b/tests/frontend/org/voltdb/regressionsuites/RegressionSuite.java index <HASH>..<HASH> 100644 --- a/tests/frontend/org/voltdb/regressionsuites/RegressionSuite.java +++ b/tests/frontend/org/voltdb/regressionsuites/RegressionSuite.java @@ -126,7 +126,7 @@ public class RegressionSuite extends TestCase { } public Client getClient() throws IOException { - return getClient(1000 * 120); + return getClient(1000 * 60 * 10); // 10 minute default } /**
ENG-<I>: Bump the default client timeout for r-suites to <I>min
diff --git a/lib/veewee/provider/virtualbox/box/helper/version.rb b/lib/veewee/provider/virtualbox/box/helper/version.rb index <HASH>..<HASH> 100644 --- a/lib/veewee/provider/virtualbox/box/helper/version.rb +++ b/lib/veewee/provider/virtualbox/box/helper/version.rb @@ -8,7 +8,9 @@ module Veewee # For example: 4.1.8_Debianr75467 -> 4.1.8 def vbox_version command="#{@vboxcmd} --version" - shell_results=shell_exec("#{command}",{:mute => true, :stderr => "/dev/null"}) + stderr = "/dev/null" + stderr = "nul" if definition.os_type_id=~/^Win/ + shell_results=shell_exec("#{command}",{:mute => true, :stderr => stderr}) version=shell_results.stdout.strip.split(/[^0-9\.]/)[0] return version end
Windows support for stderr redirecting
diff --git a/lib/pancake/mixins/request_helper.rb b/lib/pancake/mixins/request_helper.rb index <HASH>..<HASH> 100644 --- a/lib/pancake/mixins/request_helper.rb +++ b/lib/pancake/mixins/request_helper.rb @@ -44,7 +44,7 @@ module Pancake # @api public # @author Daniel Neighman def url(name, opts = {}) - configuration.router.generate(name, opts) + configuration.router.url(name, opts) end # Generate the base url for the router that got you to this point.
Updates the url helper to use the router url method rather than the raw generate
diff --git a/spoon-maven-plugin/src/main/java/com/squareup/spoon/SpoonMojo.java b/spoon-maven-plugin/src/main/java/com/squareup/spoon/SpoonMojo.java index <HASH>..<HASH> 100644 --- a/spoon-maven-plugin/src/main/java/com/squareup/spoon/SpoonMojo.java +++ b/spoon-maven-plugin/src/main/java/com/squareup/spoon/SpoonMojo.java @@ -119,10 +119,14 @@ public class SpoonMojo extends AbstractMojo { return; } + if (androidSdk == null) { + throw new MojoExecutionException( + "Could not find Android SDK. Ensure ANDROID_HOME environment variable is set."); + } File sdkFile = new File(androidSdk); if (!sdkFile.exists()) { throw new MojoExecutionException( - "Could not find Android SDK. Ensure ANDROID_HOME environment variable is set."); + String.format("Could not find Android SDK at: %s", androidSdk)); } log.debug("Android SDK: " + sdkFile.getAbsolutePath());
Add check on android SDK location to prevent NPE. androidSdk can be null if ANDROID_HOME is not defined, so the extra check prevents an NPE. Also added the location of the SDK in the error message when the location does not exist.
diff --git a/torrent.go b/torrent.go index <HASH>..<HASH> 100644 --- a/torrent.go +++ b/torrent.go @@ -1091,6 +1091,9 @@ func (t *Torrent) piecePriorityChanged(piece pieceIndex, reason string) { if !c.peerHasPiece(piece) { return } + if c.peerChoking && !c.peerAllowedFast.Contains(uint32(piece)) { + return + } c.updateRequests(reason) }) }
Filter update requests on piece priority change by peer choking and allowed fast
diff --git a/liquibase-cli/src/main/java/liquibase/integration/commandline/LiquibaseCommandLine.java b/liquibase-cli/src/main/java/liquibase/integration/commandline/LiquibaseCommandLine.java index <HASH>..<HASH> 100644 --- a/liquibase-cli/src/main/java/liquibase/integration/commandline/LiquibaseCommandLine.java +++ b/liquibase-cli/src/main/java/liquibase/integration/commandline/LiquibaseCommandLine.java @@ -828,7 +828,7 @@ public class LiquibaseCommandLine { final SortedSet<ConfigurationDefinition<?>> globalConfigurations = Scope.getCurrentScope().getSingleton(LiquibaseConfiguration.class).getRegisteredDefinitions(false); for (ConfigurationDefinition<?> def : globalConfigurations) { - String[] argNames = toArgNames(def); + final String[] argNames = toArgNames(def); for (int i = 0; i < argNames.length; i++) { final CommandLine.Model.OptionSpec.Builder optionBuilder = CommandLine.Model.OptionSpec.builder(argNames[i]) .required(false)
Make variable final like it was before DAT-<I>
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -703,7 +703,7 @@ INSTALL_REQUIREMENTS = [ 'flask-caching>=1.3.3, <2.0.0', 'flask-login>=0.3, <0.5', 'flask-swagger==0.2.13', - 'flask-wtf>=0.14.2, <0.15', + 'flask-wtf>=0.14.3, <0.15', 'funcsigs>=1.0.0, <2.0.0', 'graphviz>=0.12', 'gunicorn>=19.5.0, <20.0',
Update flask_wtf version to work with werkzeug>=<I> (#<I>) Werkzeug <I> deprecated werkzeug.url_encode, and removed it in <I>, so we need the fixed version of flask_wtf
diff --git a/aws/aws_sweeper_test.go b/aws/aws_sweeper_test.go index <HASH>..<HASH> 100644 --- a/aws/aws_sweeper_test.go +++ b/aws/aws_sweeper_test.go @@ -15,12 +15,8 @@ func TestMain(m *testing.M) { // sharedClientForRegion returns a common AWSClient setup needed for the sweeper // functions for a given region func sharedClientForRegion(region string) (interface{}, error) { - if os.Getenv("AWS_ACCESS_KEY_ID") == "" { - return nil, fmt.Errorf("empty AWS_ACCESS_KEY_ID") - } - - if os.Getenv("AWS_SECRET_ACCESS_KEY") == "" { - return nil, fmt.Errorf("empty AWS_SECRET_ACCESS_KEY") + if os.Getenv("AWS_PROFILE") == "" && (os.Getenv("AWS_ACCESS_KEY_ID") == "" || os.Getenv("AWS_SECRET_ACCESS_KEY") == "") { + return nil, fmt.Errorf("must provide environment variables AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY or environment variable AWS_PROFILE") } conf := &Config{
tests/provider: Allow AWS_PROFILE environment variable for acceptance test sweepers The AWS Go SDK will automatically pick up and use the AWS_PROFILE environment variable for credentials if provided.
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -100,7 +100,7 @@ setup( python_requires=">=2.7,!=3.0,!=3.1,!=3.2,!=3.3", install_requires=[ 'wrapt~=1.10', - 'typing', + 'typing;python_version<"3.5"', 'windows-curses;platform_system=="Windows"', ], extras_require=extras_require,
Make typing dependency conditional < python <I>
diff --git a/lib/elephrame/bot.rb b/lib/elephrame/bot.rb index <HASH>..<HASH> 100644 --- a/lib/elephrame/bot.rb +++ b/lib/elephrame/bot.rb @@ -71,6 +71,18 @@ module Elephrame return nil end + + ## + # Checks to see if a user has some form of "#NoBot" in their bio + # (so we can make make friendly bots easier!) + # + # @param account_id [String] id of account to check bio + # + # @return [Bool] + + def no_bot? account_id + @client.account(account_id).note =~ /#?NoBot/i + end end end
added no_bot? to BaseBot
diff --git a/rival-evaluate/src/test/java/net/recommenders/rival/evaluation/metric/NDCGTest.java b/rival-evaluate/src/test/java/net/recommenders/rival/evaluation/metric/NDCGTest.java index <HASH>..<HASH> 100644 --- a/rival-evaluate/src/test/java/net/recommenders/rival/evaluation/metric/NDCGTest.java +++ b/rival-evaluate/src/test/java/net/recommenders/rival/evaluation/metric/NDCGTest.java @@ -31,7 +31,7 @@ public class NDCGTest<U, V> { predictions.addPreference((long) i, (long) j, (double) i * j % 5 + 1.0); } } - ndcg = new NDCG(predictions, test); + ndcg = new NDCG(predictions, test, new int[]{5, 10, 20}); } @Test @@ -41,6 +41,13 @@ public class NDCGTest<U, V> { } @Test + public void testComputeNDCGAt() { + ndcg.compute(); + assertEquals(1.0, ndcg.getValue(5), 0.0); + assertEquals(1.0, ndcg.getValue(10), 0.0); + } + + @Test public void testGetValuePerUser() { ndcg.compute(); Map<Long, Double> ndcgPerUser = ndcg.getValuePerUser();
Fixed unit test for NDCG (see #<I>)
diff --git a/test/adapter/http.test.js b/test/adapter/http.test.js index <HASH>..<HASH> 100644 --- a/test/adapter/http.test.js +++ b/test/adapter/http.test.js @@ -13,7 +13,7 @@ var droongaAPI = require('../../lib/adapter/api/droonga'); var groongaAPI = require('../../lib/adapter/api/groonga'); suite('HTTP Adapter', function() { - test('registeration of plugin commands', function() { + test('registration of plugin commands', function() { var basePlugin = { getCommand: new command.HTTPRequestResponse({ path: '/get'
Fix a typo registeration regist ration -
diff --git a/client/html/tests/Client/Html/Basket/Standard/Coupon/DefaultTest.php b/client/html/tests/Client/Html/Basket/Standard/Coupon/DefaultTest.php index <HASH>..<HASH> 100644 --- a/client/html/tests/Client/Html/Basket/Standard/Coupon/DefaultTest.php +++ b/client/html/tests/Client/Html/Basket/Standard/Coupon/DefaultTest.php @@ -94,7 +94,7 @@ class Client_Html_Basket_Standard_Coupon_DefaultTest extends MW_Unittest_Testcas $view->standardBasket = $controller->get(); $output = $this->_object->getBody(); - $this->assertRegExp( '#<li class="coupon-item">.*90AB.*</li>#smU', $output ); + $this->assertRegExp( '#<li class="attr-item">.*90AB.*</li>#smU', $output ); } @@ -123,7 +123,7 @@ class Client_Html_Basket_Standard_Coupon_DefaultTest extends MW_Unittest_Testcas $view->standardBasket = $controller->get(); $output = $this->_object->getBody(); - $this->assertNotRegExp( '#<ul class="coupon-list">#smU', $output ); + $this->assertNotRegExp( '#<ul class="attr-list">#smU', $output ); }
Adapts test to changed coupon HTML
diff --git a/lib/cxxproject/buildingblocks/binary_library.rb b/lib/cxxproject/buildingblocks/binary_library.rb index <HASH>..<HASH> 100644 --- a/lib/cxxproject/buildingblocks/binary_library.rb +++ b/lib/cxxproject/buildingblocks/binary_library.rb @@ -8,13 +8,15 @@ module Cxxproject include HasLibraries include HasIncludes - def initialize(name) + def initialize(name, useNameAsLib = true) super(name) - libs_to_search << name + @useNameAsLib = useNameAsLib + libs_to_search << name if @useNameAsLib end def get_task_name() - libs_to_search[0] + return libs_to_search[0] if @useNameAsLib + @name end
more flexible BinaryLib (now compatible to Lake)
diff --git a/lib/controllers/actions/oauth2.js b/lib/controllers/actions/oauth2.js index <HASH>..<HASH> 100644 --- a/lib/controllers/actions/oauth2.js +++ b/lib/controllers/actions/oauth2.js @@ -36,6 +36,12 @@ module.exports = function (req, res){ res.serverError(); } else { var _data = JSON.parse(body); + + if(_data.error){ + waterlock.logger.debug(_data); + res.serverError(_data.error); + } + var attr = { facebookId: _data.id, name: _data.name @@ -66,4 +72,4 @@ module.exports = function (req, res){ waterlock.cycle.loginSuccess(req, res, user); } -}; \ No newline at end of file +};
Update oauth2.js If FB respond with an error log it and respond with server error
diff --git a/src/modules/appProps.js b/src/modules/appProps.js index <HASH>..<HASH> 100644 --- a/src/modules/appProps.js +++ b/src/modules/appProps.js @@ -9,6 +9,11 @@ var app_props = null; var load = function(cb) { var doc_url = document.location.href; var url_params = qs(doc_url); + for(var key in url_params){ + if(url_params.hasOwnProperty(key)){ + url_params[key] = url_params[key].replace(/#.*?$/g, ''); + } + } //default properties app_props = { @@ -24,7 +29,6 @@ var load = function(cb) { app_props.host = url_params.url; } - app_props.host = app_props.host.replace(/#.*?$/g, ''); app_props.local = !!(url_params.host || url_params.url); cb(null, app_props); }
sanitized all url params
diff --git a/Corrfunc/utils.py b/Corrfunc/utils.py index <HASH>..<HASH> 100644 --- a/Corrfunc/utils.py +++ b/Corrfunc/utils.py @@ -75,8 +75,8 @@ def read_catalog(filebase=None): return x, y, z def read_fastfood(filename, return_dtype=None, need_header=None): - if return_dtype is None: - msg = "Return data-type must be set and a valid numpy data-type" + if return_dtype is None or return_dtype not in [np.float32, np.float]: + msg = "Return data-type must be set and a valid numpy float" raise ValueError(msg) import struct
Added an explanatory message for reading fast-food files
diff --git a/index.js b/index.js index <HASH>..<HASH> 100644 --- a/index.js +++ b/index.js @@ -377,9 +377,7 @@ PageClass.prototype.waitReady = function() { var p = new Promise(function(resolve) { solve = resolve; }); - // https://github.com/jquery/jquery/issues/2100 - if (document.readyState == "complete" || - (document.readyState != "loading" && !document.documentElement.doScroll)) { + if (document.readyState == "complete") { this.docReady = true; setTimeout(solve); return p;
Fix #<I>: waitReady better return too late than too soon.
diff --git a/Event/PasswordResetTokenEvent.php b/Event/PasswordResetTokenEvent.php index <HASH>..<HASH> 100644 --- a/Event/PasswordResetTokenEvent.php +++ b/Event/PasswordResetTokenEvent.php @@ -11,7 +11,7 @@ namespace Darvin\UserBundle\Event; use Darvin\UserBundle\Entity\PasswordResetToken; -use Symfony\Component\EventDispatcher\Event; +use Symfony\Contracts\EventDispatcher\Event; /** * Password reset token event diff --git a/Event/UserEvent.php b/Event/UserEvent.php index <HASH>..<HASH> 100644 --- a/Event/UserEvent.php +++ b/Event/UserEvent.php @@ -11,9 +11,9 @@ namespace Darvin\UserBundle\Event; use Darvin\UserBundle\Entity\BaseUser; -use Symfony\Component\EventDispatcher\Event; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; +use Symfony\Contracts\EventDispatcher\Event; /** * User event
Replace deprecated base event class.
diff --git a/src/Methods/helpers.php b/src/Methods/helpers.php index <HASH>..<HASH> 100644 --- a/src/Methods/helpers.php +++ b/src/Methods/helpers.php @@ -57,3 +57,15 @@ if (! function_exists('take')) { return new \SebastiaanLuca\Helpers\Pipe\Item($value); } } + +if (! function_exists('rand_bool')) { + /** + * Randomly return true or false. + * + * @return bool + */ + function rand_bool() + { + return rand(0, 1) === 0; + } +}
Add rand_bool() method
diff --git a/test/unit/components/validity/lifecycle.test.js b/test/unit/components/validity/lifecycle.test.js index <HASH>..<HASH> 100644 --- a/test/unit/components/validity/lifecycle.test.js +++ b/test/unit/components/validity/lifecycle.test.js @@ -28,7 +28,7 @@ describe('validity component: lifecycle', () => { } } }).$mount() - assert(vm._elementable.isBuiltIn !== undefined) + assert.equal(vm._elementable.constructor.name, 'SingleElement') }) }) @@ -56,7 +56,7 @@ describe('validity component: lifecycle', () => { } } }).$mount() - assert(vm._elementable.getCheckedValue !== undefined) + assert.equal(vm._elementable.constructor.name, 'MultiElement') }) }) })
:shirt: refactor: change instance checking to class name
diff --git a/jax/interpreters/ad.py b/jax/interpreters/ad.py index <HASH>..<HASH> 100644 --- a/jax/interpreters/ad.py +++ b/jax/interpreters/ad.py @@ -411,15 +411,9 @@ def map_transpose(primitive, params, jaxpr, consts, freevar_vals, args, ct): all_args = pack((pack(args), pack(consts), ct)) ans = primitive.bind(fun, all_args, **params) cts_out, freevar_cts = build_tree(out_tree_def(), ans) - freevar_cts = tree_map(_sum_leading_axis, freevar_cts) + freevar_cts = tree_map(lambda x: x.sum(0), freevar_cts) return cts_out, freevar_cts -def _sum_leading_axis(x): - try: - return x.sum(0) - except AttributeError: - return onp.sum(x, 0) - primitive_transposes[core.call_p] = partial(call_transpose, call_p) primitive_transposes[pe.compiled_call_p] = partial(call_transpose, pe.compiled_call_p)
simplify map_transpose summing
diff --git a/test/json_api_test.rb b/test/json_api_test.rb index <HASH>..<HASH> 100644 --- a/test/json_api_test.rb +++ b/test/json_api_test.rb @@ -16,7 +16,6 @@ class JsonApiTest < MiniTest::Spec module Singular include Representable::Hash - include Roar::Representer::JSON # activates prepare_links include Roar::Representer::Feature::Hypermedia extend Roar::Representer::JSON::JsonApi::ClassMethods include Roar::Representer::JSON::JsonApi::Singular
no need to include JSON atm.
diff --git a/modules/system/assets/js/framework.extras.js b/modules/system/assets/js/framework.extras.js index <HASH>..<HASH> 100644 --- a/modules/system/assets/js/framework.extras.js +++ b/modules/system/assets/js/framework.extras.js @@ -52,7 +52,7 @@ }) if (!!$container.length) { - $container = $('[data-validate-error]') + $container = $('[data-validate-error]', $this) } if (!!$container.length) {
Pass the current context to the selector This fixes an issue with more than one form on a single page. The messages will be correctly displayed in the container of their corresponding form.
diff --git a/src/GkSmarty/Smarty/SmartyResolverFactory.php b/src/GkSmarty/Smarty/SmartyResolverFactory.php index <HASH>..<HASH> 100644 --- a/src/GkSmarty/Smarty/SmartyResolverFactory.php +++ b/src/GkSmarty/Smarty/SmartyResolverFactory.php @@ -26,7 +26,7 @@ class SmartyResolverFactory implements FactoryInterface { $resolver = new AggregateResolver(); $resolver->attach($serviceLocator->get('GkSmartyTemplateMapResolver')); - $resolver->attach($serviceLocator->get('GkSmartyTemplatePathStackResolver')); + $resolver->attach($serviceLocator->get('GkSmartyTemplatePathStack')); return $resolver; }
fix wrong SM key in SmartyResolverFactory
diff --git a/spec/active_record/connection_adapters/oracle_enhanced_emulate_oracle_adapter_spec.rb b/spec/active_record/connection_adapters/oracle_enhanced_emulate_oracle_adapter_spec.rb index <HASH>..<HASH> 100644 --- a/spec/active_record/connection_adapters/oracle_enhanced_emulate_oracle_adapter_spec.rb +++ b/spec/active_record/connection_adapters/oracle_enhanced_emulate_oracle_adapter_spec.rb @@ -16,4 +16,10 @@ describe "OracleEnhancedAdapter emulate OracleAdapter" do ActiveRecord::Base.connection.is_a?(ActiveRecord::ConnectionAdapters::OracleAdapter).should be_true end + after(:all) do + if defined?(ActiveRecord::ConnectionAdapters::OracleAdapter) + ActiveRecord::ConnectionAdapters.send(:remove_const, :OracleAdapter) + end + end + end
remove OracleAdapter constant after emulate OracleAdapter test
diff --git a/generators/generator-constants.js b/generators/generator-constants.js index <HASH>..<HASH> 100644 --- a/generators/generator-constants.js +++ b/generators/generator-constants.js @@ -18,7 +18,7 @@ */ // version of docker images -const DOCKER_JHIPSTER_REGISTRY = 'jhipster/jhipster-registry:v4.0.2'; +const DOCKER_JHIPSTER_REGISTRY = 'jhipster/jhipster-registry:v4.0.3'; const DOCKER_JAVA_JRE = 'openjdk:8-jre-alpine'; const DOCKER_MYSQL = 'mysql:5.7.20'; const DOCKER_MARIADB = 'mariadb:10.3.7';
Update to the latest JHipster Registry release
diff --git a/packages/core/parcel/src/cli.js b/packages/core/parcel/src/cli.js index <HASH>..<HASH> 100755 --- a/packages/core/parcel/src/cli.js +++ b/packages/core/parcel/src/cli.js @@ -116,6 +116,7 @@ var hmrOptions = { '--cert <path>': 'path to certificate to use with HTTPS', '--key <path>': 'path to private key to use with HTTPS', '--hmr-port <port>': ['hot module replacement port', process.env.HMR_PORT], + '--hmr-host <host>': ['hot module replacement host', process.env.HMR_HOST], }; function applyOptions(cmd, options) { @@ -446,8 +447,9 @@ async function normalizeOptions( let hmrOptions = null; if (command.name() !== 'build' && command.hmr !== false) { let hmrport = command.hmrPort ? parsePort(command.hmrPort) : port; + let hmrhost = command.hmrHost ? command.hmrHost : host; - hmrOptions = {port: hmrport, host}; + hmrOptions = {port: hmrport, host: hmrhost}; } if (command.detailedReport === true) {
Add --hmr-host option to set her host (#<I>)
diff --git a/cmd/ctr/list.go b/cmd/ctr/list.go index <HASH>..<HASH> 100644 --- a/cmd/ctr/list.go +++ b/cmd/ctr/list.go @@ -6,7 +6,7 @@ import ( "text/tabwriter" "github.com/containerd/containerd" - "github.com/containerd/containerd/api/services/execution" + tasks "github.com/containerd/containerd/api/services/tasks/v1" tasktypes "github.com/containerd/containerd/api/types/task" "github.com/urfave/cli" ) @@ -67,9 +67,9 @@ func taskListFn(context *cli.Context) error { return err } - tasks := client.TaskService() + s := client.TaskService() - tasksResponse, err := tasks.List(ctx, &execution.ListRequest{}) + tasksResponse, err := s.List(ctx, &tasks.ListTasksRequest{}) if err != nil { return err }
[ctr] fix tasks service refernce
diff --git a/heron/common/src/java/com/twitter/heron/common/basics/Communicator.java b/heron/common/src/java/com/twitter/heron/common/basics/Communicator.java index <HASH>..<HASH> 100644 --- a/heron/common/src/java/com/twitter/heron/common/basics/Communicator.java +++ b/heron/common/src/java/com/twitter/heron/common/basics/Communicator.java @@ -53,8 +53,12 @@ public class Communicator<E> { private volatile int capacity; /** - * Used in Used in updateExpectedAvailableCapacity() + * Used in updateExpectedAvailableCapacity() * Variables related to dynamically tune Communicator's expected available capacity + * <p> + * The value should be positive number && smaller than the capacity + * -- Non-positive number can cause starvation concerns. + * -- Too large positive number can bring gc issues. */ private volatile int expectedAvailableCapacity; @@ -225,7 +229,8 @@ public class Communicator<E> { expectedAvailableCapacity = availableCapacity + 1; } - if (inAvgSize > expectedQueueSize && availableCapacity > 0) { + // Make sure expectedAvailableCapacity will still be positive number if we decrease it + if (inAvgSize > expectedQueueSize && availableCapacity > 1) { // The decrease of available capacity is quick since // we want to recover quickly once we back-up items , which may cause GC issues expectedAvailableCapacity = availableCapacity / 2;
Increase the minimal queue size for Communicator (#<I>) Currently we use a strategy tuning the soft capacity of Communicator, which can trigger back-pressure too easily. In this pull request, we increase the minimal queue size from 0 to 1, enhancing the concurrent processing between Gateway and Slave thread.
diff --git a/menu_launcher.py b/menu_launcher.py index <HASH>..<HASH> 100755 --- a/menu_launcher.py +++ b/menu_launcher.py @@ -1,7 +1,6 @@ #!/usr/bin/env python2.7 import ConfigParser -import curses import os import sys import termios @@ -12,6 +11,7 @@ from subprocess import call, check_output, PIPE, Popen # !! TODO tmeporary fix for tests try: + import curses screen = curses.initscr() curses.noecho() curses.cbreak()
make curses optional for testing for now
diff --git a/fastlane/actions/plugin_scores.rb b/fastlane/actions/plugin_scores.rb index <HASH>..<HASH> 100644 --- a/fastlane/actions/plugin_scores.rb +++ b/fastlane/actions/plugin_scores.rb @@ -7,7 +7,9 @@ module Fastlane plugins = fetch_plugins.sort_by { |v| v.data[:overall_score] }.reverse - result = "# Available Plugins\n\n\n" + result = "<!--\nAuto generated, please only modify https://github.com/fastlane/fastlane/blob/master/fastlane/actions/plugin_scores.rb\n-->\n" + result += "{!docs/setup-fastlane-header.md!}\n" + result += "# Available Plugins\n\n\n" result += plugins.collect do |current_plugin| @plugin = current_plugin result = ERB.new(File.read(params[:template_path]), 0, '-').result(binding) # https://web.archive.org/web/20160430190141/www.rrn.dk/rubys-erb-templating-system
Add note that available-plugins.md is auto generated & add installation header (#<I>) Related to <URL>
diff --git a/lib/lifeguard/infinite_threadpool.rb b/lib/lifeguard/infinite_threadpool.rb index <HASH>..<HASH> 100644 --- a/lib/lifeguard/infinite_threadpool.rb +++ b/lib/lifeguard/infinite_threadpool.rb @@ -18,11 +18,18 @@ module Lifeguard def async(*args, &block) return false if @shutdown + sleep 0.5 if @queued_jobs.size > 1000 @queued_jobs << { :args => args, :block => block } return true end + def shutdown(shutdown_timeout = 30) + @shutdown = true + @scheduler.join + super(shutdown_timeout) + end + def create_scheduler Thread.new do while !@shutdown || @queud_jobs.size > 0
Throttle when queue is larger than 1,<I>
diff --git a/elk-util-parent/elk-util-common/src/main/java/org/semanticweb/elk/io/IOUtils.java b/elk-util-parent/elk-util-common/src/main/java/org/semanticweb/elk/io/IOUtils.java index <HASH>..<HASH> 100644 --- a/elk-util-parent/elk-util-common/src/main/java/org/semanticweb/elk/io/IOUtils.java +++ b/elk-util-parent/elk-util-common/src/main/java/org/semanticweb/elk/io/IOUtils.java @@ -30,6 +30,7 @@ import java.io.File; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; +import java.io.OutputStream; import java.net.URI; import java.net.URL; import java.security.CodeSource; @@ -54,6 +55,14 @@ public class IOUtils { } } + public static void closeQuietly(OutputStream stream) { + if (stream != null) { + try { + stream.close(); + } catch (IOException e) {} + } + } + public static List<String> getResourceNamesFromDir(File dir, String extension) { List<String> testResources = new ArrayList<String>();
a method to quietly close all output streams (as it's done for input stream).
diff --git a/lib/parse/model/model.rb b/lib/parse/model/model.rb index <HASH>..<HASH> 100644 --- a/lib/parse/model/model.rb +++ b/lib/parse/model/model.rb @@ -91,8 +91,8 @@ class String end; #users for properties: ex. :users -> "_User" or :songs -> Song - def to_parse_class - final_class = self.singularize.camelize + def to_parse_class(singularize: false) + final_class = singularize ? self.singularize.camelize : self.camelize klass = Parse::Model.find_class(final_class) || Parse::Model.find_class(self) #handles the case that a class has a custom parse table final_class = klass.parse_class if klass.present? @@ -114,7 +114,7 @@ class Symbol to_s.camelize end - def to_parse_class - to_s.to_parse_class + def to_parse_class(singularize: false) + to_s.to_parse_class(singularize: singularize) end end
The use of singularize is now optional. Off by default
diff --git a/lib/test.js b/lib/test.js index <HASH>..<HASH> 100644 --- a/lib/test.js +++ b/lib/test.js @@ -1267,7 +1267,7 @@ class Test extends Base { } resolves (promise, message, extra) { - this.currentAssert = Test.prototype.rejects + this.currentAssert = Test.prototype.resolves if (message && typeof message === 'object') extra = message, message = '' @@ -1304,7 +1304,7 @@ class Test extends Base { } resolveMatch (promise, wanted, message, extra) { - this.currentAssert = Test.prototype.rejects + this.currentAssert = Test.prototype.resolveMatch if (message && typeof message === 'object') extra = message, message = ''
correct currentAssert in t.resolves/resolveMatch
diff --git a/src/Composer/Compiler.php b/src/Composer/Compiler.php index <HASH>..<HASH> 100644 --- a/src/Composer/Compiler.php +++ b/src/Composer/Compiler.php @@ -118,7 +118,7 @@ class Compiler $finder = new Finder(); $finder->files() ->ignoreVCS(true) - ->notPath('/\/(composer\.(json|lock)|[A-Z]+\.md|\.gitignore|appveyor.yml|phpunit\.xml\.dist|phpstan\.neon\.dist|phpstan-config\.neon|phpstan-baseline\.neon)$/') + ->notPath('/\/(composer\.(json|lock)|[A-Z]+\.md(?:own)?|\.gitignore|appveyor.yml|phpunit\.xml\.dist|phpstan\.neon\.dist|phpstan-config\.neon|phpstan-baseline\.neon)$/') ->notPath('/bin\/(jsonlint|validate-json|simple-phpunit|phpstan|phpstan\.phar)(\.bat)?$/') ->notPath('justinrainbow/json-schema/demo/') ->notPath('justinrainbow/json-schema/dist/')
Fix handling of .mdown files in phar compiler
diff --git a/src/jquery.fancytree.wide.js b/src/jquery.fancytree.wide.js index <HASH>..<HASH> 100644 --- a/src/jquery.fancytree.wide.js +++ b/src/jquery.fancytree.wide.js @@ -143,7 +143,7 @@ $.ui.fancytree.registerExtension({ } this._local.measureUnit = iconWidthUnit; this._local.levelOfs = parseFloat(levelOfs); - this._local.lineOfs = (ctx.options.checkbox ? 3 : 2) * (iconWidth + iconSpacing) + iconSpacing; + this._local.lineOfs = (1 + (ctx.options.checkbox ? 1 : 0) + (ctx.options.icons ? 1 : 0)) * (iconWidth + iconSpacing) + iconSpacing; this._local.maxDepth = 10; // Get/Set a unique Id on the container (if not already exists)
Check if the user is using icons or checkboxes The old version only checked for checkboxes, so if the user had icons disabled it would mess up formatting. This commit fixes that.
diff --git a/lib/processes.js b/lib/processes.js index <HASH>..<HASH> 100644 --- a/lib/processes.js +++ b/lib/processes.js @@ -156,9 +156,21 @@ function services(srv, callback) { srvs = srvString.split('|'); } } catch (f) { - // allSrv = []; - srvString = ''; - srvs = []; + try { + const tmpsrv = execSync('systemctl --type=service --no-legend 2> /dev/null').toString().split('\n'); + srvs = []; + for (const s of tmpsrv) { + const name = s.split('.service')[0]; + if (name) { + srvs.push(name); + } + } + srvString = srvs.join('|'); + } catch (g) { + // allSrv = []; + srvString = ''; + srvs = []; + } } } }
added service list on RHEL, CentOS 7.x/8.x
diff --git a/lib/Doctrine/Hydrate.php b/lib/Doctrine/Hydrate.php index <HASH>..<HASH> 100644 --- a/lib/Doctrine/Hydrate.php +++ b/lib/Doctrine/Hydrate.php @@ -855,9 +855,9 @@ class Doctrine_Hydrate implements Serializable $relation = $this->_aliasMap[$cache[$key]['alias']]['relation']; // check the type of the relation if ( ! $relation->isOneToOne()) { - if ($prev[$parent][$component] instanceof Doctrine_Record) { + /*if ($prev[$parent][$component] instanceof Doctrine_Record) { throw new Exception(); - } + }*/ $prev[$parent][$component][] = $element; $driver->registerCollection($prev[$parent][$component]); @@ -894,7 +894,8 @@ class Doctrine_Hydrate implements Serializable } } foreach ($currData as $alias => $data) { - $componentName = $this->_aliasMap[$alias]['table']->getComponentName(); + $table = $this->_aliasMap[$alias]['table']; + $componentName = $table->getComponentName(); // component changed $identifiable = $driver->isIdentifiable($currData[$alias], $table);
Bugfix for parseData2(). Unrelated to the issues mentioned in my previous commit.