diff stringlengths 65 26.7k | message stringlengths 7 9.92k |
|---|---|
diff --git a/modules/pulsestorm/magento2/cli/magento2/generate/ui/grid/module.php b/modules/pulsestorm/magento2/cli/magento2/generate/ui/grid/module.php
index <HASH>..<HASH> 100644
--- a/modules/pulsestorm/magento2/cli/magento2/generate/ui/grid/module.php
+++ b/modules/pulsestorm/magento2/cli/magento2/generate/ui/grid/module.php
@@ -124,7 +124,7 @@ function generateListingToolbar($xml)
$listingToolbar = $xml->addChild('listingToolbar');
$listingToolbar->addAttribute('name', 'listing_top');
- $settings = $xml->addChild('settings');
+ $settings = $listingToolbar->addChild('settings');
$settings->addChild('sticky', 'true');
$paging = $listingToolbar->addChild('paging'); | Fix settings error in ui component |
diff --git a/angr/analyses/disassembly.py b/angr/analyses/disassembly.py
index <HASH>..<HASH> 100644
--- a/angr/analyses/disassembly.py
+++ b/angr/analyses/disassembly.py
@@ -268,10 +268,6 @@ class Instruction(DisassemblyPiece):
else:
in_word = True
pieces.append(c)
- elif c == '%':
- in_word = False
- pieces.append('%%')
-
else:
in_word = False
pieces.append(c) | Fix %% register prefix (#<I>)
When register names start with %, split_op_string() replaces % with %%,
which then leaks into the UI. I could not find a place where this is
used as a format string, so it appears superfluous. |
diff --git a/src/Riak/Node/Config.php b/src/Riak/Node/Config.php
index <HASH>..<HASH> 100644
--- a/src/Riak/Node/Config.php
+++ b/src/Riak/Node/Config.php
@@ -87,11 +87,12 @@ class Config
protected $connection_timeout = 10;
/**
- * Client side stream (socket read/write) timeout
+ * Client side stream (socket read/write) timeout. Default is 60
+ * seconds as that is the default operation timeout in Riak
*
* @var int
*/
- protected $stream_timeout = 5;
+ protected $stream_timeout = 60;
/**
* @return int | Increase stream timeout to <I> seconds to match Riak default. |
diff --git a/notify/notification_hms.go b/notify/notification_hms.go
index <HASH>..<HASH> 100644
--- a/notify/notification_hms.go
+++ b/notify/notification_hms.go
@@ -123,7 +123,7 @@ func GetHuaweiNotification(req *PushNotification) (*model.MessageRequest, error)
}
setDefaultAndroidNotification := func() {
- if msgRequest.Message.Android == nil {
+ if msgRequest.Message.Android.Notification == nil {
msgRequest.Message.Android.Notification = model.GetDefaultAndroidNotification()
}
} | Fix Huawei issue on nil pointer dereference (#<I>) |
diff --git a/lib/fasterer/cli.rb b/lib/fasterer/cli.rb
index <HASH>..<HASH> 100644
--- a/lib/fasterer/cli.rb
+++ b/lib/fasterer/cli.rb
@@ -5,6 +5,7 @@ module Fasterer
def self.execute
file_traverser = Fasterer::FileTraverser.new('.')
file_traverser.traverse
+ abort if file_traverser.offenses_found?
end
end
end
diff --git a/lib/fasterer/file_traverser.rb b/lib/fasterer/file_traverser.rb
index <HASH>..<HASH> 100644
--- a/lib/fasterer/file_traverser.rb
+++ b/lib/fasterer/file_traverser.rb
@@ -43,9 +43,14 @@ module Fasterer
end
end
+ def offenses_found?
+ !!offenses_found
+ end
+
private
attr_reader :parse_error_paths
+ attr_accessor :offenses_found
def nil_config_file
{ SPEEDUPS_KEY => {}, EXCLUDE_PATHS_KEY => [] }
@@ -57,7 +62,10 @@ module Fasterer
rescue RubyParser::SyntaxError, Racc::ParseError, Timeout::Error
parse_error_paths.push(path)
else
- output(analyzer) if offenses_grouped_by_type(analyzer).any?
+ if offenses_grouped_by_type(analyzer).any?
+ output(analyzer)
+ self.offenses_found = true
+ end
end
def scannable_files | Abort if the file traverser found an offense
By exiting the application with a nonzero status when an offense is
found, fasterer can be integrated into continuous integration to prevent slow
code from being committed. |
diff --git a/src/loader/loadingscreen.js b/src/loader/loadingscreen.js
index <HASH>..<HASH> 100644
--- a/src/loader/loadingscreen.js
+++ b/src/loader/loadingscreen.js
@@ -128,7 +128,7 @@
// call when the loader is resetted
onResetEvent : function () {
// background color
- me.game.world.addChild(new me.ColorLayer("background", "#202020", 0));
+ me.game.world.addChild(new me.ColorLayer("background", "#202020", 0), 0);
// progress bar
var progressBar = new ProgressBar( | [#<I>] Fix loading screen while debug panel is enabled
- This was caused by the container auto-sorting after the debug panel is added to the scene graph.
- Fixed it by forcing the object-z position to use zero instead of auto-increment |
diff --git a/artist/plot.py b/artist/plot.py
index <HASH>..<HASH> 100644
--- a/artist/plot.py
+++ b/artist/plot.py
@@ -561,16 +561,29 @@ class SubPlot(object):
y = lower + upper
self.shaded_regions_list.append({'data': zip(x, y), 'color': color})
- def draw_image(self, image, xmin, ymin, xmax, ymax):
+ def draw_image(self, image, xmin=0, ymin=0, xmax=None, ymax=None):
"""Draw an image.
Do not forget to use :meth:`set_axis_equal` to preserve the
- aspect ratio of the image.
+ aspect ratio of the image, or change the aspect ratio of the
+ plot to the aspect ratio of the image.
- :param image: Pillow Image.
+ :param image: Pillow Image object.
:param xmin,ymin,xmax,ymax: the x, y image bounds.
+ Example::
+
+ >>> from PIL import Image
+ >>> image = Image.open('background.png')
+ >>> height_ratio = (.67 * image.size[1]) / image.size[0]
+ >>> plot = artist.Plot(height=r'%.2f\linewidth' % height_ratio)
+ >>> plot.draw_image(image)
+
"""
+ if xmax is None:
+ xmax = xmin + image.size[0]
+ if ymax is None:
+ ymax = ymin + image.size[1]
self.bitmap_list.append({'image': image,
'xmin': xmin,
'xmax': xmax, | Improve draw_image
Add example and defaults for x, y bounds. |
diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -5,6 +5,28 @@ var loaderUtils = require('loader-utils');
var path = require('path');
var _ = require('lodash');
+function matches (oldRef, newRef) {
+ return _(oldRef).split(':').first() === _(newRef).split(':').first();
+}
+
+/**
+ * Merge new references with old references; ignore old references from the same file.
+ */
+function mergeReferences (oldRefs, newRefs) {
+ var _newRefs = _(newRefs);
+
+ return _(oldRefs)
+ .reject(function (oldRef) {
+ return _newRefs.any(function (newRef) {
+ return matches(oldRef, newRef);
+ });
+ })
+ .concat(newRefs)
+ .uniq()
+ .sort()
+ .value();
+}
+
module.exports = function (source) {
this.cacheable();
@@ -46,7 +68,7 @@ module.exports = function (source) {
if (existing) {
existing.comments = _.uniq(existing.comments.concat(item.comments)).sort();
- existing.references = _.uniq(existing.references.concat(item.references)).sort();
+ existing.references = mergeReferences(item.references, existing.references);
} else {
extractor.strings[item.msgid][context] = item;
} | Automagically kill old references from the same file. |
diff --git a/core/server/helpers/utils.js b/core/server/helpers/utils.js
index <HASH>..<HASH> 100644
--- a/core/server/helpers/utils.js
+++ b/core/server/helpers/utils.js
@@ -9,6 +9,9 @@ const _ = require('lodash');
* with extra diacritics character matching.
**/
module.exports.wordCount = function wordCount(html) {
+ if (!html) {
+ return 0;
+ }
html = html.replace(/<(.|\n)*?>/g, ' '); // strip tags
const pattern = /[a-zA-ZÀ-ÿ0-9_\u0392-\u03c9\u0410-\u04F9]+|[\u4E00-\u9FFF\u3400-\u4dbf\uf900-\ufaff\u3040-\u309f\uac00-\ud7af]+/g;
@@ -34,7 +37,7 @@ module.exports.wordCount = function wordCount(html) {
* @description Takes an HTML string and returns the number of images
**/
module.exports.imageCount = function wordCount(html) {
- return (html.match(/<img(.|\n)*?>/g) || []).length;
+ return html ? (html.match(/<img(.|\n)*?>/g) || []).length : 0;
};
module.exports.findKey = function findKey(key /* ...objects... */) { | 🐛 Returned 0 for word/image count when html is null
refs #<I> |
diff --git a/ansible_runner/interface.py b/ansible_runner/interface.py
index <HASH>..<HASH> 100644
--- a/ansible_runner/interface.py
+++ b/ansible_runner/interface.py
@@ -93,9 +93,8 @@ def init_runner(**kwargs):
event_callback_handler = kwargs.pop('event_handler', None)
status_callback_handler = kwargs.pop('status_handler', None)
artifacts_handler = kwargs.pop('artifacts_handler', None)
- if kwargs.get('cancel_callback'):
- cancel_callback = kwargs.pop('cancel_callback')
- else:
+ cancel_callback = kwargs.pop('cancel_callback', None)
+ if cancel_callback is None:
# attempt to load signal handler. will return None and
# issue warning if we are not in the main thread
cancel_callback = signal_handler() | pop cancel_callback, set to sig. handler if needed |
diff --git a/src/Bulletin.php b/src/Bulletin.php
index <HASH>..<HASH> 100644
--- a/src/Bulletin.php
+++ b/src/Bulletin.php
@@ -234,15 +234,17 @@ class Bulletin extends AbstractModel
$bulletin = (new BulletinFeedback([
'bulletin' => $this,
'receiver' => $member
- ]))->save();
+ ]));
app()->dispatch(new MessageNeedsToBeSent(
- $member->getEmail(),
+ $member,
$this->getTitle(),
'有一条关于您的新通知 [ ' . $this->getTitle() . ' ]' . "\n"
. $this->getAbstract() . "\n\n"
. '详情请登录系统查阅' . "\n"
. env('BASE_URL') . '/bulletin/' . $this->getId() . '/view?token=' . $bulletin->getId()
));
+ // make sure the mail sent out, then save to db
+ $bulletin->save();
}
$this->draft(false)->save();
return $this; | upgrade with core (change to receivers to array of Member); save feedback after sending email |
diff --git a/code/libraries/koowa/libraries/controller/view.php b/code/libraries/koowa/libraries/controller/view.php
index <HASH>..<HASH> 100644
--- a/code/libraries/koowa/libraries/controller/view.php
+++ b/code/libraries/koowa/libraries/controller/view.php
@@ -110,6 +110,7 @@ abstract class KControllerView extends KControllerAbstract implements KControlle
//Create the view
$config = array(
+ 'url' => KRequest::url(),
'model' => $this->getModel(),
'auto_assign' => $this instanceof KControllerModellable
); | re #<I> Pass current URL to view. |
diff --git a/spec/integration/configurer_spec.rb b/spec/integration/configurer_spec.rb
index <HASH>..<HASH> 100755
--- a/spec/integration/configurer_spec.rb
+++ b/spec/integration/configurer_spec.rb
@@ -57,7 +57,9 @@ describe Puppet::Configurer do
@configurer.run :catalog => @catalog, :report => report
t2 = Time.now.tv_sec
- File.stat(Puppet[:lastrunfile]).mode.to_s(8).should == "100666"
+ file_mode = Puppet.features.microsoft_windows? ? '100644' : '100666'
+
+ File.stat(Puppet[:lastrunfile]).mode.to_s(8).should == file_mode
summary = nil
File.open(Puppet[:lastrunfile], "r") do |fd| | Account for Windows file mode translation for lastrunfile
Windows file modes do not directly translate to POSIX file modes, so
we can't use the same file mode on Windows to check that setting the
mode worked correctly. |
diff --git a/icekit/project/settings/_base.py b/icekit/project/settings/_base.py
index <HASH>..<HASH> 100644
--- a/icekit/project/settings/_base.py
+++ b/icekit/project/settings/_base.py
@@ -705,7 +705,7 @@ INSTALLED_APPS += (
'icekit.plugins.links',
'icekit.plugins.map',
'icekit.plugins.map_with_text',
- 'icekit.plugins.oembed_with_caption.apps.OEmbedWithCaptionAppConfig',
+ 'icekit.plugins.oembed_with_caption',
# Replaces 'icekit.plugins.oembed_with_caption',
# Includes fix for https://github.com/django-fluent/django-fluent-contents/issues/65 | fix oembed installed app |
diff --git a/wfe/wfe.go b/wfe/wfe.go
index <HASH>..<HASH> 100644
--- a/wfe/wfe.go
+++ b/wfe/wfe.go
@@ -602,7 +602,11 @@ func (wfe *WebFrontEndImpl) sendError(response http.ResponseWriter, logEvent *re
// Only audit log internal errors so users cannot purposefully cause
// auditable events.
if prob.Type == probs.ServerInternalProblem {
- wfe.log.AuditErr(fmt.Sprintf("Internal error - %s - %s", prob.Detail, ierr))
+ if ierr != nil {
+ wfe.log.AuditErr(fmt.Sprintf("Internal error - %s - %s", prob.Detail, ierr))
+ } else {
+ wfe.log.AuditErr(fmt.Sprintf("Internal error - %s", prob.Detail))
+ }
}
problemDoc, err := marshalIndent(prob) | Don't print %!s(nil) when ierr is nil. (#<I>)
Sometimes sendError gets a nil argument for ierr (internal error). When this
happens we print a line like:
[AUDIT] Internal error - Failed to get registration by key - %!s(<nil>)
This is fine but distracting, since it looks like a logging bug.
Instead, print a shorter message with just the external-facing problem. |
diff --git a/foolbox/ext/native/attacks/basic_iterative_method.py b/foolbox/ext/native/attacks/basic_iterative_method.py
index <HASH>..<HASH> 100644
--- a/foolbox/ext/native/attacks/basic_iterative_method.py
+++ b/foolbox/ext/native/attacks/basic_iterative_method.py
@@ -35,7 +35,14 @@ class L2BasicIterativeAttack:
self.model = model
def __call__(
- self, inputs, labels, *, rescale=True, epsilon=0.3, step_size=0.05, num_steps=10
+ self,
+ inputs,
+ labels,
+ *,
+ rescale=False,
+ epsilon=0.3,
+ step_size=0.05,
+ num_steps=10,
):
if rescale:
min_, max_ = self.model.bounds()
@@ -67,7 +74,14 @@ class LinfinityBasicIterativeAttack:
self.model = model
def __call__(
- self, inputs, labels, *, rescale=True, epsilon=0.3, step_size=0.05, num_steps=10
+ self,
+ inputs,
+ labels,
+ *,
+ rescale=False,
+ epsilon=0.3,
+ step_size=0.05,
+ num_steps=10,
):
if rescale:
min_, max_ = self.model.bounds() | rescale = False by default |
diff --git a/structr/structr-rest/src/main/java/org/structr/rest/resource/TypeResource.java b/structr/structr-rest/src/main/java/org/structr/rest/resource/TypeResource.java
index <HASH>..<HASH> 100644
--- a/structr/structr-rest/src/main/java/org/structr/rest/resource/TypeResource.java
+++ b/structr/structr-rest/src/main/java/org/structr/rest/resource/TypeResource.java
@@ -274,10 +274,10 @@ public class TypeResource extends SortableResource {
}
- checkForIllegalSearchKeys(searchableProperties);
-
if (searchableProperties != null) {
+ checkForIllegalSearchKeys(searchableProperties);
+
for (String key : searchableProperties) {
String searchValue = request.getParameter(key); | added np check for searchable properties |
diff --git a/Annis-Service/src/main/java/annis/dao/GraphExtractor.java b/Annis-Service/src/main/java/annis/dao/GraphExtractor.java
index <HASH>..<HASH> 100644
--- a/Annis-Service/src/main/java/annis/dao/GraphExtractor.java
+++ b/Annis-Service/src/main/java/annis/dao/GraphExtractor.java
@@ -36,9 +36,7 @@ import java.util.Map;
import java.util.Properties;
import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang.Validate;
-import org.apache.log4j.Level;
import org.apache.log4j.Logger;
-import org.apache.log4j.Priority;
import org.springframework.dao.DataAccessException;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.jdbc.core.ResultSetExtractor;
@@ -54,7 +52,6 @@ public class GraphExtractor implements ResultSetExtractor
public enum IslandPolicies
{
context,
- number,
none
} | - removing "number" until it is clear howto implement this |
diff --git a/remote.go b/remote.go
index <HASH>..<HASH> 100644
--- a/remote.go
+++ b/remote.go
@@ -193,6 +193,17 @@ func (wd *remoteWD) execute(method, url string, data []byte) ([]byte, error) {
}
buf, err := ioutil.ReadAll(response.Body)
+
+ // Are we in debug mode, and did we read the response Body successfully?
+ if debugFlag && err == nil {
+ // Pretty print the JSON response
+ prettyBuf := bytes.NewBufferString("")
+ err = json.Indent(prettyBuf, buf, "", " ")
+ if prettyBuf.Len() > 0 {
+ buf = prettyBuf.Bytes()
+ }
+ }
+
debugLog("<- %s [%s]\n%s",
response.Status, response.Header["Content-Type"], buf)
if err != nil { | Added pretty printing of json responses. |
diff --git a/register.js b/register.js
index <HASH>..<HASH> 100644
--- a/register.js
+++ b/register.js
@@ -24,6 +24,20 @@ var options = {
}
};
+function configTransform (transforms, enabled) {
+ options.transforms = options.transforms || {};
+ transforms.forEach(function (transform) {
+ options.transforms[transform.trim()] = enabled;
+ });
+}
+
+if (process.env.BUBLE_OPTION_YES) {
+ configTransform(process.env.BUBLE_OPTION_YES.split(','), true);
+}
+if (process.env.BUBLE_OPTION_NO) {
+ configTransform(process.env.BUBLE_OPTION_NO.split(','), false);
+}
+
function mkdirp ( dir ) {
var parent = path.dirname( dir );
if ( dir === parent ) return;
@@ -38,7 +52,7 @@ function mkdirp ( dir ) {
var home = homedir();
if ( home ) {
- var cachedir = path.join( home, '.buble-cache', nodeVersion );
+ var cachedir = path.join( home, '.buble-cache', '' + nodeVersion );
mkdirp( cachedir );
fs.writeFileSync( path.join( home, '.buble-cache/README.txt' ), 'These files enable a faster startup when using buble/register. You can safely delete this folder at any time. See https://buble.surge.sh/guide/ for more information.' );
} | Fix path.join error in Node <I>; added support for enabling/disabling transforms via env variables |
diff --git a/py/testdir_multi_jvm/test_KMeans_params_rand2.py b/py/testdir_multi_jvm/test_KMeans_params_rand2.py
index <HASH>..<HASH> 100644
--- a/py/testdir_multi_jvm/test_KMeans_params_rand2.py
+++ b/py/testdir_multi_jvm/test_KMeans_params_rand2.py
@@ -9,7 +9,7 @@ import h2o_kmeans, h2o_import as h2i
def define_params():
print "Restricting epsilon to 1e-6 and up. Too slow otherwise and no stopping condition?"
paramDict = {
- 'k': [2, 12],
+ 'k': [2, 5], # seems two slow tih 12 clusters if all cols
'epsilon': [1e-6, 1e-2, 1, 10],
'cols': [None, "0", "3", "0,1,2,3,4,5,6"],
} | reduce max k to 5 (takes too long with <I> and all cols) |
diff --git a/navigation/libandroid-navigation/src/main/java/com/mapbox/services/android/navigation/v5/navigation/NavigationConstants.java b/navigation/libandroid-navigation/src/main/java/com/mapbox/services/android/navigation/v5/navigation/NavigationConstants.java
index <HASH>..<HASH> 100644
--- a/navigation/libandroid-navigation/src/main/java/com/mapbox/services/android/navigation/v5/navigation/NavigationConstants.java
+++ b/navigation/libandroid-navigation/src/main/java/com/mapbox/services/android/navigation/v5/navigation/NavigationConstants.java
@@ -36,7 +36,7 @@ public class NavigationConstants {
* Maximum number of meters the user can travel away from step before the
* {@link OffRouteListener}'s called.
*/
- static final double MAXIMUM_DISTANCE_BEFORE_OFF_ROUTE = 50;
+ static final double MAXIMUM_DISTANCE_BEFORE_OFF_ROUTE = 20;
/**
* Seconds used before a reroute occurs. | Reduce Reroute Threshold (#<I>) |
diff --git a/spec/flipper/ui/actions/feature_spec.rb b/spec/flipper/ui/actions/feature_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/flipper/ui/actions/feature_spec.rb
+++ b/spec/flipper/ui/actions/feature_spec.rb
@@ -31,10 +31,13 @@ RSpec.describe Flipper::UI::Actions::Feature do
context 'when feature_removal_enabled is set to false' do
around do |example|
- @original_feature_removal_enabled = Flipper::UI.feature_removal_enabled
- Flipper::UI.feature_removal_enabled = false
- example.run
- Flipper::UI.feature_removal_enabled = @original_feature_removal_enabled
+ begin
+ @original_feature_removal_enabled = Flipper::UI.feature_removal_enabled
+ Flipper::UI.feature_removal_enabled = false
+ example.run
+ ensure
+ Flipper::UI.feature_removal_enabled = @original_feature_removal_enabled
+ end
end
it 'returns with 403 status' do | Ensure that default config is reset regardless of what happens in example.run |
diff --git a/src/com/esotericsoftware/kryo/Kryo.java b/src/com/esotericsoftware/kryo/Kryo.java
index <HASH>..<HASH> 100644
--- a/src/com/esotericsoftware/kryo/Kryo.java
+++ b/src/com/esotericsoftware/kryo/Kryo.java
@@ -723,8 +723,8 @@ public class Kryo {
}
}
- /** Returns true if null or a reference to a previously read object was read. In this case, the object is stored in
- * {@link #readObject}. Returns false if the object was not a reference and needs to be read. */
+ /** Returns {@link #REF} if a reference to a previously read object was read, which is stored in {@link #readObject}. Returns a
+ * stack size > 0 if a reference ID has been put on the stack. */
int readReferenceOrNull (Input input, Class type, boolean mayBeNull) {
if (type.isPrimitive()) type = getWrapperClass(type);
boolean referencesSupported = referenceResolver.useReferences(type);
@@ -738,12 +738,12 @@ public class Kryo {
}
if (!referencesSupported) {
readReferenceIds.add(NO_REF);
- return NO_REF;
+ return readReferenceIds.size;
}
} else {
if (!referencesSupported) {
readReferenceIds.add(NO_REF);
- return NO_REF;
+ return readReferenceIds.size;
}
id = input.readInt(true);
} | Fixed references. Ermahgerhd! |
diff --git a/webpack.config.js b/webpack.config.js
index <HASH>..<HASH> 100644
--- a/webpack.config.js
+++ b/webpack.config.js
@@ -23,6 +23,7 @@ if (args[0] === '-p') {
output = {
path: dirDist,
filename: 'all.min.js',
+ libraryTarget: 'umd',
};
plugins = [
new webpack.optimize.DedupePlugin(), | feat(lib): Export public API as UMD |
diff --git a/module/index.js b/module/index.js
index <HASH>..<HASH> 100644
--- a/module/index.js
+++ b/module/index.js
@@ -61,7 +61,8 @@ Generator.prototype.moduleTest = function moduleTest() {
var testFW = this.bbb.testFramework;
var specFolder = (testFW === "jasmine") ? "spec" : "tests";
- var dest = path.join("test", testFW, specFolder, this.moduleName + ".js");
+ var ext = (testFW === "jasmine") ? ".spec.js" : ".js";
+ var dest = path.join("test", testFW, specFolder, this.moduleName + ext);
var srcText = this.src.read("test." + testFW + ".js");
var script = _.template(srcText)({ | Add '.spec.js' as Jasmine test extension to match the FW style |
diff --git a/lib/bud/lattice-lib.rb b/lib/bud/lattice-lib.rb
index <HASH>..<HASH> 100644
--- a/lib/bud/lattice-lib.rb
+++ b/lib/bud/lattice-lib.rb
@@ -1,5 +1,10 @@
require 'bud/lattice-core'
+# Float::INFINITY only defined in MRI 1.9.2+
+unless defined? Float::INFINITY
+ Float::INFINITY = 1.0/0.0
+end
+
class Bud::MaxLattice < Bud::Lattice
wrapper_name :lmax | Restore MRI <I> compatibility.
Define Float::INFINITY manually if needed, since it is only defined starting
with MRI <I> |
diff --git a/lib/api.js b/lib/api.js
index <HASH>..<HASH> 100755
--- a/lib/api.js
+++ b/lib/api.js
@@ -1,5 +1,5 @@
var Resource = require('./resource'),
- sys = require('sys'),
+ util = require('util'),
fs = require('fs'),
capitalize = require('./helpers').capitalize,
underscore = require('underscore'),
diff --git a/lib/request.js b/lib/request.js
index <HASH>..<HASH> 100755
--- a/lib/request.js
+++ b/lib/request.js
@@ -1,6 +1,5 @@
var http = require('http'),
querystring = require('querystring'),
- sys = require('sys'),
underscore = require('underscore'),
helpers = require('./helpers'),
oauthHelper = require('./oauth-helper'), | Remove unneeded dependency on deprecated sys module |
diff --git a/pkg/adaptor/mongodb/mongodb.go b/pkg/adaptor/mongodb/mongodb.go
index <HASH>..<HASH> 100644
--- a/pkg/adaptor/mongodb/mongodb.go
+++ b/pkg/adaptor/mongodb/mongodb.go
@@ -366,7 +366,7 @@ func (m *MongoDB) catData() (err error) {
}
// set up the message
- msg := message.MustUseAdaptor("mongodb").From(ops.Insert, m.computeNamespace(collection), result)
+ msg := message.MustUseAdaptor("mongo").From(ops.Insert, m.computeNamespace(collection), result)
m.pipe.Send(msg)
result = bson.M{}
@@ -437,7 +437,7 @@ func (m *MongoDB) tailData() (err error) {
continue
}
- msg := message.MustUseAdaptor("mongodb").From(ops.OpTypeFromString(result.Op), m.computeNamespace(coll), doc).(*mongodb.MongoMessage)
+ msg := message.MustUseAdaptor("mongo").From(ops.OpTypeFromString(result.Op), m.computeNamespace(coll), doc).(*mongodb.MongoMessage)
msg.TS = int64(result.Ts) >> 32
m.oplogTime = result.Ts | use mongo in adaptor naming |
diff --git a/core/src/main/java/org/projectodd/wunderboss/WunderBoss.java b/core/src/main/java/org/projectodd/wunderboss/WunderBoss.java
index <HASH>..<HASH> 100644
--- a/core/src/main/java/org/projectodd/wunderboss/WunderBoss.java
+++ b/core/src/main/java/org/projectodd/wunderboss/WunderBoss.java
@@ -135,7 +135,21 @@ public class WunderBoss {
shutdownWorkerPool();
}
- public static void addShutdownAction(Runnable action) {
+ public synchronized static void addShutdownAction(Runnable action) {
+ if (!shutdownHook) {
+ if (!inContainer()) {
+ Runtime.getRuntime().addShutdownHook(new Thread(new Runnable() {
+ public void run() {
+ try {
+ shutdownAndReset();
+ } catch (Throwable t) {
+ log.warn("Error in WunderBoss shutdown hook", t);
+ }
+ }
+ }));
+ }
+ shutdownHook = true;
+ }
shutdownActions.add(action);
}
@@ -259,5 +273,5 @@ public class WunderBoss {
private static DynamicClassLoader classLoader;
private static ExecutorService workerExecutor;
private static final Logger log = logger(WunderBoss.class);
-
+ private static boolean shutdownHook = false;
} | Run shutdown actions in Runtime shutdown hook [IMMUTANT-<I>]
Only when out-of-container, as actions are already run when app is
undeployed.
The primary motivation for this (other than I thought we already were)
is to drain requests-in-progress with Undertow's GracefulShutdownHandler
before the JVM exits. |
diff --git a/src/marshmallow/schema.py b/src/marshmallow/schema.py
index <HASH>..<HASH> 100644
--- a/src/marshmallow/schema.py
+++ b/src/marshmallow/schema.py
@@ -467,15 +467,12 @@ class BaseSchema(base.SchemaABC):
Renamed from ``marshal``.
"""
if many and obj is not None:
- self._pending = True
- ret = [
+ return [
self._serialize(
d, fields_dict, many=False, dict_class=dict_class, accessor=accessor
)
for d in obj
]
- self._pending = False
- return ret
ret = self.dict_class()
for attr_name, field_obj in fields_dict.items():
if getattr(field_obj, "load_only", False):
@@ -586,7 +583,6 @@ class BaseSchema(base.SchemaABC):
error_store.store_error([self.error_messages["type"]], index=index)
ret = []
else:
- self._pending = True
ret = [
self._deserialize(
d,
@@ -601,7 +597,6 @@ class BaseSchema(base.SchemaABC):
)
for idx, d in enumerate(data)
]
- self._pending = False
return ret
ret = dict_class()
# Check data is a dict | Remove unused _pending attribute (#<I>) |
diff --git a/cmd/influxd/run/server.go b/cmd/influxd/run/server.go
index <HASH>..<HASH> 100644
--- a/cmd/influxd/run/server.go
+++ b/cmd/influxd/run/server.go
@@ -371,7 +371,7 @@ func (s *Server) reportServer() {
json := fmt.Sprintf(`[{
"name":"reports",
- "columns":["os", "arch", "version", "server_id", "id", "num_series", "num_measurements", "num_databases"],
+ "columns":["os", "arch", "version", "server_id", "cluster_id", "num_series", "num_measurements", "num_databases"],
"points":[["%s", "%s", "%s", "%x", ",%x", "%d", "%d", "%d"]]
}]`, runtime.GOOS, runtime.GOARCH, s.Version, s.MetaStore.NodeID(), clusterID, numSeries, numMeasurements, numDatabases) | Remove rogue ID field from reporting |
diff --git a/LeanMapper/Repository.php b/LeanMapper/Repository.php
index <HASH>..<HASH> 100644
--- a/LeanMapper/Repository.php
+++ b/LeanMapper/Repository.php
@@ -81,11 +81,12 @@ abstract class Repository
->where('%n = ?', $primaryKey, $entity->$idField)
->execute();
$entity->markAsUpdated();
-
- return $result;
}
}
$this->persistHasManyChanges($entity);
+ if (isset($result)) {
+ return $result;
+ }
}
/** | Fixed place where Repository::persistHasManyChanges is called |
diff --git a/plugins/compression.js b/plugins/compression.js
index <HASH>..<HASH> 100644
--- a/plugins/compression.js
+++ b/plugins/compression.js
@@ -4,18 +4,21 @@ module.exports = compressionPlugin
function compressionPlugin() {
return {
- decompress: decompress,
- compress: compress,
+ get: get,
+ set: set,
}
- function decompress(_, key) {
- var val = this.get(key)
- if (!val) return val
- return JSON.parse(LZString.decompress(val))
+ function get(super_fn, key, raw) {
+ var val = super_fn(key)
+ if (!val || raw) return val
+ var decompressed = LZString.decompress(val)
+ // fallback to existing values that are not compressed
+ return (decompressed == null) ? val : JSON.parse(decompressed)
}
- function compress(_, key, val) {
+ function set(super_fn, key, val, raw) {
+ if (raw) return super_fn(key, val)
var compressed = LZString.compress(JSON.stringify(val))
- this.set(key, compressed)
+ super_fn(key, compressed)
}
} | update plugin to use get/set methods |
diff --git a/src/components/link.js b/src/components/link.js
index <HASH>..<HASH> 100644
--- a/src/components/link.js
+++ b/src/components/link.js
@@ -105,7 +105,7 @@ export default {
function guardEvent (e) {
// don't redirect with control keys
- if (e.metaKey || e.ctrlKey || e.shiftKey) return
+ if (e.metaKey || e.altKey || e.ctrlKey || e.shiftKey) return
// don't redirect when preventDefault called
if (e.defaultPrevented) return
// don't redirect on right click | Fix Link component to guard the event if alt key is pressed (#<I>) |
diff --git a/pymzn/mzn/solvers.py b/pymzn/mzn/solvers.py
index <HASH>..<HASH> 100644
--- a/pymzn/mzn/solvers.py
+++ b/pymzn/mzn/solvers.py
@@ -142,6 +142,13 @@ class Optimathsat(Solver):
def __init__(self, solver_id='optimathsat'):
super().__init__(solver_id)
+ def args(
+ self, all_solutions=False, num_solutions=None, free_search=False,
+ parallel=None, seed=None, **kwargs
+ ):
+ args = ['-input=fzn']
+ return args
+
class Parser(Solver.Parser):
_line_comm_p = re.compile('%.*') | solvers: add basic Optimathsat args |
diff --git a/lib/pyfrc/wpilib/__init__.py b/lib/pyfrc/wpilib/__init__.py
index <HASH>..<HASH> 100644
--- a/lib/pyfrc/wpilib/__init__.py
+++ b/lib/pyfrc/wpilib/__init__.py
@@ -1,2 +1,2 @@
from .core import *
-
+from ..main import run | Add run function to wpilib so robot code can get at it |
diff --git a/lxd/containers.go b/lxd/containers.go
index <HASH>..<HASH> 100644
--- a/lxd/containers.go
+++ b/lxd/containers.go
@@ -798,7 +798,6 @@ func newLxdContainer(name string, daemon *Daemon) (*lxdContainer, error) {
return nil, err
}
logfile := shared.VarPath("lxc", name, "log")
- fmt.Println(logfile)
err = c.SetConfigItem("lxc.logfile", logfile)
if err != nil {
return nil, err | Don't print the logfile location all the time |
diff --git a/validator/testcases/content.py b/validator/testcases/content.py
index <HASH>..<HASH> 100644
--- a/validator/testcases/content.py
+++ b/validator/testcases/content.py
@@ -272,7 +272,8 @@ def _process_file(err, xpi_package, name, file_data, name_lower,
is_subpackage else
PACKAGE_THEME)
err.set_tier(1)
- supported_versions = err.supported_versions
+ supported_versions = (err.supported_versions.copy()
+ if err.supported_versions else None)
if is_subpackage:
testendpoint_validator.test_inner_package(err, sub_xpi) | Preserve initial supported apps dict for later restoration |
diff --git a/src/Pho/Framework/AclCore.php b/src/Pho/Framework/AclCore.php
index <HASH>..<HASH> 100644
--- a/src/Pho/Framework/AclCore.php
+++ b/src/Pho/Framework/AclCore.php
@@ -50,6 +50,26 @@ class AclCore {
}
/**
+ * Getter for the Creator object.
+ *
+ * @return Actor
+ */
+ public function creator(): Actor
+ {
+ return $this->creator;
+ }
+
+ /**
+ * Getter for the Context object.
+ *
+ * @return ContextInterface
+ */
+ public function context(): ContextInterface
+ {
+ return $this->context;
+ }
+
+ /**
* Converts the object into a portable PHP array
*
* Useful for custom serialization. | minor improvements; added getter methods for core properties |
diff --git a/openfisca_core/formulas.py b/openfisca_core/formulas.py
index <HASH>..<HASH> 100644
--- a/openfisca_core/formulas.py
+++ b/openfisca_core/formulas.py
@@ -17,7 +17,7 @@ from . import holders, periods
from .parameters import ParameterNotFound
from .periods import MONTH, YEAR, ETERNITY
from .commons import empty_clone, stringify_array
-from .indexed_enums import Enum
+from .indexed_enums import Enum, EnumArray
log = logging.getLogger(__name__)
@@ -515,11 +515,12 @@ class Formula(object):
nan_count).encode('utf-8'))
except TypeError:
pass
+
+ if self.holder.variable.value_type == Enum and not isinstance(array, EnumArray):
+ array = self.holder.variable.possible_values.encode(array)
+
if array.dtype != variable.dtype:
- if self.holder.variable.value_type == Enum:
- self.holder.variable.possible_values.encode(array)
- else:
- array = array.astype(variable.dtype)
+ array = array.astype(variable.dtype)
self.clean_cycle_detection_data()
if max_nb_cycles is not None: | Encode enums when formula result is an int array |
diff --git a/keanu-project/src/main/java/io/improbable/keanu/plating/loop/Loop.java b/keanu-project/src/main/java/io/improbable/keanu/plating/loop/Loop.java
index <HASH>..<HASH> 100644
--- a/keanu-project/src/main/java/io/improbable/keanu/plating/loop/Loop.java
+++ b/keanu-project/src/main/java/io/improbable/keanu/plating/loop/Loop.java
@@ -128,7 +128,7 @@ public class Loop {
if (throwWhenMaxCountIsReached) {
throw new LoopException(errorMessage);
} else {
- log.warn(errorMessage);
+ log.info(errorMessage);
}
}
} | logger should only give INFO (not WARN) if max count has been reached but the user told it not to throw |
diff --git a/packages/express/lib/serve.js b/packages/express/lib/serve.js
index <HASH>..<HASH> 100644
--- a/packages/express/lib/serve.js
+++ b/packages/express/lib/serve.js
@@ -13,7 +13,7 @@ module.exports = (mode, { configureServer }) => {
{ phases }
);
const router = new Router();
- const app = configureServer(express().use(router), middlewares, mode);
+ const app = configureServer(express(), middlewares, mode).use(router);
debug(middlewares);
phases.forEach((phase) =>
middlewares[phase].forEach((middleware) => | fix(express): reinstate previous behaviour, broken in #<I> |
diff --git a/tests/ResourceGeneratorTest.php b/tests/ResourceGeneratorTest.php
index <HASH>..<HASH> 100644
--- a/tests/ResourceGeneratorTest.php
+++ b/tests/ResourceGeneratorTest.php
@@ -87,7 +87,7 @@ class ResourceGeneratorTest extends TestCase
public function tearDown()
{
parent::tearDown();
- //$this->rmdir($this->temporaryDirectory);
+ $this->rmdir($this->temporaryDirectory);
}
protected function rmdir(string $dir) | Clean up tmp directory after running tests |
diff --git a/kik_unofficial/datatypes/xmpp/group_adminship.py b/kik_unofficial/datatypes/xmpp/group_adminship.py
index <HASH>..<HASH> 100644
--- a/kik_unofficial/datatypes/xmpp/group_adminship.py
+++ b/kik_unofficial/datatypes/xmpp/group_adminship.py
@@ -45,7 +45,7 @@ class UnbanRequest(XMPPElement):
data = ('<iq type="set" id="{}">'
'<query xmlns="kik:groups:admin">'
'<g jid="{}">'
- '<b r="1">{}</m>'
+ '<b r="1">{}</b>'
'</g>'
'</query>'
'</iq>').format(self.message_id, self.group_jid, self.peer_jid)
@@ -62,7 +62,7 @@ class BanMemberRequest(XMPPElement):
data = ('<iq type="set" id="{}">'
'<query xmlns="kik:groups:admin">'
'<g jid="{}">'
- '<b>{}</m>'
+ '<b>{}</b>'
'</g>'
'</query>'
'</iq>').format(self.message_id, self.group_jid, self.peer_jid) | Fix malformed XML for (un)ban requests |
diff --git a/go/vt/vttablet/tabletmanager/vreplication/engine.go b/go/vt/vttablet/tabletmanager/vreplication/engine.go
index <HASH>..<HASH> 100644
--- a/go/vt/vttablet/tabletmanager/vreplication/engine.go
+++ b/go/vt/vttablet/tabletmanager/vreplication/engine.go
@@ -60,8 +60,6 @@ const (
table_name varbinary(128),
lastpk varbinary(2000),
primary key (vrepl_id, table_name))`
-
- warmUpQuery = "select 1 from _vt.vreplication limit 1"
)
var withDDL *withddl.WithDDL
@@ -151,9 +149,6 @@ func (vre *Engine) InitDBConfig(dbcfgs *dbconfigs.DBConfigs) {
return binlogplayer.NewDBClient(dbcfgs.FilteredWithDB())
}
vre.dbName = dbcfgs.DBName
-
- // Ensure the schema is created as early as possible
- go vre.Exec(warmUpQuery)
}
// NewTestEngine creates a new Engine for testing. | engine's early schema creation did not work as expected. Not improtant on this branch's radar |
diff --git a/web/concrete/authentication/concrete/controller.php b/web/concrete/authentication/concrete/controller.php
index <HASH>..<HASH> 100644
--- a/web/concrete/authentication/concrete/controller.php
+++ b/web/concrete/authentication/concrete/controller.php
@@ -2,6 +2,7 @@
namespace Concrete\Authentication\Concrete;
use \Concrete\Core\Authentication\AuthenticationTypeController;
use User;
+use Loader;
class Controller extends AuthenticationTypeController {
public $apiMethods = array('forgot_password', 'change_password'); | fixed missing loader that broke my first login
Former-commit-id: a<I>c<I>f<I>a<I>c2ebb<I>d<I>b<I>a2b5c1ed<I>c |
diff --git a/lib/Predis/Connection/PhpiredisConnection.php b/lib/Predis/Connection/PhpiredisConnection.php
index <HASH>..<HASH> 100644
--- a/lib/Predis/Connection/PhpiredisConnection.php
+++ b/lib/Predis/Connection/PhpiredisConnection.php
@@ -236,10 +236,10 @@ class PhpiredisConnection extends AbstractConnection
$host = $parameters->host;
if (ip2long($host) === false) {
- if (($address = gethostbyname($host)) === $host) {
+ if (($addresses = gethostbynamel($host)) === false) {
$this->onConnectionError("Cannot resolve the address of $host");
}
- return $address;
+ return $addresses[array_rand($addresses)];
}
return $host; | Use a random IP when a host has several IPs.
Using gethostbyname, we will reuse the same (first) IP address for
each request. Here, we choose the IP we use randomly.
This is practical in a case where we have multiple redis read-only
slaves that can't invidually support the full application load, but are
accessible through a single hostname. |
diff --git a/spyder/app/mainwindow.py b/spyder/app/mainwindow.py
index <HASH>..<HASH> 100644
--- a/spyder/app/mainwindow.py
+++ b/spyder/app/mainwindow.py
@@ -1232,6 +1232,7 @@ class MainWindow(QMainWindow):
plugin.dockwidget.raise_()
# Hide Python console until we remove it
+ self.extconsole.close_console()
self.extconsole.toggle_view_action.setChecked(False)
# Show history file if no console is visible
diff --git a/spyder/plugins/externalconsole.py b/spyder/plugins/externalconsole.py
index <HASH>..<HASH> 100644
--- a/spyder/plugins/externalconsole.py
+++ b/spyder/plugins/externalconsole.py
@@ -888,9 +888,8 @@ class ExternalConsole(SpyderPluginWidget):
if isinstance(sw, pythonshell.ExternalPythonShell):
consoles = True
break
- # Don't create consoles by default
- #if not consoles:
- # self.open_interpreter()
+ if not consoles:
+ self.open_interpreter()
else:
self.dockwidget.hide() | Python console: Fix error while creating history log file at startup |
diff --git a/pandas/core/series.py b/pandas/core/series.py
index <HASH>..<HASH> 100644
--- a/pandas/core/series.py
+++ b/pandas/core/series.py
@@ -103,11 +103,11 @@ class Series(base.IndexOpsMixin, strings.StringAccessorMixin,
"""
One-dimensional ndarray with axis labels (including time series).
- Labels need not be unique but must be any hashable type. The object
+ Labels need not be unique but must be a hashable type. The object
supports both integer- and label-based indexing and provides a host of
methods for performing operations involving the index. Statistical
methods from ndarray have been overridden to automatically exclude
- missing data (currently represented as NaN)
+ missing data (currently represented as NaN).
Operations between Series (+, -, /, *, **) align values based on their
associated index values-- they need not be the same length. The result
@@ -118,8 +118,8 @@ class Series(base.IndexOpsMixin, strings.StringAccessorMixin,
data : array-like, dict, or scalar value
Contains data stored in Series
index : array-like or Index (1d)
- Values must be unique and hashable, same length as data. Index
- object (or other iterable of same length as data) Will default to
+ Values must be hashable and have the same length as `data`.
+ Non-unique index values are allowed. Will default to
RangeIndex(len(data)) if not provided. If both a dict and index
sequence are used, the index will override the keys found in the
dict. | DOC: Correct uniqueness of index for Series (#<I>) |
diff --git a/src/fng-ui-select.js b/src/fng-ui-select.js
index <HASH>..<HASH> 100644
--- a/src/fng-ui-select.js
+++ b/src/fng-ui-select.js
@@ -265,7 +265,7 @@
defaultPlaceholder = 'Start typing...'
}
// set up the ui-select directives
- var select = '<ui-select ' + multiStr + buildingBlocks.common + requiredStr + disabledStr + ' theme="' + theme + '" style="width:300px;">'
+ var select = '<ui-select ' + multiStr + buildingBlocks.common + requiredStr + disabledStr + ' theme="' + theme + '" style="min-width:18em;">'
select += '<ui-select-match' + allowClearStr + ' placeholder="' + (processedAttr.info.placeholder || defaultPlaceholder) + '">'; | Change hard coded width to min-width |
diff --git a/lib/Clever/Student.php b/lib/Clever/Student.php
index <HASH>..<HASH> 100644
--- a/lib/Clever/Student.php
+++ b/lib/Clever/Student.php
@@ -27,6 +27,7 @@ class CleverStudent extends CleverApiResource
'school' => array(),
'district' => array(),
'teachers' => array(),
+ 'contacts' => array(),
'events' => array());
}
public function __call($method, $args) | Added the 'contacts' API endpoint to the Student object |
diff --git a/packages/material-ui/src/StepLabel/StepLabel.js b/packages/material-ui/src/StepLabel/StepLabel.js
index <HASH>..<HASH> 100644
--- a/packages/material-ui/src/StepLabel/StepLabel.js
+++ b/packages/material-ui/src/StepLabel/StepLabel.js
@@ -79,6 +79,7 @@ const StepLabel = React.forwardRef(function StepLabel(props, ref) {
classes,
className,
error = false,
+ icon: iconProp,
optional,
StepIconComponent: StepIconComponentProp,
StepIconProps,
@@ -86,7 +87,8 @@ const StepLabel = React.forwardRef(function StepLabel(props, ref) {
} = props;
const { alternativeLabel, orientation } = React.useContext(StepperContext);
- const { active, disabled, completed, icon } = React.useContext(StepContext);
+ const { active, disabled, completed, icon: iconContext } = React.useContext(StepContext);
+ const icon = iconProp || iconContext;
let StepIconComponent = StepIconComponentProp; | [Stepper] Fix the icon prop support in StepLabel (#<I>) |
diff --git a/fileutil/fileutil.go b/fileutil/fileutil.go
index <HASH>..<HASH> 100644
--- a/fileutil/fileutil.go
+++ b/fileutil/fileutil.go
@@ -122,7 +122,7 @@ func ReadStringFromFile(pth string) (string, error) {
// this is the "permissions" info, which can be passed directly to
// functions like WriteBytesToFileWithPermission or os.OpenFile
func GetFileModeOfFile(pth string) (os.FileMode, error) {
- finfo, err := os.Stat(pth)
+ finfo, err := os.Lstat(pth)
if err != nil {
return 0, err
}
diff --git a/pathutil/pathutil.go b/pathutil/pathutil.go
index <HASH>..<HASH> 100644
--- a/pathutil/pathutil.go
+++ b/pathutil/pathutil.go
@@ -39,7 +39,7 @@ func genericIsPathExists(pth string) (os.FileInfo, bool, error) {
if pth == "" {
return nil, false, errors.New("No path provided")
}
- fileInf, err := os.Stat(pth)
+ fileInf, err := os.Lstat(pth)
if err == nil {
return fileInf, true, nil
} | Use `Lstat` instead of `Stat` in `genericIsPathExists` & `GetFileModeOfFile`
The difference is symbolic links.
`Lstat`: If the file is a symbolic link, the returned FileInfo describes the symbolic link. Lstat makes no attempt to follow the link. |
diff --git a/km3pipe/pumps/tests/test_evt.py b/km3pipe/pumps/tests/test_evt.py
index <HASH>..<HASH> 100644
--- a/km3pipe/pumps/tests/test_evt.py
+++ b/km3pipe/pumps/tests/test_evt.py
@@ -81,7 +81,7 @@ class TestEvtParser(TestCase):
"end_event:"
))
- self.pump = EvtPump()
+ self.pump = EvtPump(None)
self.pump.blob_file = StringIO(self.valid_evt_header)
def tearDown(self): | Fixes broken test due to new positional argument 'filename' in pumps |
diff --git a/app/main.go b/app/main.go
index <HASH>..<HASH> 100644
--- a/app/main.go
+++ b/app/main.go
@@ -83,7 +83,7 @@ func (r *realize) Increase() {
rLimit.Cur = r.Limit
err := syscall.Setrlimit(syscall.RLIMIT_NOFILE, &rLimit)
if err != nil {
- fmt.Println(c.Red("Error Setting Rlimit "), err)
+ log.Fatal(c.Red("Error Setting Rlimit "), err)
}
} | fatal error if the system can't set a rlimit |
diff --git a/pyrsistent.py b/pyrsistent.py
index <HASH>..<HASH> 100644
--- a/pyrsistent.py
+++ b/pyrsistent.py
@@ -6,7 +6,6 @@ from numbers import Integral
import sys
import six
-import warnings
def _bitcount(val):
@@ -706,13 +705,6 @@ class PMap(object):
evolver.remove(key)
return evolver.pmap()
- def merge(self, *maps):
- """
- Deprecated, use update() instead!
- """
- warnings.warn("Deprecated! Use update() instead!", DeprecationWarning)
- return self.update(*maps)
-
def update(self, *maps):
"""
Return a new PMap with the items in Mappings inserted. If the same key is present in multiple
@@ -724,13 +716,6 @@ class PMap(object):
"""
return self.update_with(lambda l, r: r, *maps)
- def merge_with(self, merge_fn, *maps):
- """
- Deprecated, use update_with() instead!
- """
- warnings.warn("Deprecated! Use update_with() instead!", DeprecationWarning)
- return self.update_with(merge_fn, *maps)
-
def update_with(self, update_fn, *maps):
"""
Return a new PMap with the items in Mappings maps inserted. If the same key is present in multiple | Removed deprecated merge and merge_with on PMap |
diff --git a/indra/sources/geneways/__init__.py b/indra/sources/geneways/__init__.py
index <HASH>..<HASH> 100644
--- a/indra/sources/geneways/__init__.py
+++ b/indra/sources/geneways/__init__.py
@@ -1 +1 @@
-from .geneways_api import process_geneways_files
+from .api import process_geneways_files | Refactor: geneways_api to api |
diff --git a/Eloquent/Relations/MorphTo.php b/Eloquent/Relations/MorphTo.php
index <HASH>..<HASH> 100644
--- a/Eloquent/Relations/MorphTo.php
+++ b/Eloquent/Relations/MorphTo.php
@@ -151,7 +151,11 @@ class MorphTo extends BelongsTo
{
$class = Model::getActualClassNameForMorph($type);
- return new $class;
+ return tap(new $class, function ($instance) {
+ if (! $instance->getConnectionName()) {
+ $instance->setConnection($this->getConnection()->getName());
+ }
+ });
}
/** | Set relation connection on eager loaded MorphTo |
diff --git a/src/python/atomistica/mdcore_io.py b/src/python/atomistica/mdcore_io.py
index <HASH>..<HASH> 100644
--- a/src/python/atomistica/mdcore_io.py
+++ b/src/python/atomistica/mdcore_io.py
@@ -121,7 +121,9 @@ def read_atoms(fn, cycfn=None, pos_only=False, conv=1.0):
l2 = f.readline()
l3 = f.readline()
- this.set_cell( [ map(float, l1.split()), map(float, l2.split()), map(float, l3.split()) ] )
+ this.set_cell( [ [float(x) for x in l1.split()],
+ [float(x) for x in l2.split()],
+ [float(x) for x in l3.split()] ] )
l = None
@@ -131,7 +133,7 @@ def read_atoms(fn, cycfn=None, pos_only=False, conv=1.0):
while l and l[0] not in [ '<', '#' ]:
s = l.split()
- aux += [ map(float, s) ]
+ aux += [ [float(x) for x in s] ]
l = f.readline().strip() | MAINT: Python-3 compatibility. |
diff --git a/lib/arjdbc/db2/adapter.rb b/lib/arjdbc/db2/adapter.rb
index <HASH>..<HASH> 100644
--- a/lib/arjdbc/db2/adapter.rb
+++ b/lib/arjdbc/db2/adapter.rb
@@ -424,8 +424,9 @@ module ArJdbc
end
end
- def remove_index(table_name, options = { })
- execute "DROP INDEX #{quote_column_name(index_name(table_name, options))}"
+ # @override
+ def remove_index!(table_name, index_name)
+ execute "DROP INDEX #{quote_column_name(index_name)}"
end
# http://publib.boulder.ibm.com/infocenter/db2luw/v9r7/topic/com.ibm.db2.luw.admin.dbobj.doc/doc/t0020130.html | [DB2] Fix error on named index removing |
diff --git a/thefuck/rules/no_such_file.py b/thefuck/rules/no_such_file.py
index <HASH>..<HASH> 100644
--- a/thefuck/rules/no_such_file.py
+++ b/thefuck/rules/no_such_file.py
@@ -3,7 +3,9 @@ import re
patterns = (
r"mv: cannot move '[^']*' to '([^']*)': No such file or directory",
+ r"mv: cannot move '[^']*' to '([^']*)': Not a directory",
r"cp: cannot create regular file '([^']*)': No such file or directory",
+ r"cp: cannot create regular file '([^']*)': Not a directory",
) | Add missing cases for the `no_such_file` rule |
diff --git a/libnetwork/drivers/ipvlan/ipvlan_network.go b/libnetwork/drivers/ipvlan/ipvlan_network.go
index <HASH>..<HASH> 100644
--- a/libnetwork/drivers/ipvlan/ipvlan_network.go
+++ b/libnetwork/drivers/ipvlan/ipvlan_network.go
@@ -38,7 +38,6 @@ func (d *driver) CreateNetwork(nid string, option map[string]interface{}, nInfo
if err != nil {
return err
}
- config.ID = nid
err = config.processIPAM(nid, ipV4Data, ipV6Data)
if err != nil {
return err
@@ -212,6 +211,7 @@ func parseNetworkOptions(id string, option options.Generic) (*configuration, err
config.Internal = true
}
}
+ config.ID = id
return config, nil
} | libnetwork: ipvlan: set network ID as part of parseNetworkOptions |
diff --git a/core/server/data/migrations/versions/3.22/02-settings-key-renames.js b/core/server/data/migrations/versions/3.22/02-settings-key-renames.js
index <HASH>..<HASH> 100644
--- a/core/server/data/migrations/versions/3.22/02-settings-key-renames.js
+++ b/core/server/data/migrations/versions/3.22/02-settings-key-renames.js
@@ -16,7 +16,11 @@ const renameMappings = [{
from: 'brand',
to: 'accent_color',
getToValue: (fromValue) => {
- return JSON.parse(fromValue).primaryColor || '';
+ try {
+ return JSON.parse(fromValue).primaryColor || '';
+ } catch (err) {
+ return '';
+ }
},
getFromValue: (toValue) => {
return JSON.stringify({ | Fixed migration when brand setting is null
refs #<I>
This would throw if the setting was null, we catch and use the default
instead. |
diff --git a/integration_tests/test_files.py b/integration_tests/test_files.py
index <HASH>..<HASH> 100644
--- a/integration_tests/test_files.py
+++ b/integration_tests/test_files.py
@@ -13,7 +13,7 @@ class Test_make_unreadable_file(unittest.TestCase):
def test(self):
path = os.path.join(self.tmp, "unreadable")
make_unreadable_file(path)
- with self.assertRaises(OSError):
+ with self.assertRaises(IOError):
read_file(path)
def tearDown(self): | Really fix in compatibility with python <I> |
diff --git a/web/concrete/blocks/image/view.php b/web/concrete/blocks/image/view.php
index <HASH>..<HASH> 100644
--- a/web/concrete/blocks/image/view.php
+++ b/web/concrete/blocks/image/view.php
@@ -26,7 +26,7 @@ if (is_object($f)) {
<? } ?>
<script>
$(function() {
- $('.bID-<?php echo $bID;?>')
+ $('.bID-<?php print $bID;?>')
.mouseover(function(e){$(this).attr("src", '<?php print $imgPath["hover"];?>');})
.mouseout(function(e){$(this).attr("src", '<?php print $imgPath["default"];?>');});
}); | amended echo to print for consistency in view.php
Former-commit-id: 4b<I>a8cd<I>c<I>ed<I>e<I>f7abd4aff5f |
diff --git a/kv/service.go b/kv/service.go
index <HASH>..<HASH> 100644
--- a/kv/service.go
+++ b/kv/service.go
@@ -77,7 +77,9 @@ func NewService(log *zap.Logger, kv Store, configs ...ServiceConfig) *Service {
if len(configs) > 0 {
s.Config = configs[0]
- } else {
+ }
+
+ if s.Config.SessionLength == 0 {
s.Config.SessionLength = influxdb.DefaultSessionLength
} | refactor(kv): when no session length is set, use the default
In the past, the default was only being set if a service config wasn't
provided. But if a service config was provided and gave a zero value, it
would not fill in the default value. This changes the code so that it
will always set the default value if the session length is set to zero. |
diff --git a/js/btcmarkets.js b/js/btcmarkets.js
index <HASH>..<HASH> 100644
--- a/js/btcmarkets.js
+++ b/js/btcmarkets.js
@@ -44,7 +44,7 @@ module.exports = class btcmarkets extends Exchange {
'www': 'https://btcmarkets.net',
'doc': [
'https://api.btcmarkets.net/doc/v3#section/API-client-libraries',
- 'https://github.com/BTCMarkets/API'
+ 'https://github.com/BTCMarkets/API',
],
},
'api': { | btcmarkets dangling comma |
diff --git a/lib/jumpstart_auth.rb b/lib/jumpstart_auth.rb
index <HASH>..<HASH> 100644
--- a/lib/jumpstart_auth.rb
+++ b/lib/jumpstart_auth.rb
@@ -8,6 +8,25 @@ class JumpstartAuth
:consumer_secret => "M0XkT6GeBnjxdlWHcSGYX1JutMVS9D5ISlkqRfShg"
}
+ def self.client_class
+ @client_class ||= Class.new(Twitter::Client) do
+ def update(message)
+ if message.match(/^d\s/i) then
+ d, name, *rest = message.chomp.split
+ message.sub!(/.*#{name}\s/, '')
+
+ begin
+ Twitter.direct_message_create(name, message)
+ rescue Twitter::Error::Forbidden
+ end
+ else
+ super(message)
+ end
+ end
+ end
+ end
+ private_class_method :client_class
+
def self.twitter
setup_oauth unless load_settings
Twitter.configure do |config|
@@ -17,7 +36,7 @@ class JumpstartAuth
config.oauth_token_secret = @@credentials[:oauth_secret]
end
- return Twitter::Client.new
+ return client_class.new
end
private
@@ -47,4 +66,4 @@ private
@@credentials[:oauth_secret] = access_token.secret
write_settings
end
-end
\ No newline at end of file
+end | Simulate previous DM behavior
Previously, Twitter updates with leading 'd' were interpreted as DMs. Simulating that via subclassing the client class. |
diff --git a/stratosphere-core/src/main/java/eu/stratosphere/core/fs/FileSystem.java b/stratosphere-core/src/main/java/eu/stratosphere/core/fs/FileSystem.java
index <HASH>..<HASH> 100644
--- a/stratosphere-core/src/main/java/eu/stratosphere/core/fs/FileSystem.java
+++ b/stratosphere-core/src/main/java/eu/stratosphere/core/fs/FileSystem.java
@@ -200,7 +200,8 @@ public abstract class FileSystem {
}
catch (URISyntaxException e) {
// we tried to repair it, but could not. report the scheme error
- throw new IOException("FileSystem: Scheme is null. file:// or hdfs:// are example schemes.");
+ throw new IOException("FileSystem: Scheme is null. file:// or hdfs:// are example schemes. "
+ + "Failed for " + uri.toString() + ".");
}
}
@@ -213,7 +214,8 @@ public abstract class FileSystem {
// Try to create a new file system
if (!FSDIRECTORY.containsKey(uri.getScheme())) {
- throw new IOException("No file system found with scheme " + uri.getScheme());
+ throw new IOException("No file system found with scheme " + uri.getScheme()
+ + ". Failed for " + uri.toString() + ".");
}
Class<? extends FileSystem> fsClass = null; | FS.get(): Add URI causing exception to message. |
diff --git a/mongo_connector/connector.py b/mongo_connector/connector.py
index <HASH>..<HASH> 100644
--- a/mongo_connector/connector.py
+++ b/mongo_connector/connector.py
@@ -66,6 +66,17 @@ class Connector(threading.Thread):
LOG.warning('No doc managers specified, using simulator.')
self.doc_managers = (simulator.DocManager(),)
+ if not pymongo.has_c():
+ warning = ('pymongo version %s was installed without the C '
+ 'extensions. "InvalidBSON: Date value out of '
+ 'range" errors may occur if there are documents '
+ 'with BSON Datetimes that represent times outside of '
+ 'Python\'s datetime.datetime limit.') % (
+ pymongo.__version__,)
+ # Print and warn to make it extra noticeable
+ print(warning)
+ LOG.warning(warning)
+
# Password for authentication
self.auth_key = kwargs.pop('auth_key', None) | Log a warning regarding missing pymongo C extensions. (#<I>) |
diff --git a/core/ViewDataTable/Sparkline.php b/core/ViewDataTable/Sparkline.php
index <HASH>..<HASH> 100644
--- a/core/ViewDataTable/Sparkline.php
+++ b/core/ViewDataTable/Sparkline.php
@@ -108,7 +108,10 @@ class Sparkline extends ViewDataTable
$columns = $this->viewProperties['columns_to_display'];
$columnToPlot = false;
if (!empty($columns)) {
- $columnToPlot = $columns[0];
+ $columnToPlot = reset($columns);
+ if ($columnToPlot == 'label') {
+ $columnToPlot = next($columns);
+ }
}
$values = false;
// a Set is returned when using the normal code path to request data from Archives, in all core plugins
diff --git a/plugins/MultiSites/Controller.php b/plugins/MultiSites/Controller.php
index <HASH>..<HASH> 100644
--- a/plugins/MultiSites/Controller.php
+++ b/plugins/MultiSites/Controller.php
@@ -226,7 +226,6 @@ class Controller extends \Piwik\Controller
$api = "Goals.get";
}
$view = $this->getLastUnitGraph($this->pluginName, __FUNCTION__, $api);
- $view->columns_to_display = $columns;
return $this->renderView($view, $fetch);
}
} | Fix regression in MultiSites controller (sparklines would not display). |
diff --git a/unyt/array.py b/unyt/array.py
index <HASH>..<HASH> 100644
--- a/unyt/array.py
+++ b/unyt/array.py
@@ -357,7 +357,8 @@ class unyt_array(np.ndarray):
set, input_units *must* be a valid unit object. Defaults to False.
name : string
The name of the array. Defaults to None. This attribute does not propagate
- through operations.
+ through mathematical operations, but is preserved under indexing
+ and unit conversions.
Examples
--------
@@ -545,7 +546,7 @@ class unyt_array(np.ndarray):
# it's a str.
units = Unit(input_units, registry=registry)
- # Attach the units
+ # Attach the units and name
obj.units = units
obj.name = name
return obj
@@ -1957,7 +1958,8 @@ class unyt_quantity(unyt_array):
The dtype of the array data.
name : string
The name of the scalar. Defaults to None. This attribute does not propagate
- through operations.
+ through mathematical operations, but is preserved under indexing
+ and unit conversions.
Examples
-------- | address review comments
- in array.py, clarify name attribute docstring and comment |
diff --git a/template.go b/template.go
index <HASH>..<HASH> 100644
--- a/template.go
+++ b/template.go
@@ -210,8 +210,10 @@ func (p *Package) writeHeader(w io.Writer) error {
fmt.Fprintf(&buf, "package %s\n", p.Name)
// Write deduped imports.
- var decls = make(map[string]*ast.ImportSpec)
+ var decls = map[string]bool{`:"fmt"`: true, `:"io"`: true}
fmt.Fprint(&buf, "import (\n")
+ fmt.Fprintln(&buf, `"fmt"`)
+ fmt.Fprintln(&buf, `"io"`)
for _, d := range f.Decls {
d, ok := d.(*ast.GenDecl)
if !ok || d.Tok != token.IMPORT {
@@ -227,9 +229,10 @@ func (p *Package) writeHeader(w io.Writer) error {
id += ":" + s.Path.Value
// Ignore any imports which have already been imported.
- if decls[id] != nil {
+ if decls[id] {
continue
}
+ decls[id] = true
// Otherwise write it.
if s.Name == nil { | Automatically include fmt and io packages. |
diff --git a/wpull/version.py b/wpull/version.py
index <HASH>..<HASH> 100644
--- a/wpull/version.py
+++ b/wpull/version.py
@@ -32,5 +32,5 @@ def get_version_tuple(string):
return (major, minor, patch, level, serial)
-__version__ = '0.34a1'
+__version__ = '0.35a1'
version_info = get_version_tuple(__version__) | Bumps version to <I>a1.
[ci skip] |
diff --git a/ayrton/__init__.py b/ayrton/__init__.py
index <HASH>..<HASH> 100644
--- a/ayrton/__init__.py
+++ b/ayrton/__init__.py
@@ -198,5 +198,6 @@ def run (code, globals, locals):
runner.run ()
def main (script=None, file=None, **kwargs):
+ global runner
runner= Ayrton (script=script, file=file, **kwargs)
runner.run () | @ revert reference to global. |
diff --git a/core-bundle/src/Composer/ScriptHandler.php b/core-bundle/src/Composer/ScriptHandler.php
index <HASH>..<HASH> 100644
--- a/core-bundle/src/Composer/ScriptHandler.php
+++ b/core-bundle/src/Composer/ScriptHandler.php
@@ -85,7 +85,7 @@ class ScriptHandler
$phpPath,
$event->getIO()->isDecorated() ? ' --ansi' : '',
$cmd,
- static::getVerbosityFlag($event)
+ self::getVerbosityFlag($event)
)
); | [Core] Fix an issue found by Scrutinizer. |
diff --git a/src/Screen/Fields/Cropper.php b/src/Screen/Fields/Cropper.php
index <HASH>..<HASH> 100644
--- a/src/Screen/Fields/Cropper.php
+++ b/src/Screen/Fields/Cropper.php
@@ -30,6 +30,7 @@ namespace Orchid\Screen\Fields;
* @method Cropper popover(string $value = null)
* @method Cropper title(string $value = null)
* @method Cropper maxFileSize($value = true)
+ * @method Cropper storage($value = null)
*/
class Cropper extends Picture
{
diff --git a/src/Screen/Fields/Picture.php b/src/Screen/Fields/Picture.php
index <HASH>..<HASH> 100644
--- a/src/Screen/Fields/Picture.php
+++ b/src/Screen/Fields/Picture.php
@@ -21,6 +21,7 @@ use Orchid\Support\Init;
* @method Picture popover(string $value = null)
* @method Picture title(string $value = null)
* @method Picture maxFileSize($value = true)
+ * @method Picture storage($value = null)
*/
class Picture extends Field
{ | add storage to Cropper and Image metadata (#<I>)
Add storage method to metadata |
diff --git a/lib/server-code/services/api-server.js b/lib/server-code/services/api-server.js
index <HASH>..<HASH> 100644
--- a/lib/server-code/services/api-server.js
+++ b/lib/server-code/services/api-server.js
@@ -154,7 +154,7 @@ class ApiServerService {
return this.sendRequest('services/debug', opts)
.then(res => {
if (res.statusCode === 200) {
- logger.info(`Service ${service.name} successfully deployed`);
+ logger.info(`Service ${service.name} successfully registered`);
} else {
throw failureRespError(res, `register service ${service.name}`);
} | fix (log) confusing msg 'service deployed' in debug mode |
diff --git a/peer.go b/peer.go
index <HASH>..<HASH> 100644
--- a/peer.go
+++ b/peer.go
@@ -535,6 +535,9 @@ func (p *peer) loadActiveChannels(chans []*channeldb.OpenChannel) (
FeeRate: selfPolicy.FeeProportionalMillionths,
TimeLockDelta: uint32(selfPolicy.TimeLockDelta),
}
+ if forwardingPolicy.MaxHTLC > MaxPaymentMSat {
+ forwardingPolicy.MaxHTLC = MaxPaymentMSat
+ }
} else {
peerLog.Warnf("Unable to find our forwarding policy "+
"for channel %v, using default values",
@@ -1866,6 +1869,9 @@ out:
FeeRate: defaultPolicy.FeeRate,
TimeLockDelta: defaultPolicy.TimeLockDelta,
}
+ if forwardingPolicy.MaxHTLC > MaxPaymentMSat {
+ forwardingPolicy.MaxHTLC = MaxPaymentMSat
+ }
// Create the link and add it to the switch.
err = p.addLink( | peer: clamp a link's max HTLC forwarding policy to current max HTLC pay size
In this commit, we start to clamp the max HTLC forwarding policy to the
current register max HTLC payment size. By doing this, we ensure that
any links that have a advertised max HTLC transit size above the max
payment size will reject any incoming or outgoing attempts for such
large payments. |
diff --git a/src/formatters/json.js b/src/formatters/json.js
index <HASH>..<HASH> 100644
--- a/src/formatters/json.js
+++ b/src/formatters/json.js
@@ -1,7 +1,7 @@
/*eslint no-console: "off"*/
function printResults(results) {
- console.log(JSON.stringify(results));
+ console.error(JSON.stringify(results));
}
module.exports = {
diff --git a/src/formatters/stylish.js b/src/formatters/stylish.js
index <HASH>..<HASH> 100644
--- a/src/formatters/stylish.js
+++ b/src/formatters/stylish.js
@@ -64,12 +64,12 @@ function printResults(results) {
results.forEach(function(result) {
if (result.errors.length > 0) {
- console.log(stylizeFilePath(result.filePath));
+ console.error(stylizeFilePath(result.filePath));
result.errors.forEach(function(error) {
- console.log(stylizeError(error, maxErrorMsgLength, maxLineChars));
+ console.error(stylizeError(error, maxErrorMsgLength, maxLineChars));
});
- console.log('\n');
+ console.error('\n');
}
});
} | fix: use console.error instead of console.log
this fixes e.g. output in a Jenkins console, since normal console.log statements are mapped to INFO instead of ERROR |
diff --git a/cruzdb/__init__.py b/cruzdb/__init__.py
index <HASH>..<HASH> 100644
--- a/cruzdb/__init__.py
+++ b/cruzdb/__init__.py
@@ -109,7 +109,6 @@ class Genome(object):
_direction=None):
assert _direction in (None, "up", "down")
-
# they sent in a feature
if start is None:
assert end is None
@@ -125,14 +124,15 @@ class Genome(object):
qstart, qend = start, end
res = self.bin_query(table, chrom, qstart, qend)
- change = 400
+ i, change = 1, 350
while res.count() < k:
if _direction in (None, "up"):
if qstart == 0 and _direction == "up": break
qstart = max(0, qstart - change)
if _direction in (None, "down"):
qend += change
- change *= 2
+ i += 1
+ change *= (i + 5)
res = self.bin_query(table, chrom, qstart, qend)
def dist(f):
d = 0 | heurisitic to improve query speed |
diff --git a/freshroastsr700/__init__.py b/freshroastsr700/__init__.py
index <HASH>..<HASH> 100644
--- a/freshroastsr700/__init__.py
+++ b/freshroastsr700/__init__.py
@@ -220,6 +220,8 @@ class freshroastsr700(object):
self.state_transition_func()
else:
self.idle()
+ else:
+ time.sleep(0.01)
def get_roaster_state(self):
"""Returns a string based upon the current state of the roaster. Will | Put a small sleep in the timer function else case
To prevent high CPU usage, adding a small sleep in the else logic.
This should also alleviate some UI lag issues in Openroast once you plug the roaster in. I found that the tight loop in the timer thread was taking so much CPU that the UI responsiveness would drop to about one second for a click on my machine. |
diff --git a/grpc/src/main/java/com/linecorp/armeria/internal/grpc/ArmeriaMessageFramer.java b/grpc/src/main/java/com/linecorp/armeria/internal/grpc/ArmeriaMessageFramer.java
index <HASH>..<HASH> 100644
--- a/grpc/src/main/java/com/linecorp/armeria/internal/grpc/ArmeriaMessageFramer.java
+++ b/grpc/src/main/java/com/linecorp/armeria/internal/grpc/ArmeriaMessageFramer.java
@@ -160,7 +160,7 @@ public class ArmeriaMessageFramer implements AutoCloseable {
return compressed;
}
- private ByteBuf writeUncompressed(ByteBuf message) throws IOException {
+ private ByteBuf writeUncompressed(ByteBuf message) {
int messageLength = message.readableBytes();
if (maxOutboundMessageSize >= 0 && messageLength > maxOutboundMessageSize) {
throw Status.RESOURCE_EXHAUSTED | [Trivial] ArmeriaMessageFramer#writeUncompressed does not throw IOException anymore (#<I>) |
diff --git a/public/js/chrome/analytics.js b/public/js/chrome/analytics.js
index <HASH>..<HASH> 100644
--- a/public/js/chrome/analytics.js
+++ b/public/js/chrome/analytics.js
@@ -93,7 +93,7 @@ var analytics = {
archive: function (url) {
analytics.track('button', 'archive', url);
},
- unarchive: function () {
+ unarchive: function (url) {
analytics.track('button', 'unarchive', url);
},
loadGist: function (id) { | Fixed #<I>
Analytics was throwing exception |
diff --git a/lib/web_translate_it/tasks.rb b/lib/web_translate_it/tasks.rb
index <HASH>..<HASH> 100755
--- a/lib/web_translate_it/tasks.rb
+++ b/lib/web_translate_it/tasks.rb
@@ -85,10 +85,7 @@ private
WELCOME_SCREEN = <<-EO_WELCOME
-<banner>Web Translate It for Ruby on Rails</banner>
-Should you need help, please visit:
-<b>*</b> https://webtranslateit.com/help
-<b>*</b> https://webtranslateit.com/forum
+<banner>Web Translate It</banner>
EO_WELCOME | Gem, not plugin. Also makes banner less annoying |
diff --git a/lib/build.py b/lib/build.py
index <HASH>..<HASH> 100644
--- a/lib/build.py
+++ b/lib/build.py
@@ -22,7 +22,7 @@ import distorm3
try:
from PyInstaller import main as PyInstallerMain
except ImportError:
- logging.error("PyInstaller missing")
+ logging.warn("PyInstaller missing")
from grr.lib import config_lib
from grr.lib import rdfvalue | Lowered severity of PyInstaller import error |
diff --git a/core/block_svg.js b/core/block_svg.js
index <HASH>..<HASH> 100644
--- a/core/block_svg.js
+++ b/core/block_svg.js
@@ -998,8 +998,9 @@ Blockly.BlockSvg.prototype.updatePreviews = function(closestConnection,
// Remove an insertion marker if needed. For Scratch-Blockly we are using
// grayed-out blocks instead of highlighting the connection; for compatibility
// with Web Blockly the name "highlightedConnection" will still be used.
- if (Blockly.highlightedConnection_ &&
- Blockly.highlightedConnection_ != closestConnection) {
+ if (Blockly.highlightedConnection_ && Blockly.localConnection_ &&
+ (Blockly.highlightedConnection_ != closestConnection ||
+ Blockly.localConnection_ != localConnection)) {
if (Blockly.insertionMarker_ && Blockly.insertionMarkerConnection_) {
Blockly.BlockSvg.disconnectInsertionMarker();
} | Allow moving an insertion marker leftwards, take 2
By recognising an insertion marker as invalid if localConnection has
changed, not just if highlightedConnection has changed. |
diff --git a/generator/sbpg/generator.py b/generator/sbpg/generator.py
index <HASH>..<HASH> 100755
--- a/generator/sbpg/generator.py
+++ b/generator/sbpg/generator.py
@@ -88,10 +88,15 @@ def main():
"Invalid output directory: %s. Exiting!" % output_dir
# Ingest, parse, and validate.
test_mode = args.test_c
+
if test_mode:
file_index = yaml.resolve_test_deps(*yaml.get_files(input_file))
else:
file_index = yaml.resolve_deps(*yaml.get_files(input_file))
+
+ # Sort the files - we need them to be in a stable order for some test generation
+ file_index_items = sorted(file_index.items(), key=lambda f: f[0])
+
if verbose:
print "Reading files..."
pprint.pprint(file_index.keys())
@@ -102,7 +107,7 @@ def main():
else:
spec_no = 0
all_specs = []
- for fname, spec in file_index.items():
+ for fname, spec in file_index_items:
spec_no = spec_no + 1
if test_mode:
parsed = yaml.parse_test_spec(fname, spec, spec_no) | Sort spec files before generating code - this should prevent files from being reordered arbitrarily when Make is run on different machines |
diff --git a/lib/roma/async_process.rb b/lib/roma/async_process.rb
index <HASH>..<HASH> 100644
--- a/lib/roma/async_process.rb
+++ b/lib/roma/async_process.rb
@@ -749,6 +749,15 @@ module Roma
if count>0
@log.info("#{__method__}:#{count} keys deleted.")
end
+
+ # delete @rttable.logs
+ if @stats.gui_run_gather_logs || @rttable.logs.empty?
+ false
+ else
+ gathered_time = @rttable.logs[0]
+ # delete gathering log data after 5min
+ @rttable.logs.clear if gathered_time.to_i < Time.now.to_i - (60 * 5)
+ end
ensure
@log.info("#{__method__}:stop")
end
@@ -962,7 +971,8 @@ module Roma
}
@rttable.logs = target_logs
-# set expiration date
+ # set gathered date for expiration
+ @rttable.logs.unshift(Time.now)
@log.debug("#{__method__} has done.")
rescue =>e | add gathered date for expiration in clean_up process |
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -70,7 +70,7 @@ setuptools.setup(
tests_require=tests_require,
cmdclass=setup.get_cmdclass(),
include_package_data=False,
- packages=setuptools.find_packages('.'),
+ packages=setuptools.find_packages(exclude=['tests', 'tests.*']),
package_data=PackageData,
eager_resources=EagerResources,
entry_points={ | Exclude top level 'tests dir' from packages.
In 8fbe6d we moved 'tests' to be top level. As such it makes
since to now exclude it from quantumclient packages.
Change-Id: I<I>b0bd4f<I>b<I>c<I>ff<I>b8e<I>cba<I>ce<I>a5 |
diff --git a/lib/ace/renderloop.js b/lib/ace/renderloop.js
index <HASH>..<HASH> 100644
--- a/lib/ace/renderloop.js
+++ b/lib/ace/renderloop.js
@@ -37,7 +37,7 @@
define(function(require, exports, module) {
-var event = require("ace/lib/event")
+var event = require("ace/lib/event").event;
var RenderLoop = function(onRender) {
this.onRender = onRender; | fix path left behind due to changeset clash |
diff --git a/nfc/clf.py b/nfc/clf.py
index <HASH>..<HASH> 100644
--- a/nfc/clf.py
+++ b/nfc/clf.py
@@ -549,7 +549,10 @@ class ContactlessFrontend(object):
raise IOError(errno.ENODEV, os.strerror(errno.ENODEV))
with self.lock:
- return self.dev.exchange(send_data, timeout)
+ log.debug(">>> %s %.3fs" % (str(send_data).encode("hex"), timeout))
+ rcvd_data = self.dev.exchange(send_data, timeout)
+ log.debug("<<< %s" % str(rcvd_data).encode("hex"))
+ return rcvd_data
def set_communication_mode(self, brm, **kwargs):
"""Set the hardware communication mode. The effect of calling | debug log tx/rx data in clf exchange method |
diff --git a/mod/scorm/locallib.php b/mod/scorm/locallib.php
index <HASH>..<HASH> 100644
--- a/mod/scorm/locallib.php
+++ b/mod/scorm/locallib.php
@@ -567,6 +567,13 @@ function scorm_insert_track($userid, $scormid, $scoid, $attempt, $element, $valu
// Create status submitted event.
$event = \mod_scorm\event\status_submitted::create($data);
}
+ // Fix the missing track keys when the SCORM track record already exists, see $trackdata in datamodel.php.
+ // There, for performances reasons, columns are limited to: element, id, value, timemodified.
+ // Missing fields are: userid, scormid, scoid, attempt.
+ $track->userid = $userid;
+ $track->scormid = $scormid;
+ $track->scoid = $scoid;
+ $track->attempt = $attempt;
// Trigger submitted event.
$event->add_record_snapshot('scorm_scoes_track', $track);
$event->add_record_snapshot('course_modules', $cm); | MDL-<I> mod_scorm: Fixed the missing keys when updating a record.
Thanks to Rajesh Taneja for his testing. |
diff --git a/lib/node.js b/lib/node.js
index <HASH>..<HASH> 100644
--- a/lib/node.js
+++ b/lib/node.js
@@ -28,6 +28,7 @@ var node = module.exports = {
}
var txn = this._safeBatch();
var node = txn.save(obj);
+ if (obj[this.options.id] != null) node = txn.read(obj);
txn.label(node, label);
return this._safeBatchCommit(txn, function(err, result) {
if (err) callback(err); | support updating nodes with a label. closes #<I> |
diff --git a/sprinter/recipes/git.py b/sprinter/recipes/git.py
index <HASH>..<HASH> 100644
--- a/sprinter/recipes/git.py
+++ b/sprinter/recipes/git.py
@@ -33,8 +33,8 @@ class GitRecipe(RecipeStandard):
call("git pull origin %s" % (config['branch'] if 'branch' in config else 'master'))
def __clone_repo(self, repo_url, target_directory, branch=None):
- call("git clone %s %s" % (repo_url, target_directory))
+ self.logger.info(call("git clone %s %s" % (repo_url, target_directory)))
if branch:
os.chdir(target_directory)
- call("git fetch origin %s" % branch)
- call("git checkout %s" % branch)
+ self.logger.info(call("git fetch origin %s" % branch))
+ self.logger.info(call("git checkout %s" % branch)) | making git recipe more verbose |
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -21,7 +21,7 @@ import setuptools
setuptools.setup(
name='brozzler',
- version='1.1b3',
+ version='1.1b4.dev59',
description='Distributed web crawling with browsers',
url='https://github.com/internetarchive/brozzler',
author='Noah Levitt', | back to a dev version number |
diff --git a/neurom/io/neurolucida.py b/neurom/io/neurolucida.py
index <HASH>..<HASH> 100644
--- a/neurom/io/neurolucida.py
+++ b/neurom/io/neurolucida.py
@@ -88,7 +88,7 @@ def _get_tokens(morph_fd):
Note: this also strips newlines and comments
'''
- for line in morph_fd.readlines():
+ for line in morph_fd:
line = line.rstrip() # remove \r\n
line = line.split(';', 1)[0] # strip comments
squash_token = [] # quoted strings get squashed into one token
@@ -263,7 +263,7 @@ def read(morph_file, data_wrapper=DataWrapper):
warnings.warn(msg)
L.warning(msg)
- with open(morph_file) as morph_fd:
+ with open(morph_file, encoding='utf-8', errors='replace') as morph_fd:
sections = _parse_sections(morph_fd)
raw_data = _sections_to_raw_data(sections)
return data_wrapper(raw_data, 'NL-ASCII') | Encoding error handling in NeuroLucida reader
Use error='replace' when opening the file.
This causes unknown bytes to be replaced by '?' instead
of having the reader crashing |
diff --git a/python_modules/libraries/dagster-mysql/dagster_mysql/schedule_storage/schedule_storage.py b/python_modules/libraries/dagster-mysql/dagster_mysql/schedule_storage/schedule_storage.py
index <HASH>..<HASH> 100644
--- a/python_modules/libraries/dagster-mysql/dagster_mysql/schedule_storage/schedule_storage.py
+++ b/python_modules/libraries/dagster-mysql/dagster_mysql/schedule_storage/schedule_storage.py
@@ -45,7 +45,7 @@ class MySQLScheduleStorage(SqlScheduleStorage, ConfigurableClass):
)
table_names = retry_mysql_connection_fn(db.inspect(self._engine).get_table_names)
- if "schedules" not in table_names or "jobs" not in table_names:
+ if "jobs" not in table_names:
with self.connect() as conn:
alembic_config = mysql_alembic_config(__file__)
retry_mysql_creation_fn(lambda: ScheduleStorageSqlMetadata.create_all(conn)) | [dagster-mysql] Fixing schedule storage stamp_alembic_rev error
Summary: `stamp_alembic_rev` was erroring out when using `dagster-daemon run` since it was being called incorrectly. |
diff --git a/symfit/api.py b/symfit/api.py
index <HASH>..<HASH> 100644
--- a/symfit/api.py
+++ b/symfit/api.py
@@ -3,7 +3,7 @@ import symfit.core.operators
# Expose useful objects.
from symfit.core.fit import (
- Fit, Model, Constraint, ODEModel, ModelError, CallableModel,
+ Fit, Model, ODEModel, ModelError, CallableModel,
CallableNumericalModel, GradientModel
)
from symfit.core.fit_results import FitResults | Remove Constraint objects from the API |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.