diff
stringlengths
65
26.7k
message
stringlengths
7
9.92k
diff --git a/library/pulse/script/cache.rb b/library/pulse/script/cache.rb index <HASH>..<HASH> 100644 --- a/library/pulse/script/cache.rb +++ b/library/pulse/script/cache.rb @@ -1,14 +1,16 @@ # encoding: utf-8 module Pulse - class Cache - def initialize script - @script = script - end + class Script + class Cache + def initialize script + @script = script + end - private - def path - File.expand_path $0 + private + def path + "#{File.expand_path $0}/cache/#{@script.name}_#{@index}" + end end end end
Fixed namespacing of script cache and corrected Cache#path
diff --git a/bulbs/__init__.py b/bulbs/__init__.py index <HASH>..<HASH> 100644 --- a/bulbs/__init__.py +++ b/bulbs/__init__.py @@ -1 +1 @@ -__version__ = "0.3.18" +__version__ = "0.3.19"
Bumping version [ci skip]
diff --git a/embed_video/fields.py b/embed_video/fields.py index <HASH>..<HASH> 100644 --- a/embed_video/fields.py +++ b/embed_video/fields.py @@ -47,6 +47,6 @@ class EmbedVideoFormField(forms.URLField): except UnknownBackendException: raise forms.ValidationError(_(u'URL could not be recognized.')) except UnknownIdException: - raise forms.ValidationError(_(u'ID of this video could not be \ - recognized.')) + raise forms.ValidationError(_(u'ID of this video could not be ' + u'recognized.')) return url
Fix string formating There is a lot of spaces in this error message. By the way: this is never raised in normal condition. The `detect_backend` doesn't try to `get_code()` at all.
diff --git a/Eloquent/Model.php b/Eloquent/Model.php index <HASH>..<HASH> 100644 --- a/Eloquent/Model.php +++ b/Eloquent/Model.php @@ -786,15 +786,15 @@ abstract class Model implements ArrayAccess, Arrayable, Jsonable, JsonSerializab $relation = $caller['function']; } + $instance = new $related; + // If no foreign key was supplied, we can use a backtrace to guess the proper // foreign key name by using the name of the relationship function, which // when combined with an "_id" should conventionally match the columns. if (is_null($foreignKey)) { - $foreignKey = Str::snake($relation).'_id'; + $foreignKey = Str::snake($relation).'_' . $instance->getKeyName(); } - $instance = new $related; - if (! $instance->getConnectionName()) { $instance->setConnection($this->connection); }
default foreign key for belongsTo relationship is now dynamic
diff --git a/maildir_deduplicate/tests/test_cli.py b/maildir_deduplicate/tests/test_cli.py index <HASH>..<HASH> 100644 --- a/maildir_deduplicate/tests/test_cli.py +++ b/maildir_deduplicate/tests/test_cli.py @@ -81,7 +81,7 @@ class TestHashCLI(CLITestCase): """).encode('utf-8') with self.runner.isolated_filesystem(): - with open('mail.txt', 'w') as f: + with open('mail.txt', 'wb') as f: f.write(message) result = self.runner.invoke(cli, ['hash', 'mail.txt'])
Fix python 3 binary write.
diff --git a/src/org/opencms/workplace/commons/CmsPublishScheduled.java b/src/org/opencms/workplace/commons/CmsPublishScheduled.java index <HASH>..<HASH> 100644 --- a/src/org/opencms/workplace/commons/CmsPublishScheduled.java +++ b/src/org/opencms/workplace/commons/CmsPublishScheduled.java @@ -263,8 +263,11 @@ public class CmsPublishScheduled extends CmsDialog { String userName = getCms().getRequestContext().getCurrentUser().getName(); // get the java date format - DateFormat dateFormat = DateFormat.getDateTimeInstance(DateFormat.SHORT, DateFormat.SHORT, getLocale()); - Date date = dateFormat.parse(publishScheduledDate); + // DateFormat dateFormat = DateFormat.getDateTimeInstance(DateFormat.SHORT, DateFormat.SHORT, getLocale()); + // dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm"); + // Date date = dateFormat.parse(publishScheduledDate); + long lDate = org.opencms.widgets.CmsCalendarWidget.getCalendarDate(getMessages(), publishScheduledDate, true); + Date date = new Date(lDate); // check if the selected date is in the future if (date.getTime() < new Date().getTime()) {
Improved date handling in CmsPublishScheduled (orginally commited by sschneider in branch 9_0_0_solr, commit <I>de5a3bdaf<I>cd<I>bb7b<I>cfc<I>c<I>)
diff --git a/examples/simulations/gyroscope2.py b/examples/simulations/gyroscope2.py index <HASH>..<HASH> 100644 --- a/examples/simulations/gyroscope2.py +++ b/examples/simulations/gyroscope2.py @@ -62,7 +62,7 @@ for i, t in enumerate(pb.range()): gaxis = (Lshaft + 0.03) * vector(st * sp, ct, st * cp) # set orientation along gaxis and rotate it around its axis by psidot*t degrees - gyro.orientation(gaxis, rotation=psidot * t * 57.3) + gyro.orientation(gaxis, rotation=psidot * t, rad=True) if not i % 200: # add trace and render all, every 200 iterations vp.add(Point(gaxis, r=3, c="r")) vp.show()
Updated deg<-> rad conversion in examples/simulations/gyroscope2.py
diff --git a/src/XeroPHP/Remote/Object.php b/src/XeroPHP/Remote/Object.php index <HASH>..<HASH> 100644 --- a/src/XeroPHP/Remote/Object.php +++ b/src/XeroPHP/Remote/Object.php @@ -406,12 +406,12 @@ abstract class Object implements ObjectInterface, \JsonSerializable { } /** - * JSON Encode overload to putt out hidden properties + * JSON Encode overload to pull out hidden properties * * @return string */ public function jsonSerialize(){ - return json_encode($this->toStringArray()); + return $this->toStringArray(); } } \ No newline at end of file
Again for #<I>, corrected so JSON is at the root, and fixed doc
diff --git a/src/SelectionControls/SearchControl/SearchControlViewBridge.js b/src/SelectionControls/SearchControl/SearchControlViewBridge.js index <HASH>..<HASH> 100644 --- a/src/SelectionControls/SearchControl/SearchControlViewBridge.js +++ b/src/SelectionControls/SearchControl/SearchControlViewBridge.js @@ -406,9 +406,13 @@ searchControl.prototype.createResultItemDom = function (item) { for (var i = 0; i < this.model.resultColumns.length; i++) { var column = this.model.resultColumns[i]; - if (typeof item.data[column] != 'undefined') { + // Slightly unorthodox but using eval allows for the column to contain 'dots' to + // descend into nested data structures in the item data. + var itemValue = eval('item.data.' + column); + + if (typeof itemValue != 'undefined') { var td = document.createElement('td'); - td.appendChild(document.createTextNode(item.data[column])); + td.appendChild(document.createTextNode(itemValue)); itemDom.appendChild(td); } else {
Now supports result columns the descend into nested data structures
diff --git a/lib/Gregwar/Image.php b/lib/Gregwar/Image.php index <HASH>..<HASH> 100644 --- a/lib/Gregwar/Image.php +++ b/lib/Gregwar/Image.php @@ -551,6 +551,14 @@ class Image } /** + * Tostring defaults to jpeg + */ + public function __toString() + { + return $this->jpeg(); + } + + /** * Create an instance, usefull for one-line chaining */ public static function open($file = '')
Added __toString() method
diff --git a/tests/Unit/Suites/ContentDelivery/Catalog/AbstractProductListingRequestHandlerTest.php b/tests/Unit/Suites/ContentDelivery/Catalog/AbstractProductListingRequestHandlerTest.php index <HASH>..<HASH> 100644 --- a/tests/Unit/Suites/ContentDelivery/Catalog/AbstractProductListingRequestHandlerTest.php +++ b/tests/Unit/Suites/ContentDelivery/Catalog/AbstractProductListingRequestHandlerTest.php @@ -404,7 +404,7 @@ abstract class AbstractProductListingRequestHandlerTest extends \PHPUnit_Framewo * @runInSeparateProcess * @requires extension xdebug */ - public function testProductsPrePageCookieIsSetIfCorrespondingQueryParameterIsPresent() + public function testProductsPerPageCookieIsSetIfCorrespondingQueryParameterIsPresent() { $selectedNumberOfProductsPerPage = 2;
Issue #<I>: Fix typo in test method name
diff --git a/zuul-core/src/main/java/com/netflix/netty/common/proxyprotocol/OptionalHAProxyMessageDecoder.java b/zuul-core/src/main/java/com/netflix/netty/common/proxyprotocol/OptionalHAProxyMessageDecoder.java index <HASH>..<HASH> 100644 --- a/zuul-core/src/main/java/com/netflix/netty/common/proxyprotocol/OptionalHAProxyMessageDecoder.java +++ b/zuul-core/src/main/java/com/netflix/netty/common/proxyprotocol/OptionalHAProxyMessageDecoder.java @@ -42,7 +42,7 @@ public class OptionalHAProxyMessageDecoder extends ChannelInboundHandlerAdapter { public static final String NAME = "OptionalHAProxyMessageDecoder"; private static final Logger logger = LoggerFactory.getLogger("OptionalHAProxyMessageDecoder"); - CachedDynamicBooleanProperty dumpHAProxyByteBuf = new CachedDynamicBooleanProperty("zuul.haproxy.dump.bytebuf", false); + private static final CachedDynamicBooleanProperty dumpHAProxyByteBuf = new CachedDynamicBooleanProperty("zuul.haproxy.dump.bytebuf", false); @Override public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception
Make the FP a static copy.
diff --git a/index.js b/index.js index <HASH>..<HASH> 100644 --- a/index.js +++ b/index.js @@ -420,6 +420,8 @@ class Hyperdrive extends Nanoresource { } catch (err) { return cb(err) } + } else if (chunk.left) { + entry.value = chunk.left.info } return cb(null, entry) })
Diff stream should return mount info on mount events
diff --git a/src/main/java/hex/Layer.java b/src/main/java/hex/Layer.java index <HASH>..<HASH> 100644 --- a/src/main/java/hex/Layer.java +++ b/src/main/java/hex/Layer.java @@ -22,7 +22,7 @@ public abstract class Layer extends Iced { @ParamsSearch.Ignore public int units; - protected NeuralNet params; + public NeuralNet params; // Layer state: activity, error protected transient float[] _a, _e; @@ -916,9 +916,9 @@ public abstract class Layer extends Iced { public static void shareWeights(Layer src, Layer dst) { dst._w = src._w; - dst._b = src._b; + if (dst._b == null || dst._b.length == src._b.length) dst._b = src._b; dst._wm = src._wm; - dst._bm = src._bm; + if (dst._bm == null || dst._bm.length == src._bm.length) dst._bm = src._bm; } public static void shareWeights(Layer[] src, Layer[] dst) {
Make params public and add size guards during sharing of layer weights and biases.
diff --git a/lib/commoner.js b/lib/commoner.js index <HASH>..<HASH> 100644 --- a/lib/commoner.js +++ b/lib/commoner.js @@ -241,14 +241,6 @@ Cp.cliBuildP = function(version) { // Ignore dependencies because we wouldn't know how to find them. this.ignoreDependencies = true; - } else if (stats.isFile(first)) { - sourceDir = workingDir; - outputDir = absolutePath(workingDir, args.pop()); - roots = args.map(fileToId); - - // Ignore dependencies because we wouldn't know how to find them. - this.ignoreDependencies = true; - } else if (stats.isDirectory(first)) { sourceDir = first; outputDir = absolutePath(workingDir, args[1]);
Abandon the no-source-directory, multiple-file usage pattern. In practice this is never what one wants. Instead of doing bin/commonize file1.js file2.js file3.js output/ one should simply use the directory-first pattern: bin/commonize . output/ file1 file2 file3
diff --git a/plank/cli.py b/plank/cli.py index <HASH>..<HASH> 100644 --- a/plank/cli.py +++ b/plank/cli.py @@ -8,12 +8,14 @@ from .runner import Runner def list_available_tasks(ctx, param, value): + sys.path.insert(0, os.getcwd()) if not value or ctx.resilient_parsing: return tasks = Inspector().get_tasks() print 'Available tasks:' for task in tasks.values(): print '\t{0}'.format(task.name) + sys.path.pop(0) ctx.exit()
Add the cwd into the python path when running --list
diff --git a/contrib/externs/angular-material.js b/contrib/externs/angular-material.js index <HASH>..<HASH> 100644 --- a/contrib/externs/angular-material.js +++ b/contrib/externs/angular-material.js @@ -93,7 +93,7 @@ md.$dialog = function() {}; * locals: (Object|undefined), * resolve: (Object|undefined), * controllerAs: (string|undefined), - * parent: (Element|undefined) + * parent: (angular.JQLite|Element|undefined) * }} */ md.$dialog.options;
Update $mdDialog.show parent option to have type angular.JQLite ------------- Created by MOE: <URL>
diff --git a/core/src/main/java/jenkins/security/CallableDirectionChecker.java b/core/src/main/java/jenkins/security/CallableDirectionChecker.java index <HASH>..<HASH> 100644 --- a/core/src/main/java/jenkins/security/CallableDirectionChecker.java +++ b/core/src/main/java/jenkins/security/CallableDirectionChecker.java @@ -39,8 +39,7 @@ public class CallableDirectionChecker extends CallableDecorator { // no annotation provided, so we don't know. // to err on the correctness we'd let it pass with reporting, which // provides auditing trail. - if (LOGGER.isLoggable(Level.FINE)) - LOGGER.fine("Unchecked callable from "+computer.getName()+": "+c); + LOGGER.log(Level.WARNING, "Unchecked callable from {0}: {1}", new Object[] {computer.getName(), c}); return stem; }
For now, at least print warnings about unmarked callables.
diff --git a/core/src/main/java/org/kohsuke/stapler/Stapler.java b/core/src/main/java/org/kohsuke/stapler/Stapler.java index <HASH>..<HASH> 100644 --- a/core/src/main/java/org/kohsuke/stapler/Stapler.java +++ b/core/src/main/java/org/kohsuke/stapler/Stapler.java @@ -1023,7 +1023,7 @@ public class Stapler extends HttpServlet { * Extensions that look like text files. */ private static final Set<String> TEXT_FILES = new HashSet<String>(Arrays.asList( - "css","js","html","txt","java","htm","c","cpp","h","rb","pl","py","xml" + "css","js","html","txt","java","htm","c","cpp","h","rb","pl","py","xml","json" )); /**
allow JSON responses to be compressed when serving with serveStaticResource
diff --git a/common/session/class.BasicSession.php b/common/session/class.BasicSession.php index <HASH>..<HASH> 100644 --- a/common/session/class.BasicSession.php +++ b/common/session/class.BasicSession.php @@ -29,9 +29,12 @@ */ use oat\oatbox\user\User; use oat\oatbox\Refreshable; +use Zend\ServiceManager\ServiceLocatorAwareInterface; +use Zend\ServiceManager\ServiceLocatorAwareTrait; -class common_session_BasicSession implements common_session_Session +class common_session_BasicSession implements common_session_Session, ServiceLocatorAwareInterface { + use ServiceLocatorAwareTrait; /** * @var common_user_User */
basic session is now service locator aware
diff --git a/tests/test_halo.py b/tests/test_halo.py index <HASH>..<HASH> 100644 --- a/tests/test_halo.py +++ b/tests/test_halo.py @@ -453,6 +453,23 @@ class TestHalo(unittest.TestCase): except ValueError as e: self.fail('Attempted to write to a closed stream: {}'.format(e)) + def test_closing_stream_before_persistent(self): + """Test no I/O is performed on streams closed before stop_and_persist is called + """ + stream = io.StringIO() + spinner = Halo(text='foo', stream=stream) + spinner.start() + time.sleep(0.5) + + # no exception raised after closing the stream means test was successful + try: + stream.close() + + time.sleep(0.5) + spinner.stop_and_persist('done') + except ValueError as e: + self.fail('Attempted to write to a closed stream: {}'.format(e)) + def test_setting_enabled_property(self): """Test if spinner stops writing when enabled property set to False """
Added a test that passes after the fix
diff --git a/lib/winrm/shells/base.rb b/lib/winrm/shells/base.rb index <HASH>..<HASH> 100644 --- a/lib/winrm/shells/base.rb +++ b/lib/winrm/shells/base.rb @@ -86,7 +86,11 @@ module WinRM # Closes the shell if one is open def close return unless shell_id - self.class.close_shell(connection_opts, transport, shell_id) + begin + self.class.close_shell(connection_opts, transport, shell_id) + rescue WinRMWSManFault => e + raise unless [ERROR_OPERATION_ABORTED, SHELL_NOT_FOUND].include?(e.fault_code) + end remove_finalizer @shell_id = nil end diff --git a/tests/spec/shells/base_spec.rb b/tests/spec/shells/base_spec.rb index <HASH>..<HASH> 100644 --- a/tests/spec/shells/base_spec.rb +++ b/tests/spec/shells/base_spec.rb @@ -212,5 +212,14 @@ describe DummyShell do subject.close expect(subject.shell_id).to be(nil) end + + context 'when shell was not found' do + it 'does not raise' do + subject.run(command, arguments) + expect(DummyShell).to receive(:close_shell) + .and_raise(WinRM::WinRMWSManFault.new('oops', '2150858843')) + expect { subject.close }.not_to raise_error + end + end end end
Ignore error <I> during shell closing It is possible to get wsman error code <I> when closing shell. This patch protects against raising and ignore the error (after all the shell is closed) Change-Id: I7af5cb<I>a<I>dc4ad4d<I>fe<I>b<I>b3de<I>
diff --git a/tests/test_PGPKeyring.py b/tests/test_PGPKeyring.py index <HASH>..<HASH> 100644 --- a/tests/test_PGPKeyring.py +++ b/tests/test_PGPKeyring.py @@ -110,6 +110,9 @@ class TestPGPKeyring: # verify the signature ourselves first assert k.verify("tests/testdata/unsigned_message", str(sig).encode()) + # verify that the secret key material was destroyed and that seckey_material is now empty + assert k.seckeys["C4BC77CEAD66AAD5"].keypkt.seckey_material.empty + # now write out to a file and test with gpg with open('tests/testdata/unsigned_message.asc', 'w') as sigf: sigf.write(str(sig))
add another bit to this test. closes #<I>
diff --git a/lib/dalli/server.rb b/lib/dalli/server.rb index <HASH>..<HASH> 100644 --- a/lib/dalli/server.rb +++ b/lib/dalli/server.rb @@ -363,7 +363,7 @@ module Dalli def write(bytes) begin @sock.write(bytes) - rescue SystemCallError + rescue SystemCallError, Timeout::Error failure! retry end
Catch and handle write timeouts, fixes GH-<I>
diff --git a/test/integration/054_adapter_methods_test/test_adapter_methods.py b/test/integration/054_adapter_methods_test/test_adapter_methods.py index <HASH>..<HASH> 100644 --- a/test/integration/054_adapter_methods_test/test_adapter_methods.py +++ b/test/integration/054_adapter_methods_test/test_adapter_methods.py @@ -1,6 +1,4 @@ from test.integration.base import DBTIntegrationTest, use_profile -from dbt.adapters.bigquery import GrantTarget -from google.cloud.bigquery import AccessEntry import yaml @@ -92,6 +90,9 @@ class TestGrantAccess(DBTIntegrationTest): @use_profile('bigquery') def test_bigquery_adapter_methods(self): + from dbt.adapters.bigquery import GrantTarget + from google.cloud.bigquery import AccessEntry + self.run_dbt(['compile']) # trigger any compile-time issues self.run_sql_file("seed_bq.sql") self.run_dbt(['seed'])
Moved bigquery imports into bigquery test
diff --git a/ehforwarderbot/channel.py b/ehforwarderbot/channel.py index <HASH>..<HASH> 100644 --- a/ehforwarderbot/channel.py +++ b/ehforwarderbot/channel.py @@ -238,7 +238,7 @@ class EFBChannel(ABC): """ raise NotImplementedError() - def get_message_by_id(self, msg_id: str) -> Optional['EFBMsg']: + def get_message_by_id(self, chat_uid: str, msg_id: str) -> Optional['EFBMsg']: """ Get message entity by its ID. Applicable to both master channels and slave channels. @@ -247,5 +247,9 @@ class EFBChannel(ABC): Override this method and raise :exc:`~.exceptions.EFBOperationNotSupported` if it is not feasible to perform this for your platform. + + Args: + chat_uid: Unique ID of chat in slave channel / middleware. + msg_id: ID of message from the chat in slave channel / middleware. """ raise NotImplementedError()
Fix EFBChannel.get_message_by_id() definition.
diff --git a/test/package.js b/test/package.js index <HASH>..<HASH> 100644 --- a/test/package.js +++ b/test/package.js @@ -5,7 +5,7 @@ import pify from 'pify'; import index from '../'; test('Every rule is defined in index file', async t => { - const files = await pify(fs.readdir)('../rules'); + const files = await pify(fs.readdir)('rules'); const ruleFiles = files.filter(file => path.extname(file) === '.js'); for (const file of ruleFiles) {
fix package test (#<I>)
diff --git a/lib/repository/base/version.rb b/lib/repository/base/version.rb index <HASH>..<HASH> 100644 --- a/lib/repository/base/version.rb +++ b/lib/repository/base/version.rb @@ -4,6 +4,6 @@ module Repository class Base # Gem version, following [RubyGems.org](https://rubygems.org) and # [SemVer](http://semver.org/) conventions. - VERSION = '0.1.1' + VERSION = '0.1.2' end end
Bumped version number to <I>. No code/spec changes. RSpec: <I> examples, 0 failures; <I>/<I> LOC (<I>%) covered RuboCop: <I> files inspected, no offenses detected
diff --git a/sb.js b/sb.js index <HASH>..<HASH> 100644 --- a/sb.js +++ b/sb.js @@ -76,9 +76,7 @@ $ = function(selector, root) { } var nodeList = new sb.nodeList(); - - nodeList.setSelector(selector); - + nodeList.selector = selector; if(document.querySelectorAll){ nodeList.add(root.querySelectorAll(selector)); @@ -86,11 +84,12 @@ $ = function(selector, root) { } else { $.parseSelectors(nodeList, root); } + if(nodeList.length() === 0 && nodeList.selector.match(/^\#\w+$/) ){ return null; } else if(nodeList.length() == 1 && (nodeList.selector.match(/^\#\w+$/) || sb.nodeList.singleTags.some(function(v){return v === nodeList.selector;}))){ - + return nodeList.nodes[0]; } else { return nodeList; @@ -1164,7 +1163,7 @@ sb.nodeList.prototype = { */ add : function(nodes){ - nodes = (nodes instanceof Array || nodes instanceof NodeList) ? nodes : [nodes]; + nodes = (nodes instanceof Array || (typeof NodeList !='undefined' && nodes instanceof NodeList)) ? nodes : [nodes]; var len = nodes.length;
Bug FIx: There was a problem with QuerySelector all in Safari working with single #id tags in $
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -7,7 +7,7 @@ license: GNU-GPL2 from setuptools import setup setup(name='pyprofiler', - version='37', + version='38', description='Profiler utility for python, graphical and textual, whole program or segments', url='https://github.com/erikdejonge/pyprofiler', author='Erik de Jonge',
pip Thursday <I> April <I> (week:<I> day:<I>), <I>:<I>:<I>
diff --git a/src/gform-app/cms/createValueFactory.js b/src/gform-app/cms/createValueFactory.js index <HASH>..<HASH> 100644 --- a/src/gform-app/cms/createValueFactory.js +++ b/src/gform-app/cms/createValueFactory.js @@ -18,7 +18,7 @@ define([], function () { }, createPartial: function (templateStore) { var template = this._createTemplate(); - template.group.attributes.push(this._createNameAttribute()); + //template.group.attributes.push(this._createNameAttribute()); return template; },
partial does not need to have a name
diff --git a/packages/babel-plugin-transform-es2015-block-scoping/src/index.js b/packages/babel-plugin-transform-es2015-block-scoping/src/index.js index <HASH>..<HASH> 100644 --- a/packages/babel-plugin-transform-es2015-block-scoping/src/index.js +++ b/packages/babel-plugin-transform-es2015-block-scoping/src/index.js @@ -93,7 +93,7 @@ function replace(path, node, scope, remaps) { let ownBinding = scope.getBindingIdentifier(node.name); if (ownBinding === remap.binding) { - node.name = remap.uid; + scope.rename(node.name, remap.uid); } else { // scope already has it's own binding that doesn't // match the one we have a stored replacement for
rename scope bindings during block scope transform
diff --git a/pymatgen/io/core.py b/pymatgen/io/core.py index <HASH>..<HASH> 100644 --- a/pymatgen/io/core.py +++ b/pymatgen/io/core.py @@ -46,9 +46,9 @@ class InputFile(MSONable): with open(filename, "wt") as f: f.write(self.__str__()) - @staticmethod + @classmethod @abc.abstractmethod - def from_string(contents): + def from_string(cls, contents: str): """ Create an InputFile object from a string
InputFile: from_string as classmethod
diff --git a/setuptools/tests/config/downloads/__init__.py b/setuptools/tests/config/downloads/__init__.py index <HASH>..<HASH> 100644 --- a/setuptools/tests/config/downloads/__init__.py +++ b/setuptools/tests/config/downloads/__init__.py @@ -1,5 +1,7 @@ import re +import time from pathlib import Path +from urllib.error import HTTPError from urllib.request import urlopen __all__ = ["DOWNLOAD_DIR", "retrieve_file", "output_file", "urls_from_file"] @@ -21,14 +23,18 @@ def output_file(url: str, download_dir: Path = DOWNLOAD_DIR): return Path(download_dir, re.sub(r"[^\-_\.\w\d]+", "_", file_name)) -def retrieve_file(url: str, download_dir: Path = DOWNLOAD_DIR): +def retrieve_file(url: str, download_dir: Path = DOWNLOAD_DIR, wait: float = 5): path = output_file(url, download_dir) if path.exists(): print(f"Skipping {url} (already exists: {path})") else: download_dir.mkdir(exist_ok=True, parents=True) print(f"Downloading {url} to {path}") - download(url, path) + try: + download(url, path) + except HTTPError: + time.sleep(wait) # wait a few seconds and try again. + download(url, path) return path
Try to rescue the download backing off a few seconds
diff --git a/test/db/hsqldb.rb b/test/db/hsqldb.rb index <HASH>..<HASH> 100644 --- a/test/db/hsqldb.rb +++ b/test/db/hsqldb.rb @@ -7,6 +7,7 @@ ActiveRecord::Base.establish_connection(config) at_exit { # Clean up hsqldb when done - Dir['test.db*'].each {|f| File.delete(f)} - File.delete('hsqldb-testdb.log') rescue nil #can't delete on windows + require "fileutils" + Dir['test.db*'].each {|f| FileUtils.rm_rf(f)} + FileUtils.rm_rf('hsqldb-testdb.log') rescue nil #can't delete on windows }
Small tweak to the way hsqldb is cleaned up to be compatible with <I>
diff --git a/lib/vcap/request.rb b/lib/vcap/request.rb index <HASH>..<HASH> 100644 --- a/lib/vcap/request.rb +++ b/lib/vcap/request.rb @@ -8,8 +8,7 @@ module VCAP end def current_id - Thread.current[:vcap_request_id] or - raise 'No request id is set' + Thread.current[:vcap_request_id] end end end diff --git a/spec/unit/request_spec.rb b/spec/unit/request_spec.rb index <HASH>..<HASH> 100644 --- a/spec/unit/request_spec.rb +++ b/spec/unit/request_spec.rb @@ -22,10 +22,8 @@ module VCAP end context "when it hasn't been set" do - it 'raises an exception' do - expect { - described_class.current_id - }.to raise_error('No request id is set') + it 'returns nil' do + described_class.current_id.should be_nil end end end
Don't raise exception when request id is unset [#<I>]
diff --git a/lib/memfs/file.rb b/lib/memfs/file.rb index <HASH>..<HASH> 100644 --- a/lib/memfs/file.rb +++ b/lib/memfs/file.rb @@ -337,11 +337,7 @@ module MemFs end def world_writable? - if (entry.mode & Fake::Entry::OWRITE).nonzero? - entry.mode - else - nil - end + entry.mode if (entry.mode & Fake::Entry::OWRITE).nonzero? end def sticky?
Simplifying Stat.world_writable?
diff --git a/tests/frontend/org/voltdb/canonicalddl/TestCanonicalDDLThroughSQLcmd.java b/tests/frontend/org/voltdb/canonicalddl/TestCanonicalDDLThroughSQLcmd.java index <HASH>..<HASH> 100644 --- a/tests/frontend/org/voltdb/canonicalddl/TestCanonicalDDLThroughSQLcmd.java +++ b/tests/frontend/org/voltdb/canonicalddl/TestCanonicalDDLThroughSQLcmd.java @@ -145,7 +145,7 @@ public class TestCanonicalDDLThroughSQLcmd extends AdhocDDLTestBase { private int callSQLcmd(String ddl, boolean fastModeDDL) throws Exception { String commandPath = "bin/sqlcmd"; - final long timeout = 300000; // 300,000 millis -- give up after 5 minutes of trying. + final long timeout = 600000; // 600,000 millis -- give up after 10 minutes of trying. File f = new File("ddl.sql"); f.deleteOnExit(); @@ -173,7 +173,7 @@ public class TestCanonicalDDLThroughSQLcmd extends AdhocDDLTestBase { long elapsedtime = 0; long pollcount = 0; do { - Thread.sleep(1000); + Thread.sleep(2000); try { int exitValue = process.exitValue(); // Only verbosely report the successful exit after verbosely reporting a delay.
testCanonicalDDLRoundtrip waits longer for success
diff --git a/v3/buildpacks_test.go b/v3/buildpacks_test.go index <HASH>..<HASH> 100644 --- a/v3/buildpacks_test.go +++ b/v3/buildpacks_test.go @@ -63,11 +63,11 @@ var _ = Describe("buildpack", func() { }) It("Stages with a user specified github buildpack", func() { - StageBuildpackPackage(packageGuid, "http://github.com/cloudfoundry/go-buildpack") + StageBuildpackPackage(packageGuid, "http://github.com/cloudfoundry/ruby-buildpack") Eventually(func() *Session { return FetchRecentLogs(appGuid, token, config) - }, 3*time.Minute, 10*time.Second).Should(Say("Godep")) + }, 3*time.Minute, 10*time.Second).Should(Say("Compiling Ruby/Rack")) }) It("uses buildpack cache for staging", func() {
Use correct buildpack for pushing dora
diff --git a/collab/CollabClient.js b/collab/CollabClient.js index <HASH>..<HASH> 100644 --- a/collab/CollabClient.js +++ b/collab/CollabClient.js @@ -41,9 +41,9 @@ class CollabClient extends EventEmitter { */ _onMessage(msg) { if (msg.scope === this.scope) { - this.emit('message', msg) - } else { - console.info('Message ignored. Not sent in hub scope', msg) + this.emit('message', msg); + } else if (msg.scope !== '_internal') { + console.info('Message ignored. Not sent in hub scope', msg); } }
Don't warn about the `{type: "highfive", scope: "_internal"}` message This message is sent by the `CollabServer`. This change simply removes the distracting console warning every <I>s. I'm not sure that this is the best way to deal with this long term.
diff --git a/lib/AuthHelper.php b/lib/AuthHelper.php index <HASH>..<HASH> 100644 --- a/lib/AuthHelper.php +++ b/lib/AuthHelper.php @@ -28,8 +28,11 @@ class AuthHelper else { $protocol = 'http'; } + + $url = $protocol . '://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']; + $url = false !== ($qsPos = strpos($url, '?')) ? substr($url, 0, $qsPos) : $url; // remove query params - return "$protocol://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]"; + return $url; } /**
Remove query params from current url
diff --git a/ella/db/models.py b/ella/db/models.py index <HASH>..<HASH> 100644 --- a/ella/db/models.py +++ b/ella/db/models.py @@ -35,21 +35,15 @@ class Publishable(Model): current_site = Site.objects.get_current() - try: - # TODO: what if have got multiple listings on one site? - placements = get_cached_list( - Placement, - target_ct=ContentType.objects.get_for_model(self.__class__), - target_id=self.pk, - category__site=current_site, + # TODO: what if have got multiple listings on one site? + placements = get_cached_list( + Placement, + target_ct=ContentType.objects.get_for_model(self.__class__), + target_id=self.pk, + category__site=current_site, ) - if len(placements): - self._main_placement = placements[0] - else: - self._main_placement = None - return self._main_placement - except Placement.DoesNotExist: - self._main_placement = None + if placements: + return placements[0] try: # TODO - check and if we don't have category, take the only placement that exists in current site @@ -59,7 +53,6 @@ class Publishable(Model): target_id=self.pk, category=self.category_id ) - return self._main_placement except Placement.DoesNotExist: self._main_placement = None
Updated publishable.main_placement to work for placements on other sites git-svn-id: <URL>
diff --git a/extensions/gii/generators/crud/Generator.php b/extensions/gii/generators/crud/Generator.php index <HASH>..<HASH> 100644 --- a/extensions/gii/generators/crud/Generator.php +++ b/extensions/gii/generators/crud/Generator.php @@ -67,7 +67,7 @@ class Generator extends \yii\gii\Generator [['modelClass'], 'validateClass', 'params' => ['extends' => BaseActiveRecord::className()]], [['baseControllerClass'], 'validateClass', 'params' => ['extends' => Controller::className()]], [['controllerClass'], 'match', 'pattern' => '/Controller$/', 'message' => 'Controller class name must be suffixed with "Controller".'], - [['controllerClass'], 'match', 'pattern' => '/[A-Z0-9][^\\]+Controller$/', 'message' => 'Controller class name must start with an uppercase letter.'], + [['controllerClass'], 'match', 'pattern' => '/(^|\\\\)[A-Z0-9][^\\\\]+Controller$/', 'message' => 'Controller class name must start with an uppercase letter.'], [['controllerClass', 'searchModelClass'], 'validateNewClass'], [['indexWidgetType'], 'in', 'range' => ['grid', 'list']], [['modelClass'], 'validateModelClass'],
Fixed regex-escaping in crudgenerator
diff --git a/src/Manager.php b/src/Manager.php index <HASH>..<HASH> 100644 --- a/src/Manager.php +++ b/src/Manager.php @@ -51,7 +51,7 @@ class Manager extends Plugin $boundModel = call_user_func_array( [$className, "findFirst"], [ - $parameters + $parameters, ] ); @@ -105,7 +105,7 @@ class Manager extends Plugin $count = call_user_func_array( [$className, "count"], [ - $parameters + $parameters, ] ); @@ -193,7 +193,7 @@ class Manager extends Plugin return [ "conditions" => $conditions, - "bind" => $bind + "bind" => $bind, ]; } }
Added trailing commas to arrays
diff --git a/lib/negroku/cli.rb b/lib/negroku/cli.rb index <HASH>..<HASH> 100644 --- a/lib/negroku/cli.rb +++ b/lib/negroku/cli.rb @@ -3,7 +3,7 @@ require 'capistrano/setup' require 'capistrano/deploy' # Load applications deploy config if it exists -require './config/deploy' if File.exists? "./config/deploy" +require './config/deploy' if File.exists? "./config/deploy.rb" require 'gli' require 'inquirer'
fix(): load deploy.rb file when file exist
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -7,7 +7,7 @@ except ImportError: from setup_libuv import libuv_build_ext, libuv_sdist -__version__ = "0.10.1" +__version__ = "0.11.0-dev" setup(name = "pyuv", version = __version__,
Set version to <I>-dev on master
diff --git a/app/helpers/tenon/tenon_helper.rb b/app/helpers/tenon/tenon_helper.rb index <HASH>..<HASH> 100644 --- a/app/helpers/tenon/tenon_helper.rb +++ b/app/helpers/tenon/tenon_helper.rb @@ -61,17 +61,6 @@ module Tenon end end - # form row helper for boolean published block - def publish_box(f, object) - if can?(:publish, object) - content = [ - f.check_box(:published, class: 'tn-checkbox-right'), - f.super_label(:published, 'Published?') - ].join(' ').html_safe - content_tag(:div, content, class: 'form-group inline') - end - end - def i18n_language_nav(table) if Tenon.config.languages && I18nLookup.fields[:tables][table] render 'tenon/shared/i18n_language_nav'
remove the published boolean form helper
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -10,7 +10,7 @@ except (IOError, ImportError) as e: setup( name='cutil', packages=['cutil'], - version='2.6.6', + version='2.6.7', description='A collection of useful functions', long_description=long_description, author='Eddy Hintze', @@ -26,7 +26,7 @@ setup( "Topic :: Utilities", ], install_requires=['hashids', - 'psycopg2-binary', + 'psycopg2', 'pytz', ] )
Just use psycopg2 and not the binary
diff --git a/application/geomajas-gwt-example/src/main/java/org/geomajas/example/gwt/client/samples/editing/EditLineLayerSample.java b/application/geomajas-gwt-example/src/main/java/org/geomajas/example/gwt/client/samples/editing/EditLineLayerSample.java index <HASH>..<HASH> 100644 --- a/application/geomajas-gwt-example/src/main/java/org/geomajas/example/gwt/client/samples/editing/EditLineLayerSample.java +++ b/application/geomajas-gwt-example/src/main/java/org/geomajas/example/gwt/client/samples/editing/EditLineLayerSample.java @@ -103,7 +103,7 @@ public class EditLineLayerSample extends SamplePanel { } public String[] getConfigurationFiles() { - return new String[] { "WEB-INF/editing/mapEditLineLayer.xml", "WEB-INF/layerGoogleSat.xml", + return new String[] { "WEB-INF/mapEditLineLayer.xml", "WEB-INF/layerGoogleSat.xml", "WEB-INF/layerRoadsTrl020.xml" }; }
GWTSHOW-<I> : View Source on edit line layer sample is broken
diff --git a/packages/components/bolt-carousel/__tests__/carousel.js b/packages/components/bolt-carousel/__tests__/carousel.js index <HASH>..<HASH> 100644 --- a/packages/components/bolt-carousel/__tests__/carousel.js +++ b/packages/components/bolt-carousel/__tests__/carousel.js @@ -9,7 +9,7 @@ import { const { readYamlFileSync } = require('@bolt/build-tools/utils/yaml'); const { join } = require('path'); -const timeout = 60000; +const timeout = 120000; const viewportSizes = [ {
test: retest carousel Jest tests with increased timeout
diff --git a/spec/features/bitpay_plugin_spec.rb b/spec/features/bitpay_plugin_spec.rb index <HASH>..<HASH> 100644 --- a/spec/features/bitpay_plugin_spec.rb +++ b/spec/features/bitpay_plugin_spec.rb @@ -39,7 +39,7 @@ feature "Bitpay Plugin", js: true, type: :feature do end - scenario "can display invoice" do + xscenario "can display invoice" do user = create(:user_with_addreses) shipping_method = create(:free_shipping_method, name: "Satoshi Post") product = create(:base_product, name: "BitPay T-Shirt")
Disable false positive integration test until corrected
diff --git a/app/assets/javascripts/admin/views/forms/markdown_composer.js b/app/assets/javascripts/admin/views/forms/markdown_composer.js index <HASH>..<HASH> 100644 --- a/app/assets/javascripts/admin/views/forms/markdown_composer.js +++ b/app/assets/javascripts/admin/views/forms/markdown_composer.js @@ -41,6 +41,7 @@ var MarkdownComposerViewController = Backbone.View.extend({ $("body").removeClass("-modal-open"); this.$fullscreenButtonLabel.html("Fullscreen"); this.$fullscreenButtonIcon.removeClass("icon-compress").addClass("icon-arrows-alt"); + this.$textarea.focus(); } },
Focus the composer after collapsing
diff --git a/twitcher/middleware.py b/twitcher/middleware.py index <HASH>..<HASH> 100644 --- a/twitcher/middleware.py +++ b/twitcher/middleware.py @@ -1,6 +1,6 @@ from webob import Request -from twitcher.owsexceptions import OWSServiceNotAllowed +from twitcher.owsexceptions import OWSException, OWSServiceNotAllowed from twitcher.owsrequest import OWSRequest import logging @@ -27,8 +27,13 @@ class OWSSecurityMiddleware(object): self.request = Request(environ) self.ows_request = OWSRequest(self.request) if self.is_route_path_protected(): - self.validate_ows_service() - self.validate_ows_request() + try: + self.validate_ows_service() + self.validate_ows_request() + except OWSException as e: + return e(environ, start_response) + except Exception,e: + return [e] else: logger.warn('unprotected access')
fixed usage of owsexceptions in middleware
diff --git a/lib/octopress-deploy.rb b/lib/octopress-deploy.rb index <HASH>..<HASH> 100644 --- a/lib/octopress-deploy.rb +++ b/lib/octopress-deploy.rb @@ -87,12 +87,12 @@ FILE if !File.exist?(gitignore) || Pathname.new(gitignore).read.match(/#{@options[:config_file]}/i).nil? if ask_bool("Do you want to add #{@options[:config_file]} to your .gitignore?") - append_gitignore + gitignore_config_file end end end - def self.append_gitignore + def self.gitignore_config_file File.open('.gitignore', 'ab') { |f| f.write(@options[:config_file]) } end
append_gitignore is now renamed to gitignore_config_file because @parkr cares about people understanding code.
diff --git a/service/routes/public/authorization.js b/service/routes/public/authorization.js index <HASH>..<HASH> 100644 --- a/service/routes/public/authorization.js +++ b/service/routes/public/authorization.js @@ -11,10 +11,11 @@ exports.register = function (server, options, next) { server.route({ method: 'GET', - path: '/authorization/check/{userId}/{action}/{resource*}', + path: '/authorization/access/{userId}/{action}/{resource*}', handler: function (request, reply) { const { organizationId } = request.udaru const { resource, action, userId } = request.params + const params = { userId, action, @@ -39,7 +40,7 @@ exports.register = function (server, options, next) { } }, description: 'Authorize user action against a resource', - notes: 'The GET /authorization/check/{userId}/{action}/{resource} endpoint returns is a user can perform and action\non a resource\n', + notes: 'The GET /authorization/check/{userId}/{action}/{resource} endpoint returns if a user can perform and action\non a resource\n', tags: ['api', 'service', 'authorization'] } })
renamed check to access as authoriztion endpoint
diff --git a/html5lib/constants.py b/html5lib/constants.py index <HASH>..<HASH> 100644 --- a/html5lib/constants.py +++ b/html5lib/constants.py @@ -467,6 +467,7 @@ booleanAttributes = { "details": frozenset(("open",)), "datagrid": frozenset(("multiple", "disabled")), "command": frozenset(("hidden", "disabled", "checked", "default")), + "hr": frozenset(("noshade")), "menu": frozenset(("autosubmit",)), "fieldset": frozenset(("disabled", "readonly")), "option": frozenset(("disabled", "readonly", "selected")),
Add @noshade as a boolean attribute. Fixes #<I>. Thanks to fantasai for the patch.
diff --git a/test/utils.py b/test/utils.py index <HASH>..<HASH> 100644 --- a/test/utils.py +++ b/test/utils.py @@ -547,6 +547,7 @@ class VtGate(object): '-log_dir', environment.vtlogroot, '-srv_topo_cache_ttl', cache_ttl, '-tablet_protocol', protocols_flavor().tabletconn_protocol(), + '-stderrthreshold', get_log_level(), ] if l2vtgates: args.extend([
test: utils.py: Set -stderrthreshold for vtgate. After this change, test runs with -v will show the vtgate Go logs.
diff --git a/test/test.js b/test/test.js index <HASH>..<HASH> 100644 --- a/test/test.js +++ b/test/test.js @@ -292,6 +292,19 @@ function testSuite(Model){ childO.arr.push("a"); assert.throws(function(){ childO.arr.push(false); }, /TypeError/, "child array model catches push calls"); assert.throws(function(){ childO.arr[0] = 1; }, /TypeError/, "child array model catches set index"); + + var N = Model({ x: Number, y: [Number] }).defaults({ x: 5, y: 7 }); + Arr = Model.Array(N); + a = Arr([ { x:9 } ]); + assert.ok(a[0] instanceof N, "test automatic model casting with array init 1/2") + assert.equal(a[0].x * a[0].y, 63, "test automatic model casting with array init 2/2") + a.push({ x: 3 }); + assert.ok(a[1] instanceof N, "test automatic model casting with array mutator method 1/2") + assert.equal(a[1].x * a[1].y, 21, "test automatic model casting with array mutator method 2/2") + a[0] = { x: 10 }; + assert.ok(a[0] instanceof N, "test automatic model casting with array set index 1/2") + assert.equal(a[0].x * a[0].y, 70, "test automatic model casting with array set index 2/2"); + }); QUnit.test("Function models", function(assert){
added tests for automatic casting on arrays
diff --git a/src/Deployer/Task/DeployTasks.php b/src/Deployer/Task/DeployTasks.php index <HASH>..<HASH> 100644 --- a/src/Deployer/Task/DeployTasks.php +++ b/src/Deployer/Task/DeployTasks.php @@ -16,6 +16,7 @@ class DeployTasks extends TaskAbstract { const TASK_INITIALIZE = 'deploy:initialize'; const TASK_ROLLBACK = 'rollback'; // Overwriting the existing one + const TASK_LINKCACHETOOL = 'link:cachetool'; public static function register() {
[FIX] Add missing TASK for deploytask
diff --git a/src/test/java/de/codecentric/jbehave/junit/monitoring/LoggerTest.java b/src/test/java/de/codecentric/jbehave/junit/monitoring/LoggerTest.java index <HASH>..<HASH> 100644 --- a/src/test/java/de/codecentric/jbehave/junit/monitoring/LoggerTest.java +++ b/src/test/java/de/codecentric/jbehave/junit/monitoring/LoggerTest.java @@ -21,6 +21,7 @@ public class LoggerTest { @Before public void setup() { + System.clearProperty(Logger.PROP_JJM_LOGLEVEL); logger = new Logger(); MockitoAnnotations.initMocks(this); logger.logStream = stream;
Test was failing at first. Apparently in some random test order (from infinitest?), the system property was set to a value that enabled logging. Now unsetting the property in the test setup.
diff --git a/cake/libs/model/model.php b/cake/libs/model/model.php index <HASH>..<HASH> 100644 --- a/cake/libs/model/model.php +++ b/cake/libs/model/model.php @@ -1831,7 +1831,7 @@ class Model extends Overloadable { )); } - if ($db->delete($this)) { + if ($db->delete($this, array($this->alias . '.' . $this->primaryKey => $id))) { if (!empty($this->belongsTo)) { $this->updateCounterCache($keys[$this->alias]); }
Adding specific conditions to model->delete's call to dbo->delete. This helps fix a race condition where dbo->defaultConditions could cause additional data loss. Fixes #<I>
diff --git a/cmd/pulsectl/plugin.go b/cmd/pulsectl/plugin.go index <HASH>..<HASH> 100644 --- a/cmd/pulsectl/plugin.go +++ b/cmd/pulsectl/plugin.go @@ -46,6 +46,7 @@ func unloadPlugin(ctx *cli.Context) { r := pClient.UnloadPlugin(pName, pVer) if r.Err != nil { fmt.Printf("Error unloading plugin:\n%v\n", r.Err.Error()) + os.Exit(1) } fmt.Println("Plugin unloaded")
Add exit call when error thrown unloading plugin
diff --git a/src/components/colorlegend/colorlegend.js b/src/components/colorlegend/colorlegend.js index <HASH>..<HASH> 100644 --- a/src/components/colorlegend/colorlegend.js +++ b/src/components/colorlegend/colorlegend.js @@ -147,6 +147,7 @@ var ColorLegend = Component.extend({ //Hide rainbow element if showing minimap or if color is discrete //TODO: indocators-properties are incorrectly used here. this.rainbowEl.classed("vzb-hidden", canShowMap || this.colorModel.use !== "indicator"); + this.rainbowLegendEl.classed("vzb-hidden", canShowMap || this.colorModel.use !== "indicator"); //Hide minimap if no data to draw it this.minimapEl.classed("vzb-hidden", !canShowMap);
Fixed color anchors appearing when color is a property #<I>
diff --git a/ArgusCore/src/main/java/com/salesforce/dva/argus/service/metric/transform/AnomalySTLTransform.java b/ArgusCore/src/main/java/com/salesforce/dva/argus/service/metric/transform/AnomalySTLTransform.java index <HASH>..<HASH> 100644 --- a/ArgusCore/src/main/java/com/salesforce/dva/argus/service/metric/transform/AnomalySTLTransform.java +++ b/ArgusCore/src/main/java/com/salesforce/dva/argus/service/metric/transform/AnomalySTLTransform.java @@ -38,8 +38,6 @@ import com.salesforce.dva.argus.system.SystemAssert; import java.util.*; -import com.sun.org.apache.xerces.internal.util.SynchronizedSymbolTable; -import org.apache.commons.math3.distribution.*; /** * Created by vmuruganantham on 7/13/16.
Remove unused vendor specific imports. (#<I>)
diff --git a/libkbfs/cr_actions.go b/libkbfs/cr_actions.go index <HASH>..<HASH> 100644 --- a/libkbfs/cr_actions.go +++ b/libkbfs/cr_actions.go @@ -658,14 +658,22 @@ func (dua *dropUnmergedAction) updateOps(unmergedMostRecent BlockPointer, unmergedMostRecent) } + found := false for i, op := range unmergedChain.ops { if op == dua.op { unmergedChain.ops = append(unmergedChain.ops[:i], unmergedChain.ops[i+1:]...) + found = true break } } + // Return early if this chain didn't contain the op; no need to + // invert on the merged chain in that case. + if !found { + return nil + } + invertedOp := invertOpForLocalNotifications(dua.op) err := prependOpsToChain(mergedMostRecent, mergedChains, invertedOp) if err != nil {
cr: when dropping an action, only invert locally on one chain Some actions get their updates applied on both the parent and the node itself, and we don't want the inversions appearing multiple times. Issue: KBFS-<I>
diff --git a/spec/support/macros/deprecation.rb b/spec/support/macros/deprecation.rb index <HASH>..<HASH> 100644 --- a/spec/support/macros/deprecation.rb +++ b/spec/support/macros/deprecation.rb @@ -1,18 +1,9 @@ require "active_support" -module SilenceDeprecation - def silence_deprecation(example) - cached_silenced = FactoryBot::Deprecation.silenced - FactoryBot::Deprecation.silenced = true - example.run - FactoryBot::Deprecation.silenced = cached_silenced - end -end - RSpec.configure do |config| - config.include SilenceDeprecation - config.around :example, silence_deprecation: true do |example| - silence_deprecation(example) + with_temporary_assignment(FactoryBot::Deprecation, :silenced, true) do + example.run + end end end
Use temporary assignment helper to silence deprecations in specs
diff --git a/process/plugin/plugin.go b/process/plugin/plugin.go index <HASH>..<HASH> 100644 --- a/process/plugin/plugin.go +++ b/process/plugin/plugin.go @@ -140,7 +140,7 @@ func (p Plugin) Launch(proc charm.Process) (ProcDetails, error) { // Destroy runs the given plugin, passing it the "destroy" command, with the id of the // process to destroy as an argument. // -// <plugin> destroy <id> +// <plugin> destroy <id> func (p Plugin) Destroy(id string) error { _, err := p.run("destroy", id) return errors.Trace(err)
don't mix tabs and spaces!
diff --git a/filesystem/disk/disk.go b/filesystem/disk/disk.go index <HASH>..<HASH> 100644 --- a/filesystem/disk/disk.go +++ b/filesystem/disk/disk.go @@ -4,11 +4,10 @@ import "os" // IsExist return true if file or directory exists func IsExist(path string) bool { - _, err := os.Stat(path) - if err != nil && os.IsNotExist(err) { - return false + if _, err := os.Stat(path); err == nil { + return true } - return true + return false } // IsDir return true if directory exists
fix/refactor disk IsExist
diff --git a/phy/plot/_vispy_utils.py b/phy/plot/_vispy_utils.py index <HASH>..<HASH> 100644 --- a/phy/plot/_vispy_utils.py +++ b/phy/plot/_vispy_utils.py @@ -210,19 +210,17 @@ class BaseSpikeVisual(_BakeVisual): def cluster_colors(self, value): self._cluster_colors = _as_array(value) assert len(self._cluster_colors) == self.n_clusters - self.set_to_bake('color') + self.set_to_bake('cluster_color') # Data baking # ------------------------------------------------------------------------- - # TODO: rename to _bake_cluster_color - - def _bake_color(self): + def _bake_cluster_color(self): u_cluster_color = self.cluster_colors.reshape((1, self.n_clusters, -1)) u_cluster_color = (u_cluster_color * 255).astype(np.uint8) # TODO: more efficient to update the data from an existing texture self.program['u_cluster_color'] = gloo.Texture2D(u_cluster_color) - debug("bake color", u_cluster_color.shape) + debug("bake cluster color", u_cluster_color.shape) #------------------------------------------------------------------------------
Renamed color bake to cluster color.
diff --git a/src/Composer/Downloader/ArchiveDownloader.php b/src/Composer/Downloader/ArchiveDownloader.php index <HASH>..<HASH> 100644 --- a/src/Composer/Downloader/ArchiveDownloader.php +++ b/src/Composer/Downloader/ArchiveDownloader.php @@ -29,7 +29,9 @@ abstract class ArchiveDownloader extends FileDownloader public function download(PackageInterface $package, $path, PackageInterface $prevPackage = null, $output = true) { $res = parent::download($package, $path, $prevPackage, $output); - if (is_dir($path) && !$this->filesystem->isDirEmpty($path)) { + + // if not downgrading and the dir already exists it seems we have an inconsistent state in the vendor dir and the user should fix it + if (!$prevPackage && is_dir($path) && !$this->filesystem->isDirEmpty($path)) { throw new IrrecoverableDownloadException('Expected empty path to extract '.$package.' into but directory exists: '.$path); }
Allow downgrades to go through even though the target dir for archive extraction exists
diff --git a/tests/dlkit/json_/test_utilities.py b/tests/dlkit/json_/test_utilities.py index <HASH>..<HASH> 100644 --- a/tests/dlkit/json_/test_utilities.py +++ b/tests/dlkit/json_/test_utilities.py @@ -4,6 +4,7 @@ import codecs import glob import json import os +import shutil import unittest from dlkit.json_.utilities import MyIterator,\ @@ -112,7 +113,7 @@ class TestJSONClientValidated(unittest.TestCase): @classmethod def tearDownClass(cls): - pass + shutil.rmtree(cls._get_test_store_path(cls.mgr._provider_manager._runtime)) def test_can_save_json_file(self): test_doc = {'_id': '123', 'foo': 'bar'}
clean up after json client tests
diff --git a/src/browser/extension/inject/pageScript.js b/src/browser/extension/inject/pageScript.js index <HASH>..<HASH> 100644 --- a/src/browser/extension/inject/pageScript.js +++ b/src/browser/extension/inject/pageScript.js @@ -82,7 +82,7 @@ window.devToolsExtension = function(next) { doChange(); timeout.last = Date.now(); } - else timeout.id = setTimeout(doChange, timeoutValue); + else timeout.id = setTimeout(() => { doChange(); timeout.last = Date.now(); }, timeoutValue); } }
Prevent relaying store changes consecutively
diff --git a/app/assets/javascripts/lentil/addfancybox.js b/app/assets/javascripts/lentil/addfancybox.js index <HASH>..<HASH> 100644 --- a/app/assets/javascripts/lentil/addfancybox.js +++ b/app/assets/javascripts/lentil/addfancybox.js @@ -81,6 +81,7 @@ function addfancybox() { autoSize : true, fitToView: true, minWidth : 250, + scrolling : 'no', type: 'html', helpers : { title : { type : 'inside' }, @@ -91,7 +92,7 @@ function addfancybox() { var img = $(this.element).children(".instagram-img"); if($(img).attr("data-media-type") === "video") { - this.content = '<video class="fancybox-video" controls="controls" height="100%" width="90%" src="' + this.href + '" oncanplay="$.fancybox.update()"></video>'; + this.content = '<video class="fancybox-video" controls="controls" height="100%" width="100%" src="' + this.href + '" oncanplay="$.fancybox.update()"></video>'; } else { this.content = '<img class="fancybox-img" src="' + this.href + '" onload="$.fancybox.update()"/>'; }
Disable scrolling, fix issue for small video modals
diff --git a/trace/opentracing.go b/trace/opentracing.go index <HASH>..<HASH> 100644 --- a/trace/opentracing.go +++ b/trace/opentracing.go @@ -163,6 +163,8 @@ type Span struct { *Trace + recordErr error + // These are currently ignored logLines []opentracinglog.Field } @@ -196,7 +198,7 @@ func (s *Span) FinishWithOptions(opts opentracing.FinishOptions) { // TODO remove the name tag from the slice of tags - s.Record(s.Name, s.Tags) + s.recordErr = s.Record(s.Name, s.Tags) } func (s *Span) Context() opentracing.SpanContext { diff --git a/trace/trace.go b/trace/trace.go index <HASH>..<HASH> 100644 --- a/trace/trace.go +++ b/trace/trace.go @@ -203,11 +203,7 @@ func (t *Trace) Record(name string, tags map[string]string) error { span := t.SSFSpan() span.Tags[NameKey] = name - err := sendSample(span) - if err != nil { - logrus.WithError(err).Error("Error submitting sample") - } - return err + return sendSample(span) } func (t *Trace) Error(err error) {
Remove logged error with record * We already return the error value, so there's no need to log it as * well
diff --git a/mtgsdk/querybuilder.py b/mtgsdk/querybuilder.py index <HASH>..<HASH> 100644 --- a/mtgsdk/querybuilder.py +++ b/mtgsdk/querybuilder.py @@ -89,7 +89,38 @@ class QueryBuilder(object): break return list + + def iter(self): + """Gets all resources, automating paging through data + Returns: + iterable of object: Iterable of resource objects + """ + + page = 1 + fetch_all = True + url = "{}/{}".format(__endpoint__, self.type.RESOURCE) + + if 'page' in self.params: + page = self.params['page'] + fetch_all = False + + while True: + response = RestClient.get(url, self.params)[self.type.RESOURCE] + if len(response) > 0: + for item in response: + yield self.type(item) + + if not fetch_all: + break + else: + page += 1 + self.where(page=page) + else: + break + + return + def array(self): """Get all resources and return the result as an array
Iterable query Now has an iter function for better memory usage.
diff --git a/spec/unit/parser/functions/lookup_spec.rb b/spec/unit/parser/functions/lookup_spec.rb index <HASH>..<HASH> 100644 --- a/spec/unit/parser/functions/lookup_spec.rb +++ b/spec/unit/parser/functions/lookup_spec.rb @@ -3,6 +3,10 @@ require 'puppet/pops' require 'stringio' describe "lookup function" do + before(:each) do + Puppet[:binder] = true + end + it "must be called with at least a name to lookup" do scope = scope_with_injections_from(bound(bindings))
(#<I>) Fix failing lookup function test (missing setting of --binder) The lookup function test was missing because the setting --binder was missing, and lookup only works when this feature is turned on).
diff --git a/pronto/parser/owl.py b/pronto/parser/owl.py index <HASH>..<HASH> 100644 --- a/pronto/parser/owl.py +++ b/pronto/parser/owl.py @@ -148,6 +148,9 @@ class OwlXMLTreeParser(OwlXMLParser): for elem in itertools.islice(rawterm.iter(), 1, None): basename = elem.tag.split('}', 1)[-1] + if elem.text is not None: + elem.text = elem.text.strip() + if elem.text: _rawterms[-1][basename].append(elem.text) elif elem.get(RDF_RESOURCE) is not None:
Prevent OwlXMLTreeParser from adding empty data to Term.other
diff --git a/lib/veritas/algebra/rename.rb b/lib/veritas/algebra/rename.rb index <HASH>..<HASH> 100644 --- a/lib/veritas/algebra/rename.rb +++ b/lib/veritas/algebra/rename.rb @@ -14,9 +14,7 @@ module Veritas end def each(&block) - operand.each do |tuple| - yield Tuple.new(header, tuple.to_ary) - end + operand.each { |tuple| yield Tuple.new(header, tuple.to_ary) } self end
Minor simplification of Rename#each
diff --git a/bt/algos.py b/bt/algos.py index <HASH>..<HASH> 100644 --- a/bt/algos.py +++ b/bt/algos.py @@ -172,10 +172,12 @@ class SelectAll(Algo): class SelectHasData(Algo): - def __init__(self, min_count, - lookback=pd.DateOffset(months=3)): + def __init__(self, lookback=pd.DateOffset(months=3), + min_count=None): super(SelectHasData, self).__init__() self.lookback = lookback + if min_count is None: + min_count = bt.finance.get_num_days_required(lookback) self.min_count = min_count def __call__(self, target):
added default value for min_count in SelectHasData
diff --git a/src/foremast/autoscaling_policy/create_policy.py b/src/foremast/autoscaling_policy/create_policy.py index <HASH>..<HASH> 100644 --- a/src/foremast/autoscaling_policy/create_policy.py +++ b/src/foremast/autoscaling_policy/create_policy.py @@ -161,7 +161,7 @@ class AutoScalingPolicy: "serverGroupName": server_group, "credentials": self.env, "region": self.region, - "provider": "{{ provider }}", + "provider": "aws", "type": "deleteScalingPolicy", "user": "foremast-autoscaling-policy" }]
fix: fixed provider in autoscaling policy
diff --git a/cache_test.go b/cache_test.go index <HASH>..<HASH> 100644 --- a/cache_test.go +++ b/cache_test.go @@ -1555,7 +1555,7 @@ func benchmarkCacheGetManyConcurrent(b *testing.B, exp time.Duration) { tc := New(exp, 0) keys := make([]string, n) for i := 0; i < n; i++ { - k := "foo" + strconv.Itoa(n) + k := "foo" + strconv.Itoa(i) keys[i] = k tc.Set(k, "bar", DefaultExpiration) } diff --git a/sharded_test.go b/sharded_test.go index <HASH>..<HASH> 100644 --- a/sharded_test.go +++ b/sharded_test.go @@ -65,7 +65,7 @@ func benchmarkShardedCacheGetManyConcurrent(b *testing.B, exp time.Duration) { tsc := unexportedNewSharded(exp, 0, 20) keys := make([]string, n) for i := 0; i < n; i++ { - k := "foo" + strconv.Itoa(n) + k := "foo" + strconv.Itoa(i) keys[i] = k tsc.Set(k, "bar", DefaultExpiration) }
Fix incorrect key in concurrent benchmarks Fixes #<I>
diff --git a/src/lightncandy.php b/src/lightncandy.php index <HASH>..<HASH> 100644 --- a/src/lightncandy.php +++ b/src/lightncandy.php @@ -66,8 +66,8 @@ class LightnCandy { const FLAG_BESTPERFORMANCE = 16384; // FLAG_ECHO const FLAG_JS = 24; // FLAG_JSTRUE + FLAG_JSOBJECT const FLAG_MUSTACHE = 40239104; // FLAG_ERROR_SKIPPARTIAL + FLAG_MUSTACHESP + FLAG_MUSTACHELOOKUP + FLAG_MUSTACHEPAIN + FLAG_MUSTACHESEC - const FLAG_HANDLEBARS = 25173984; // FLAG_THIS + FLAG_WITH + FLAG_PARENT + FLAG_JSQUOTE + FLAG_ADVARNAME + FLAG_SPACECTL + FLAG_NAMEDARG + FLAG_SPVARS + FLAG_SLASH + FLAG_ELSE - const FLAG_HANDLEBARSJS = 25174008; // FLAG_JS + FLAG_HANDLEBARS + const FLAG_HANDLEBARS = 25305056; // FLAG_THIS + FLAG_WITH + FLAG_PARENT + FLAG_JSQUOTE + FLAG_ADVARNAME + FLAG_SPACECTL + FLAG_NAMEDARG + FLAG_SPVARS + FLAG_SLASH + FLAG_ELSE + FLAG_MUSTACHESP + const FLAG_HANDLEBARSJS = 25305080; // FLAG_JS + FLAG_HANDLEBARS const FLAG_INSTANCE = 98304; // FLAG_PROPERTY + FLAG_METHOD // RegExps
align with handlebars.js (it now handle spacing)
diff --git a/cube.py b/cube.py index <HASH>..<HASH> 100755 --- a/cube.py +++ b/cube.py @@ -54,7 +54,7 @@ _Square = namedtuple("Square", ["face", "index", "colour"]) _Square.type = "Square" -class Square: +class Square(object): """ Square(colour, face, index), implements a square (sticker) on a cube. @@ -117,7 +117,7 @@ class Square: -class Face: +class Face(object): """ Face(face, colour_or_list_of_squares), implements a face on a cube. @@ -170,7 +170,7 @@ class Face: -class Cube: +class Cube(object): """ Cube([face * 6 L,U,F,D,R,B]), implements a whole cube.
Square, Face, Cube superclass = object
diff --git a/tasks/jade.js b/tasks/jade.js index <HASH>..<HASH> 100644 --- a/tasks/jade.js +++ b/tasks/jade.js @@ -60,9 +60,19 @@ module.exports = function(grunt) { try { var jade = require('jade'); + + if (options.filters) { + // have custom filters Object.keys(options.filters).forEach(function(filter) { - jade.filters[filter] = options.filters[filter]; + if (typeof data === 'function') { + // have custom options + jade.filters[filter] = options.filters[filter].bind({jade: jade, locals: data()}); + } else { + // have no custom options + jade.filters[filter] = options.filters[filter].bind({jade: jade }); + } + }); } compiled = jade.compile(src, options);
added implementation for advanced filters #<I>
diff --git a/src/ui/controls/class-display-text.php b/src/ui/controls/class-display-text.php index <HASH>..<HASH> 100644 --- a/src/ui/controls/class-display-text.php +++ b/src/ui/controls/class-display-text.php @@ -75,7 +75,7 @@ class Display_Text extends Abstract_Control { * * @type string $input_type HTML input type ('checkbox' etc.). Required. * @type string $tab_id Tab ID. Required. - * @type string $section Section ID. Required. + * @type string $section Optional. Section ID. Default Tab ID. * @type array $elements The HTML elements to display (including the outer tag). Required. * @type string|null $short Optional. Short label. Default null. * @type bool $inline_help Optional. Display help inline. Default false. @@ -85,7 +85,7 @@ class Display_Text extends Abstract_Control { * } */ protected function __construct( Options $options, $options_key, $id, array $args ) { - $args = $this->prepare_args( $args, [ 'elements', 'section' ] ); + $args = $this->prepare_args( $args, [ 'elements' ] ); $this->elements = $args['elements']; parent::__construct( $options, $options_key, $id, $args['tab_id'], $args['section'], '', $args['short'], null, null, false, $args['attributes'], $args['outer_attributes'], $args['settings_args'] );
Make "section" optional for Display_Text control as well
diff --git a/src/java/org/apache/cassandra/io/util/FileUtils.java b/src/java/org/apache/cassandra/io/util/FileUtils.java index <HASH>..<HASH> 100644 --- a/src/java/org/apache/cassandra/io/util/FileUtils.java +++ b/src/java/org/apache/cassandra/io/util/FileUtils.java @@ -148,23 +148,6 @@ public class FileUtils return f.delete(); } - public static boolean delete(List<String> files) - { - boolean bVal = true; - for ( int i = 0; i < files.size(); ++i ) - { - String file = files.get(i); - bVal = delete(file); - if (bVal) - { - if (logger.isDebugEnabled()) - logger.debug("Deleted file {}", file); - files.remove(i); - } - } - return bVal; - } - public static void delete(File[] files) { for ( File file : files )
Remove dead (and buggy: removes only half the files) code
diff --git a/salt/state.py b/salt/state.py index <HASH>..<HASH> 100644 --- a/salt/state.py +++ b/salt/state.py @@ -2606,7 +2606,10 @@ class BaseHighState(object): ) if found == 0: - log.error('No contents found in top file') + log.error('No contents found in top file. Please verify ' + 'that the \'file_roots\' specified in \'etc/master\' are ' + 'accessible: {0}'.format(repr(self.state.opts['file_roots'])) + ) # Search initial top files for includes for saltenv, ctops in six.iteritems(tops):
Provide useful hints for error "No contents found" Without extensive experience with salt, the following error is confusing: [ERROR ] No contents found in top file. Make this error more intelligible by providing hints about where to look [ERROR ] No contents found in top file. Please verify that the 'file_roots' specified in 'etc/master' are accessible: {'base': ['/home/eradman/hg/salT']}
diff --git a/classes/indexqueue/class.tx_solr_indexqueue_recordmonitor.php b/classes/indexqueue/class.tx_solr_indexqueue_recordmonitor.php index <HASH>..<HASH> 100644 --- a/classes/indexqueue/class.tx_solr_indexqueue_recordmonitor.php +++ b/classes/indexqueue/class.tx_solr_indexqueue_recordmonitor.php @@ -159,6 +159,11 @@ class tx_solr_indexqueue_RecordMonitor { $recordUid = $uid; $recordPageId = 0; + // #typo3-60 can't load configuration for records stored on page 0 + if ($table == 'sys_file') { + return; + } + if ($status == 'new') { $recordUid = $tceMain->substNEWwithIDs[$recordUid]; }
[BUGFIX] Crash on change of sys_file Fixes: #<I> Change-Id: If<I>a0fc9d3fd8bb<I>bc6bf3a1d0ada<I>b
diff --git a/common/config.go b/common/config.go index <HASH>..<HASH> 100644 --- a/common/config.go +++ b/common/config.go @@ -161,14 +161,6 @@ func DownloadableURL(original string) (string, error) { // Make sure it is lowercased url.Scheme = strings.ToLower(url.Scheme) - // This is to work around issue #5927. This can safely be removed once - // we distribute with a version of Go that fixes that bug. - // - // See: https://code.google.com/p/go/issues/detail?id=5927 - if url.Path != "" && url.Path[0] != '/' { - url.Path = "/" + url.Path - } - // Verify that the scheme is something we support in our common downloader. supported := []string{"file", "http", "https"} found := false
common: remove dead code The referenced bug was fixed in Go <I>, and Packer requires Go <I>+.
diff --git a/searchtweets/_version.py b/searchtweets/_version.py index <HASH>..<HASH> 100644 --- a/searchtweets/_version.py +++ b/searchtweets/_version.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2018 Twitter, Inc. +# Copyright 2020 Twitter, Inc. # Licensed under the MIT License # https://opensource.org/licenses/MIT -VERSION = "1.7.4" +VERSION = "1.7.5"
bumping for update of HTTP error handling
diff --git a/cmd/juju/commands/repl.go b/cmd/juju/commands/repl.go index <HASH>..<HASH> 100644 --- a/cmd/juju/commands/repl.go +++ b/cmd/juju/commands/repl.go @@ -55,7 +55,7 @@ Type "q" or ^D or ^C to quit. var ( quitCommands = set.NewStrings("q", "quit", "exit") - noControllerCommands = set.NewStrings("bootstrap", "register") + noControllerCommands = set.NewStrings("help", "bootstrap", "register") ) const (
Add "help" to the list of REPL commands that don't need a controller
diff --git a/src-test/async/publish-timeout.js b/src-test/async/publish-timeout.js index <HASH>..<HASH> 100644 --- a/src-test/async/publish-timeout.js +++ b/src-test/async/publish-timeout.js @@ -1,6 +1,8 @@ /* * Test cases for Hub.publish timeouts. +THIS TEST CASE KILLS CHROME! + AsyncTestCase("publish-timeout", { tearDown: function() { @@ -13,7 +15,7 @@ AsyncTestCase("publish-timeout", { }); queue.call(function(pool) { var time = new Date().getTime(); - Hub.publish("a", "b").then(function() { + Hub.publish("a/b").then(function() { fail("Unexpected success callback"); }, pool.add(function(error) { assertObject(error); diff --git a/src-test/prototype.js b/src-test/prototype.js index <HASH>..<HASH> 100644 --- a/src-test/prototype.js +++ b/src-test/prototype.js @@ -1,6 +1,6 @@ /* * Test cases for prototype scoped peers. - */ + TestCase("prototype", { tearDown: function() { @@ -35,4 +35,4 @@ TestCase("prototype", { assert(fn.called); } -}); \ No newline at end of file +}); */ \ No newline at end of file
Fixed bug in publish-timeout test case, but it still kills Chrome. Commented out peer prototype tests for now.
diff --git a/lib/node_tracers.js b/lib/node_tracers.js index <HASH>..<HASH> 100644 --- a/lib/node_tracers.js +++ b/lib/node_tracers.js @@ -215,7 +215,7 @@ RawZipkinTracer.prototype._sendTrace = function(tuple) { var trace = tuple[0], annotations = tuple[1]; async.waterfall([ - formatters.formatForZipkin.bind(null, trace, annotations), + formatters.formatForZipkin.bind(trace, annotations, null), this.scribeClient.send.bind(this, this.category) ], function(err) {}); }; diff --git a/lib/trace.js b/lib/trace.js index <HASH>..<HASH> 100644 --- a/lib/trace.js +++ b/lib/trace.js @@ -73,10 +73,8 @@ }); if (has(options, 'tracers') && options.tracers){ - console.log("options tracers:"+JSON.stringify(options.tracers)); self._tracers = options.tracers; } else { - console.log("tracers:"+JSON.stringify(tracers.getTracers())); self._tracers = tracers.getTracers(); } };
change to node_tracers using zipkin formatting
diff --git a/spark-spi/src/main/java/spark/spi/SolutionSet.java b/spark-spi/src/main/java/spark/spi/SolutionSet.java index <HASH>..<HASH> 100644 --- a/spark-spi/src/main/java/spark/spi/SolutionSet.java +++ b/spark-spi/src/main/java/spark/spi/SolutionSet.java @@ -84,7 +84,7 @@ public class SolutionSet extends BaseResults implements Solutions { @Override public boolean next() { cursor++; - return cursor < (data.size() - 1); + return cursor < data.size(); } @Override @@ -111,7 +111,7 @@ public class SolutionSet extends BaseResults implements Solutions { private class SolutionIterator implements Iterator<Map<String,RDFNode>> { - int iterCursor = 0; + int iterCursor = -1; @Override public boolean hasNext() {
Fix a couple of off-by-one errors in the default SolutionSet implementation.
diff --git a/actionview/test/template/render_test.rb b/actionview/test/template/render_test.rb index <HASH>..<HASH> 100644 --- a/actionview/test/template/render_test.rb +++ b/actionview/test/template/render_test.rb @@ -22,7 +22,7 @@ module RenderTestCases def test_render_without_options e = assert_raises(ArgumentError) { @view.render() } - assert_match "You invoked render but did not give any of :partial, :template, :inline, :file or :text option.", e.message + assert_match(/You invoked render but did not give any of (.+) option./, e.message) end def test_render_file
Fix a fragile test on `action_view/render` This test were assuming that the list of render options will always be the same. Fixing that so this doesn't break when we add/remove render option in the future.
diff --git a/lib/espresso-runner.js b/lib/espresso-runner.js index <HASH>..<HASH> 100644 --- a/lib/espresso-runner.js +++ b/lib/espresso-runner.js @@ -26,7 +26,12 @@ class EspressoRunner { } this[req] = opts[req]; } - this.jwproxy = new JWProxy({server: this.host, port: this.systemPort, base: ''}); + this.jwproxy = new JWProxy({ + server: this.host, + port: this.systemPort, + base: '', + keepAlive: true, + }); this.proxyReqRes = this.jwproxy.proxyReqRes.bind(this.jwproxy); this.modServerPath = path.resolve(this.tmpDir, `${TEST_APK_PKG}_${version}_${this.appPackage}.apk`);
feat: Enable keep-alive mode for server connections (#<I>)
diff --git a/python/mxnet/gluon/block.py b/python/mxnet/gluon/block.py index <HASH>..<HASH> 100644 --- a/python/mxnet/gluon/block.py +++ b/python/mxnet/gluon/block.py @@ -742,18 +742,16 @@ class Block: if g.stype == 'row_sparse': ndarray.zeros_like(g, out=g) else: - arrays[g.ctx].append(g) + if is_np_array(): + arrays[g.ctx].append(g.as_nd_ndarray()) + else: + arrays[g.ctx].append(g) if len(arrays) == 0: return - if is_np_array(): - for arr in arrays.values(): - for ele in arr: - ele[()] = 0 - else: - for arr in arrays.values(): - ndarray.reset_arrays(*arr, num_arrays=len(arr)) + for arr in arrays.values(): + ndarray.reset_arrays(*arr, num_arrays=len(arr)) def reset_ctx(self, ctx): """Re-assign all Parameters to other contexts.
Use multi-tensor zeroing for resetting grads (#<I>)
diff --git a/lib/fog/core/errors.rb b/lib/fog/core/errors.rb index <HASH>..<HASH> 100644 --- a/lib/fog/core/errors.rb +++ b/lib/fog/core/errors.rb @@ -68,6 +68,9 @@ An alternate file may be used by placing its path in the FOG_RC environment vari :vsphere_server: :vsphere_username: :vsphere_password: + :libvirt_username: + :libvirt_password: + :libvirt_uri: # # End of Fog Credentials File #######################################################
Added libvirt options to credentials error
diff --git a/python/ray/rllib/es/es.py b/python/ray/rllib/es/es.py index <HASH>..<HASH> 100644 --- a/python/ray/rllib/es/es.py +++ b/python/ray/rllib/es/es.py @@ -124,13 +124,13 @@ class Worker(object): [np.sign(rewards_pos).sum(), np.sign(rewards_neg).sum()]) lengths.append([lengths_pos, lengths_neg]) - return Result( - noise_indices=noise_indices, - noisy_returns=returns, - sign_noisy_returns=sign_returns, - noisy_lengths=lengths, - eval_returns=eval_returns, - eval_lengths=eval_lengths) + return Result( + noise_indices=noise_indices, + noisy_returns=returns, + sign_noisy_returns=sign_returns, + noisy_lengths=lengths, + eval_returns=eval_returns, + eval_lengths=eval_lengths) class ESAgent(Agent):
fix indentation for ES (#<I>)
diff --git a/plugins/database/mongodb/connection_producer.go b/plugins/database/mongodb/connection_producer.go index <HASH>..<HASH> 100644 --- a/plugins/database/mongodb/connection_producer.go +++ b/plugins/database/mongodb/connection_producer.go @@ -132,8 +132,7 @@ func createClient(ctx context.Context, connURL string, clientOptions *options.Cl clientOptions.SetSocketTimeout(1 * time.Minute) clientOptions.SetConnectTimeout(1 * time.Minute) - opts := clientOptions.ApplyURI(connURL) - client, err = mongo.Connect(ctx, opts) + client, err = mongo.Connect(ctx, options.MergeClientOptions(options.Client().ApplyURI(connURL), clientOptions)) if err != nil { return nil, err }
Merge writeOpts and tlsAuthOpts after call to ApplyURI (#<I>)